Repository navigation
feat(checks): generate the ADR index and check amendment back-links - #61
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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 bychecks/adr_index.pyfrom the records and the enforcement config. Never hand-edited.adr-indexcheck (ADR 0012 TC-3, warn): fails when the committed index differs from the generator's output.adr-amendment-linkcheck (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.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 findingspython -m unittest discover -s checks/tests— 25 tests pass, including one that fails if the committed index is staleADR impact
🤖 Generated with Claude Code