Skip to content
All Skills

Adr Writer

Best-practice Architecture Decision Record (ADR) writer following the Michael Nygard template. Generates, revises, and stores ADRs in docs/adr/.

Software Engineering|v1|Updated 7/14/2026|GitHub source
MCP get_skill({ skillId: "adr-writer-agent-1d410394" })

Use this skill with your agent

Create a free account and connect via MCP

Get Started Free
# ADR Writer Agent

Expert Architecture Decision Record (ADR) writer. Follow the **Michael Nygard ADR template**. Store all records in `docs/adr/`.

## ADR Philosophy

ADRs are permanent records of significant technical decisions: *"Why does the codebase look the way it does?"*

- **Immutable once accepted** — never deleted; superseded ones marked "Superseded by ADR-XXXX"
- **Decision-focused** — capture *why*, not just *what*
- **Honest about trade-offs** — include real negatives and costs
- **Written for future readers** — understandable 12 months later

## Storage Convention

ADRs live in `docs/adr/` as sequentially numbered Markdown files:

```
docs/adr/
  0001-use-postgresql-for-primary-storage.md
  0002-adopt-hexagonal-architecture.md
  0003-switch-from-rest-to-graphql.md
```

**Filename format**: `NNNN-kebab-case-title.md`
- `NNNN` zero-padded 4 digits (e.g., `0001`, `0042`)
- Lowercase kebab-case title
- Only hyphens as separators

## ADR Template

Two parts: **human-friendly narrative**, then **RFC 2119 normative specification** for machine-checkable conformance.

```markdown
# ADR-{NNNN}: {Concise Decision Title}

**Date**: {YYYY-MM-DD}
**Status**: {Draft | Proposed | Accepted | Deprecated | Superseded by [ADR-XXXX](XXXX-title.md)}
**Deciders**: {list of people/roles involved in the decision, or "Unknown" for historical records}

---

## Part 1 — Narrative (Human-Friendly)

### Context

{Describe the situation, problem, and forces at play in plain language. What is the issue that motivated this decision? What constraints exist? What are the non-negotiable requirements? Write for a developer who is new to the codebase and needs background without reading the code. Keep this to 3–5 sentences.}

### Decision

{State the decision clearly using active voice. Start with "We will..." or "We decided to...". Explain the primary rationale in 2–4 sentences. This section should be unambiguous — a reader must know exactly what was decided.}

### Alternatives Considered

#### Alternative 1: {Name}

{Description of the alternative. Why was it considered? Why was it not chosen? Be honest — if it was a close call, say so.}

#### Alternative 2: {Name}

{Description of the alternative. Why was it considered? Why was it not chosen?}

*(Add more alternatives as needed. Minimum 2 alternatives for non-trivial decisions.)*

### Consequences

#### Positive
- {Expected benefit or improvement}
- {Another benefit}

#### Negative
- {Trade-off, cost, or technical debt introduced}
- {Another cost or limitation}

#### Neutral
- {Side effects that are neither clearly positive nor negative}
- {Implementation implications that should be noted}

---

## Part 2 — Normative Specification (RFC 2119)

> The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this section are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).

### {Primary requirement area — e.g., "Data Storage", "API Design", "Authentication"}

1. Implementations **MUST** {the non-negotiable core of the decision in imperative form}.
2. Implementations **MUST NOT** {what is explicitly prohibited by this decision}.
3. Implementations **SHOULD** {what is strongly recommended but has valid exceptions}.
4. Implementations **MAY** {what is permitted but not required}.

### {Secondary requirement area, if applicable}

1. {Additional normative requirement}.
2. {Additional normative requirement}.

### Conformance

An implementation is considered conformant with this ADR if it satisfies all **MUST** and **MUST NOT** requirements above. Failure to meet any **MUST** or **MUST NOT** requirement constitutes non-conformance.

---

*ADR created by [adr-writer agent]. Review and finalize before changing status from Draft to Accepted.*
```

## Status Values

| Status | Meaning |
|--------|---------|
| `Draft` | Initial AI-generated or work-in-progress ADR; requires human review |
| `Proposed` | Under review by the team; not yet accepted |
| `Accepted` | The decision is in effect |
| `Deprecated` | The decision no longer applies but was not superseded |
| `Superseded by ADR-XXXX` | A newer ADR replaces this one |

## Writing Quality Standards

### Part 1 — Narrative Sections

#### Context (3–5 sentences)
- *What problem? What constraints?* (technical, organizational, timeline)
- Codebase state at decision time
- Problem space, not implementation

#### Decision (2–4 sentences)
- Active voice: "We will use X because Y"
- Name the primary driver (performance, simplicity, cost, etc.)
- Name the pattern/principle if applicable

#### Alternatives Considered (2–4 sentences each)
- **≥2 genuine alternatives** (no strawmen)
- For each: what, why considered, why rejected
- If close call, say so

#### Consequences
- **Positive**: real benefits
- **Negative**: real costs and trade-offs
- **Neutral**: side effects worth noting
- ≥2 per category for non-trivial decisions

### Part 2 — Normative Specification

Translates the Decision into testable [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119) requirements.

#### RFC 2119 Keyword Usage

| Keyword | Use when… |
|---------|-----------|
| **MUST** / **REQUIRED** / **SHALL** | Absolute, non-negotiable constraint |
| **MUST NOT** / **SHALL NOT** | Absolute prohibition |
| **SHOULD** / **RECOMMENDED** | Strong recommendation; valid exceptions may exist |
| **SHOULD NOT** / **NOT RECOMMENDED** | Strong discouragement; valid exceptions may exist |
| **MAY** / **OPTIONAL** | Truly optional |

#### Writing Normative Requirements

- Complete sentences ending with a period
- Keywords (**MUST**, **SHOULD**, **MAY**, etc.) in **bold**
- Atomic — one constraint per numbered item
- Group into named subsections (e.g., "Storage", "API", "Authentication")
- Every section ends with a **Conformance** paragraph
- Stay consistent with the narrative Decision
- "We will always use X" → "Implementations **MUST** use X"
- "We prefer Y" → "Implementations **SHOULD** use Y"

## Procedure: Writing a New ADR

### Step 1: Next Sequence Number

```bash
ls docs/adr/*.md 2>/dev/null | grep -oP '\d{4}' | sort -n | tail -1
```

Start at `0001` if none exist; otherwise increment.

### Step 2: Derive the Filename

Kebab-case the title: lowercase, hyphens for spaces/specials, drop meaningless leading articles, 3–6 words.

Example: "Use PostgreSQL for Primary Storage" → `0001-use-postgresql-for-primary-storage.md`

### Step 3: Ensure Directory

```bash
mkdir -p docs/adr
```

### Step 4: Analyze Context

- PR diff: identify implicit decisions
- Description: clarify decision and rationale
- Updating: read current version first

### Step 5: Write the ADR

Apply the template strictly. Fill every section. No placeholder text — mark unknowns `[TODO: verify]`.

### Step 6: Save

Write to `docs/adr/{NNNN}-{title}.md`.

### Step 7: Validate

**Part 1 — Narrative:**
- [ ] Context, Decision, Alternatives, Consequences sections all present
- [ ] Status is `Draft` for new ADRs
- [ ] Date is today (YYYY-MM-DD format)
- [ ] ≥2 genuine alternatives listed
- [ ] Both positive and negative consequences listed
- [ ] Filename follows NNNN-kebab-case-title.md convention
- [ ] ADR number in title matches filename number

**Part 2 — Normative Specification:**
- [ ] RFC 2119 boilerplate paragraph present
- [ ] All normative keywords in **bold**
- [ ] Each requirement atomic (one constraint per item)
- [ ] Requirements grouped into named subsections
- [ ] Conformance paragraph present
- [ ] Normative requirements are consistent with the narrative Decision section

## Procedure: Analyzing a PR Diff for ADR Content

Look for:

1. **New abstractions** — interfaces, base classes, protocols
2. **Technology choices** — libraries, frameworks, databases, services
3. **Structural changes** — package/module/directory reorganization
4. **Pattern adoption** — design patterns, conventions, standards
5. **Integration points** — external services, API contracts
6. **Data model changes** — schemas, types, representations
7. **Performance trade-offs** — algorithms, caching strategies

For each: what problem? what alternatives? what consequences?

## Procedure: Verifying an Existing ADR Against Code

1. Read the ADR **Decision** — extract commitments
2. Check code for conformance/deviation
3. Note **divergences**: code contradicts decision
4. Note **scope creep**: significant decisions in code not covered

Return:
- **Aligned**: code implements the ADR
- **Partially aligned**: minor divergences
- **Divergent**: significant contradictions

## Examples of ADR-Worthy Decisions

Warrant an ADR:
- Database, message queue, cache, or storage choice
- Adopting/replacing a framework
- Auth/authz approach change
- API convention (REST vs GraphQL vs gRPC)
- Architectural patterns (microservices vs monolith, event-driven vs request-driven)
- Significant infrastructure (Kubernetes, Terraform)
- New testing strategy or quality gate
- Language/runtime for a new service

Do **not** warrant an ADR:
- Bug fixes without design trade-offs
- Minor refactors within existing patterns
- Documentation updates
- Dependency bumps (unless major new dep)
- Code style/formatting changes
#broad-capability#agentic-workflows#github-actions#architecture

Related Skills

More skills in Software Engineering

Accessibility Standards

Comprehensive web accessibility standards based on WCAG 2.2 AA, with 38+ anti-patterns, legal enforcement context (EAA, ADA Title II), WAI-ARIA patterns, and framework-specific fixes for modern web frameworks and libraries.

#github-copilot#accessibilityMIT

Accord

Authoring unified specification packages across Business/Development/Design teams via staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria). No code. Use when authoring cross-team specs, building L0-L3 packages, or aligning Biz/Dev/Design on a single source of truth.

#broad-capability#developmentMIT

Acquire Codebase Knowledge

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

#github-copilot#documentationMIT

Acreadiness Assess

Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc readiness` and hands off rendering to the @ai-readiness-reporter custom agent. Supports policies (--policy) for org-specific scoring. Use when asked to assess, audit, or score the AI readiness of a repo.

#github-copilot#planningMIT

Acreadiness Generate Instructions

Generate tailored AI agent instruction files via AgentRC instructions command. Produces .github/copilot-instructions.md (default, recommended for Copilot in VS Code) plus optional per-area .instructions.md files with applyTo globs for monorepos. Use after running /acreadiness-assess to close gaps in the AI Tooling pillar.

#github-copilot#skillMIT

Acreadiness Policy

Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting pass-rate thresholds, or chaining org baselines with team overrides. Use when the user asks about strict mode, AI-only scoring, custom weights, CI gating, or wants org-wide standardisation.

#github-copilot#planningMIT