Skip to content

docs(adr): trim architecture.md and move alternatives to _history/ (#346) - #384

Merged
alpergundogdu merged 4 commits into
mainfrom
docs/adr-trim-architecture-and-history
May 1, 2026
Merged

alpergundogdu merged 4 commits into
mainfrom
docs/adr-trim-architecture-and-history

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Summary

Two thematic commits, ~340 lines deleted from the rendered ADR set.

1. Move pre-launch Alternatives Considered to _history/ (closes #346)

Each of the eight ## Alternatives Considered sections is moved into a single audit-trail file adr/_history/alternatives-pre-launch.md, anchored by source ADR. The source ADR keeps a one-paragraph stub naming the alternatives and pointing at the history entry.

Source Alternatives moved
014-on-chain-verification.md § 1 RIP-7212 / Solidity ed25519 / ZK / optimistic vs. dual-key
018-liquidity-strategy.md Uniswap V3 + revisit triggers
022-content-discovery.md 6 discovery alternatives (probe fan-out, gossip, hash-prefix, iroh DHT, indexers, libp2p)
026-gauge-boost-tokenomics.md 5 tokenomics shapes (original 3% flat, auto-ve-lock, USDC ve-pool, pure-deflationary, TOKEN bootstrap)
architecture.md Decentralised storage model
appendix-encrypted-content-publishing.md Client expiry, decryption proxy, proxy re-encryption, per-client ECIES
appendix-local-admin-http.md REST hyper, OpenRPC, Unix socket, iroh ALPN, /metrics extension
appendix-poc-production-seams.md cfg!() branching, two features, runtime enum, Option fields, two repos, scattered #[cfg]

Neither PDF build (numeric or book) includes _history/ — the audit trail lives in the source repo only, matching the README's "the protocol has one design" framing. Readers researching a decision can follow the breadcrumb at the end of each source ADR back to the history. The strip filter in the book PDF build still drops the now-stub headings unchanged.

2. Trim architecture.md per-ADR summaries to a compact index

The ## Architectural Decisions section walked every ADR with a multi-paragraph summary (~8–10 lines per ADR × 22 ADRs = ~180 lines) that duplicated each ADR's own Context / Decision intro. Replace with a single bullet list keeping each ADR's bold one-line decision summary verbatim. Heading anchors (#adr-001-network-topology-…) were not referenced from anywhere else in the repo (verified by grep -rn "architecture.md#adr-"), so collapsing them into list items is safe.

architecture.md drops from 593 → 436 lines (-157, ~6 PDF pages off both builds). The Reading Order chapter index above remains the thematic top-to-bottom navigation; this section is now the canonical numeric per-ADR index.

Net effect

  • 8 source files: −129 lines (alternatives moved out)
  • architecture.md: −157 lines (per-ADR summaries collapsed)
  • _history/alternatives-pre-launch.md: +187 lines (new audit-trail file, not in either PDF build)
  • Book PDF and numeric PDF: ~17 fewer pages each (the architecture.md trim hits both; the alternatives strip-filter behaviour is unchanged for the book build, and the stub→_history path is shorter than the inline content was for the numeric build)

Test plan

  • cd adr && pandoc … -o adrs.pdf (numeric) — renders without warnings; the per-ADR section is now a bullet list; alternatives stubs link to _history/ (rendered as plain-text URLs by typst, navigable on GitHub).
  • cd adr && pandoc … --lua-filter=_build/strip-meta-sections.lua _build/preface.md … -o adrs-book.pdf — renders without typst label-not-found errors. Stubs are stripped along with the rest of the alternatives content.
  • Browse _history/alternatives-pre-launch.md on GitHub: each ## ADR NNN — Topic section's anchor matches the link in the corresponding source ADR's stub.
  • Spot-check three random ADR's ## Alternatives Considered stubs — the named alternatives in the stub match the headings in _history/.

🤖 Generated with Claude Code

alpergundogdu and others added 2 commits May 1, 2026 06:42
The README has long carried a TODO that moving rejected-alternatives
content out of ADR bodies into a dedicated `adr/_history/` audit trail
is tracked in #346 ("Tier 3 of the book-readiness program"). This
delivers it.

Each of the eight `## Alternatives Considered` sections is moved into
`adr/_history/alternatives-pre-launch.md` (single audit-trail file,
anchored by source ADR) and replaced in the source ADR with a one-
paragraph stub naming the alternatives evaluated and pointing at the
history entry. Sources moved:

- ADR 014 § 1 (slash signature scheme: RIP-7212 / Solidity ed25519 /
  ZK / optimistic vs. dual-key chosen)
- ADR 018 (Uniswap V3 + revisit triggers)
- ADR 022 (six discovery alternatives: probe fan-out, gossip
  announcements, hash-prefix hints, iroh mainline DHT, indexer
  nodes, full libp2p Kademlia)
- ADR 026 (five tokenomics shapes: original 3% flat, auto-ve-lock-on-
  vest, USDC ve-pool, pure-deflationary slashing, TOKEN bootstrap
  fund)
- architecture.md (decentralised-storage model)
- appendix-encrypted-content-publishing (client expiry, decryption
  proxy, proxy re-encryption, per-client ECIES)
- appendix-local-admin-http (REST hyper, OpenRPC, Unix socket, iroh
  ALPN, /metrics extension)
- appendix-poc-production-seams (cfg!() branch, two features,
  runtime enum, Option fields, two repos, scattered cfg)

Neither `adrs.pdf` (numeric) nor `adrs-book.pdf` (reading-order)
includes the history file — the audit trail lives in the source repo
only, matching the README's "the protocol has one design" framing.
PDF readers approaching the protocol top-to-bottom get the canonical
spec; readers researching a specific decision can follow the
breadcrumb at the end of each source ADR back to the history.

The strip filter in the book PDF build still drops the now-stub
`## Alternatives Considered` headings (the patterns are unchanged) so
the book output is unaffected. The numeric PDF includes the stubs
plus their links to `_history/`, which render as plain text URLs in
typst — readable and discoverable on GitHub, where the cross-file
anchor resolves.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The `## Architectural Decisions` section walked every ADR with a
multi-paragraph summary (~8-10 lines per ADR × 22 ADRs = ~180 lines)
that duplicated each ADR's own Context / Decision intro. Readers who
clicked through to the ADR got the same content twice.

Replace the per-ADR sub-sections with a single bullet list, one line
per ADR, keeping each ADR's bold one-line decision summary verbatim
as the bullet body. Heading anchors (e.g. `#adr-001-network-topology-
and-peer-mesh`) were not referenced from any other ADR or the
README/CLAUDE.md/CONTRIBUTING.md (verified by grep), so collapsing
the headings into list items is safe.

Net result: architecture.md drops from 593 → 436 lines (-157),
~6 PDF pages off both numeric and book builds. The Reading Order
chapter index above remains the thematic top-to-bottom navigation;
this section is now the canonical numeric per-ADR index.

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 consolidates the 'Alternatives Considered' sections from multiple Architectural Decision Records (ADRs) into a single historical audit trail file, adr/_history/alternatives-pre-launch.md. It also refactors architecture.md to use a concise one-line index for ADR summaries. A broken anchor link was found in the new history file that needs to be updated to correctly reference the signature verification section in ADR 014.

Comment thread adr/_history/alternatives-pre-launch.md Outdated

## ADR 014 — Slash Signature Scheme

Source: [ADR 014 § 1 — ECDSA Signature for `slash_sig`](../014-on-chain-verification.md#1-poc-approach-eip-712-secp256k1-on-existing-fields).

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 anchor in this link is broken. It must be updated to match the header in adr/014-on-chain-verification.md. Note that GFM slug generation removes special characters like em-dashes and replaces spaces with hyphens, which leads to double hyphens in the anchor (e.g., ' — ' becomes '--'). Additionally, the link text should precisely identify the signature type (Ed25519 on-chain) to comply with repository documentation standards.

Suggested change
Source: [ADR 014 § 1 — ECDSA Signature for `slash_sig`](../014-on-chain-verification.md#1-poc-approach-eip-712-secp256k1-on-existing-fields).
Source: [ADR 014 § 1 — Ed25519 On-Chain Signature Verification — Dual-Key Slash Signatures](../014-on-chain-verification.md#1-ed25519-signature-verification--dual-key-slash-signatures).
References
  1. When referencing ADRs, ensure that anchor links are correctly formatted. GFM slug generation removes special characters like em-dashes and replaces whitespace with hyphens, potentially leading to double hyphens.
  2. In technical documentation, be precise about which cryptographic key is used for each specific signature type (e.g., distinguish between Ed25519 wire signatures and secp256k1 on-chain evidence signatures).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 24a66cf — applied your suggestion verbatim. The anchor I had (#1-poc-approach-eip-712-secp256k1-on-existing-fields) was carried over from an early-draft heading that had been renamed to ### 1. Ed25519 Signature Verification — Dual-Key Slash Signatures between the original ADR draft and where it landed; my history extraction missed the rename. GFM-correct anchor is now #1-ed25519-signature-verification--dual-key-slash-signatures.

alpergundogdu and others added 2 commits May 1, 2026 06:47
Each ADR opens with two metadata lines between the H1 title and the
first content section:

    # ADR 002: Content Addressing

    **Date:** 2026-03-28
    **Status:** Draft

    ## Context

In a top-to-bottom read of the protocol spec, those lines are noise:
they age poorly (most ADRs were touched on a date no one cares about
months later), and the "Draft" status is correct-but-meaningless once
the protocol ships. They remain useful as audit metadata in the
source `.md` files, but the rendered book PDF should read like a
single canonical design.

Extend `_build/strip-meta-sections.lua` with a `Para` filter inside
the existing `doc:walk` that drops paragraphs whose stringified text
starts with `Date:` or `Status:`. Both the soft-break-joined form
(no blank line between Date and Status) and the two-Para form
(ADR 022 has a blank line, parses as two Paras) are caught — the
leading text matches `Date:` / `Status:` either way.

Source files unchanged; only the reading-order `adrs-book.pdf` build
is affected. Numeric `adrs.pdf` keeps the metadata.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The history file's ADR 014 entry pointed at
`#1-poc-approach-eip-712-secp256k1-on-existing-fields`, an anchor
that doesn't exist in the source ADR. The actual heading is
`### 1. Ed25519 Signature Verification — Dual-Key Slash Signatures`,
which under GFM slug generation produces
`#1-ed25519-signature-verification--dual-key-slash-signatures` (the
em-dash drops, the surrounding spaces become a `--` pair).

Update the link text and anchor to match. Spotted in PR review.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alpergundogdu
alpergundogdu merged commit 6bc76fc into main May 1, 2026
8 checks passed
@alpergundogdu
alpergundogdu deleted the docs/adr-trim-architecture-and-history branch May 1, 2026 13:52
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 3: strip decision-record scaffolding, move to adr/_history/

1 participant