ワンクリックで
adr-write
Write ADR document from discovered candidates with GitHub context research
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Write ADR document from discovered candidates with GitHub context research
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | adr-write |
| description | Write ADR document from discovered candidates with GitHub context research |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash, WebFetch, Task |
Write ADR documents based on discovered candidates from adr-candidates.md.
$ARGUMENTS
You MUST consider the user input before proceeding.
Generate complete ADR documents by researching GitHub commits/PRs and applying the ADR template.
Multi-Agent Collaboration Pipeline:
┌─────────────────────────────────────────────────────────────────┐
│ ADR Writing Pipeline │
├─────────────────────────────────────────────────────────────────┤
│ Phase 1: specvital-specialist │
│ → Search related commits/PRs via GitHub API │
│ → Extract decision context and rationale │
│ → Identify options that were considered │
├─────────────────────────────────────────────────────────────────┤
│ Phase 2: product-strategist │
│ → Analyze decision trade-offs │
│ → Evaluate consequences (positive/negative) │
│ → Structure options comparison │
├─────────────────────────────────────────────────────────────────┤
│ Phase 3: Write ADR Documents │
│ → Generate English version (docs/en/adr/) │
│ → Generate Korean version (docs/ko/adr/) │
│ → Update all required index files │
│ → Update sidebar configuration │
└─────────────────────────────────────────────────────────────────┘
Reference candidates by number from adr-candidates.md:
/adr-write 1 # Platform Level candidate #1
/adr-write core/1 # Core repository candidate #1
/adr-write worker/1 # Worker repository candidate #1
Describe what ADR to write:
/adr-write billing and quota system
/adr-write write the AI spec document generation ADR
/adr-write domain hints extraction for core repository
1, 2): Match Platform Level candidate by numbercore/1, web/2): Match repository-level candidateRead adr-candidates.md and identify the target ADR:
1. Parse user input to identify candidate
2. Extract from adr-candidates.md:
- Title
- Target location (e.g., /en/adr/13-xxx.md)
- Related repositories
- Complexity and priority
3. Determine ADR number and file paths
File Path Determination:
| Candidate Type | English Path | Korean Path |
|---|---|---|
| Platform Level | docs/en/adr/{num}-{slug}.md | docs/ko/adr/{num}-{slug}.md |
| Core | docs/en/adr/core/{num}-{slug}.md | docs/ko/adr/core/{num}-{slug}.md |
| Worker | docs/en/adr/worker/{num}-{slug}.md | docs/ko/adr/worker/{num}-{slug}.md |
| Web | docs/en/adr/web/{num}-{slug}.md | docs/ko/adr/web/{num}-{slug}.md |
Task tool invocation:
Task(subagent_type="specvital-specialist", prompt="""
Research GitHub context for ADR: {candidate_title}
**Target Repositories**: {related_repos}
**Research Tasks**:
1. **Search Related Commits**
- Use gh CLI or GitHub MCP to search commits
- Keywords: {extracted_keywords}
- Timeframe: Last 90 days
- Command: `gh search commits "{keyword}" --repo specvital/{repo} --limit 20`
2. **Search Related PRs**
- Find PRs that introduced or modified this feature
- Command: `gh pr list --repo specvital/{repo} --search "{keyword}" --state all --limit 10`
3. **Extract Decision Context**
For each relevant commit/PR:
- What problem was being solved?
- What approach was taken?
- Any alternatives mentioned in discussions?
4. **Output Format**
""")
Task tool invocation:
Task(subagent_type="product-strategist", prompt="""
Analyze the architectural decision for ADR: {candidate_title}
**Input**: Context from Phase 1
**Analysis Tasks**:
1. **Structure the Context**
- What was the problem/need?
- Why was a decision required?
- What constraints existed?
2. **Identify Options**
Based on commits/PRs and common patterns:
- Option A (selected): What was chosen and why
- Option B: What alternatives existed
- Option C: Any other approaches considered
3. **Evaluate Consequences**
For the selected option:
- Positive outcomes (benefits, improvements)
- Negative outcomes (trade-offs, limitations)
- Technical implications
4. **Output Format**
Structured content ready for ADR template sections:
- Context section content
- Decision section content
- Options Considered section content
- Consequences section content
""")
Generate both English and Korean versions following the template.
ADR Template Structure:
---
title: { Title }
description: ADR for {brief description}
---
# ADR-{num}: {Title}
> [Korean Version](/ko/adr/{path}) OR 🇰🇷 [한국어 버전](/ko/adr/{path})
| Date | Author | Repos |
| ---------- | --------- | ---------------- |
| YYYY-MM-DD | @{author} | {repo1}, {repo2} |
## Context
{Problem situation and why a decision was needed}
## Decision
{The decision made and its rationale}
## Options Considered
### Option A: {Name} (Selected)
{Description, pros, cons}
### Option B: {Name}
{Description, pros, cons}
## Consequences
**Positive:**
- {Benefit 1}
- {Benefit 2}
**Negative:**
- {Trade-off 1}
- {Trade-off 2}
## References
- [Related ADR](/en/adr/XX-related.md)
- [Related PR](https://github.com/specvital/{repo}/pull/{num})
After writing ADR documents, you MUST update all required files per CLAUDE.md rules.
adr/13-xxx.md)Update 6 files:
☐ docs/en/index.md ← Homepage ADR links section
☐ docs/ko/index.md ← Homepage ADR links section
☐ docs/en/adr/index.md ← ADR overview
☐ docs/ko/adr/index.md ← ADR overview
☐ docs/.vitepress/config.mts ← Sidebar navigation
adr/core/16-xxx.md)Update 6 files:
☐ docs/en/index.md ← Homepage ADR links section
☐ docs/ko/index.md ← Homepage ADR links section
☐ docs/en/adr/index.md ← ADR overview (repository section)
☐ docs/ko/adr/index.md ← ADR overview (repository section)
☐ docs/en/adr/{category}/index.md ← Category index
☐ docs/ko/adr/{category}/index.md ← Category index
☐ docs/.vitepress/config.mts ← Sidebar navigation
/en/)/ko/)Korean Style Examples:
| ✅ Correct | ❌ Incorrect |
|---|---|
| 데이터 무결성 검증 | 데이터 무결성을 검증합니다 |
| API 호출 최소화 | API 호출이 최소화됩니다 |
| 정적 분석 기반 테스트 카운트 | 정적 분석을 통해 테스트를 카운트한다 |
adr-candidates.mdconfig.mtsAfter completion, report:
## ADR Written
| Item | Value |
|------|-------|
| Title | {ADR Title} |
| Number | ADR-{num} |
| English | docs/en/adr/{path} |
| Korean | docs/ko/adr/{path} |
## Files Updated
- [x] docs/en/adr/{path} (created)
- [x] docs/ko/adr/{path} (created)
- [x] docs/en/index.md
- [x] docs/ko/index.md
- [x] docs/en/adr/index.md
- [x] docs/ko/adr/index.md
- [x] docs/.vitepress/config.mts
## Source References
- {commit_sha}: {message}
- PR #{num}: {title}
# Write Platform Level candidate #1 (Billing and Quota)
/adr-write 1
# Write Core repository candidate #1
/adr-write core/1
# Natural language - matches "AI-Based Spec Document Generation Pipeline"
/adr-write AI spec generation
# Natural language with context
/adr-write write the billing ADR, focus on quota tracking aspects
/adr-discover: Discover ADR candidates/document-business-rule: Business rule documentation/commit: Commit message generationspecvital-specialist: GitHub context researchproduct-strategist: Decision analysis and trade-offsprompt-engineer: Document quality optimizationclaude-code-specialist: Command and workflow optimizationNow execute the workflow:
adr-candidates.md