Markdown Editor

Architecture Decision Record (ADR) Template

Lightweight Nygard-style ADR: status, context, decision, consequences, alternatives, related decisions, lifecycle and log

Logiciel & IngénierieStandardMichael Nygard ADR format (2011)adr

Mode d'emploi: Use it for architecturally significant decisions that are hard to reverse but do not need scored options (use MADR for that). Write the context neutrally before the decision. The main pitfall is editing an accepted ADR instead of superseding it with a new one.

Aperçu

ADR-[NNNN]: [Short decision title in the active voice]

Lightweight architecture decision record in the format popularised by Michael Nygard ("Documenting Architecture Decisions", 2011): title, status, context, decision and consequences, extended here with alternatives considered and related decisions. Use it for decisions that are significant but do not need the structured option scoring of the MADR template (dev/madr).

FieldValue
IDADR-[NNNN]
Status[Proposed / Accepted / Rejected / Deprecated / Superseded by ADR-NNNN]
DateYYYY-MM-DD
Deciders[@name, @name]
Consulted[@name]
Tags[architecture, storage, api]
Supersedes[ADR-NNNN or none]

When to write an ADR

Write an ADR when a decision is architecturally significant: it is hard or expensive to reverse, it affects several teams or components, or someone will later ask "why did we do it this way?". Typical triggers:

  • Choosing a framework, database, message broker, cloud service or major library.
  • Changing a public API style, data format, protocol or authentication method.
  • Setting a cross-cutting rule, such as how errors are logged or how services talk.
  • Accepting a known trade-off, such as eventual consistency or a vendor dependency.
  • Deliberately not doing something that people will keep proposing.

Do not write an ADR for choices that are local, cheap to change or already dictated by an existing standard; a code comment or pull request description is enough.

Lifecycle

An ADR moves through a small set of states. Only the deciders named in the record can accept or reject it, normally after review in a pull request or an architecture meeting.

StatusMeaningWho changes it
ProposedUnder discussion; may still changeAuthor
AcceptedIn force; the system should conformDeciders
RejectedConsidered and declined; kept for historyDeciders
DeprecatedNo longer applies, with no direct replacementDeciders
SupersededReplaced by a newer ADR, linked in the statusAuthor of the new ADR

Context

[Describe the issue that motivates this decision and the forces that shape it, including constraints and facts that cannot be changed.]

Example: The editor stores documents in the browser using IndexedDB. Users ask for revision history, and today every save overwrites the previous version. Average document size is 18 KB; heavy users keep about 400 documents and save every few seconds while typing. Browser storage quotas vary by browser and can be as low as a few hundred megabytes on some mobile devices. We must not send document content to a server.

Decision

We will [decision in one or two sentences].

Example: We will store revisions as full snapshots in a separate IndexedDB table, created at most once every 5 minutes of active editing and on explicit save, and keep the latest 50 revisions per document, pruning older ones automatically. Revisions are stored locally only.

Consequences

What becomes easier or harder because of this decision.

Positive

  • Example: Simple to implement and to restore; any revision is readable on its own.
  • Example: No server and no change to the privacy model.

Negative

  • Example: Storage grows to roughly 50×18 KB≈0.9 MB50 \times 18\,\text{KB} \approx 0.9\,\text{MB} per heavily edited document, about 360 MB in the worst case for 400 documents; quota handling is required.
  • Example: Diffs between revisions must be computed on demand.

Follow-up actions

  • [Action, owner, due date], Example: add a quota warning in Settings, @dev, YYYY-MM-DD.
  • [Action, owner, due date]

Alternatives considered

AlternativeSummaryWhy not chosen
Example: Store diffs (patches) between revisionsSmaller storage, about 10% of snapshotsRestoring requires replaying chains; corruption of one patch breaks later revisions
Example: Keep every saveComplete historyStorage grows without bound for users who type continuously
Example: Sync revisions to a serverUnlimited storageBreaks the local-first, zero-collection principle
[Alternative][Summary][Reason]

Related decisions

ADRRelationshipNote
Example: ADR-0003 Use IndexedDB through Dexie for local storageDepends onRevisions use the same database
Example: ADR-0011 Autosave debounce intervalRelatedRevision interval builds on autosave events
[ADR-NNNN][Depends on / Supersedes / Superseded by / Conflicts with][Note]

ADR log

The log lists every ADR with its current status.

IDTitleStatusDateSuperseded by
ADR-0001Example: Record architecture decisionsAcceptedYYYY-MM-DD
ADR-0003Example: Use IndexedDB through Dexie for local storageAcceptedYYYY-MM-DD
ADR-0007Example: Render Markdown with a custom parserSupersededYYYY-MM-DDADR-0009
ADR-0009Example: Render Markdown with a unified/remark pipelineAcceptedYYYY-MM-DD
ADR-[NNNN][Title][Status]YYYY-MM-DD[ADR-NNNN]

Standard and licence note

Based on the architecture decision record format described by Michael Nygard in "Documenting Architecture Decisions" (2011): title, status, context, decision and consequences, extended with alternatives, related decisions and an ADR log as commonly practised. The text is original to this collection and reproduces none of the source article. Template licence: MIT.

Modèles associés