Mask quoted runs before clause splitting; provision-first strikes

↗ view on GitHub · Eli Ziff · 2026-07-28 · b27b3f79

The 58% quotedContent recall was clause splitting firing on ' by '
INSIDE quoted blocks, fragmenting them before capture. Splitting and
context scanning now run on a length-preserving masked body (quoted-run
interiors blanked, GPO paragraph seams honoured via
endOfTypographicRun); clause text always slices from the original.
Also: a provision ref directly after 'striking' now wins over quoted
text further along, so 'striking subsection (u) and inserting the
following:' compiles replace_provision instead of a bogus
substitute_text whose oldText was the whole block.

USLM re-measure: quotedContent onset recall 58.0% -> 90.2% (554/614),
quotedText 90.1% -> 91.9%, refusals 195 -> 137. Real-law probe
unchanged at 2/2 verified vs current consolidations. 18/18 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018bhP89cYSdEEjHNPnxacns
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents b7357a9e
Stats 2 files changed , +113 , -11
Part of Deterministic legal-text tools ("SLA audit organs")

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

⬇ Download capture-commit-b27b3f79.md