write-adr
БесплатноЗапускает вложенные скриптыНе проверенUse when generating Architecture Decision Records (ADRs) from a session, extracting architectural decisions from design discussions, formatting decisions with…
от existential-birds★ 92 звезды на GitHubОб этом скилле
Write ADR
Generate and verify Architecture Decision Records (ADRs) using the MADR 4.0 template and E.C.A.D.R. Definition of Done criteria — either by extracting decisions from the current session or by formatting an already-supplied decision directly.
Workflow Overview
- Context - Gather repository context and existing ADRs
- Extract - Analyze conversation for decisions (skip Steps 2–3 when the user already supplied the exact decision(s) to write)
- Confirm - Present extracted decisions to user for selection
- Write - Pre-allocate sequence numbers and generate MADR files (in parallel via subagents if supported, otherwise sequentially)
- Report - Summarize created files and status
- Verify - Validate generated ADRs against Definition of Done (
references/definition-of-done.md)
Gates (objective pass conditions)
Advance only when the pass condition holds. These are checkable without "I verified internally."
| After | Pass condition |
|---|---|
| Step 2 (extract) | Extraction output is valid JSON with a top-level decisions array (empty is OK). Every item has id (integer), non-empty title, problem, decision, confidence (high/medium/low), alternatives (array, [] if none), and optional rationale/source_context. Explicit [ADR] tags are all captured (confidence: "high"), duplicates merged, and any low-confidence item explains why in source_context. |
| Step 4 (pre-allocate) | python3 scripts/next_adr_number.py --count N (run relative to this skill directory, or python3 .agents/skills/write-adr/scripts/next_adr_number.py --count N from repo root) prints exactly N lines (one number per line). You have a written mapping from each confirmed decision to one of those numbers before launching any ADR writer unit. |
| Step 4 (context per ADR) | Before drafting each ADR, you record a written list of ≥0 paths under docs/adrs/ consulted for related/superseded ADRs (or record that docs/adrs/ is missing/empty) and ≥1 repo path for related code (or N/A with a one-line reason). |
| Step 5 (report) | Every file path in the summary table is copied from a completed write (optionally verified with test -f <path>). |
| Step 6 (verify) | For each ADR path (docs/adrs/NNNN-slugified-title.md), line 1 is ---, YAML frontmatter parses with status and date, and every E, C, A, D, R item in references/definition-of-done.md either passes or has a scoped [INVESTIGATE: ...] marker. |
Step 1: Gather Context
# Get current branch and recent commits
git branch --show-current
git log --oneline -5
# Check for existing ADRs
ls docs/adrs/ 2>/dev/null || echo "No ADR directory found"
# Count existing ADRs for numbering
find docs/adrs -name "*.md" 2>/dev/null | wc -l
This context helps ADR writers reference related commits, avoid duplicate ADRs for already-documented decisions, and verify sequence numbering.
Direct-ADR entry: If the user already supplied a specific decision (or asked to format/verify an existing ADR against MADR and E.C.A.D.R.), skip Steps 2–3 and proceed directly to Step 4 using the supplied decision(s).
Step 2: Extract Decisions
Analyze the current conversation for architectural decisions. If the agent supports subagents, dispatch this as a single extraction subagent; otherwise run the same extraction inline — identical output.
Detection Signals & Extraction Rules
| Signal Type | Examples | Confidence Rule |
|---|---|---|
| Explicit markers | [ADR], "decided:", "the decision is" |
[ADR] tags receive confidence: "high" automatically (guaranteed inclusion) |
| Choice patterns | "let's go with X", "we'll use Y", "choosing Z" | high if clear choice + rationale; medium if implied from action taken |
| Trade-off discussions | "X vs Y", "pros/cons", "considering alternatives" | Combine alternatives and drivers across related mentions |
| Problem-solution pairs | "the problem is... so we'll..." | low if inferred contextually without explicit agreement; state what is missing or contradictory in source_context |
- De-duplicate: Consolidate multiple mentions of the same decision (merge alternatives, combine rationale, keep highest confidence; drop inferred duplicates of an explicit
[ADR]entry). - Brief / Output Schema:
{
"decisions": [
{
"id": 1,
"title": "Use PostgreSQL for user data",
"problem": "Need ACID transactions for financial records",
"decision": "PostgreSQL for user data storage",
"alternatives": ["MongoDB", "SQLite"],
"rationale": "ACID compliance, team familiarity, mature ecosystem",
"confidence": "high",
"source_context": "Discussion about database selection in planning phase"
}
]
}
If extraction returns an empty decisions array, skip to Step 5 with message: `"No architectural decisions detected in this se
Установить write-adr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл write-adr?
Use when generating Architecture Decision Records (ADRs) from a session, extracting architectural decisions from design discussions, formatting decisions with the MADR template, or verifying ADR completeness against E.C.A.D.R. criteria. Triggers on "write ADRs", "write an ADR", "format as MADR", "document our decisions", "create decision records", "record the choices we made", "extract decisions from this chat", or "check ADR quality". Supports both full session extraction-confirm-write workflows and direct single-ADR creation.
Как установить скилл write-adr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл write-adr запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic