Found while implementing #9592 (PR #12785). Recording the scope boundary that card deliberately drew, so it is a visible decision rather than an implicit gap.
What the new layer covers, and what it does not
#9592 commissioned the decision-letter check for the anchored surface: every anchor's invariant in scripts/adr-anchors/, plus the full text of each anchored file. That is where the #3723 incident happened and where the invariants live, and it is bounded by the registry rather than by the size of the repo.
Measured on origin/main @ 1246b4cf2:
anchored surface : 915 `ADR-NNNN Dk` citations (52 anchored files + 53 anchor invariants)
repo-wide : 7736 same-line occurrences across 1609 tracked files
So roughly 88% of the corpus is outside the layer. The number layer above it (#6634) already scans repo-wide — 29,678 ADR-NNNN citations across 3,740 files — so the two layers now have different populations, and a Dk written outside an anchored file is checked for its number and not for its letter.
Why this is a decision and not simply a to-do
Widening is not free and not obviously right:
- Blast radius is unmeasured at that scale. The anchored surface came back at 0 bad letters only after the sub-decision grammar (a
Dk heading's own lettered/numbered list) was added; a repo-wide first run would need the same measure-before-parse pass over 8x the corpus, and any residue would have to be fixed or explained before it could ship green. - The unverifiable population grows too. 67 of 125 ADR numbers declare no decision letters at all (filed separately), and repo-wide the "cannot verify" note could become large enough to stop being read — which is the failure mode the note exists to avoid.
- The two layers answer different questions. The number layer protects navigation for any reader who greps an id. The letter layer protects an anchor's promise. Whether the second should have the first's reach is a judgement about what an anchor is for, not a coverage oversight.
Re-check
git grep --untracked -IocE 'ADR-[0-9]{4}[ \t]+D[0-9]' | awk -F: '{n+=$NF; f++} END {print n, "occurrences across", f, "files"}'
node scripts/check-adr-anchors.mjs # the OK line reports the anchored-surface count
Refs: #9592 (the commissioned scope) · PR #12785 (the implementation) · #6634 (the repo-wide number layer, for contrast)
Generated by Claude Code
Found while implementing #9592 (PR #12785). Recording the scope boundary that card deliberately drew, so it is a visible decision rather than an implicit gap.
What the new layer covers, and what it does not
#9592 commissioned the decision-letter check for the anchored surface: every anchor's
invariantinscripts/adr-anchors/, plus the full text of each anchored file. That is where the #3723 incident happened and where the invariants live, and it is bounded by the registry rather than by the size of the repo.Measured on
origin/main@1246b4cf2:So roughly 88% of the corpus is outside the layer. The number layer above it (#6634) already scans repo-wide — 29,678
ADR-NNNNcitations across 3,740 files — so the two layers now have different populations, and aDkwritten outside an anchored file is checked for its number and not for its letter.Why this is a decision and not simply a to-do
Widening is not free and not obviously right:
Dkheading's own lettered/numbered list) was added; a repo-wide first run would need the same measure-before-parse pass over 8x the corpus, and any residue would have to be fixed or explained before it could ship green.Re-check
Refs: #9592 (the commissioned scope) · PR #12785 (the implementation) · #6634 (the repo-wide number layer, for contrast)
Generated by Claude Code