Architecture Decision Records — index

An ADR records a decision, the alternatives it beat, and what it cost — and then stops changing. This directory answers "why is it this way?", a question the design docs cannot answer because they describe the current contract, which is allowed to move.

The boundary rule

This is what keeps the corpus from becoming a fourth copy of the documentation. Each kind of fact has exactly one home:

ContentOne homeMutable?
The decision, the alternatives considered, the accepted consequencesdocs/adr/NNNN-*.mdNo — a change is a new ADR plus Superseded by on the old one
The current contract: capabilities, file formats, semanticsthe design doc (docs/KV-CACHE-DESIGN.md, docs/COMPUTE-GRAPH-DESIGN.md, …), which links Decision: ADR-NNNNYes
Measurements, suite counts, per-ticket historyscripts/test-baselines.toml, docs/TEST-BASELINES.md, docs/ARCHITECTURE-EXECUTION-PLAN.mdYes
The plan's phase counters, next: sentence and baseline commitsscripts/status.toml, docs/ARCHITECTURE-EXECUTION-PLAN.mdYes
Unresolvable path citations in this corpus, each with a reasonscripts/adr-citations.toml, beside its checkerYes
A machine-read record: fixture provenance, an accepted-annotation baselinebeside its readers, never in the book tree — tests/fixtures/f6-fixtures.json, scripts/dead-code-baseline.toml (ADR-0024)Yes

What a map lists. A design document ends with ## Decisions governing this document — its map. It lists the ADRs whose decision that document's current contract depends on (states it, or requires it); naming another document's decision is a cross-reference, which belongs in the prose and not in the map, so a document may legitimately mention an ADR its map omits (ADR-0028).

Three kinds of page carry no map, and that is not an omission — each is a place a fact about a decision lives, not a document whose contract depends on one:

  • a record page: the plan and its per-ticket history (docs/ARCHITECTURE-EXECUTION-PLAN.md), the optimization records (docs/CUDA_OPTIMIZATION.md, docs/METAL_OPTIMIZATIONS.md), and a plan's own root-cause notes (docs/QWEN3-SUPPORT-PLAN.md);
  • a ledger page: docs/TEST-BASELINES.md, whose numbers are machine-checked against scripts/test-baselines.toml;
  • an upstream comparison: docs/LLAMA-COMPUTE-GRAPH.md, which is not this repository's contract.

And a map may omit an ADR that names the page, in two cases — both are references about a document rather than a dependency of it:

  • a correction reference: ADR-0022 names the documents whose citations it fixes (ADR-0029 records the class);
  • a contrast reference: ADR-0037 names docs/CUDA-BACKEND-DESIGN.md §4.3 as a different mechanism, not as a dependency.

Three rules keep it that way. All three are about kind, not about banning a form:

  • A capability is a dated consequence, never a present-tense claim. "At the Date: above, #310 enabled X" is allowed; "X is now true" is not — that is the sentence that rots. The authority for what is true today is the design doc and docs/SUPPORT-MATRIX.md, which are mutable.
  • A citation is dated — a path, a symbol and a count, not only a capability. An ADR may say "the ledgers then lived under docs/"; it may not say "the ledgers live under docs/". Cite the kind of home (the machine ledger, the design doc) or date the reference. An unresolvable path citation is either pinned with a reason in scripts/adr-citations.toml or it fails check_adr.py; telling history from staleness is that ledger's whole purpose (ADR-0027).
  • A number may be evidence, never a baseline. A count that is part of an argument — the rejected alternative's failures, a named boundary — is frozen with the ADR and belongs in it. A current suite baseline belongs in docs/TEST-BASELINES.md and its ledger scripts/test-baselines.toml, which are machine-checked. An ADR that quotes today's suite result is a bug.

Three consequences worth stating outright:

  • Superseding is additive. Correcting a decision means writing a new ADR and setting the old one's Status to Superseded by ADR-NNNN. The old text is never edited — the record of what we believed, and why, is the useful part.
  • Corrections are additive too. A defect in a frozen ADR's text is corrected by a new ADR carrying - Corrects: ADR-NNNN, and the corrected ADR's row below names the corrector — both ends, enforced by check_adr.py. The old text is never edited. See ADR-0022 (three citations at once) and ADR-0026 (a path a follow-through had moved).
  • Numbers are citations. They are dense from 0001, never reused, never renumbered. A number is assigned once, in the order decisions are established when their ADR is written, and the Date: field carries the date the decision was actually taken. Because most of this corpus is backfilled from existing records, a decision discovered later keeps its true (possibly earlier) Date: and takes the next free number — so the sequence is approximately chronological, and Date: is always the authority. That is the cost of keeping numbers stable; stability is worth more here than a perfect chronology.

scripts/check_adr.py (CI job check-docs) enforces the mechanically checkable half: filename and heading agree, dense numbering, one of four Status values, a YYYY-MM-DD date, the required sections, every ADR listed below, Superseded by written from both ends, a Corrects: target that exists, is lower-numbered and is named on its own index row, and every path citation either resolving or pinned in scripts/adr-citations.toml.

Index

Ordered by Date:, because a number is a citation and a date is the chronology. Backfilled ADRs are numbered in the order they were written, so a lower number does not imply an earlier decision — see the numbering rule above. Within one date, the order is by number.

#DateDecisionStatus
00072026-06-24No ML frameworks: every operator is hand-writtenAccepted (citation corrected by ADR-0024)
00132026-06-24The CPU quantizes activations to Q8_0; a device reads f32Accepted
00082026-08-02GPU safety: bounded waits, no early return past a barrier, runtime device limitsAccepted
00012026-08-21Inference runs through one declarative compute graphAccepted (citation corrected by ADR-0022)
00022026-08-21Topology is a function of GraphParams alone, so positions cannot be structureAccepted
00092026-08-21A failure is an error, never a silent fallbackAccepted
00102026-08-28The identity gate: bitwise by default, a named tolerance class otherwiseAccepted (citation corrected by ADR-0022)
00032026-09-16Metal is out of scope for this roundSuperseded by ADR-0005
00042026-09-19The batching default follows the deviceAccepted
00052026-09-20Metal becomes a first-class backendAccepted (supersedes ADR-0003; corrected by ADR-0022)
00142026-09-22A KV session is a versioned, checksummed file — never a memory dumpAccepted
00152026-09-23The offload auto fit takes a prefix, not a knapsackAccepted
00112026-09-24Backend ids are a file-format contract: appended, never renumberedAccepted
00162026-09-24A failed device-memory query is not a zero budgetAccepted
00172026-09-24Speculative decoding refuses the features its identity contract cannot carryAccepted
00182026-09-24The grammar mask is one stage inside the single sampler pipelineAccepted
00192026-09-24A chat template that cannot be rendered refuses the loadAccepted
00062026-09-25The KV storage format is a per-engine gate, not a process-wide globalAccepted
00202026-09-27A quantized file is byte-identical to llama-quantize, or it is wrongAccepted (citation corrected by ADR-0024)
00212026-09-27bf16 is a round-to-nearest-even cast, and 1-D tensors stay f32Accepted
00122026-10-04Device is the first axis, the layer the second — and no premature commonAccepted
00222026-10-09A defect in a frozen ADR is corrected by a new ADR, not by editing itAccepted (corrected by ADR-0023 and ADR-0027)
00232026-10-09Each machine ledger lives beside its checker, one per prose targetAccepted
00242026-10-09A machine-read record is not book contentAccepted
00252026-10-09A docs-only change runs the docs gate, not the compilersAccepted (corrected by ADR-0026)
00262026-10-10The classifier carries no docs-path exception, and its list is ratchetedAccepted
00272026-10-10A citation is dated too — paths, symbols and counts, not only capabilitiesAccepted (corrects ADR-0022)
00282026-10-10A document's ADR map lists what its contract depends onAccepted (corrected by ADR-0029)
00292026-10-10An ADR's prose count is dated too, and its References are map evidenceAccepted (corrects ADR-0028)
00302026-10-10Launch severity lives in the helper, not in 120 call sitesAccepted
00312026-10-10Capture runs in thread-local mode, because Global lets a foreign thread's call join the windowAccepted
00322026-10-10The packed-KV staging window is f32, not f16Accepted
00332026-10-10The CUDA pool recycles exact byte lengths, never frees, and reports OOM as an errorAccepted
00342026-10-10The smem opt-in is an eager pre-warm by construction, with the lazy path as defence in depthAccepted
00352026-10-10The q4_K dsc plane is admitted by two gates, and the payload test is equalityAccepted
00362026-10-10bf16 weights get their own device kernels, not a dtype flag on the f16 onesAccepted
00372026-10-10A Metal weight dtype a kernel cannot consume is refused, never run as a wrong kernelAccepted
00382026-10-10The per-tensor registration dispatch is one shared rule, not a copy per loaderAccepted

The template

# NNNN. One-line decision title

- Status: Accepted | Proposed | Rejected | Superseded by ADR-NNNN
- Date: YYYY-MM-DD
- Issues: #NN, #NN            (optional)
- Supersedes: ADR-NNNN        (required when this ADR replaces one)
- Corrects: ADR-NNNN          (when this ADR corrects an earlier one's text; see ADR-0022)

## Context

What the situation was, and what made it a decision rather than a default. Cite the record.

## Decision

What was decided, in one or two sentences, then the concrete facts (symbols, files, flags).

## Alternatives considered

Each alternative and the reason it lost — a measurement, a constraint, a cost. If the record holds
no rejected alternative, say so explicitly rather than inventing one.

## Consequences

What this makes easy, what it makes expensive, and which costs were knowingly accepted.

## References

The design doc or plan section that holds the current contract, and the issues/PRs involved.