Skip to content

docs(adr): unify section taxonomy so the book filter stops rotting - #571

Merged
alpergundogdu merged 2 commits into
mainfrom
claude/exciting-kepler-f80686
May 15, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
claude/exciting-kepler-f80686

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Why

The ADR book compiles to ~400 pages and we want to cut it. While scoping the reduction, the recurring non-Context/Decision/Consequences sections turned out to be an inconsistency problem first: ~3 concepts hid under 15+ synonym headings (ADRs Affected, Amendments to Existing ADRs, Cross-ADR Consistency, Cross-references, Forward references, Implications & follow-ups, Future Work, …). The reading-order book filter (strip-meta-sections.lua) chased these by an ever-growing, brittle pattern list that silently rots as new ADRs coin new names.

This PR unifies the taxonomy first (the prerequisite for any later page-reduction work). It is consistency-only — see the key finding below.

Key finding (scopes this PR)

Inspecting the sections showed the "cross-ADR" family is substantive, not scaffolding — it carries real amendments and coupling notes (e.g. ADR 011's "permissionless-origin claim is amended to DAO-gated", ADR 024's signature-scheme amendments). They were never stripped from the book and still aren't. So this is not the "~20pp free strip" originally hypothesized; the real page win requires folding that content back into target ADRs (a separate, larger effort).

What changed

  • Canonical taxonomy (documented in adr/README.md): Cross-ADR Impact (kept — substantive), Deferred & Open (stripped), Non-Goals (kept), References (kept).
  • Renamed all variant headings across 12 ADRs + 7 appendices to the canonical set.
  • Repointed inbound anchor links (014, 032×3, 030) and the same-file ADR 028 self-reference (#forward-references-follow-up-adrs → #cross-adr-impact).
  • Split appendix-bundles "Future work and non-goals" → ## Non-Goals (now correctly shown; previously stripped wholesale by ^future work) + ## Deferred & Open.
  • Rewrote strip-meta-sections.lua to key off the canonical set (legacy aliases retained defensively); updated README.md + _build/preface.md.

Net effect on the book

Essentially zero substantive content change: cross-ADR sections were never stripped and still aren't; Deferred & Open is stripped exactly as Future Work/Open Questions were. The one intentional improvement: appendix-bundles' Non-Goals are now rendered instead of being stripped with the future-work bullet.

Verification

  • pandoc --pdf-engine=typst (+ lua filter) builds both PDFs with exit 0 and zero dangling-label errors (the earlier typst failure was the missed same-file 028 link, now fixed).
  • No stray non-canonical scaffolding headings; no links to obsoleted anchors.
  • Binary adrs*.pdf intentionally not regenerated: mermaid-filter is broken in this environment (Node 24; fix in flight separately). Regenerating without it would degrade diagrams to raw text. The mermaid-fixed pipeline / CI should regenerate the artifacts.

Out of scope (excluded deliberately)

architecture.md (owned by a later overview rework; its Future Work: still stripped via retained pattern), ADR 010's substantive What This Adds/Scope of Changes/Migration from ADR 003, the H3 ### Cross-ADR alignment in appendix-l2-deployment, and 001's struck H3.

🤖 Generated with Claude Code

Recurring non-Context/Decision/Consequences sections used 15+ synonym
headings for ~3 concepts, forcing the reading-order book filter to chase
an ever-growing pattern list. Canonicalize to: Cross-ADR Impact (kept --
substantive cross-cutting design), Deferred & Open (stripped), Non-Goals
(kept), References (kept). Rename all variants across 12 ADRs + 7
appendices, repoint inbound anchor links (incl. the same-file ADR 028
self-reference), split appendix-bundles' mixed "Future work and
non-goals", and rewrite strip-meta-sections.lua + README + preface to
key off the canonical set.

No substantive book content removed: the cross-ADR sections were never
stripped and still aren't (they carry real amendments/coupling notes,
not scaffolding); appendix-bundles' Non-Goals are now correctly shown
rather than stripped with the rest. Binary adrs*.pdf intentionally not
regenerated here -- mermaid-filter is broken in this environment (fix
in flight separately); source builds clean with pandoc+typst (exit 0,
zero dangling labels).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request standardizes the section taxonomy across the ADR documentation, introducing canonical headings like "Cross-ADR Impact" and "Deferred & Open" to replace various legacy synonyms. The build pipeline is updated to handle these new sections, ensuring that substantive design impacts are retained while meta-discussion is stripped from the reading-order PDF. Feedback highlights a few remaining non-canonical headings and minor inaccuracies in the build script comments regarding the classification of legacy aliases.

Comment thread adr/024-account-abstraction.md Outdated
- **[ADR 019](019-node-onboarding.md):** "ETH gas sponsor" PoC simplification updated. "Delegated voucher signer" future work item resolved by the Production smartsessions plan.

## ADRs Affected
### Affected ADRs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The section heading ### Affected ADRs uses a non-canonical name and creates a redundant list. According to the "Canonical section taxonomy" in adr/README.md, ADRs Affected (and its variations) should be replaced by Cross-ADR Impact. Since a ## Cross-ADR Impact heading already exists at line 194, and the list following this heading (lines 206-207) is redundant with the more detailed list provided in the previous section (lines 198-200), this entire sub-section should be removed to maintain consistency and reduce redundancy.

References
  1. Ensure ADR documentation accurately reflects implementation and internal references.

Comment thread adr/_build/preface.md Outdated
This is the **reading-order build** of the deCDN protocol specification — every numbered ADR plus appendix, ordered by chapter (Foundations → Discovery → Payments → Tokenomics → Verification → Governance → Operations → Supporting → Appendices) rather than by ADR number.

**Sections omitted from this PDF:** *Alternatives Considered*, *Considered Alternatives*, *Open Questions*, *Future Work*, and *"Why not …"* subsections are stripped at build time so the document reads as a single canonical design rather than a debate transcript. They remain in the source `.md` files in `adr/` and in the numeric `adrs.pdf` build for readers who want the full decision-record context.
**Sections omitted from this PDF:** *Deferred & Open* (deferred work / open questions / forward references), *Alternatives Considered* / *Considered Alternatives*, and *"Why not …"* subsections are stripped at build time so the document reads as a single canonical design rather than a debate transcript. *Cross-ADR Impact* sections are retained — they carry substantive cross-cutting design content. The omitted sections remain in the source `.md` files in `adr/` and in the numeric `adrs.pdf` build for readers who want the full decision-record context.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line incorrectly states that "forward references" are stripped from the PDF. According to the canonical taxonomy in adr/README.md, Forward references is a legacy alias for Cross-ADR Impact, which is explicitly retained because it contains substantive design content. The Lua filter strip-meta-sections.lua also does not include a pattern to strip this heading.

Suggested change
**Sections omitted from this PDF:** *Deferred & Open* (deferred work / open questions / forward references), *Alternatives Considered* / *Considered Alternatives*, and *"Why not …"* subsections are stripped at build time so the document reads as a single canonical design rather than a debate transcript. *Cross-ADR Impact* sections are retained — they carry substantive cross-cutting design content. The omitted sections remain in the source `.md` files in `adr/` and in the numeric `adrs.pdf` build for readers who want the full decision-record context.
**Sections omitted from this PDF:** *Deferred & Open* (deferred work / open questions), *Alternatives Considered* / *Considered Alternatives*, and *"Why not …"* subsections are stripped at build time so the document reads as a single canonical design rather than a debate transcript. *Cross-ADR Impact* sections are retained — they carry substantive cross-cutting design content. The omitted sections remain in the source .md files in adr/ and in the numeric adrs.pdf build for readers who want the full decision-record context.
References
  1. Ensure ADR documentation accurately reflects implementation and internal references.

Comment thread adr/_build/strip-meta-sections.lua Outdated
--
-- * "Deferred & Open" — STRIPPED. The canonical home for deferred work,
-- open questions, and forward references. Legacy names ("Open Questions",
-- "Future Work", "Forward references …") are kept in the patterns below

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment incorrectly lists "Forward references ..." as a legacy name for Deferred & Open (which is stripped). According to the taxonomy table in adr/README.md, Forward references is a legacy alias for Cross-ADR Impact, which is substantive and NOT stripped. The code correctly omits it from strip_patterns, so the comment should be updated to avoid confusion.

--     open questions. Legacy names ("Open Questions", "Future Work") are kept
References
  1. Ensure ADR documentation accurately reflects implementation and internal references.

- preface.md / strip-meta-sections.lua: stop listing "forward
  references" as a stripped Deferred & Open alias. Per the README
  taxonomy it is a Cross-ADR Impact alias (retained, substantive);
  the filter correctly has no pattern for it. Comments now match.
- 024: remove the redundant `### Affected ADRs` sub-section. Its five
  bullets restate the same ADRs already detailed in the Cross-ADR
  Impact amendments list above it; the heading was also non-canonical.

Both PDFs build clean (pandoc+typst exit 0, zero dangling labels);
no links referenced the removed 024 anchor.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alpergundogdu

Copy link
Copy Markdown
Contributor Author

Addressed all three Gemini comments in 4e556be — all were valid (self-contradictions I introduced):

  1. 024 ### Affected ADRs — removed. Verified its 5 bullets restate the exact same ADRs (003/012/014/016/019) already detailed in the ## Cross-ADR Impact amendments list directly above; nothing unique lost, and it drops a non-canonical heading.
  2. _build/preface.md — removed "forward references" from the stripped-list parenthetical. It's a Cross-ADR Impact alias (retained), per the README taxonomy.
  3. strip-meta-sections.lua comment — same fix; "Forward references" no longer described as a kept Deferred & Open legacy pattern (there is deliberately no such pattern). Added an explicit note that it maps to the retained Cross-ADR Impact.

Both PDFs still build clean (pandoc+typst exit 0, zero dangling labels); no link referenced the removed 024 anchor.

@alpergundogdu
alpergundogdu merged commit 364b7be into main May 15, 2026
10 checks passed
@alpergundogdu
alpergundogdu deleted the claude/exciting-kepler-f80686 branch May 15, 2026 13:55
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