feat: native-markup SourceDoc engine replaces the legacy structure pipeline (P1.1a stage 4)

↗ view on GitHub · Eli Ziff · 2026-07-27 · f6990b99

sourceDocNativeMarkup.ts compiles TNA Akoma Ntoso, CAP/CourtListener
casebody HTML, GOV.UK ET, GovInfo, and journal renditions into the one
SourceDoc artifact; legalSourceStructure.ts is deleted. Legacy behavior
is frozen in fixtures/nativemarkup/legacy-structure.json - a machine
capture over real provider payloads (343-entry lookup battery, receipt
payload_sha256 shapes) asserted byte-identical. Native anchors query
compiled postings instead of throwaway per-quote docs. Benchmarks
(bench-structure.ts, both trees): compile 1.3-1.6x, lookup batteries
2.0-2.6x, zero stage-3 regressions. Both browser gates pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUsMXzBsEJ27DjJVPSfW5o
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents 062a0144
Stats 23 files changed , +9428 , -419
Part of SourceDoc / DOCX engine: redlines, tracked changes, editing benchmark

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-f6990b99.md from inside the repo you want the change in.

⬇ Download capture-commit-f6990b99.md