Architecture Decision Records
Capture architectural decisions as they happen during coding sessions. Instead of decisions living only in Slack threads, PR comments, or someone's memory, this skill produces structured ADR documents that live alongside the code.
When to Activate
- User explicitly says "let's record this decision" or "ADR this"
- User chooses between significant alternatives (framework, library, pattern, database, API design)
- User says "we decided to..." or "the reason we're doing X instead of Y is..."
- User asks "why did we choose X?" (read existing ADRs)
- During planning phases when architectural trade-offs are discussed
ADR Format
Use the lightweight ADR format proposed by Michael Nygard, adapted for AI-assisted development:
# ADR-NNNN: [Decision Title]
**Date**: YYYY-MM-DD
**Status**: proposed | accepted | deprecated | superseded by ADR-NNNN
**Deciders**: [who was involved]
## Context
What is the issue that we're seeing that is motivating this decision or change?
[2-5 sentences describing the situation, constraints, and forces at play]
## Decision
What is the change that we're proposing and/or doing?
[1-3 sentences stating the decision clearly]
## Alternatives Considered
### Alternative 1: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific reason this was rejected]
### Alternative 2: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific reason this was rejected]
## Consequences
What becomes easier or more difficult to do because of this change?
### Positive
- [benefit 1]
- [benefit 2]
### Negative
- [trade-off 1]
- [trade-off 2]
### Risks
- [risk and mitigation]
Workflow
Capturing a New ADR
When a decision moment is detected:
- Initialize (first time only) — if
docs/adr/ does not exist, ask the user for confirmation before creating the directory, a README.md seeded with the index table header (see ADR Index Format below), and a blank template.md for manual use. Do not create files without explicit consent.
- Identify the decision — extract the core architectural choice being made
- Gather context — what problem prompted this? What constraints exist?
- Document alternatives — what other options were considered? Why were they rejected?
- State consequences — what are the trade-offs? What becomes easier/harder?
- Assign a number — scan existing ADRs in
docs/adr/ and increment
- Confirm and write — present the draft ADR to the user for review. Only write to
docs/adr/NNNN-decision-title.md after explicit approval. If the user declines, discard the draft without writing any files.
- Update the index — append to
docs/adr/README.md
Reading Existing ADRs
When a user asks "why did we choose X?":
- Check if
docs/adr/ exists — if not, respond: "No ADRs found in this project. Would you like to start recording architectural decisions?"
- If it exists, scan
docs/adr/README.md index for relevant entries
- Read matching ADR files and present the Context and Decision sections
- If no match is found, respond: "No ADR found for that decision. Would you like to record one now?"
ADR Directory Structure
docs/
└── adr/
├── README.md ← index of all ADRs
├── 0001-use-nextjs.md
├── 0002-postgres-over-mongo.md
├── 0003-rest-over-graphql.md
└── template.md ← blank template for manual use
ADR Index Format
# Architecture Decision Records
| ADR | Title | Status | Date |
|-----|-------|--------|------|
| [0001](0001-use-nextjs.md) | Use Next.js as frontend framework | accepted | 2026-01-15 |
| [0002](0002-postgres-over-mongo.md) | PostgreSQL over MongoDB for primary datastore | accepted | 2026-01-20 |
| [0003](0003-rest-over-graphql.md) | REST API over GraphQL | accepted | 2026-02-01 |
Decision Detection Signals
Watch for these patterns in conversation that indicate an architectural decision:
Explicit signals
- "Let's go with X"
- "We should use X instead of Y"
- "The trade-off is worth it because..."
- "Record this as an ADR"
Implicit signals (suggest recording an ADR — do not auto-create without user confirmation)
- Comparing two frameworks or libraries and reaching a conclusion
- Making a database schema design choice with stated rationale
- Choosing between architectural patterns (monolith vs microservices, REST vs GraphQL)
- Deciding on authentication/authorization strategy
- Selecting deployment infrastructure after evaluating alternatives
What Makes a Good ADR
Do
- Be specific — "Use Prisma ORM" not "use an ORM"
- Record the why — the rationale matters more than the what
- Include rejected alternatives — future developers need to know what was considered
- State consequences honestly — every decision has trade-offs
- Keep it short — an ADR should be readable in 2 minutes
- Use present tense — "We use X" not "We will use X"
Don't
- Record trivial decisions — variable naming or formatting choices don't need ADRs
- Write essays — if the context section exceeds 10 lines, it's too long
- Omit alternatives — "we just picked it" is not a valid rationale
- Backfill without marking it — if recording a past decision, note the original date
- Let ADRs go stale — superseded decisions should reference their replacement
ADR Lifecycle
proposed → accepted → [deprecated | superseded by ADR-NNNN]
- proposed: decision is under discussion, not yet committed
- accepted: decision is in effect and being followed
- deprecated: decision is no longer relevant (e.g., feature removed)
- superseded: a newer ADR replaces this one (always link the replacement)
Categories of Decisions Worth Recording
| Category |
Examples |
| Technology choices |
Framework, language, database, cloud provider |
| Architecture patterns |
Monolith vs microservices, event-driven, CQRS |
| API design |
REST vs GraphQL, versioning strategy, auth mechanism |
| Data modeling |
Schema design, normalization decisions, caching strategy |
| Infrastructure |
Deployment model, CI/CD pipeline, monitoring stack |
| Security |
Auth strategy, encryption approach, secret management |
| Testing |
Test framework, coverage targets, E2E vs integration balance |
| Process |
Branching strategy, review process, release cadence |
Integration with Other Skills
- Planner agent: when the planner proposes architecture changes, suggest creating an ADR
- Code reviewer agent: flag PRs that introduce architectural changes without a corresponding ADR
1---2name: architecture-decision-records3description: Capture architectural decisions made during Claude Code sessions as structured ADRs. Auto-detects decision moments, records context, alternatives considered, and rationale. Maintains an ADR log so future developers understand why the codebase is shaped the way it is.4---5
6# Architecture Decision Records
7
8Capture architectural decisions as they happen during coding sessions. Instead of decisions living only in Slack threads, PR comments, or someone's memory, this skill produces structured ADR documents that live alongside the code.
9
10## When to Activate
11
12- User explicitly says "let's record this decision" or "ADR this"
13- User chooses between significant alternatives (framework, library, pattern, database, API design)
14- User says "we decided to..." or "the reason we're doing X instead of Y is..."
15- User asks "why did we choose X?" (read existing ADRs)
16- During planning phases when architectural trade-offs are discussed
17
18## ADR Format
19
20Use the lightweight ADR format proposed by Michael Nygard, adapted for AI-assisted development:
21
22```markdown
23# ADR-NNNN: [Decision Title]
24
25**Date**: YYYY-MM-DD
26**Status**: proposed | accepted | deprecated | superseded by ADR-NNNN
27**Deciders**: [who was involved]
28
29## Context
30
31What is the issue that we're seeing that is motivating this decision or change?
32
33[2-5 sentences describing the situation, constraints, and forces at play]
34
35## Decision
36
37What is the change that we're proposing and/or doing?
38
39[1-3 sentences stating the decision clearly]
40
41## Alternatives Considered
42
43### Alternative 1: [Name]
44- **Pros**: [benefits]
45- **Cons**: [drawbacks]
46- **Why not**: [specific reason this was rejected]
47
48### Alternative 2: [Name]
49- **Pros**: [benefits]
50- **Cons**: [drawbacks]
51- **Why not**: [specific reason this was rejected]
52
53## Consequences
54
55What becomes easier or more difficult to do because of this change?
56
57### Positive
58- [benefit 1]
59- [benefit 2]
60
61### Negative
62- [trade-off 1]
63- [trade-off 2]
64
65### Risks
66- [risk and mitigation]
67```
68
69## Workflow
70
71### Capturing a New ADR
72
73When a decision moment is detected:
74
751. **Initialize (first time only)** — if `docs/adr/` does not exist, ask the user for confirmation before creating the directory, a `README.md` seeded with the index table header (see ADR Index Format below), and a blank `template.md` for manual use. Do not create files without explicit consent.
762. **Identify the decision** — extract the core architectural choice being made
773. **Gather context** — what problem prompted this? What constraints exist?
784. **Document alternatives** — what other options were considered? Why were they rejected?
795. **State consequences** — what are the trade-offs? What becomes easier/harder?
806. **Assign a number** — scan existing ADRs in `docs/adr/` and increment
817. **Confirm and write** — present the draft ADR to the user for review. Only write to `docs/adr/NNNN-decision-title.md` after explicit approval. If the user declines, discard the draft without writing any files.
828. **Update the index** — append to `docs/adr/README.md`
83
84### Reading Existing ADRs
85
86When a user asks "why did we choose X?":
87
881. Check if `docs/adr/` exists — if not, respond: "No ADRs found in this project. Would you like to start recording architectural decisions?"
892. If it exists, scan `docs/adr/README.md` index for relevant entries
903. Read matching ADR files and present the Context and Decision sections
914. If no match is found, respond: "No ADR found for that decision. Would you like to record one now?"
92
93### ADR Directory Structure
94
95```
96docs/
97└── adr/
98 ├── README.md ← index of all ADRs
99 ├── 0001-use-nextjs.md
100 ├── 0002-postgres-over-mongo.md
101 ├── 0003-rest-over-graphql.md
102 └── template.md ← blank template for manual use
103```
104
105### ADR Index Format
106
107```markdown
108# Architecture Decision Records
109
110| ADR | Title | Status | Date |
111|-----|-------|--------|------|
112| [0001](0001-use-nextjs.md) | Use Next.js as frontend framework | accepted | 2026-01-15 |
113| [0002](0002-postgres-over-mongo.md) | PostgreSQL over MongoDB for primary datastore | accepted | 2026-01-20 |
114| [0003](0003-rest-over-graphql.md) | REST API over GraphQL | accepted | 2026-02-01 |
115```
116
117## Decision Detection Signals
118
119Watch for these patterns in conversation that indicate an architectural decision:
120
121**Explicit signals**
122- "Let's go with X"
123- "We should use X instead of Y"
124- "The trade-off is worth it because..."
125- "Record this as an ADR"
126
127**Implicit signals** (suggest recording an ADR — do not auto-create without user confirmation)
128- Comparing two frameworks or libraries and reaching a conclusion
129- Making a database schema design choice with stated rationale
130- Choosing between architectural patterns (monolith vs microservices, REST vs GraphQL)
131- Deciding on authentication/authorization strategy
132- Selecting deployment infrastructure after evaluating alternatives
133
134## What Makes a Good ADR
135
136### Do
137- **Be specific** — "Use Prisma ORM" not "use an ORM"
138- **Record the why** — the rationale matters more than the what
139- **Include rejected alternatives** — future developers need to know what was considered
140- **State consequences honestly** — every decision has trade-offs
141- **Keep it short** — an ADR should be readable in 2 minutes
142- **Use present tense** — "We use X" not "We will use X"
143
144### Don't
145- Record trivial decisions — variable naming or formatting choices don't need ADRs
146- Write essays — if the context section exceeds 10 lines, it's too long
147- Omit alternatives — "we just picked it" is not a valid rationale
148- Backfill without marking it — if recording a past decision, note the original date
149- Let ADRs go stale — superseded decisions should reference their replacement
150
151## ADR Lifecycle
152
153```
154proposed → accepted → [deprecated | superseded by ADR-NNNN]
155```
156
157- **proposed**: decision is under discussion, not yet committed
158- **accepted**: decision is in effect and being followed
159- **deprecated**: decision is no longer relevant (e.g., feature removed)
160- **superseded**: a newer ADR replaces this one (always link the replacement)
161
162## Categories of Decisions Worth Recording
163
164| Category | Examples |
165|----------|---------|
166| **Technology choices** | Framework, language, database, cloud provider |
167| **Architecture patterns** | Monolith vs microservices, event-driven, CQRS |
168| **API design** | REST vs GraphQL, versioning strategy, auth mechanism |
169| **Data modeling** | Schema design, normalization decisions, caching strategy |
170| **Infrastructure** | Deployment model, CI/CD pipeline, monitoring stack |
171| **Security** | Auth strategy, encryption approach, secret management |
172| **Testing** | Test framework, coverage targets, E2E vs integration balance |
173| **Process** | Branching strategy, review process, release cadence |
174
175## Integration with Other Skills
176
177- **Planner agent**: when the planner proposes architecture changes, suggest creating an ADR
178- **Code reviewer agent**: flag PRs that introduce architectural changes without a corresponding ADR