Skip to content

Latest commit

 

History

History
149 lines (131 loc) · 12.9 KB

README.md

File metadata and controls

149 lines (131 loc) · 12.9 KB

Architecture Decision Records

Significant architectural decisions are recorded here, one file per decision, numbered in order of acceptance. A decision is "significant" when reversing it later would be expensive: protocol shape, storage model, security boundaries, public contracts.

The rule: no decision of this class ships undocumented. The ADR lands in the same PR as the code, and may be written either before it (when the decision needs settling first) or from the finished implementation (when building is what reveals the right shape). What is never acceptable is a merged change of this class with no ADR, or an ADR that describes something other than what shipped.

Format

Files are named NNNN-short-title.md and follow a three-section template:

# NNNN. Title

Date: YYYY-MM-DD
Status: Accepted | Superseded by NNNN
Amends: NNNN, NNNN §5          # optional — decisions this one changes
Amended by: NNNN               # optional — later decisions that changed this one

## Context

What situation forces a decision. Constraints, not opinions.

## Decision

What we chose, stated in one place, unambiguously.

## Consequences

What becomes easier, what becomes harder, what we gave up.

The body is immutable once accepted; the header is maintained. Context, Decision and Consequences record what was decided when it was decided and are never edited. A change of mind produces a new ADR: a whole replacement gives the old file Status: Superseded by NNNN, a partial change declares Amends: in the new file and adds Amended by: to the old one.

The distinction is that the two reference lines carry information that did not exist when the file was written, and that its author could not have written. A reader who opens an old ADR must be able to see, in that file, that the ground has moved — which is precisely what nine slices of one-directional references failed to give them (ADR 0022).

Status: is a closed vocabulary: Accepted or Superseded by NNNN, nothing else. Partial amendment goes in Amends:, never in prose appended to the status.

docs/adr/adr_test.go enforces all of it — the graph must be symmetric, point backwards, name only ADRs that exist, and every ADR must appear in the index below. Forgetting the mirror line fails make test, and the failure prints the line to paste.

Index