/draft:adrfrom draft
Creates and manages Architecture Decision Records to document technical decisions with context, alternatives, and consequences. Also supports evaluate and design modes.
Ships in draft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are creating or managing Architecture Decision Records (ADRs) for this project.
ADRs capture WHY, not just WHAT. Every decision needs alternatives considered.
ls draft/ 2>/dev/null
If draft/ doesn't exist:
/draft:init first."ls draft/adrs/ 2>/dev/null
If draft/adrs/ doesn't exist, create it:
mkdir -p draft/adrs
Check for arguments:
/draft:adr — Interactive mode: ask about the decision/draft:adr "decision title" — Create ADR with given title/draft:adr list — List all existing ADRs/draft:adr supersede <number> — Mark an ADR as supersededIf argument is list:
Prefer the deterministic adr-index.sh wrapper for the listing — it returns a structured JSON {adrs:[{id,title,date,status,path,related_tracks}]} derived from each ADR's frontmatter. Resolve via the canonical tool resolver (see core/shared/tool-resolver.md):
DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"
if [ -x "$DRAFT_TOOLS/adr-index.sh" ]; then
bash "$DRAFT_TOOLS/adr-index.sh" --root draft/adrs
else
ls draft/adrs/ # fallback: enumerate files manually
fi
Display summary table:
Architecture Decision Records
| # | Title | Status | Date |
|---|-------|--------|------|
| 001 | Use PostgreSQL for primary storage | Accepted | 2026-01-15 |
| 002 | Adopt event-driven architecture | Proposed | 2026-02-01 |
| 003 | Replace REST with GraphQL | Superseded by #005 | 2026-02-03 |
Stop here after listing.
If argument is supersede <number>:
draft/adrs/<number>-*.mdAccepted to Superseded by ADR-<new_number>If argument starts with evaluate:
/draft:adr evaluate <proposal or description> — Evaluate a design proposalRead the proposal (from arguments, pasted text, file path, or ask user to describe)
Load project context: draft/tech-stack.md, draft/.ai-context.md, draft/architecture.md
Check existing ADRs in draft/adrs/ for related decisions
Evaluate against six dimensions:
Output evaluation report (do not save to file — display directly):
# Design Evaluation: <Title>
## Summary
[1-2 sentence assessment]
## Alignment Analysis
| Dimension | Assessment | Notes |
|-----------|------------|-------|
| Architecture alignment | ✅ Aligned / ⚠️ Partial / ❌ Conflict | [detail] |
| Tech stack consistency | ✅/⚠️/❌ | [detail] |
| Invariant impact | ✅/⚠️/❌ | [detail] |
| Scalability | ✅/⚠️/❌ | [detail] |
| Operational complexity | ✅/⚠️/❌ | [detail] |
| Team familiarity | ✅/⚠️/❌ | [detail] |
## Risks
- [Risk and mitigation strategy]
## Recommendation
[Accept as-is / Accept with modifications / Reconsider approach / Reject — with reasoning]
## Next Steps
If this leads to a decision: `/draft:adr "<decision title>"` to document it
If this needs a full design: `/draft:adr design "<system>"` to design it
Stop here after evaluation.
If argument starts with design:
/draft:adr design <system or component> — Full system/component designGather requirements:
draft/tech-stack.md)Load project context: same as ADR creation (Step 3 of main flow)
Design using 5-section framework:
Section 1: Requirements
Section 2: High-Level Design
Section 3: Deep Dive
Section 4: Scale & Reliability
Section 5: Trade-off Analysis
Determine design document number using same ADR numbering (Step 4 of main flow)
Save to draft/adrs/<number>-design-<kebab-case-title>.md with YAML frontmatter and git metadata (same format as ADR creation, Step 5)
Present for review (same as Step 6 of main flow)
Stop here after design.
If in interactive mode (no title provided), ask:
If title provided, proceed directly with the title.
If an active track exists and draft/tracks/<id>/hld.md is present:
Read HLD §Alternatives Considered table.
If any row is marked Promote to ADR? yes and has not been promoted yet (no matching ADR exists), offer:
Found 1 unpromoted alternative in <track>/hld.md:
- {alternative} — rejected because: {reason}
Promote to ADR? [Y/n]
When promoting:
originating_hld: draft/tracks/<id>/hld.md.After ADR creation, edit HLD §Alternatives Considered table: change the Promote to ADR? cell to ADR-<number> (linking back). Surface the diff to the user for confirmation.
If invoked outside a track context, skip 2.1 and proceed with normal interactive flow.
Follow the base procedure in core/shared/draft-context-loading.md.
Read relevant Draft context:
draft/.ai-context.md — Current architecture patterns, invariants, data paths, and constraints. Falls back to draft/architecture.md for legacy projects.draft/tech-stack.md — Current technology choicesdraft/product.md — Product requirements that influence the decisionCross-reference the decision against existing context:
# Extract the highest existing ADR number from filenames
ls draft/adrs/*.md 2>/dev/null | sed 's/.*\/\([0-9]*\)-.*/\1/' | sort -n | tail -1
Next number = highest existing ADR number + 1, zero-padded to 3 digits (001, 002, ...). If no ADRs exist, start at 001.
Verify the target filename draft/adrs/<number>-<kebab-case-title>.md does not already exist. If collision, increment the number until a free slot is found.
MANDATORY: Include YAML frontmatter with git metadata. Gather git info first:
git branch --show-current # LOCAL_BRANCH
git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "none" # REMOTE/BRANCH
git rev-parse HEAD # FULL_SHA
git rev-parse --short HEAD # SHORT_SHA
git log -1 --format=%ci HEAD # COMMIT_DATE
git log -1 --format=%s HEAD # COMMIT_MESSAGE
git status --porcelain | head -1 | wc -l # 0 = clean, >0 = dirty
Create draft/adrs/<number>-<kebab-case-title>.md:
---
project: "{PROJECT_NAME}"
module: "root"
adr_number: <number>
generated_by: "draft:adr"
generated_at: "{ISO_TIMESTAMP}"
git:
branch: "{LOCAL_BRANCH}"
remote: "{REMOTE/BRANCH}"
commit: "{FULL_SHA}"
commit_short: "{SHORT_SHA}"
commit_date: "{COMMIT_DATE}"
commit_message: "{COMMIT_MESSAGE}"
dirty: {true|false}
synced_to_commit: "{FULL_SHA}"
# Optional — populated when ADR is promoted from a track HLD §Alternatives Considered row.
originating_hld: "{path/to/draft/tracks/<id>/hld.md or null}"
originating_track: "{<track_id> or null}"
---
# ADR-<number>: <Title>
| Field | Value |
|-------|-------|
| **Branch** | `{LOCAL_BRANCH}` → `{REMOTE/BRANCH}` |
| **Commit** | `{SHORT_SHA}` — {COMMIT_MESSAGE} |
| **Generated** | {ISO_TIMESTAMP} |
| **Synced To** | `{FULL_SHA}` |
**Status:** Proposed
**Deciders:** [names or roles]
## Context
[What is the issue that we're seeing that is motivating this decision or change?]
[What forces are at play (technical, business, organizational)?]
## Decision
[What is the change that we're proposing and/or doing?]
[State the decision in active voice: "We will..."]
## Alternatives Considered
### Alternative 1: <name>
- **Pros:** [advantages]
- **Cons:** [disadvantages]
- **Why rejected:** [specific reason]
### Alternative 2: <name>
- **Pros:** [advantages]
- **Cons:** [disadvantages]
- **Why rejected:** [specific reason]
## Consequences
### Positive
- [Benefit 1]
- [Benefit 2]
### Negative
- [Trade-off 1]
- [Trade-off 2]
### Risks
- [Risk and mitigation]
## References
- [Link to relevant discussion, RFC, or documentation]
- [Related ADRs: ADR-xxx]
- [Originating HLD: draft/tracks/<id>/hld.md §Alternatives Considered] (only when promoted from a track)
Present the ADR to the user for review:
ADR-<number> created: <title>
File: draft/adrs/<number>-<kebab-case-title>.md
Status: Proposed
Review the ADR and update status to "Accepted" when approved.
If the decision affects existing Draft context:
draft/architecture.md to reflect this decision (.ai-context.md will be auto-refreshed via Condensation Subroutine)."Proposed → Accepted → [Deprecated | Superseded by ADR-xxx]
If no draft/ directory:
/draft:init firstIf ADR number conflict:
If superseding non-existent ADR:
draft/adrs/ for valid ADR numbers."What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub drafthq/draft --plugin draft33 skills in this plugin
/assist-reviewReviewing someone else's PR for handoff/sign-off. Isolates structural changes from trivial edits, flags HLD/LLD drift and guardrail violations, points the reviewer at what to scrutinize. Use when prepping to review another engineer's work — NOT for first-pass self-review (use review / quick-review)./bughuntPerforms an exhaustive 14-dimension bug hunt across the codebase using Draft context (architecture, tech-stack, product) for false-positive elimination. Generates a severity-ranked report with code evidence, data flow traces, and suggested fixes. Optionally writes regression tests. Use when the user asks to find bugs, audit code for defects, scan for vulnerabilities, or says 'hunt bugs', 'find bugs', or 'code audit'./changeHandle mid-track requirement changes. Analyzes impact on completed and pending tasks, proposes amendments to spec.md and plan.md before applying.Other plugins' skills for the same job