Evidence exhibit indexer and cover-page engine (Task 2) — Anish Kumar - #7
Open
Outsideorbit29 wants to merge 6 commits into
Open
Evidence exhibit indexer and cover-page engine (Task 2) — Anish Kumar#7Outsideorbit29 wants to merge 6 commits into
Outsideorbit29 wants to merge 6 commits into
Conversation
Immigration-paralegal build: propose an exhibit order that follows the brief's argument, generate numbered cover pages (what each exhibit proves), build an exhibit index whose page ranges exactly match the assembled packet, insert in-brief citations at the sentences that rely on each exhibit, and export the filing as one paginated file through the SuperDocs API (upload -> chat with approval gate -> approve -> export). Adding an exhibit late renumbers covers, index, page ranges and every in-brief citation together. Pagination is a single source of truth so the index and the rendered packet can never disagree. - exhibit/ engine: order, citations, covers, index, paging, proposals, loader, flow, superdocs client, mock server, optional CrewAI crew - tests/: 37 tests against the bundled mock server (no API key needed) - sample/: synthetic spousal-visa filing (PDF/DOCX/TXT/MD), all fictitious - CLI: exhibit-engine run [--mock|--live] [--add-late FILE:AFTER] Co-Authored-By: Claude <noreply@anthropic.com>
The real SuperDocs API only persists a document (making it editable via chat) when the upload request carries a session_id; without one it is a one-off conversion that returns no session, so the approval-gated chat had no session to target. The client now mints a session id (UUID, matching ^[a-zA-Z0-9_.-]+$) when none is supplied. Verified live: upload -> chat -> approve 6/6 -> export produced all [See Exhibit N] markers. Co-Authored-By: Claude <noreply@anthropic.com>
The deterministic cover writer concatenated stemmed keywords into broken
English ("Evidences balan, depos, and trans relevant to this application.").
Structured evidence (passports, tax returns, leases, certificates) is now
summarised by its real field: value pairs, prose by quoting the exhibit's own
most evidential clause, with a clean title-grounded fallback. Adds 5 regression
tests (test_covers.py) asserting grammatical, grounded output across the real
sample pile, a fresh screenshot, and the README credit line.
Co-Authored-By: Claude <noreply@anthropic.com>
…t flow - tools/superdocs_login.py: self-signup agent account (altcha proof-of-work, whoami reuse, key saved to ~/.superdocs/agent_credentials.json, never echoed) - cli.py: _agent_key() reads the saved agent key so --live works keyless - flow.py: build_message now scopes the model to citation edits only — cover pages, contents and index are assembled deterministically by the engine, so the export is a clean brief-with-citations (real names/dates/amounts, no 'Please fill' redaction, no '[Copy of]' placeholders) - flow.py: render markdown headings in the uploaded brief (h1/h2/h3) - README: document the login tool and what a live run produces Live-verified against the real API: 9-exhibit filing (incl. late insertion, which renumbered every citation in the export), 7/7 changes approved, exported brief carries the renumbered markers end to end.
SuperDocs keeps agent accounts on their own free tier and refuses to merge them into an existing human account (web + API adoption both blocked), so the agent-account flow is retired. The CLI now reads ~/.superdocs/personal_key.txt (dashboard API key) as the fallback after SUPERDOCS_API_KEY, and the live run was verified against the real API with the human account's key (9-exhibit filing, all citations, no redaction).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Evidence Exhibit Indexer and Cover-Page Engine — by Anish Kumar
A paralegal's tool for an immigration filing. Give it the brief and a pile of mixed-format evidence and it proposes an exhibit order that follows the brief's argument, generates a numbered cover page per exhibit (what it proves), builds an exhibit index whose page ranges exactly match the assembled packet, inserts in-brief citations (
[See Exhibit N]) at the sentences that rely on each exhibit, and exports the filing as one paginated file.The strong requirement: adding an exhibit late renumbers the index, the cover pages, the page ranges, and every in-brief citation — together.
Located at
use-cases/Outsideorbit29/exhibit-engine/. Runpython -m exhibit.cli run --brief sample/brief/supporting_brief.md --evidence sample/evidence --format html --mock --out packet-out.