From draft
Creates and manages Architecture Decision Records (ADRs) to document technical decisions with context, alternatives, and consequences. Supports listing, superseding, evaluating proposals against project context, and system design modes.
npx claudepluginhub mayurpise/draft --plugin draftThis skill uses the workspace's default tool permissions.
You are creating or managing Architecture Decision Records (ADRs) for this project.
Creates and manages Architecture Decision Records (ADRs) for documenting technology choices, design decisions, and architectural changes. Tracks status, alternatives considered, and consequences over time.
Generates Architectural Decision Records (ADRs) by detecting project template conventions, assigning sequential numbers, supporting MADR/Nygard/Alexandrian formats, and saving markdown files. Use for documenting technical decisions.
Share bugs, ideas, or general feedback.
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:
draft/adrs/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.
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}"
---
# 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]
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."