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
Source: affaan-m/ECC → skills/architecture-decision-records/SKILL.md
Also appears in: hashgraph-online/awesome-codex-plugins/plugins/Colin4k1024/tsp/skills/architecture-decision-records/SKILL.md
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# Architecture Decision Records67Capture 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.89## When to Activate1011- User explicitly says "let's record this decision" or "ADR this"12- User chooses between significant alternatives (framework, library, pattern, database, API design)13- User says "we decided to..." or "the reason we're doing X instead of Y is..."14- User asks "why did we choose X?" (read existing ADRs)15- During planning phases when architectural trade-offs are discussed1617## ADR Format1819Use the lightweight ADR format proposed by Michael Nygard, adapted for AI-assisted development:2021```markdown22# ADR-NNNN: [Decision Title]2324**Date**: YYYY-MM-DD25**Status**: proposed | accepted | deprecated | superseded by ADR-NNNN26**Deciders**: [who was involved]2728## Context2930What is the issue that we're seeing that is motivating this decision or change?3132[2-5 sentences describing the situation, constraints, and forces at play]3334## Decision3536What is the change that we're proposing and/or doing?3738[1-3 sentences stating the decision clearly]3940## Alternatives Considered4142### Alternative 1: [Name]43- **Pros**: [benefits]44- **Cons**: [drawbacks]45- **Why not**: [specific reason this was rejected]4647### Alternative 2: [Name]48- **Pros**: [benefits]49- **Cons**: [drawbacks]50- **Why not**: [specific reason this was rejected]5152## Consequences5354What becomes easier or more difficult to do because of this change?5556### Positive57- [benefit 1]58- [benefit 2]5960### Negative61- [trade-off 1]62- [trade-off 2]6364### Risks65- [risk and mitigation]66```6768## Workflow6970### Capturing a New ADR7172When a decision moment is detected:73741. **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.752. **Identify the decision** — extract the core architectural choice being made763. **Gather context** — what problem prompted this? What constraints exist?774. **Document alternatives** — what other options were considered? Why were they rejected?785. **State consequences** — what are the trade-offs? What becomes easier/harder?796. **Assign a number** — scan existing ADRs in `docs/adr/` and increment807. **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.818. **Update the index** — append to `docs/adr/README.md`8283### Reading Existing ADRs8485When a user asks "why did we choose X?":86871. Check if `docs/adr/` exists — if not, respond: "No ADRs found in this project. Would you like to start recording architectural decisions?"882. If it exists, scan `docs/adr/README.md` index for relevant entries893. Read matching ADR files and present the Context and Decision sections904. If no match is found, respond: "No ADR found for that decision. Would you like to record one now?"9192### ADR Directory Structure9394```95docs/96└── adr/97 ├── README.md ← index of all ADRs98 ├── 0001-use-nextjs.md99 ├── 0002-postgres-over-mongo.md100 ├── 0003-rest-over-graphql.md101 └── template.md ← blank template for manual use102```103104### ADR Index Format105106```markdown107# Architecture Decision Records108109| ADR | Title | Status | Date |110|-----|-------|--------|------|111| [0001](0001-use-nextjs.md) | Use Next.js as frontend framework | accepted | 2026-01-15 |112| [0002](0002-postgres-over-mongo.md) | PostgreSQL over MongoDB for primary datastore | accepted | 2026-01-20 |113| [0003](0003-rest-over-graphql.md) | REST API over GraphQL | accepted | 2026-02-01 |114```115116## Decision Detection Signals117118Watch for these patterns in conversation that indicate an architectural decision:119120**Explicit signals**121- "Let's go with X"122- "We should use X instead of Y"123- "The trade-off is worth it because..."124- "Record this as an ADR"125126**Implicit signals** (suggest recording an ADR — do not auto-create without user confirmation)127- Comparing two frameworks or libraries and reaching a conclusion128- Making a database schema design choice with stated rationale129- Choosing between architectural patterns (monolith vs microservices, REST vs GraphQL)130- Deciding on authentication/authorization strategy131- Selecting deployment infrastructure after evaluating alternatives132133## What Makes a Good ADR134135### Do136- **Be specific** — "Use Prisma ORM" not "use an ORM"137- **Record the why** — the rationale matters more than the what138- **Include rejected alternatives** — future developers need to know what was considered139- **State consequences honestly** — every decision has trade-offs140- **Keep it short** — an ADR should be readable in 2 minutes141- **Use present tense** — "We use X" not "We will use X"142143### Don't144- Record trivial decisions — variable naming or formatting choices don't need ADRs145- Write essays — if the context section exceeds 10 lines, it's too long146- Omit alternatives — "we just picked it" is not a valid rationale147- Backfill without marking it — if recording a past decision, note the original date148- Let ADRs go stale — superseded decisions should reference their replacement149150## ADR Lifecycle151152```153proposed → accepted → [deprecated | superseded by ADR-NNNN]154```155156- **proposed**: decision is under discussion, not yet committed157- **accepted**: decision is in effect and being followed158- **deprecated**: decision is no longer relevant (e.g., feature removed)159- **superseded**: a newer ADR replaces this one (always link the replacement)160161## Categories of Decisions Worth Recording162163| Category | Examples |164|----------|---------|165| **Technology choices** | Framework, language, database, cloud provider |166| **Architecture patterns** | Monolith vs microservices, event-driven, CQRS |167| **API design** | REST vs GraphQL, versioning strategy, auth mechanism |168| **Data modeling** | Schema design, normalization decisions, caching strategy |169| **Infrastructure** | Deployment model, CI/CD pipeline, monitoring stack |170| **Security** | Auth strategy, encryption approach, secret management |171| **Testing** | Test framework, coverage targets, E2E vs integration balance |172| **Process** | Branching strategy, review process, release cadence |173174## Integration with Other Skills175176- **Planner agent**: when the planner proposes architecture changes, suggest creating an ADR177- **Code reviewer agent**: flag PRs that introduce architectural changes without a corresponding ADR178179---180181**Source:** [`affaan-m/ECC`](https://github.com/affaan-m/ECC) → `skills/architecture-decision-records/SKILL.md`182183**Also appears in:** `hashgraph-online/awesome-codex-plugins/plugins/Colin4k1024/tsp/skills/architecture-decision-records/SKILL.md`