Reviewed evidence chart
The case workspace's Liability Facts → Evidence chart section lets staff map a claim's attorney-supplied elements to supporting and contradictory document passages, record gaps, and obtain a human review. This is a manual work-product tool; it does not generate or validate jurisdiction-specific law.
Use
- Create the chart and enter the claim/count, jurisdiction, and authority or jury-instruction version.
- Add the exact element wording. Select indexed passages on either side of each element; narrow the quote to an exact excerpt if needed. The document name links to the source document, with the indexed page shown where available.
- Record missing proof, disputed-evidence gaps, and attorney analysis separately from quoted facts. An insufficient assessment can be reviewed when its gaps are explicitly recorded; review is not a finding that the claim is proved.
- Save the draft. An attorney or firm administrator with case-edit access can acknowledge the authority and record review of that saved revision.
- Every subsequent save clears review. Changes to a cited document or indexed passage make an existing review stale when the chart is read. Remove and reselect changed passages, reconsider the analysis, save, and review again.
Controls and storage
- API:
GET/POST /api/cases/[caseId]/evidence-chart.GET ?q=...searches indexed text, returning up to 100 matching candidates plus the chart's current cited passages. Previews are bounded to 4,000 characters. - Scope: ADMIN, SUPER_ADMIN, ATTORNEY and PARALEGAL, subject to existing matter grants. Review follows the existing approver role set and additionally refuses API-key agent sessions.
- Source queries constrain both document and chunk to the authenticated firm and case. Per-document permissions filter source candidates; a restricted existing source blocks access to the derived chart.
- Quotes must occur verbatim in the current indexed passage. A SHA-256 fingerprint binds document metadata/update time, chunk content, page, and offsets. This chart-specific fingerprint is not a legal-authority verification result.
- One chart lives in
Case.metadata.evidenceChart. Saves use a monotonically increasing revision and compare-and-swap of the loaded metadata. They preserve unrelated keys and return 409 instead of overwriting concurrent case changes. - Save/review and the corresponding Activity record run in one Prisma transaction. Actor, timestamp and review revision are set by the server; client-supplied review metadata is rejected.
- The UI keeps unsaved edits after save failures and offers an explicitly labeled discard-and-reload action. Access-denied/not-found responses clear the displayed chart.
- Limits: 20 elements, eight references per side per element, 2,000 characters per quote, 128 KiB request body. Sources must be indexed documents in this version.
The API emits the existing material-claim citation shape with server-derived document/chunk/page details. This manual tool does not submit an AI-review request, authorize a demand send, disclose exhibits, alter case status, or write IOLTA data.
Verification
npx vitest run src/__tests__/lib/evidence-chart.test.ts src/__tests__/api/evidence-chart.test.ts src/__tests__/components/evidence-chart.test.tsx src/__tests__/api/liability-facts-authority.test.ts --maxWorkers=1 --testTimeout=30000
The tests exercise runtime domain logic, mocked Prisma route boundaries, and rendered component interactions. They do not constitute a live PostgreSQL or deployed-browser integration test.
Source context: planning/evidence/harvest-2026-10-01-claude-for-legal/, pinned upstream commit 4a6c651889c97cc9140580363c73e0eb17379c2b. Implementation is an original adaptation of the reviewed workflow patterns. Raw source attribution/license stays with the harvested package.
No migration or feature-specific configuration is needed. Release through the repository's normal owner-run deployment process. Reverting the feature removes its UI/API; existing metadata remains inert unless explicitly migrated in a separate task.