roadmap BUILT

644. A phrase quoted after a path must still be in that file

Title and slug are drafts. Raised by the 2026-09-24 documentation audit (design/audit-reports/2026-09-24-split-documents-read-from-the-inbound-side.md), whose lens was the day's document splits read from the side of the files that cite them. Name provisional, this file's and nothing else's.

No hardware, no decision, no dependency. It extends script/citations, which already checks the same thing for two other shapes.

The claim

The tree cites a section of a document in one common shape: a path, then the section's heading or a phrase from it, in quotation marks. notes/interrupts.md, "Testing it with no device" is one. Nothing checks that the quoted phrase is still in the file the path names.

script/citations already checks two neighbors of this shape. An attributed block quote (> -- path) must still exist in the file it names, and a gloss after milestone N or §N must match the target. The path-then-quote form is the third, and it is the one a document split breaks, because a split moves the section and leaves the path pointing at the main page.

The measurement

On 2026-09-24, at the audit's base edfb4cd6b, the tree held 121 citations in this shape whose path resolves to a file. 14 quoted a phrase the file does not contain:

A further 37 citations named a section by date or by a bare noun ("the 2026-09-19 section", "the multi-hart section"). No script can check that shape without false positives, so it stays with the documentation sweep.

What it would be

A --ratchet rule in script/citations: a line a branch adds that carries path, then a quoted phrase of six characters or more, fails if the phrase is not in that file after whitespace and markup are normalized. It covers added lines only, like the gloss ratchet, so the five deliberate exceptions above never fire. An intentional old quotation is marked the way the attributed-quote form already allows.

What would make it not worth doing

If a lane's added lines produce more false positives than the 5 in 14 measured over the whole tree, the rule costs more attention than it saves. The first week's failures are the measurement.

Built 2026-10-15 (UTC): the third shape is a ratchet rule

Written by the milestone 644 lane. The proposal above is kept as written, with one exception recorded here. Its example line quoted a phrase a later split of notes/interrupts.md had divided in two, which is the defect this milestone exists for. The example now quotes the heading the file has today.

script/citations --ratchet judges every line a branch adds for the shape: a path that resolves from the repository root, then a comma, then a quoted phrase of six characters or more. It fails when the phrase is not in the file the path names, matched on the same normalization as the attributed quotations (whitespace collapsed, emphasis and double-quote punctuation dropped). A quotation stale on purpose carries quotation: exception. Reason: ..., placed as the ratchet allows. The false-positive shapes the audit's looser scan caught stay out on resolution. runs.txt, "<run_id> <lane>" in a usage template and kani_lib.c, "machine model macos" in a list of search strings name no file from the root, so they are never judged. The possessive (AGENTS.md's "old wording", the historical form) has no comma, so the scanner never sees it.

Measured at the lane's base 8fad33799: 128 citations in the shape, 125 with a path that resolves, 12 quoting a phrase the file does not hold.

The gate's first week starts from that zero. Proven on this branch before the docs landed, by planting one line at a time and committing it. A stale quotation failed with its line and phrase. A current phrase passed. The marker above the line exempted a planted deliberate quotation. The gloss ratchet still fired on the same plant for its own reason, a bare milestone 644 with no gloss. The two rules compose rather than compete.

Against the proposal's bar for not worth doing: the audit's five non-rot cases do not match the landed shape, so the measured false-positive rate on added lines starts at zero.

Follow-on

Index row

script/citations --ratchet checks three citation shapes; the third, since 2026-10-15, is that a phrase quoted after a path must still be in the file the path names, on lines a branch adds. A deliberate old quotation carries quotation: exception. Reason: ... on its line or the one above. Normalization drops double-quote punctuation, so a heading that scare-quotes its term still matches.