Skip to content

Commit 8c0b5cf

Browse files
os-zhuangclaude
andauthored
tooling(check-adr-anchors): verify a cited Dk names a real decision of the cited ADR (#12785)
Extends `scripts/check-adr-anchors.mjs` one layer below the number: for every `ADR-NNNN Dk` citation on the anchored surface (each anchor's `invariant` and each anchored file's text), `Dk` must appear in the cited record's decision index. The number layer already proved 0057 names one record; nothing read the `D10` half, which is the #8386 / #9255 failure family. The heading grammar was measured across `docs/adr/**` before the parser was written, and the check recognises exactly the four shapes that exist: `### Dk` headings, `**Dk —**` bold leads, `| Dk |` decision-table rows, and a `Dk` heading's own top-level list declaring `Dk.1`/`Dka` sub-decisions. That last rule is load-bearing: 20 live citations into ADR-0120 D5's lettered gates and ADR-0020 D3's numbered steps resolve only through it. "Cannot verify" is a third verdict and is printed, never folded into the OK line: 67 of 125 ADR numbers declare no machine-readable decision letters, and an unrecognised shape must not read the same as a clean one. Claude-Session: https://claude.ai/code/session_01PfaSTikked61BkcsB5Rn69 Co-authored-by: Claude <noreply@anthropic.com>
1 parent a70f6d2 commit 8c0b5cf

1 file changed

Lines changed: 585 additions & 1 deletion

File tree

0 commit comments

Comments
 (0)