Skip to content

Architecture decision records

An ADR records a decision that is hard to reverse — one where the cost of changing our minds later is paid by consumers, not by us. Most decisions are not that. If a decision can be undone in a patch release without anybody noticing, it belongs in a commit message or in ../architecture.md, not here.

Concretely, for this repo: anything that changes the shape of DevToolbarExtension, the meaning of a data-dtb-* hook, the storage key layout, or what an entry in the exports map is called. Those are things published consumers have written code against.

Format

One file per decision, ADR-<NNN>-<kebab-name>.md, numbered in order and never renumbered. ADR-000-template.md is the template — the Nygard sections: Status, Context, Decision, Consequences.

Status is one of:

StatusMeaning
ProposedWritten down, not settled. The question is open and the ADR says what is undecided.
AcceptedIn force. The code does this.
Superseded by ADR-NNNReplaced. The file stays; superseded ADRs are never deleted, because the reasoning is why the replacement exists.

Rules that matter more than the format:

  • Write the rejected alternatives, and what they would have cost. An ADR that lists one option is a changelog entry wearing a costume.
  • Where a decision carries security, reliability or operational risk, accept the risk explicitly — say what could go wrong, how likely it is, and what mitigates it. A risk nobody wrote down is a risk nobody owns.
  • A mermaid diagram is worth adding where it clarifies a flow, and noise otherwise.
  • An ADR is a record of a decision at a point in time. Do not edit it to match what the code does now; supersede it.

The records

#TitleStatus
001Extensions are plain objects passed in as a propAccepted
002The shell renders in the light DOMAccepted
003CONTRACT_VERSION compatibility policyProposed
004Per-extension bar presentationAccepted
005Build the documentation site over the docs treeAccepted

Released under the MIT License.