Skip to content

About

DocuMind AI reads contracts in plain English. Paste or upload a PDF, Word or TXT file to get a summary, risks rated High, Medium or Low, and findings linked to the exact clause. Accept, Ignore or Flag each risk, then export a revised document with safer wording and a comparison report. Not legal advice.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

DocuMind AI logo

Understand any contract in plain English. Review it, fix it, sign with confidence.

An Anna app that reads your agreement, rates its risks, links every finding to the exact clause, lets you Accept, Ignore or Flag each one, and exports a revised document with a comparison report.


Platform Status AI Servers Build


Overview · Features · How it works · Getting Started · Privacy


Table of Contents


Overview

Most people sign contracts they do not fully understand. DocuMind AI turns legal wording into a clear, actionable review.

Paste text or upload a PDF, Word (.docx) or TXT file (up to 15 MB). The app first detects what kind of document it is:

  • Contracts and agreements (leases, rentals, employment, NDAs, services, terms of service) get a full contract review: summary, key facts, important clauses, obligations, risks rated High, Medium or Low, and questions for a lawyer.
  • Anything else (articles, reports, essays, scripts) gets a general summary, so a legal template is never forced onto text that is not a contract.

Your original document sits beside the analysis. Click a finding and its exact clause is highlighted. Then Accept, Ignore or Flag each risk, add your own comments, and export a revised document with safer wording plus a comparison report.

Know what you are signing, and what to ask before you do.


Availability

DocuMind AI runs inside the Anna platform. It has no public link yet: the listing goes live once the current version is approved. The full source code is in this repository.


The Problem and Our Solution

The problem

  • Contracts are long, dense and written for lawyers.
  • Generic AI summaries do not show where in the document a risk comes from, so they are hard to trust.
  • Spotting a risk is only half the job: people still need better wording to negotiate with.
Need How DocuMind AI addresses it
Understand the document quickly Plain-language summary, key facts, clauses and obligations
Know what is risky Risks rated High, Medium or Low, each with a suggested next step
Trust the findings Every finding is linked to its clause, highlighted in your original text
Stay in control Accept, Ignore or Flag each finding, with your own comments
Negotiate better Safer replacement wording you can edit, then export as a revised document
Keep a record Save reports, reopen them with all decisions, export as PDF
Not everything is a contract Non-contract text gets a general summary instead

Key Features

  • Smart document routing: a contract check combining an AI classification with a local check of contract language (parties, duties, payment, termination, liability, governing law, numbered clauses, signature lines), so real agreements always get a contract review.
  • Contract review: summary, key facts, important clauses, key obligations, risks (High / Medium / Low), action items and questions for a lawyer.
  • Linked highlighting: your original text beside the analysis, with the matching clause highlighted for every finding.
  • Reliable clause matching on long contracts: exact, whitespace and quote tolerant, partial-quote and best-sentence matching, with the AI choosing among the likeliest excerpts when needed.
  • Decision workflow: Accept, Ignore or Flag each risk, with a comment box on every finding.
  • Safer wording: one focused rewrite per risk, editable by you. If matching or rewriting fails you can Try again, Use my selection (select the clause yourself) or Write my own wording.
  • Revised document: accepted wording replaces the original clause. Export as PDF or Word (.docx) with a comparison report on the last page.
  • Saved reports: save, reopen with decisions and comments restored, export as PDF, or delete.
  • Three clear sections: New analysis, Saved reports and About.
  • General summaries: key facts, main points, questions to consider and next steps for non-contract text.
  • File import: PDF (PDF.js), Word (Mammoth.js) and TXT, read in your browser.
  • Zero build step: plain HTML, CSS and JavaScript.

How DocuMind AI Works

Step Stage Description
01 Add Paste text or upload a PDF, Word or TXT file.
02 Detect The app decides: contract review or general summary.
03 Analyze Anna AI produces findings with quotes from your document.
04 Review Accept, Ignore or Flag, comment, and edit safer wording.
05 Export Save the report, or export the revised document and comparison.
flowchart LR
    A["You<br/>paste or upload"] --> B["01 Add<br/>text or file"]
    B --> C["02 Detect<br/>contract or not"]
    C --> D["03 Analyze<br/>Anna AI"]
    D --> E["04 Review<br/>Accept / Ignore / Flag"]
    E --> F["05 Export<br/>revised document + report"]

    style A fill:#2a1a3d,stroke:#8E4EC6,color:#fff
    style B fill:#1b1f2a,stroke:#f5a524,color:#fff
    style C fill:#0f1e4a,stroke:#0090FF,color:#fff
    style D fill:#0f3d2a,stroke:#30A46C,color:#fff
    style E fill:#3d2a0f,stroke:#f5a524,color:#fff
    style F fill:#3d0f14,stroke:#E5484D,color:#fff
Loading

System Architecture

DocuMind AI is a static app that runs inside Anna. It has no servers or database of its own. The Anna runtime provides the AI call and per-user storage.

flowchart TB
    subgraph ANNA["Anna platform"]
        LLM["anna.llm.complete<br/>AI analysis"]
        STO["anna.storage<br/>saved reports"]
    end

    subgraph APP["DocuMind AI bundle"]
        IDX["index.html<br/>layout, tabs, styles"]
        JS["app.js<br/>routing, review workflow, exports"]
        PDF["vendor/pdfjs<br/>PDF text extraction"]
        DOC["vendor/mammoth<br/>Word text extraction"]
    end

    USER["You"] --> IDX
    IDX --> JS
    JS --> PDF
    JS --> DOC
    JS -- "classify, analyze, rewrite" --> LLM
    JS -- "save and reopen" --> STO
    JS -- "PDF / Word export in your browser" --> USER

    style ANNA fill:#0f3d2a,stroke:#30A46C,color:#fff
    style APP fill:#1b1f2a,stroke:#f5a524,color:#fff
Loading

Components

Component Responsibility
bundle/index.html Layout, the three tabs, the review workspace and styles
bundle/app.js Document routing, prompts, analysis parsing, clause matching, review workflow, saved reports, PDF and Word export
bundle/vendor/pdfjs Reads text from uploaded PDFs in the browser
bundle/vendor/mammoth Reads text from uploaded Word files in the browser
manifest.json · app.json Anna app manifest and configuration
PRIVACY.md Privacy policy

Workflow Diagrams

Analysis and Routing

A wrong or unreadable AI answer can never hide a real agreement.

flowchart TD
    A["Document text"] --> B["AI classification<br/>retried once if unreadable"]
    A --> C["Local contract check<br/>parties, duties, terms, clauses"]
    B --> D{"Decide route"}
    C --> D
    D -- "Strong contract language" --> L["Contract review"]
    D -- "AI says legal" --> L
    D -- "Otherwise" --> G["General summary"]
    G --> O["Button: this is a contract,<br/>run contract review"]
    O --> L

    style L fill:#0f3d2a,stroke:#30A46C,color:#fff
    style G fill:#0f1e4a,stroke:#0090FF,color:#fff
Loading

Matching a Risk to its Clause

flowchart TD
    A["Risk with quoted evidence"] --> B{"Exact or whitespace/quote tolerant match?"}
    B -- "Yes" --> S["Clause found: expand to the whole sentence"]
    B -- "No" --> C{"Partial quote or best word-overlap sentence?"}
    C -- "Yes" --> S
    C -- "No" --> D["Show the 3 likeliest excerpts to the AI"]
    D --> E{"AI picks one?"}
    E -- "Yes" --> S
    E -- "No" --> M["You decide: Use my selection<br/>or Write my own wording"]
    S --> R["One focused rewrite for that clause"]

    style S fill:#0f3d2a,stroke:#30A46C,color:#fff
    style M fill:#3d2a0f,stroke:#f5a524,color:#fff
Loading

Review and Revised Document

stateDiagram-v2
    [*] --> Pending: finding created
    Pending --> Accepted: Accept
    Pending --> Ignored: Ignore
    Pending --> Flagged: Flag
    Accepted --> Pending: undo
    Ignored --> Pending: undo
    Flagged --> Pending: undo
    Accepted --> Revised: has wording
    Revised --> Exported: PDF / Word + comparison
    note right of Accepted
        accepted without wording does not
        change the document; the app says so
    end note
Loading

Using the App

  1. Open DocuMind AI in Anna and go to New analysis.
  2. Paste text or upload a PDF, Word or TXT file, then click Analyze.
  3. For a contract, read the summary and the risks. Click Show in document to see the clause.
  4. Accept, Ignore or Flag each risk and add your comments. Edit the suggested wording if you like.
  5. Open the Revised tab to see the full updated document, then export it as PDF or Word, with a comparison report.
  6. Click Save report. Find it later under Saved reports, where you can reopen, export or delete it.
Section What it shows
New analysis Your current document and review
Saved reports Search, reopen, export or delete earlier reviews
About What the app does, its privacy and limits

Tech Stack

Layer Technology
Platform Anna App (static bundle) with the AnnaAppRuntime SDK
AI anna.llm.complete
Storage anna.storage (per-user saved reports)
Front end Vanilla HTML, CSS and JavaScript. Single bundle, no build step
File import PDF.js (PDF) and Mammoth.js (Word)
Export Hand-built PDF and Word (.docx) writers that run in the browser
CLI Anna CLI (anna-app)

Project Structure

DocuMind-AI/
├── assets/
│   └── logo.svg                 Project logo (README)
├── bundle/                      The app (what Anna runs)
│   ├── index.html               Layout, tabs and styles
│   ├── app.js                   Routing, review workflow, exports
│   └── vendor/                  PDF.js and Mammoth.js
├── executas/documind-ai/        Anna executa configuration
├── screenshots/                 Listing screenshots
├── app.json · manifest.json     Anna app configuration
├── PRIVACY.md                   Privacy policy
└── README.md

Getting Started

Prerequisites

  • The Anna CLI (anna-app) and an Anna account
  • Git (and the GitHub CLI gh if you push from the terminal)

Run locally

anna-app login --host https://anna.partners
anna-app validate
anna-app dev --slug documind-ai

Open the app in the Anna runtime, paste a contract and click Analyze.

Release a new version

anna-app validate
anna-app apps push --cwd . --skip-executa-publish
anna-app apps cut <next-version> --changelog "What changed"
anna-app apps versions documind-ai
anna-app apps submit-review

Check that submit-review prints under review: v<next-version>. A version cut after a submission is not part of that review.


Privacy and Security

  • Your text goes to Anna AI: when you click Analyze, the document text is sent to Anna's AI service. Avoid confidential or personal information you are not comfortable sharing.
  • Saved reports live in Anna's per-app storage under your account. You can delete any report at any time. Original text is stored for documents up to 60,000 characters.
  • No servers of our own: no database, no ads, no trackers, nothing sold.
  • Exports stay on your device: PDF and Word files are created in your browser and are not uploaded.
  • Safe rendering: everything shown from documents or AI output is HTML-escaped.

Read the full privacy policy.

Not legal advice. DocuMind AI provides informational support only. AI can make mistakes. Always verify important decisions with a qualified professional.


Limitations

  • AI can be wrong: always check quotations and wording against the original.
  • PDF export is basic Latin only: use the Word export to keep every language and character.
  • Large documents: original text is not stored with a saved report above 60,000 characters, so highlighting and revisions are unavailable when you reopen it.
  • Scanned PDFs: pages that are only images contain no text to read.

Roadmap

  • Contract review with risks linked to original clauses
  • Accept, Ignore and Flag workflow with comments
  • Safer wording, revised document and comparison report
  • Saved reports, PDF and Word export
  • Smart routing between contract review and general summary
  • Reliable matching for long contracts, with manual fallbacks
  • Side-by-side comparison of two contract versions
  • Clause library with preferred wording
  • More languages

Author

Built by Hajrajadoon for the Anna platform.


DocuMind AI · Understand contracts in plain English.

Informational support only. Not legal advice.

About

DocuMind AI reads contracts in plain English. Paste or upload a PDF, Word or TXT file to get a summary, risks rated High, Medium or Low, and findings linked to the exact clause. Accept, Ignore or Flag each risk, then export a revised document with safer wording and a comparison report. Not legal advice.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages