[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-113807":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},113807,"open-doc-review","enveda\u002Fopen-doc-review","enveda","Advisory AI document review that bolts onto any ECM (Box, SharePoint, local). MIT licensed.",null,"Python",259,19,1,0,179,190,73.9,"MIT License",false,"main",true,[],"2026-11-03 17:08:54","2026-11-23 16:02:23","# open-doc-review\n\nAdvisory AI document review that bolts onto the content-management system (ECM) you already use.\n\nWhen a document lands in your ECM, open-doc-review:\n\n1. **classifies** it into one of the document types you define, and saves the type as metadata,\n2. **extracts** the fields you define for that type into metadata,\n3. **finds the reference documents** it must agree with (by matching extracted fields: an invoice's\n   PO number finds the purchase order),\n4. **reviews** it against those references with Claude, using **your** prompts, and\n5. **writes the findings beside the document**: one comment per finding (severity, page, what was\n   compared), a summary comment, and review metadata.\n\nA reference that arrives later triggers a re-review, and long PDFs are reviewed in page windows.\n\n> **Align it with your own policies.** The example document types, fields, prompts and severity levels\n> are starting points, not a standard. Before relying on any result, make them reflect your organization's\n> own policies, procedures, specifications and regulatory obligations; have the policy owners approve the\n> wording; and check the results with `docreview eval`. Every starter prompt carries this notice in its\n> header. Nothing in this project is legal, quality or regulatory advice.\n\nIt never edits, moves, renames or deletes a document. The ECM port has no method that could. Every\nfinding is advisory: a person decides what to do with it.\n\n```mermaid\nflowchart LR\n    ECM[(\"Your ECM\u003Cbr\u002F>(via its adapter)\")]\n    C[\"1 · Classify\"]\n    X[\"2 · Extract fields\"]\n    F[\"3 · Find references\"]\n    R[\"4 · Review\"]\n    YOU[\u002F\"Your prompts +\u003Cbr\u002F>document-type config\"\u002F]\n    LOG[(\"Audit log\u003Cbr\u002F>every model call\")]\n\n    ECM -- \"new or changed document\" --> C\n    C -- \"writes: document type\" --> ECM\n    C --> X\n    X -- \"writes: field values\" --> ECM\n    X --> F\n    F -- \"searches by field values\" --> ECM\n    F --> R\n    R -- \"writes: comments + review outcome\" --> ECM\n    YOU -.-> C & X & R\n    C & X & R -.-> LOG\n```\n\nEach step writes its own result into the ECM as soon as it has it. The document type and fields are\ntherefore searchable (and correctable by a person) before the review runs, and a person's correction is\nrespected on the next pass.\n\n## What you bring\n\n| You provide | Where | Example |\n|---|---|---|\n| Document types and their fields | `docreview.yaml` → `doc_types` | invoice: `invoice_number`, `po_number`, `total` |\n| How to find references | `doc_types.\u003Ctype>.review.references` | invoice → purchase order where `po_number` matches |\n| Prompts, in your own words and style | a folder of Markdown files | `prompts\u002Freview\u002Finvoice.md`, started from `examples\u002Fprompt_templates\u002Freview_template.md` |\n| Documents with known problems, to check it works | `expected.yaml` + a test folder | `examples\u002Fgeneric\u002Fexpected.yaml` |\n| A connection to your ECM | an adapter: `local`, `box`, or your own | see [docs\u002FADAPTERS.md](docs\u002FADAPTERS.md) |\n\nWhat's in `examples\u002F`:\n\n| Folder | What it is |\n|---|---|\n| `shared_prompts\u002F` | Generic starter system, classification and extraction prompts, written for any document type. |\n| `prompt_templates\u002F` | A fill-in review prompt template: checks, exclusions, severity, how to report. |\n| `generic\u002F` | The quick-start example: an invoice checked against a purchase order, and a batch record against its master record. |\n| `starter_pack\u002F` | Ready-to-copy examples: three-way invoice match, certificate of analysis against a specification, contract against standard terms, and a policy checklist with no references. |\n\nAll of it is illustrative. Copy it, then replace the wording with your own.\n\n## Quick start (no ECM needed)\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fenveda\u002Fopen-doc-review.git && cd open-doc-review\nuv sync                                   # or: pip install -e .\nexport ANTHROPIC_API_KEY=...              # or: ant auth login\ncd examples\u002Fgeneric\nuv run docreview check                    # validates config, prompts and the adapter\nuv run docreview templates                # shows the metadata it will write (for Box\u002FSharePoint: the setup script)\nuv run docreview run --once               # reviews the sample documents in library\u002F\nuv run docreview estimate                 # rough tokens and cost before you run anything (no model calls)\nuv run docreview eval --runs 3            # scores the review against the planted problems (expected.yaml)\n```\n\n### What you'll see\n\nThe example library holds two made-up pairs of documents. Each document under review has four planted\nmistakes, so you can check that the review catches them.\n\n**A supplier invoice** (`library\u002Finbox\u002FINV-2041.txt`), checked against the purchase order it cites\n(`library\u002Fpurchase_orders\u002FPO-7730.txt`):\n\n1. It bills 550 widgets; the PO ordered 500.\n2. Brackets are charged at 0.95; the agreed price is 0.85.\n3. It adds a 60.00 expedite fee that is not on the PO.\n4. The total says 1,460.00; the lines add up to 1,450.00.\n\n**An executed batch record** (`library\u002Finbox\u002FEBR-B24-0117.txt`), checked against the master batch record it\nwas made to (`library\u002Fmaster_batch_records\u002FMBR-0042.txt`), found by MBR number and version:\n\n1. 10.40 kg of active ingredient was dispensed; the limit is 10.00 kg ± 1% (10.10 kg at most).\n2. The drying inlet air was 68 °C; the limit is 55–65 °C.\n3. The blend step has no second-person verification, which the MBR requires.\n4. The yield is 91.2%; the acceptable range is 95.0–102.0%.\n\nNone of the out-of-limit results has a deviation recorded. Nothing in these files refers to a real product,\ncompany or batch.\n\nThe local adapter has no ECM to write to, so after the run it saves results **in a new file next to each\ndocument**, such as `INV-2041.txt.docreview.json`. (With Box or SharePoint, the same results appear as metadata\nand comments on the file.) This file does not exist until you run the example. Trimmed, it looks like this;\nthe wording of the findings varies from run to run:\n\n```json\n{\n  \"classification\": {\"doc_type\": \"invoice\", \"processed_version\": \"3f9c0d1e2a7b\", \"...\": \"...\"},\n  \"fields\": {\"invoice_number\": \"INV-2041\", \"po_number\": \"PO-7730\", \"supplier\": \"Acme Widgets Co.\",\n             \"invoice_date\": \"2026-09-18\", \"total\": 1460.0, \"currency\": \"USD\"},\n  \"review\": {\"outcome\": \"blocking_findings\",\n             \"finding_counts\": {\"blocker\": 1, \"major\": 3, \"minor\": 0, \"info\": 0},\n             \"references\": {\"Purchase order\": \"purchase_orders\u002FPO-7730.txt\"}, \"...\": \"...\"},\n  \"comments\": [\n    {\"text\": \"[BLOCKER] Invoice total does not add up\\nLines sum to 1,450.00 but the total states 1,460.00.\"},\n    {\"text\": \"[MAJOR] Quantity exceeds purchase order\\nLine 1 bills 550; PO-7730 ordered 500. · compared with Purchase order\"},\n    {\"text\": \"[MAJOR] Unit price differs from purchase order\\nBracket billed at 0.95; agreed price 0.85. · compared with Purchase order\"},\n    {\"text\": \"[MAJOR] Charge not on purchase order\\nExpedite fee of 60.00 is not on PO-7730. · compared with Purchase order\"},\n    {\"text\": \"Review summary — advisory outcome: blocking findings\\n...\"}\n  ]\n}\n```\n\n- **classification**: what type of document it decided this is.\n- **fields**: the values it pulled out, as configured for that type in `docreview.yaml`.\n- **review**: the overall outcome, the count of findings by severity, and which reference documents were used.\n- **comments**: one per finding (severity, what's wrong, what it was compared with), plus a summary.\n\nEvery call to the model is also recorded in `logs\u002Fai_calls.jsonl`, the audit log: what was asked,\nwhich model answered, what it returned, tokens and time.\n\nOther commands:\n\n```bash\ndocreview run                    # poll forever (every 60 s; --interval to change)\ndocreview process \u003Cdocument-id>  # one document: classify, extract, review if not yet reviewed\ndocreview review \u003Cdocument-id>   # review now, even if this version was already reviewed\n```\n\nSet `review.dry_run: true` to run real model calls while writing nothing to the ECM. It's useful\nfor trying a prompt change on live documents.\n\n## Connecting your ECM\n\n| Adapter | `adapter:` | Install | Status | Guide |\n|---|---|---|---|---|\n| Local folder | `local` | (built in) | supported: for trying it out and tests | this README |\n| Box | `box` | `pip install 'open-doc-review[box]'` | supported | [docs\u002FBOX.md](docs\u002FBOX.md) |\n| SharePoint Online | `sharepoint` | `pip install 'open-doc-review[sharepoint]'` | experimental | [docs\u002FSHAREPOINT.md](docs\u002FSHAREPOINT.md) |\n| Veeva Vault | `veeva_vault` | `pip install 'open-doc-review[veeva_vault]'` | example | [docs\u002FVEEVA_VAULT.md](docs\u002FVEEVA_VAULT.md) |\n| M-Files | `mfiles` | `pip install 'open-doc-review[mfiles]'` | example | [docs\u002FMFILES.md](docs\u002FMFILES.md) |\n| Alfresco | `alfresco` | `pip install 'open-doc-review[alfresco]'` | example | [docs\u002FALFRESCO.md](docs\u002FALFRESCO.md) |\n| Amazon S3 | `s3` | `pip install 'open-doc-review[s3]'` | example | [docs\u002FS3.md](docs\u002FS3.md) |\n\nWhat the statuses mean:\n\n- **Supported:** built and unit-tested against the vendor's SDK.\n- **Experimental:** written to the documented API and unit-tested, but not yet run against a live system.\n- **Example:** the same as experimental, but intended mainly as a worked starting point for your own adapter. Read its Known limits first.\n\n**Anything else** (OpenText, Documentum, NetDocuments, Egnyte, Google Drive, ...): implement eight methods. See\n[docs\u002FADAPTERS.md](docs\u002FADAPTERS.md). `adapter: your_package.module:YourAdapter` loads it, with no fork needed.\n\n## Documentation\n\n- [docs\u002FARCHITECTURE.md](docs\u002FARCHITECTURE.md): how a document flows through, and the design rules\n- [docs\u002FCONFIGURATION.md](docs\u002FCONFIGURATION.md): every config key\n- [docs\u002FMETADATA.md](docs\u002FMETADATA.md): every metadata key written on a document, with examples, and how each ECM stores it\n- [docs\u002FPROMPTS.md](docs\u002FPROMPTS.md): writing your own prompts, and the variables available\n- [docs\u002FWRITING_REVIEW_PROMPTS.md](docs\u002FWRITING_REVIEW_PROMPTS.md): how to write review checks and severities that give consistent results\n- [docs\u002FVALIDATION.md](docs\u002FVALIDATION.md): a generic risk-assessment and validation starting point for regulated organizations\n- [docs\u002FADAPTERS.md](docs\u002FADAPTERS.md): writing an adapter for your ECM\n- [docs\u002FBOX.md](docs\u002FBOX.md): setting up the Box adapter\n- [docs\u002FSHAREPOINT.md](docs\u002FSHAREPOINT.md): setting up the SharePoint adapter (experimental)\n- Example adapters: [Veeva Vault](docs\u002FVEEVA_VAULT.md), [M-Files](docs\u002FMFILES.md), [Alfresco](docs\u002FALFRESCO.md), [Amazon S3](docs\u002FS3.md)\n- [docs\u002FDEPLOY.md](docs\u002FDEPLOY.md): running it as a service, rolling it out, cost\n- [CDP methods paper, Supplementary Information (PDF)](docs\u002FSupplementary_Enveda-Anthropic_CDP_methods_paper.pdf): the production system this project's design comes from, including how it compares with open-doc-review (Supplementary Note 1.7)\n\n## Before you use it on real documents\n\n- Documents are sent to the Claude API. Check that this is allowed for your content, and review\n  your data-retention settings with Anthropic.\n- Give the adapter's service account the least access that works: read, plus write for metadata and comments.\n- Findings come from a model. Validate the prompts and configuration on documents with known\n  problems before anyone relies on the output, and keep a person in the loop.\n\n## Author\n\nCreated and maintained by Andrew Martin ([LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fandrew-martin-7961834b\u002F), [GitHub](https:\u002F\u002Fgithub.com\u002FHedgehog-Info)) at Enveda.\n\n## License\n\nMIT License. See [LICENSE](LICENSE).\n","open-doc-review 是一个可嵌入现有企业内容管理系统（ECM）的轻量级AI文档审阅工具，用于自动化执行分类、结构化字段抽取、参考文档匹配及基于规则的合规性比对审阅。它不修改原始文档，仅通过ECM适配器（支持Box、SharePoint、本地文件系统等）写入元数据与审阅评论；所有逻辑由用户自定义的文档类型配置（docreview.yaml）、字段映射和Claude提示词驱动，支持分页处理长PDF及参考文档后置触发重审。适用于合同、发票、采购订单等需跨文档一致性校验与策略对齐的合规审查场景。",2,"2026-11-24 04:47:05","CREATED_QUERY"]