Skip to content

feat(checks): generate the ADR index and check amendment back-links - #61

Merged
chrispezza merged 1 commit into
mainfrom
feat/adr-index-and-link-checks
Oct 12, 2026
Merged

chrispezza merged 1 commit into
mainfrom
feat/adr-index-and-link-checks

Conversation

@chrispezza

Copy link
Copy Markdown
Collaborator

Summary

  • Generated ADR index at docs/adrs/README.md: one row per record with status, the checks that enforce it and their warn/block status, which later ADRs amend it, and how many in-file amendments it carries. Built by checks/adr_index.py from the records and the enforcement config. Never hand-edited.
  • adr-index check (ADR 0012 TC-3, warn): fails when the committed index differs from the generator's output.
  • adr-amendment-link check (ADR 0012 TC-4, warn): when an ADR says it amends another, the amended one must name it. This would have caught the ADR 0013 to ADR 0004 gap on the day it landed.
  • README's hand-kept ADR table, which had two wrong rows, is now a pointer to the index.
  • Guard fix. The Bash inline-script rule from the earlier guard PR blocked two legitimate commands within an hour, both scripts that only mentioned the ADR folder in text written elsewhere. It now requires an existing protected file or iteration of the ADR folder. Regression test added.

Cost

Two more checks in the existing suite and eight more unit tests. Still about one second in CI. No new dependency.

Test plan

  • python checks/run_checks.py --ci — 17 checks, 0 findings
  • python -m unittest discover -s checks/tests — 25 tests pass, including one that fails if the committed index is stale
  • CI green

ADR impact

  • Existing ADR amended by an appended, dated section: ADR 0012

🤖 Generated with Claude Code

Every hand-kept summary of the ADRs had drifted from the records. The index
is now derived, and a check fails when it is stale.

- Add checks/adr_index.py: renders docs/adrs/README.md from ADR titles and
  status lines, the enforcement config, and declared amendments
- Add adr-index (ADR 0012 TC-3) and adr-amendment-link (TC-4) at warn
- Restrict adr-status to numbered ADR files so the index is not read as one
- Replace the README ADR table with a pointer to the index
- Narrow the guard's inline-script rule after two false positives; add a
  regression test
- Record all of it as an appended amendment to ADR 0012

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chrispezza
chrispezza merged commit 23fd71a into main Oct 12, 2026
2 checks passed
@chrispezza
chrispezza deleted the feat/adr-index-and-link-checks branch October 12, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant