Create Architecture Decision Records for significant technical decisions...
Purpose: Create Architecture Decision Records (ADRs) using MADR (Markdown Any Decision Records) format for significant technical decisions.
When to use:
Identify which project this ADR belongs to based on context:
stellaris/docs/adr/hotel-de-ville/docs/adr/inbox/adr/ (for tooling, processes, meta-decisions)Detection heuristics:
Scan the target project's docs/adr/ directory to find the next available number:
# Example for Stellaris
ls stellaris/docs/adr/ADR-*.md | wc -l
# Result: 3 existing ADRs
# Next number: ADR-004
Numbering rules:
Use the template in adr-template.md (see below).
File naming convention: ADR-NNN-kebab-case-title.md
Examples:
ADR-001-sqlite-vs-postgresql-for-stellaris.mdADR-002-zustand-state-management.mdADR-003-qdrant-vector-database.mdRequired sections (from template):
Quality criteria:
Maintain docs/adr/README.md with table of all ADRs.
Format:
# Architecture Decision Records
| ID | Title | Status | Date |
|----|-------|--------|------|
| [ADR-001](ADR-001-example.md) | Example Decision | Accepted | 2025-01-01 |
| [ADR-002](ADR-002-new.md) | New Decision | Accepted | 2025-01-15 |
Update process:
If README.md doesn't exist, create it with header and first entry.
Location: .claude/skills/write-adr/adr-template.md
# ADR-[number]: [Title]
**Status:** Proposed | Accepted | Deprecated | Superseded by [ADR-XXX]
**Date:** [YYYY-MM-DD]
**Deciders:** [who made this decision - e.g., Johannes, Solutions Architect, Product Team]
**Technical Story:** [link to related plan/issue/spike if applicable]
## Context and Problem Statement
[Describe the context and problem statement in 2-4 paragraphs. What forces are at play? What constraints exist? What requirements drive this decision?]
[Good context answers: Why do we need to make this decision now? What would happen if we didn't decide? What are the key constraints (time, budget, team skills, existing systems)?]
## Decision Drivers
- [driver 1, e.g., "Must support 1000+ concurrent users"]
- [driver 2, e.g., "Team has strong Python experience but limited Go"]
- [driver 3, e.g., "Budget constraint of $100/month for infrastructure"]
- [driver 4, e.g., "Must integrate with existing PostgreSQL database"]
- [driver 5, e.g., "Decision must be reversible within 3 months"]
## Considered Options
1. **[Option 1]** - [1-2 sentence description]
2. **[Option 2]** - [1-2 sentence description]
3. **[Option 3]** - [1-2 sentence description]
[Include at least 3 options. Consider "do nothing" as an option when relevant.]
## Decision Outcome
**Chosen option:** "[Option X]", because [2-3 sentence justification explicitly linking to decision drivers above].
### Positive Consequences
- [e.g., "Improved query performance by 10x"]
- [e.g., "Simplified deployment (no separate database server)"]
- [e.g., "Team can start implementing immediately (familiar technology)"]
### Negative Consequences
- [e.g., "Increased complexity in error handling"]
- [e.g., "Learning curve for team (2 week ramp-up estimated)"]
- [e.g., "Won't scale beyond 10k users without migration"]
## Pros and Cons of the Options
### [Option 1]
- **Good**, because [specific benefit]
- **Good**, because [specific benefit]
- **Bad**, because [specific drawback]
- **Bad**, because [specific drawback]
- **Neutral**, because [neutral consideration]
### [Option 2]
- **Good**, because [specific benefit]
- **Good**, because [specific benefit]
- **Bad**, because [specific drawback]
- **Bad**, because [specific drawback]
### [Option 3]
- **Good**, because [specific benefit]
- **Bad**, because [specific drawback]
- **Bad**, because [specific drawback]
## Links
- [Related ADR-XXX: Title](ADR-XXX-title.md)
- [Related Plan: PLAN-2025-XXX](../../inbox/plans/PLAN-2025-XXX.md)
- [Technical Spike: Topic](../../inbox/spikes/spike-2025-01-15-topic.md)
- [External documentation or research](https://example.com)
ADRs have a lifecycle tracked in the Status field:
| Status | Meaning |
|---|---|
| Proposed | Decision drafted but not yet approved |
| Accepted | Decision approved and in effect |
| Deprecated | Decision no longer recommended but not replaced |
| Superseded by ADR-XXX | Decision replaced by newer ADR |
Status transitions:
Before finalizing an ADR, verify:
File: stellaris/docs/adr/ADR-001-sqlite-vs-postgresql.md
Key sections:
File: stellaris/docs/adr/ADR-005-zustand-state-management.md
Key sections:
If ADR directory doesn't exist:
mkdir -p {project}/docs/adr/If numbering collision (concurrent ADRs):
If project can't be determined:
This skill is used by:
solutions-architect agent - Primary user for architectural decisionstechnical-pm agent - For process/workflow decisions/adr command - User-initiated ADR creationThis skill uses:
Read - Scan existing ADRs for numberingWrite - Create new ADR fileGlob - Find all ADR filesGrep - Search for related ADRsUpdate this skill when:
Document significant changes to this skill in repository CLAUDE.md.