PROMPT · multi-agent-orchestration

ADR author command

A /adr-author command that drafts a structured MADR record with YAML frontmatter from a one-line decision description. Always status: proposed, never invented facts.

✓ verified 2026-06-10 · stack: claude-code · source

A user-invoked skill that expands a one-line decision description, the “kernel of truth”, into a full structured MADR draft with the YAML frontmatter that makes ADRs filterable by agents (the format case is made in AI-legible documentation). Two guardrails are load-bearing: the draft always lands as proposed for human review, and the prompt forbids inventing facts it does not have.

.claude/skills/adr-author/SKILL.md
---
name: adr-author
description: >
Draft a structured MADR Architecture Decision Record from a brief decision
description. Invoke with /adr-author <what was decided and why>. Produces a
proposed-status draft for human review; never marks an ADR accepted.
---
Draft an Architecture Decision Record in MADR format with YAML frontmatter.
**Decision to document:** $ARGUMENTS
## Before writing
1. Read existing ADRs in docs/decisions/ (service-level for service
decisions, repo root for cross-cutting ones) to establish:
- the next sequential number NNNN
- decisions this relates to or supersedes (for the `related` field)
- the technology stack in use
2. If the decision's scope, options considered, or rationale are not clear
from $ARGUMENTS and the codebase, ask — do not invent them.
## Output format
Write docs/decisions/NNNN-<title-with-dashes>.md exactly in this shape:
```markdown
---
title: "<Short noun phrase for the decision>"
description: "<One sentence: what was chosen and why>"
status: proposed
created: <today YYYY-MM-DD>
updated: <today YYYY-MM-DD>
author: <ask if unknown>
category: <persistence | messaging | security | api | infrastructure | testing | architecture>
tags: [<2-4 lowercase tags>]
project: <service name, or "cross-cutting">
technologies: [<specific technologies involved>]
related: [<NNNN-existing-adr-slug, if any>]
---
# NNNN. <Same as title>
## Context and problem statement
<2-3 sentences: what problem prompted this, and under what constraints.>
## Decision drivers
- <Constraint, quality attribute, or team need>
- <Driver 2>
## Considered options
- <Option A — the chosen one>
- <Option B>
- <Option C>
## Decision outcome
Chosen option: **<Option A>**, because <rationale tied to the drivers>.
### Consequences
- Good: <positive consequence>
- Bad: <trade-off accepted>
### Confirmation
<What metric or observation will show this decision was right?>
## Pros and cons of the options
### <Option A>
- Pro: <advantage>
- Con: <disadvantage>
### <Option B>
- Pro: <advantage>
- Con: <disadvantage>
## More information
<Links to spikes, proof-of-concept results, or team discussions.>
```
## After writing
1. Add a row to docs/decisions/overview.md: | NNNN | <title> | proposed | <date> |
2. Report: "ADR draft at docs/decisions/NNNN-<slug>.md, status proposed.
Review and change to accepted deliberately."
## Hard rules
- Status is always `proposed`. Never write or edit an ADR to `accepted`.
- Do NOT invent product capabilities, AWS service behaviour, benchmark
numbers, or team decisions. Where context is missing, write
`<!-- TODO: confirm with team -->` instead of an answer.
- One decision per ADR. If $ARGUMENTS contains two decisions, say so and
draft the first.

Commit the directory; /adr-author we chose SQS over Kinesis for order events because of cost and ordering-per-group produces a numbered draft in the right directory with the index updated.

What it does

  • Implements the drafter-not-decider pattern. Equal Experts’ finding is that AI excels at expanding a one-liner into a coherent ADR draft, and that the outputs are persuasive enough to require human verification, hence the hard proposed status and the explicit review instruction in the output message.
  • Emits the structured MADR shape. The body follows the MADR template (context, drivers, options, outcome, consequences, confirmation); the YAML frontmatter follows the structured-madr extension, so agents can later filter by status, category, tags, and project and walk related links without parsing prose.
  • Reads before it writes. Numbering, related decisions, and stack context come from the existing docs/decisions/ tree, so drafts join the record instead of contradicting it.
  • Fails towards questions. Missing context becomes a question or a visible TODO comment, not a plausible fabrication, the failure mode both fetched ADR-generation write-ups warn about.

Failure modes

  • Persuasive nonsense survives lazy review. The draft reads finished; that is the hazard. A reviewer who skims will accept invented decision drivers. Treat the review step as the actual authoring act: the command only removes the blank-page cost.
  • Nothing enforces proposed. The status rule is prompt-space. If it must hold, add a CI check (the structured-madr project ships JSON Schema validation and a GitHub Action) that blocks new ADRs entering with status: accepted in the same PR that creates them.
  • Numbering races. Two concurrent branches both take NNNN+1. The overview-table merge conflict surfaces it, but renumber before merging.
  • TODO comments rot. A committed <!-- TODO: confirm with team --> that nobody resolves becomes a permanent gap in the record. Grep for them in CI or in the review checklist.

Verified against the Equal Experts ADR-acceleration write-up (kernel-of-truth drafting, human-review requirement), the MADR template at adr.github.io, and the structured-madr frontmatter schema, fetched 2026-06-10.