| name | blueprint |
| description | Orchestrate creation/update of PRD, ADR, ARCHITECTURE, and ROADMAP via a guided
5-mode flow (Bootstrap / PRD / ADR / ARCHITECTURE / ROADMAP). Wraps the six
doc subagents with phase-state enforcement so steps cannot be skipped. Use when
the user invokes `/blueprint`, asks to "PRD/ROADMAP์ ๋ง๋ค์", or wants to
initialize/refresh project documentation.
|
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep","AskUserQuestion"] |
| skills | interview-protocol |
/blueprint
Orchestrator only. The six doc subagents already implement the
interview-protocol 2-pass contract; this skill owns ordering, branch,
state, validation gate, and final PR โ nothing else.
Do NOT inline PRD/ROADMAP/PS authoring logic here. Always dispatch via the
Agent tool to the corresponding subagent. Each subagent runs Pass 1 โ
returns pending_questions โ main agent pumps AskUserQuestion one at a
time โ re-spawns with ## INTERVIEW ANSWERS for Pass 2.
Phase 1 โ Intent
- Args capture: if invoked as
/blueprint <prompt>, store the raw prompt as args_seed. Otherwise args_seed = null.
- Resume check: if
.claude/runtime/blueprint-state.json exists and current_phase != "complete":
- Ask the user: resume from
<current_phase> or start over?
- Resume โ mode is locked to
state.mode (skip step 3). Jump to step 4 with the existing state.
- Start over โ delete the state file first, then continue to step 3.
- Mode select (only when no resume) โ single
AskUserQuestion:
- header:
Mode
- question:
์ด๋ค ๋ฌธ์๋ฅผ ์์
ํ ๊น์?
- options:
Bootstrap (์ ์ฒด ์์ฑ) ยท PRD ์์ฑ ๋ฐ ์
๋ฐ์ดํธ ยท ADR ์์ฑ ๋ฐ ์
๋ฐ์ดํธ ยท ARCHITECTURE ์์ฑ ๋ฐ ์
๋ฐ์ดํธ ยท ROADMAP ์์ฑ ๋ฐ ์
๋ฐ์ดํธ
- Dependency precheck โ
roadmap mode only: [ -f docs/PRD.md ]. If missing, ask ROADMAP์ PRD๊ฐ ํ์ํด์. PRD๋ถํฐ ๋ง๋ค๊น์? โ branch to bootstrap or abort.
- Branch (only when no resume):
git checkout -b docs/blueprint-{mode}. Skip git-issue.sh (docs-only exception per CLAUDE.md).
- State init (only when no resume): write
.claude/runtime/blueprint-state.json per the schema below with current_phase = "intent", then advance to the first execution phase (prd-gen / adr-gen / arch-gen / roadmap-gen).
Phase 2..N โ Execute
Dispatch by mode:
Universal rules (apply to every subagent call):
- Run one Pass 1 โ AskUserQuestion loop โ one Pass 2 per subagent. Do not start the next subagent before the current one's Pass 2 returns.
- After Pass 2 returns, write
current_phase to the next value in the mode's sequence. The phase-gate hook enforces single-step forward (or *-gen rewind on validation-fail).
- On validator findings with severity
warning or higher (i.e., not pure info), report the issue list to the user with choices ์์ / ๋ฌด์ / ์ข
๋ฃ:
์์ โ rewind state to the corresponding *-gen phase, re-spawn the generator with the issue list appended to the prompt.
๋ฌด์ โ advance.
์ข
๋ฃ โ stop, leave state at the validator phase.
- If the validator returns only
info findings (or none), advance automatically without prompting.
State
.claude/runtime/blueprint-state.json:
{
"mode": "bootstrap|prd|adr|architecture|roadmap",
"current_phase": "intent|prd-gen|prd-validate|adr-gen|arch-gen|roadmap-gen|roadmap-validate|complete",
"branch": "docs/blueprint-{mode}",
"args_seed": "<string|null>",
"started_at": "<ISO8601>",
"updated_at": "<ISO8601>"
}
Allowed sequences
| mode | sequence |
|---|
bootstrap | intent โ prd-gen โ prd-validate โ adr-gen โ arch-gen โ roadmap-gen โ roadmap-validate โ complete |
prd | intent โ prd-gen โ prd-validate โ complete |
adr | intent โ adr-gen โ complete |
architecture | intent โ arch-gen โ complete |
roadmap | intent โ roadmap-gen โ roadmap-validate โ complete |
Enforcement: hooks/phase/blueprint-guard.sh blocks
(a) renderer scripts run outside their expected gen-phase, (b) phase writes that skip a step or jump to a phase outside the mode's sequence, and (c) Bash/Edit mutations of blueprint-state.json. Always use the Write tool with the full state JSON to advance phases; Edit and sed/jq -i/> file mutations are denied. Escape: BLUEPRINT_BYPASS=1 (one-shot only).
Subagent dispatch
| Phase | Agent | seed |
|---|
prd-gen | prd-generator | args_seed |
prd-validate | prd-validator | โ |
adr-gen | adr-generator | args_seed |
arch-gen | architecture-generator | args_seed |
roadmap-gen | roadmap-generator | args_seed |
roadmap-validate | roadmap-validator | โ |
args_seed is routed only to the generator of the mode the user picked (or every generator in bootstrap). Validators do not receive it.
Phase Final โ Wrap up
current_phase = "complete" (state file retained).
- Stage + commit:
git add docs/ .claude/runtime/blueprint-state.json
git commit -m "๐ docs: blueprint <mode> run"
- PR:
hooks/pr/git-pr-create.sh --title "<title>" --body "<body>"
- User confirmation โ merge:
hooks/pr/git-pr-merge.sh.
User-facing examples (ํ๊ธ)
Phase 1 ์ง์
์:
์ด๋ค ๋ฌธ์๋ฅผ ์์
ํ ๊น์?
1) Bootstrap (์ ์ฒด ์์ฑ)
2) PRD ์์ฑ ๋ฐ ์
๋ฐ์ดํธ
3) ADR ์์ฑ ๋ฐ ์
๋ฐ์ดํธ
4) ARCHITECTURE ์์ฑ ๋ฐ ์
๋ฐ์ดํธ
5) ROADMAP ์์ฑ ๋ฐ ์
๋ฐ์ดํธ
Resume ์๋ด:
์ด์ ์ prd-validate ๋จ๊ณ๊น์ง ์งํํ์ด์. ์ด์ด์ ์งํํ ๊น์, ์๋ก ์์ํ ๊น์?
Validation ์ด์ ๋ณด๊ณ :
PRD validator ์ด์ 3๊ฑด:
- F003: ์ธ์ฆ ํ๋ฆ ๋ชจํธ
- ยง7: ์ธ๋ํค ๋๋ฝ
- ยง11: KPI ์ธก์ ๋ฐฉ๋ฒ ๋ฏธ๋ช
์
์ ํ: ์์ / ๋ฌด์ / ์ข
๋ฃ
Hook ์ฐจ๋จ ๋ฉ์์ง (์ฐธ๊ณ ์ฉ โ ์ ์ ํ๋ฆ์์๋ ๋์ค์ง ์์):
Blueprint Phase Gate ์ฐจ๋จ: ์ด renderer๋ 'prd-gen' phase์์๋ง ์คํ ๊ฐ๋ฅํฉ๋๋ค.
ํ์ฌ phase: arch-gen (mode=bootstrap)
Out of scope
roadmap-generator Mark mode (separate workflow).
- Unit tests for
blueprint itself (TDD-exempt: skill / hook / config).
- Any unattended loop that auto-feeds validation findings back into a generator (user decision required).