Architecture Decision Records
You are recording or retrieving an Architecture Decision Record (ADR) for this
project. ADRs live in api/docs/arch/adr/ at the repo root.
When to record
Record these decisions:
- Technology selections (frameworks, libraries, databases, cloud providers)
- Architectural patterns (state management, caching strategy, API design)
- Data modeling choices (schema design, indexing, query approach)
- Infrastructure and deployment models
- Security, authentication, or testing strategy changes
- Any choice where the "why we didn't pick the alternative" will matter in 6 months
Skip: trivial choices (variable naming, formatting, minor refactors).
ADR template
Every ADR must have an H1 title stating the decision, and body prose covering
the context, the decision itself, and the alternatives considered with why
they were rejected. README.md and template.md are index/template files,
not ADRs, and are exempt from this requirement.
The body may be short free-form prose covering those points, or the full
template below (Date/Status/Deciders header block, Context, Decision,
Alternatives Considered, Consequences). The full template is recommended for
new ADRs but not required — the **Deciders**: line is always optional. If
the decision, its context, or the rejected alternatives can't be stated, stop
and ask the user for the missing information before writing the file.
# ADR-NNNN: [Decision Title]
**Date**: YYYY-MM-DD
**Status**: proposed | accepted | deprecated | superseded by ADR-NNNN
**Deciders**: [who was involved]
## Context
[2–5 sentences describing the situation, constraints, and forces at play]
## Decision
[1–3 sentences stating the change clearly and unambiguously]
## Alternatives Considered
### Alternative 1: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific rejection reason]
### Alternative 2: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific rejection reason]
## Consequences
### Positive
- [benefit 1]
### Negative
- [trade-off 1]
### Risks
- [risk and mitigation]
Workflow — recording a new ADR
- Scan existing ADRs —
Glob api/docs/arch/adr/[0-9]*.md to find the highest existing number.
- Assign next ID — next sequential 4-digit number (e.g.,
0003).
- Gather context — ask the user for any missing details on the context, the decision, and the alternatives considered with why they were rejected. Only ask about deciders and consequences if the user opts into the full template.
- Draft the ADR — cover the context, decision, and rejected alternatives, either as free-form prose or using the full template above.
- Present the draft — show it to the user for review before writing any file.
- Write the file —
api/docs/arch/adr/NNNN-kebab-title.md (kebab-case title, all lowercase).
- Update the index — append a new row to the
| ADR | Title | Status | Date | table in api/docs/arch/adr/README.md.
Workflow — reading / querying ADRs
- Check if
api/docs/arch/adr/README.md exists. If not, offer to start the ADR directory.
- Read the README index table and find entries relevant to the user's question.
- Read the matching ADR file and summarise the Context and Decision sections.
- If no ADR matches, suggest recording one now.
Quality standards
- Each ADR should be readable in under 2 minutes.
- Every rejected alternative must include a Why not reason — "we didn't pick X" without a reason is useless.
- When a decision is superseded, update the old ADR's Status field to
superseded by ADR-NNNN and create the new ADR with a back-reference in its Context.
- Keep one decision per ADR — split if two separate choices are getting conflated.
1---2name: adr3description: Record an architecture decision as an ADR in api/docs/arch/adr/. Use when choosing between frameworks, libraries, databases, or architectural patterns; stating a decision with reasoning ("we decided X instead of Y because..."); or querying past decisions ("why did we choose X?").4---56# Architecture Decision Records78You are recording or retrieving an Architecture Decision Record (ADR) for this9project. ADRs live in `api/docs/arch/adr/` at the repo root.1011## When to record1213**Record these decisions:**14- Technology selections (frameworks, libraries, databases, cloud providers)15- Architectural patterns (state management, caching strategy, API design)16- Data modeling choices (schema design, indexing, query approach)17- Infrastructure and deployment models18- Security, authentication, or testing strategy changes19- Any choice where the "why we didn't pick the alternative" will matter in 6 months2021**Skip:** trivial choices (variable naming, formatting, minor refactors).2223## ADR template2425Every ADR must have an H1 title stating the decision, and body prose covering26the context, the decision itself, and the alternatives considered with why27they were rejected. `README.md` and `template.md` are index/template files,28not ADRs, and are exempt from this requirement.2930The body may be short free-form prose covering those points, or the full31template below (Date/Status/Deciders header block, Context, Decision,32Alternatives Considered, Consequences). The full template is recommended for33new ADRs but not required — the `**Deciders**:` line is always optional. If34the decision, its context, or the rejected alternatives can't be stated, stop35and ask the user for the missing information before writing the file.3637```markdown38# ADR-NNNN: [Decision Title]3940**Date**: YYYY-MM-DD41**Status**: proposed | accepted | deprecated | superseded by ADR-NNNN42**Deciders**: [who was involved]4344## Context45[2–5 sentences describing the situation, constraints, and forces at play]4647## Decision48[1–3 sentences stating the change clearly and unambiguously]4950## Alternatives Considered5152### Alternative 1: [Name]53- **Pros**: [benefits]54- **Cons**: [drawbacks]55- **Why not**: [specific rejection reason]5657### Alternative 2: [Name]58- **Pros**: [benefits]59- **Cons**: [drawbacks]60- **Why not**: [specific rejection reason]6162## Consequences6364### Positive65- [benefit 1]6667### Negative68- [trade-off 1]6970### Risks71- [risk and mitigation]72```7374## Workflow — recording a new ADR75761. **Scan existing ADRs** — `Glob api/docs/arch/adr/[0-9]*.md` to find the highest existing number.772. **Assign next ID** — next sequential 4-digit number (e.g., `0003`).783. **Gather context** — ask the user for any missing details on the context, the decision, and the alternatives considered with why they were rejected. Only ask about deciders and consequences if the user opts into the full template.794. **Draft the ADR** — cover the context, decision, and rejected alternatives, either as free-form prose or using the full template above.805. **Present the draft** — show it to the user for review before writing any file.816. **Write the file** — `api/docs/arch/adr/NNNN-kebab-title.md` (kebab-case title, all lowercase).827. **Update the index** — append a new row to the `| ADR | Title | Status | Date |` table in `api/docs/arch/adr/README.md`.8384## Workflow — reading / querying ADRs85861. Check if `api/docs/arch/adr/README.md` exists. If not, offer to start the ADR directory.872. Read the README index table and find entries relevant to the user's question.883. Read the matching ADR file and summarise the **Context** and **Decision** sections.894. If no ADR matches, suggest recording one now.9091## Quality standards9293- Each ADR should be readable in under 2 minutes.94- Every rejected alternative must include a **Why not** reason — "we didn't pick X" without a reason is useless.95- When a decision is superseded, update the old ADR's **Status** field to `superseded by ADR-NNNN` and create the new ADR with a back-reference in its Context.96- Keep one decision per ADR — split if two separate choices are getting conflated.