Adr create
Skill samrom3/claude-hyper-plugs/adr-wizard/skills/adr-create
Curated Claude Code marketplace and custom plugins by samrom3 for empowering everyday Software Engineers
npx -y skills add samrom3/claude-hyper-plugs --skill adr-createAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
This skill should be used when the user asks to 'create an ADR', 'document an architectural decision', 'record a design decision', 'write an architecture decision record', or when the model identifies an architectural decision in context that warrants formal documentation. Evaluates decision worthiness before authoring and guides section drafting.
SKILL.md
8.6 KB, as published. Nobody here has run it
adr-create
Creates new ADR file with auto-numbering, fills Nygard template, updates dir's README.md index.
Step 0 — Evaluate decision worthiness
Phase A — Silent evaluation (always runs first)
Assess decision across axes before engaging user:
| Axis | What to assess |
|---|---|
| Alternatives | Obvious alternatives exist? Or was decision effectively forced? |
| Scope | Crosses module/team/service boundaries — or local to one fn/file? |
| Reversibility | Undoing costs significant? (data migration, API contract change, retraining) |
| Tradeoffs | Context surface what was given up? |
| Existing ADRs | Extends, contradicts, or supersedes prior choice? |
Clear verdict → act directly:
- Clear yes (cross-cutting, meaningful alternatives, non-trivial reversal cost, or intersects existing ADR): proceed to Step 1 without engaging user.
- Clear no (routine impl detail, derivable from code, no alternatives in play, entirely local): inform user, suggest lighter alternative (inline comment, team note), stop. No escape hatch.
Inconclusive (alternatives ambiguous, tradeoffs not surfaced, decision boundaries unclear) → Phase B.
Phase B — Adversarial debate (only when Phase A inconclusive)
Engage user to extract info Phase A couldn't resolve. Posture: adversarial-constructive. Argue against ADR necessity or framing until clear. State challenges directly; no softening.
Challenge axes (raise 1–3 based on what Phase A left unresolved):
| Axis | Counterpoint |
|---|---|
| Scope | "This sounds contained to [X]. Why does someone on a different part of the system six months from now need to know?" |
| Obviousness | "Experienced engineer reading the code would likely infer this from [Y]. What would they miss?" |
| Reversibility | "Real cost of undoing this? If low, permanent record may not be warranted." |
| Alternatives | "What alternatives did you actually consider? If only one option was ever on the table, this may be recording an outcome, not a decision." |
| Novelty | "Is this consistent with existing ADR? If so, it may be implementing an already-approved pattern." |
1–2 exchanges. Steelman responses, counter if still unconvincing. End when picture is clear.
Outcome routing (after Phase A or B)
| Outcome | Action |
|---|---|
| Single ADR warranted | Proceed to Step 1. |
| Multiple ADRs warranted | Surface each distinct decision: "This looks like two separate decisions: [A] and [B]. I'll create them in sequence — starting with [A]." Proceed to Step 1 for first; loop Step 0 for each subsequent. |
| Supersede/deprecate warranted | "This appears to supersede ADR-NNNN ([title]). I'll hand off to /adr-supersede." Invoke lifecycle skill, stop. |
| No ADR warranted | Explain confidently. Phase A clear no → stop, no escape hatch. Debate concludes no → offer escape hatch via AskUserQuestion: Proceed anyway / Revisit framing. Revisit restarts Phase B; proceed → Step 1. |
Step 1 — Discover ADR directories
-
Read project
CLAUDE.md. -
Search for heading containing
ADR Locations(case-insensitive, any heading level). -
If found, collect bullet items as relative paths, strip inline
# comments. Store asadr_dirs. -
If not found, fall back: scan repo root for
docs/adrs,decisions,architecture/decisions. -
If
adr_dirsempty, offer bootstrap viaAskUserQuestion:No ADR directories found. Would you like me to create one?
Options:
docs/adrs/(recommended) or custom path.On confirm: a. Create dir. b. Copy
references/README-template.md→<dir>/README.md, replace<PROJECT_NAME>. c. Copyreferences/0000-adr-template.md→ new dir. d. Add### ADR Locationssection toCLAUDE.md(or create if absent). e. Setadr_dirsto new dir, continue to Step 2.
Step 2 — Select target directory
- Single entry → use as
target_dir. - Multiple entries:
a. Identify dir whose path best matches recent file context (longest common prefix with files mentioned in conversation/editor).
b. Present suggestion:
Suggested ADR directory:
<target_dir>(based on recent file context) Other options:<list remaining dirs>Press Enter to accept, or type path of another directory. c. Wait for confirmation. Use confirmed path astarget_dir.
Step 3 — Determine next ADR number
- List files in
target_dirmatchingNNNN-*.md. - Find highest number.
next_num = highest + 1(or1if none exist).- Zero-pad to 4 digits:
1→0001,12→0012.
Step 4 — Parse the decision context
- Arg provided (e.g.,
/adr-create Use PostgreSQL for primary storage): use asdecision_summary. - No arg, conversation contains clear decision: extract as
decision_summary. - No arg, no clear context: ask:
What architectural decision are you recording? (e.g., "Use PostgreSQL for primary storage")
From decision_summary + conversation context, derive adr_title. Convert to kebab-case slug: lowercase, spaces/specials → hyphens.
Step 5 — Draft all ADR sections
Author every section — no template placeholders for user. Infer from conversation, codebase, decision_summary. Use AskUserQuestion when info insufficient.
Context
Context: describe problem forces, not solution. Reader understands why decision needed, not pre-sold on answer.
Draw from conversation history, recent code/files, constraints/tradeoffs mentioned. If insufficient:
What problem or situation prompted this decision? What constraints are in play?
Decision
Decision: active voice ("We decided to X"). Specific, declarative. No passive constructions. State what was chosen, not why or what happens next.
Be specific (e.g., "We will use PostgreSQL 16 as primary data store for all user-facing services"). Draw from decision_summary + explicit conversation choices.
If ambiguous:
Can you state the decision more precisely? What exactly are we choosing to do?
Consequences
Consequences: ≥1 genuinely adverse consequence required. 200–400 words. Substantially more → consider splitting into two ADRs.
3–7 bullets: expected benefits, trade-offs/risks (≥1 required), follow-up work, migration/compatibility implications.
If can't infer:
What are the main benefits and trade-offs of this decision? Any follow-up work it creates?
Interview flow
Batch questions — ask multiple sections' questions in single AskUserQuestion. Proceed to file creation only after all sections have substantive content.
Step 6 — Create the ADR file
- Filename:
<target_dir>/<NNNN>-<slug>.md. - Fill template from
references/0000-adr-template.md:- Replace
NNNNwith zero-padded number. - Replace
Titlewithadr_title. - Set
**Status:** Proposed(new ADRs always Proposed unless user specifies otherwise). - Set
**Date:**to today's date (YYYY-MM-DD). - Write Context, Decision, Consequences content.
- Replace
- Write file to disk.
Step 7 — Update the index
- If
<target_dir>/README.mdmissing, create:# Architecture Decision Records | ADR | Title | Status | |-----|-------|--------| - Add row:
Insert after last existing row.| [ADR-NNNN](<NNNN>-<slug>.md) | <adr_title> | Proposed | - Save
README.md.
Step 8 — Confirm
Created
<target_dir>/<NNNN>-<slug>.md(ADR-NNNN: <adr_title>) Updated index:<target_dir>/README.mdReview the ADR and change the Status to
Acceptedwhen the decision is finalised.Tip: commit this ADR in the same PR as (or just before) the code it describes so the decision and implementation are traceable together.
Step 9 — Post-write validation
- Invoke
adr-checkscoped against new ADR:adr-check <target_dir>/<NNNN>-<slug>.md - Review result:
- Structural FAIL: Block completion, present issues to user. Offer to fix directly if straightforward.
- Style warnings: Display, don't block. ADR complete; user may address or not.
- PASS (no warnings): Complete successfully.