Skip to content

docs(adr): add README preamble + thematic reading order (Tier 1) - #347

Merged
alpergundogdu merged 3 commits into
mainfrom
docs/adr-tier1-readme
Apr 30, 2026
Merged

alpergundogdu merged 3 commits into
mainfrom
docs/adr-tier1-readme

Conversation

@alpergundogdu

@alpergundogdu alpergundogdu commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #344.

What

Two additions:

  1. adr/README.md — protocol preamble. GitHub auto-renders this when navigating to /adr/, so it doubles as the natural entry point.
  2. Reading Order section in architecture.md — 32 ADRs organized into 8 thematic chapters, ordered for top-to-bottom reading.

README.md contents

  • One-paragraph elevator pitch
  • 6 design principles (content addressing, paid byte delivery, stake-and-slash, opaque origin, ve-weighted commitment, definitive framing)
  • 32-term glossary in 4 categories: wire protocol & content, payments, tokenomics & incentives, on-chain enforcement (consolidates the prior 11-term partial glossary in architecture.md and adds tokenomics terms)
  • Pointers to the chapter list in architecture.md
  • Note on the decision-record framing + forward-ref to ADR book-readiness Tier 3: strip decision-record scaffolding, move to adr/_history/ #346 (Tier 3 — adr/_history/)

Reading order

Chapter ADRs
1 — Foundations 000, 001, 002, 005
2 — Discovery 022, 015
3 — Payments 003, 010, 012, 024
4 — Tokenomics & incentives 026, 027, 018, 028, 029, 030, 031, 032
5 — Verification & enforcement 014, 007, 008, 011
6 — Governance & contracts 009, 016
7 — Operations 019, 020, 023, 025
8 — Supporting infrastructure 021, 013, 017, 006

The numeric per-ADR index below stays as the canonical reference; this section is the first-time-reader path. All 32 ADRs are covered exactly once.

Out of scope

Test plan

  • Navigating to https://github.com/decdn/decdn/tree/main/adr after merge renders README.md automatically.
  • Glossary covers all canonical terms used across 3+ ADRs without inline definition.
  • All 32 ADRs appear in the Reading Order section exactly once.
  • architecture.md Glossary now points to README rather than carrying its own (partial) copy.
  • First-time reader can follow README.md → reading order → individual ADRs without backtracking.

🤖 Generated with Claude Code

Closes #344.

Adds `adr/README.md` as the protocol's preamble — what deCDN is, the
six core design principles, the canonical 32-term glossary (grouped
into wire/payments/tokenomics/enforcement), and pointers into the
reading order. GitHub auto-renders this when navigating to `/adr/`,
making it the natural entry point.

Adds a **Reading Order** section to `architecture.md` that groups the
32 ADRs into 8 thematic chapters, each assuming the previous chapters
are read:

  1. Foundations (000, 001, 002, 005)
  2. Discovery (022, 015)
  3. Payments (003, 010, 012, 024)
  4. Tokenomics & incentives (026, 027, 018, 028, 029, 030, 031, 032)
  5. Verification & enforcement (014, 007, 008, 011)
  6. Governance & contracts (009, 016)
  7. Operations (019, 020, 023, 025)
  8. Supporting infrastructure (021, 013, 017, 006)

The numeric per-ADR index below stays as the canonical reference;
this section is the first-time-reader path.

Consolidates the partial Glossary previously in `architecture.md`
into the README's expanded version (32 terms vs the prior 11), and
leaves a one-line pointer at the old location.

Tier 1 of the book-readiness program; #345 (smooth narrative
connectives + cross-cutting lifts) and #346 (move alternatives to
adr/_history/) are queued behind this. Tier 1 was the lowest-risk,
highest-leverage move — does not touch any individual ADR body.

@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 establishes a comprehensive protocol specification for deCDN. It introduces a new adr/README.md containing core design principles, a thematic reading order for Architecture Decision Records (ADRs), and a categorized glossary. Additionally, adr/architecture.md is updated to include the thematic reading order and to reference the README for the canonical glossary. Review feedback focuses on improving documentation accuracy and compatibility, specifically by refining ADR cross-references for Merkle proofs, replacing non-standard characters in mathematical formulas for better rendering, and correcting the scaling logic for challenge bonds between PoC and production environments.

Comment thread adr/README.md Resolved
Comment thread adr/README.md Resolved
Comment thread adr/README.md Resolved
2 of 3 comments addressed (1 wontfix).

README.md:40 — Chunk glossary entry now cross-refs both ADR 002 (the
addressing scheme) and ADR 014 (the slash-evidence verification
flow). Gemini was right that ADR 014 is the canonical home for the
verification logic; ADR 002 still owns the addressing scheme itself,
so the entry now links both.

README.md:65 — `working_bytes` formula now uses `*` for multiplication
instead of `·` (middle dot). The middle dot is fine in most renderers
but `*` is universally compatible across viewers and copy-paste-friendly
into pseudocode contexts. Backticks kept (formula vs prose distinction).

README.md:80 — wontfix. Gemini suggested the challenge-bond values
(100 PoC / 50 production) were reversed because production bonds are
"typically" higher than PoC. They aren't reversed: PoC TOKEN is
freely-mintable testnet supply (no market value, so 100 TOKEN is
essentially free), while production TOKEN is the fixed-supply (1B)
canonical asset with real market value (so 50 TOKEN is the higher
economic deterrent). Confirmed against the canonical values across
ADRs 011, 014, and 023.

Em-dash → semicolon suggestions across all three comments are also
declined: em-dashes in *prose* (table cells, glossary entries) don't
affect GFM anchors. Only em-dashes in *headings* produce the `--`
double-hyphen anchor pattern, and #343 already standardized those to
the actual GFM-generated form. Glossary prose stays.
Same-structure principle ("PoC and Prod follow the same structure;
fee router is the only thing that changes") applied to the challenge
bond. The historical 100 PoC / 50 production split was rationalized
by "PoC TOKEN has no market value, so the higher nominal makes a
deterrent" — but that's exactly the kind of nominal-vs-real-value
split that creates implementer confusion. Unify to 100 TOKEN.

Touched:

- README.md glossary entry
- ADR 005:83 — wire-protocol cross-ref to challenge-bond requirement
- ADR 011:207 — blacklist-violation slashing path
- ADR 016:151 — SlashJudge constructor parameters table
- ADR 023:23, :120 — PoC/Prod comparison tables (both columns now 100)
- ADR 023:182 — `challenge_bond_token` constants table

Programmatic check: zero `50 TOKEN` mentions remain in the ADR set.
@alpergundogdu
alpergundogdu merged commit 65fdbf5 into main Apr 30, 2026
8 checks passed
@alpergundogdu
alpergundogdu deleted the docs/adr-tier1-readme branch April 30, 2026 15:43
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.

ADR book-readiness Tier 1: preamble + thematic reading order

1 participant