Skip to content

ADR audit: demote optional patterns / implementation guides to appendices #348

Closed

Description

@alpergundogdu

Why

ADR set today mixes two kinds of documents:

  1. Core protocol decisions — invariants every conforming node/client/contract must implement the same way (e.g., wire protocol, content addressing, slashing schedule).
  2. Optional patterns / implementation guides — how to build or operate something on top of the protocol; another implementation might do it differently without breaking interop.

Mixing them dilutes the "protocol spec" feel of the ADR set. Demoting the second class to a clearly-labeled appendix section would sharpen the protocol-bible reading experience without losing the documented patterns.

This is a companion to the book-readiness program (#344 / #345 / #346). Lands cleanly alongside #345 (narrative-connectives pass) — at that point we're already touching ADR bodies, so the structural moves can land in the same edit pass.

Proposed rule of thumb

An ADR documents a core protocol decision — a behavior every conforming participant must implement the same way for the network to function.

An appendix documents a pattern, reference implementation, or operational guide — a recommended way to build or operate something on top of the protocol; alternative implementations are acceptable.

Audit (strongest candidates first)

Strong candidates for appendix demotion

  • ADR 006 — End-to-End Encryption and Key Distribution. The CDN protocol is encryption-agnostic (content addressing means we shuttle bytes; ciphertext vs plaintext is the publisher's choice). What this ADR documents is one deployment pattern for an encrypted-content publishing system on top of deCDN — including the companion app server and cdn/keys/v1 ALPN, neither of which are CDN protocol participants. Reframe as adr/appendix-encrypted-publishing.md or adr/patterns/encrypted-content.md.
  • ADR 025 — Local Admin HTTP Surface. Implementation detail of how the deCDN node binary exposes admin endpoints. Not a protocol mechanic — other nodes/clients don't interact with this surface, and a different implementation could expose admin via gRPC, Unix socket, or any other channel without breaking interop.
  • ADR 023 — PoC/Production Seam Architecture. Implementation guidance for Rust crate structure (leaf-crate principle, wiring-layer mode selection, #[cfg(feature = \"poc\")] placement). Another implementation language wouldn't follow this pattern. The protocol invariant ("PoC and production must be visibly distinct") is a design rule; the specific Rust crate layout is the pattern.

Medium candidates (borderline)

  • ADR 019 — Node Onboarding and Bootstrapping Flow. Reads as an operational runbook. The atomic stake-then-register mechanic is a protocol invariant (already documented in ADR 001), but the surrounding process (DNS, monitoring setup, gossip warmup) is operator-facing guidance.
  • ADR 020 — Observability and Metrics Standard. Defines specific metric names, types, labels. Standardized metric names are arguably an interop concern (monitoring tooling, dashboards, alerting), but metric implementation is consumer-side. Could go either way.
  • ADR 021 — Production L2 Chain Selection. Documents the choice of Arbitrum One. The protocol depends on Arbitrum-class properties (forced-inclusion delay ≤ 24h, EIP-4844, native USDC), but the specific chain choice is a deployment decision — another instance of the protocol could deploy on Base or OP Mainnet without breaking interop. Could move to adr/appendix-deployment-targets.md with the protocol-level dependencies extracted into the affected ADRs (ADR 003 / 007 / 018) as definitive constraints.

Stays as core ADR

Everything else: 000, 001, 002, 003, 005, 007, 008, 009, 010, 011, 012, 013, 014, 015, 016, 017, 018, 022, 024, 026, 027, 028, 029, 030, 031, 032.

Mechanics

For each demoted ADR:

  1. Move the file to adr/patterns/<name>.md (or adr/appendix-<name>.md — bikeshed during execution). Drop the numeric prefix.
  2. Strip ADR-decision-record framing (## Context / ## Decision / ## Consequences / ## Alternatives Considered). Replace with a top-of-file framing like "This appendix documents one way to build X on top of deCDN; alternative implementations are acceptable." Move the rejected-alternatives content into the prose where it informs design choices.
  3. Add a redirect note at the original adr/NNN-name.md location (one-line file pointing at the new path) so external links don't break.
  4. Add a new "Appendices / Reference Patterns" section to architecture.md § Reading Order (after Chapter 8) listing the demoted documents. They drop out of their previous chapters.
  5. README.md decision-record-context note: distinguish "core protocol ADRs" from "appendices / reference patterns".

Sequencing

Lands cleanly with #345 (Tier 2). Both involve touching ADR bodies and lifting cross-cutting concerns; doing the structural reclassification at the same time as the narrative-connectives pass avoids touching the same files twice.

If #345 ships first without this, the rework cost on the demoted ADRs becomes lower (their narrative connectives won't have been smoothed yet).

Acceptance

  • Each strong-candidate ADR (006, 025, 023) moved to adr/patterns/ (or equivalent) with redirect notes left at original paths.
  • Medium candidates (019, 020, 021) decided on case-by-case during execution, with rationale recorded in the PR description.
  • architecture.md Reading Order has an "Appendices / Reference Patterns" section.
  • README.md distinguishes core protocol ADRs from patterns.
  • No outbound link from a core ADR to a pattern is broken.

Risk

  • Numbering churn — pattern files lose their NNN- prefix. Existing external links (PRs, issue comments, third-party references) to e.g. adr/006-e2e-encryption.md need redirect-note files to keep working.
  • Boundary disputes — ADR 020 (observability) and ADR 021 (L2 selection) are genuinely borderline. Recommend evaluating against the rule-of-thumb during execution rather than litigating up front.

Activity

  1. added
    kind:docs
    on Apr 30, 2026
  2. alpergundogdu commented on Apr 30, 2026

    @alpergundogdu
    ContributorAuthor

    Disposition confirmed (per discussion):

    ADR Move Notes
    006 — E2E encryption → appendix encryption-agnostic protocol; companion app server pattern
    025 — Local admin HTTP → appendix binary-internal surface, not protocol mechanic
    023 — PoC/Production seams → appendix Rust crate-structure pattern; principle stays in protocol
    020 — Observability → appendix metric names are consumer-side; not interop-blocking
    021 — L2 chain selection → appendix deployment decision; protocol depends on properties (forced-inclusion ≤ 24h, etc.), not on the specific chain
    019 — Node onboarding stays as core ADR operational but tied tightly enough to protocol mechanics (atomic stake-then-register, gossip warmup invariants) to keep

    Goal: the ADR set after demotion reads as the protocol. Operational/implementation/deployment guidance lives in clearly-labeled appendices. First-time readers approaching the protocol-bible reading order get a tighter, more focused canonical spec.

    For the demoted set, extract any protocol-level invariants before moving. Specifically:

    • ADR 023 — the leaf-crate principle ("domain crates MUST NOT contain mode-branching for ADR 026 contract surface") is a protocol design rule and should land as a paragraph in ADR 026 or ADR 016 before the rest moves.
    • ADR 021 — the L2 dependencies (forced-inclusion ≤ 24h per ADR 007, gas-cost calibration per ADR 003, Balancer V3 Router on Arbitrum One per ADR 018) should be lifted into those ADRs as definitive constraints. The chain selection itself moves.
    • ADR 020 — if any specific metric is load-bearing for a protocol invariant (e.g., decdn_ve_lock_rate feeding ADR 029's adaptive hook), that invariant stays in the consuming ADR. The full metric catalog moves.

    This keeps the appendices as patterns/implementations, not as places where protocol invariants hide.

  3. added a commit that references this issue on Apr 30, 2026
    3617aa6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:docs

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions