--- name: decision-records description: Writes and audits concise architecture decision records (MADR or Y-statement) with alternatives, consequences, revisit triggers and a staleness rubric. Use when a technical decision is made, changed, questioned or needs writing up for future developers, when existing records need an audit, or to find the recorded rationale of an existing decision (check docs/adr first); a casual "why" question about a piece of code does not need it. --- # Decision Records (ADR) An ADR keeps the **why** that code cannot show: context, rejected options, accepted trade-offs. ## Significance test (write one if any holds) | Test | Example | |---|---| | One-way door: hard or costly to reverse | Database, framework, public API shape | | Cross-cutting | Error strategy, auth model, module boundaries | | Surprising to a newcomer | "Why not the obvious library?" | | Known trade-off accepted | Consistency traded for latency | | Constraint-driven | Legal, budget, platform limit | Two-way doors (cheap to reverse) get a commit message, not an ADR. ## Location and naming Reuse `docs/adr/`, `doc/adr/`, `adr/` or `docs/decisions/`; else create `docs/adr/` (read-only agents: put the draft in the report instead). File `NNNN-kebab-title.md`, numbers never reused. To find why an existing decision was made, read these folders first (Context and Alternatives hold the rationale); nothing recorded → say so instead of inferring a rationale. ## Template (≤ 60 lines) ```markdown # NNNN Title as decision statement Status: proposed | accepted | superseded by NNNN | deprecated · Date: YYYY-MM-DD ## Context Forces and constraints. Mark each assumption explicitly. ## Decision Imperative and specific. ## Alternatives | Option | Rejected because | ## Consequences Positive and negative; who or what must change. ## Revisit if Observable triggers (version, scale, metric, event). ``` Small decisions fit a **Y-statement**: *In the context of ``, facing ``, we decided `