feat: server-side citation verification against source text

↗ view on GitHub · Amalanand Muthukumaran · 2026-07-25 · a05e2956

Port of the fork's document-quote verification (apps/api/src/lib/tools/
verifyCitations.ts and its wiring) to upstream layout. After the model's
<CITATIONS> block is parsed, each document quote is located in the
document's extracted source text (exact, then whitespace/case-tolerant,
then punctuation-tolerant matching). Quotes get a per-quote verification
record and each citation an aggregate verification_status:
verified | repaired (exact source excerpt swapped in) | unverified.
Case-law citations pass through untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEguyEgXa9JjCciXCcVemC
Repository open-legal-products/mike
Author Amalanand Muthukumaran <mamalanand3@gmail.com>
Authored
Committed
Parents 2266446b
Stats 5 files changed , +473 , -13
Part of Add server-side citation verification

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-a05e2956.md from inside the repo you want the change in.

⬇ Download capture-commit-a05e2956.md