Repository navigation
docs(adr): expand numeric §N to section names in cross-ref link text - #605
Merged
Merged
Conversation
Numeric section refs (§7, §2) silently break when sections are renumbered (#590 already caused some). Replace the §N token in link DISPLAY TEXT with the target section's actual name, resolved from the heading the link's anchor already points to — so the URL is untouched and every rewritten link still resolves. 146 links across 25 files. Conservative/mechanical: only links whose text is exactly "[ADR N ]§num" (no trailing prose, ranges, or doc-top anchors). The 43 deferred cases (trailing/range/multi, lazy doc-top anchors, one broken anchor) plus bare/intra/code-block §N and the guard swap to ban §N corpus-wide are PR-B. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
3 of 4 tasks
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
Follow-up to #600. Numeric section refs (
§7,§2) silently break when sections get renumbered — #590's ADR 026 split already caused some. This expands the§Ntoken in link display text to the target section's real name.[ADR 026 §7](…#7-operator-economics-and-minimum-stake)→[ADR 026 § Operator economics and minimum stake](…#7-operator-economics-and-minimum-stake).[ADR N ]§num(no trailing prose, ranges, or doc-top anchors).Deferred to PR-B (stacked)
43 cases the script intentionally skipped + the rest of the policy:
§7-§8,§2 Foo) — 27§N, intra-doc§N, 27 §N inside code blockscheck-section-spacing→check-no-section-numbers(bans§\dcorpus-wide including code blocks, since the drift fragility is identical there and a section name works in code even though a markdown link cannot)Test plan
make -C adr check-refs→ all green (anchors unchanged → md-anchors green;§ Nameis the blessed named form → section-spacing green)