Architecture decision records
Short notes on decisions that are expensive to rediscover — where the reasoning matters more than the diff, and where a later reader would otherwise be within their rights to "fix" the thing on purpose.
This is not a process. Most changes need no record at all; ARCHITECTURE.md
covers how the system is built and the code comments carry the local why. An ADR
earns its place when the obvious thing is wrong for a non-obvious reason —
usually a measured constraint the code cannot state for itself.
One file per decision, NNNN-kebab-title.md, numbered in order and never
renumbered. Keep the shape:
- Status — accepted / superseded by NNNN. Records are not edited into a new opinion; a reversal is a new record that supersedes this one, because the wrong turn is usually the more useful half.
- Context — what was measured or observed. Numbers, not adjectives.
- Decision — what was done.
- Consequences — what this costs, and what it forbids. The forbidding is the point: it is what stops the decision being quietly undone.
Where the working-out lives, when it is long: docs/handoffs/. An ADR should be
readable without it.
| # | decision |
|---|---|
| 0001 | A GPU hang rebuilds the device instead of ending the session |
| 0002 | Treat per-tab WebGPU sessions as a scarce budget (superseded by 0004) |
| 0003 | Delete the worker-hosted engine |
| 0004 | Never destroy a GPUDevice that has been presenting |
| 0005 | Saved profiles live in Firestore, and need an account |
| 0006 | A take is a seed plus its resolved picks, and never Math.random |
| 0007 | The FIR passes are not ALU-bound, so ablate before optimizing |
| 0008 | Record H.264 High, pick the level from the frame, and know where the chroma went |
| 0009 | The sync separator slices off the peak it finds and the restorer sets black from it |
| 0010 | The account holds the session and a still per profile, not just the library |
| 0011 | App Check attests the client, and the rules do not rate limit |
| 0012 | The account keeps one session per visit, up to a cap |