Skip to main content

Architecture decisions (ADRs)

An Architecture Decision Record (ADR) is a short page that records one decision: what the situation was, what was chosen, and what follows from it. Its job is to answer “why is it like this?” months later, so nobody removes a workaround or reopens a settled question without knowing the history. ADRs describe decisions as they were made. They are not kept in sync with the code. When a decision changes, write a new ADR that supersedes the old one instead of rewriting it.

When to write one

Write an ADR when a choice:
  • is hard or expensive to reverse (a runtime, a dependency, a platform you will or will not support),
  • looks wrong or arbitrary in isolation and a future contributor is likely to “fix” it,
  • rules something out on purpose (for example no CUDA, no server), or
  • worked around a bug you do not own in a way that shapes the architecture.
Do not write one for routine implementation detail, or for anything the code and its comments already explain well. Workarounds for upstream bugs also get an entry in KNOWN_ISSUES.md in the repo. If you are not sure, open an issue first. Larger changes should be discussed there before a PR (see Contributing).

Numbering and files

  • One file per decision: developers/decisions/NNNN-short-title.mdx.
  • Four-digit numbers, in order, starting at 0001. Take the next free number. Never reuse or renumber one, even if the ADR is rejected or superseded.
  • Add the page to the “Decisions” group in docs.json.
  • Keep each ADR short: a page or less. Link to the code and to issues instead of copying them.
  • Only record reasons the sources support. If a reason is unknown, say less rather than guess.

Statuses

Template

Copy this into a new file.

Index