How this command is triggered — by the user, by Claude, or both
Slash command
/spec-workflow:plan <path-to-spec.md>This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
spec-workflow v1.0.0 · Plan You are running the standalone plan generation stage. ## Review File Semantics Review files (`docs/reviews/REVIEW-*.md`) are local artifacts only. Do NOT commit them. Use the Write tool to create/update them; users can commit manually if desired. ## Artifact Write Rules 1. ALWAYS use the **Write** tool to persist PLAN and REVIEW files. - NEVER use Bash heredocs (`cat <<EOF`), `echo "..." >`, or `python -c "..."` to write artifact content. 2. All generated artifacts MUST be UTF-8. Avoid emoji and non-ASCII status symbols. - Use these ASCII status marker...
spec-workflow v1.0.0 · Plan
You are running the standalone plan generation stage.
Review files (docs/reviews/REVIEW-*.md) are local artifacts only. Do NOT commit them.
Use the Write tool to create/update them; users can commit manually if desired.
cat <<EOF), echo "..." >, or python -c "..." to write artifact content.[x] (done), [ ] (pending), [!] (critical), [~] (warning).When executing Bash commands on Windows (non-WSL):
"c:/Users/Bryce/Projects/bryce-labs-toolkit"/mnt/c/... unless the environment is confirmed to be WSLc:\Users\...) into Bash — backslashes are stripped or misinterpretedcd to the repo root, use repo-relative paths for all subsequent commandsCanonical examples:
cd "c:/Users/Bryce/Projects/bryce-labs-toolkit" && ls tools/cd "c:/Users/Bryce/Projects/bryce-labs-toolkit" && node -e "JSON.parse(require('fs').readFileSync('.claude-plugin/marketplace.json','utf8'))"Before executing ANY Bash command, verify:
:\ or \\ (Windows backslash paths).
c:\Users\Bryce -> c:/Users/Bryce).type, dir, del), route through
cmd /c "..." or powershell -NoProfile -Command "..." instead of bare Bash.cd).If a Bash call errors with <tool_use_error> or fails unexpectedly:
&&) — run one command per Bash callcdfind with Windows backslash pathsFirst, check if $ARGUMENTS contains --quiet-gates. If so, set QUIET_GATES = true and remove the flag from the text. Otherwise, QUIET_GATES = false.
Determine the type of the remaining arguments:
File path (contains / or \ or ends in .md):
SPEC-foo-bar.md → foo-barFreeform text (no path separators, does not end in .md):
add-user-authdocs/specs/SPEC-{FEATURE_NAME}.mdRead the specification at SPEC_PATH. Extract all REQ-, AC-, NFR-* identifiers from the spec.
Explore the codebase for existing patterns, integration points, and conventions using read-only tools.
Use this structure for the plan:
# Implementation Plan: {Feature Name}
**Spec:** {REQUIRED: relative path to SPEC.md, e.g., docs/specs/SPEC-feature-name.md}
**Version:** 1.0
**Status:** Draft | Under Review | Approved
**Date:** {YYYY-MM-DD}
> **Note:** The Spec field is mandatory. Plans without a valid spec reference
> will be rejected by the plan-reviewer. This link enables the implement and
> review phases to validate against the original requirements.
## Requirement Mapping
| Spec ID | Task ID(s) | Status |
|---------|------------|--------|
| REQ-001 | TASK-001 | [x] Mapped |
| AC-001 | TASK-001 (test) | [x] Mapped |
**Coverage:** X/X (100%)
## Tasks
### TASK-001: {Title}
**Maps to:** REQ-001, AC-001
**Dependencies:** None
**Files:**
- Create: `src/path/file.ts`
- Modify: `src/path/existing.ts`
**Test:** `tests/path/file.test.ts`
**Description:**
{implementation details}
---
## Architecture Decisions
### AD-001: {Decision}
**Choice:** {selected approach}
**Rationale:** {why}
**Alternatives:** {rejected options and why}
## Risk Assessment
| Risk | Impact | Mitigation |
|------|--------|------------|
| {risk} | High | {strategy} |
Create the implementation plan following the template:
Save to: docs/plans/PLAN-{FEATURE_NAME}.md
Use the plan-reviewer subagent (@plan-reviewer) to validate the plan. Pass it:
The plan-reviewer runs in forked context and checks:
Minimum 1 iteration required — always invoke the reviewer at least once.
Parse the JSON decision line from reviewer output:
{"verdict":"APPROVED"|"GAPS_IDENTIFIED","must_fix":N,"should_fix":N,"summary":"..."}
If the reviewer finds gaps with must_fix > 0, revise the plan and re-invoke the reviewer. Repeat up to 3 total iterations. If max iterations reached without APPROVED, proceed to output anyway (let user decide).
Save all plan-reviewer iteration outputs to docs/reviews/REVIEW-PLAN-{FEATURE_NAME}.md:
# Plan Review: {Feature Name}
**Plan:** docs/plans/PLAN-{FEATURE_NAME}.md
**Date:** {YYYY-MM-DD}
**Iterations:** {N}
**Final Verdict:** {verdict}
---
## Iteration 1
**Timestamp:** {YYYY-MM-DD HH:MM}
**Verdict:** {verdict}
**Must-Fix:** {N} | **Should-Fix:** {N}
{full reviewer output}
---
## Iteration 2
...
If QUIET_GATES is enabled, print only:
docs/plans/PLAN-{FEATURE_NAME}.mddocs/reviews/REVIEW-PLAN-{FEATURE_NAME}.mdThen skip directly to step 4 (AskUserQuestion) below.
Otherwise (default), print the following IN ORDER:
1. Summary table:
| Metric | Value |
|---|---|
| Tasks | N |
| Requirement Coverage | X/Y (Z%) |
| Architecture Decisions | N |
| Risks Identified | N |
| Review Iterations | N |
2. Review iteration log (from parsed JSON decision lines):
| Iteration | Must-Fix | Should-Fix | Verdict |
|---|
3. Artifact paths + excerpt:
docs/plans/PLAN-{FEATURE_NAME}.mddocs/reviews/REVIEW-PLAN-{FEATURE_NAME}.mdcode docs/plans/PLAN-{FEATURE_NAME}.mdcat docs/plans/PLAN-{FEATURE_NAME}.mdtype docs\plans\PLAN-{FEATURE_NAME}.md4. Then IMMEDIATELY call the AskUserQuestion tool. Keep the question text SHORT (max 5 lines). Move all details into option descriptions.
QUESTION TEXT (substitute values in braces):
PLAN GATE Plan: docs/plans/PLAN-{FEATURE_NAME}.md | Review: docs/reviews/REVIEW-PLAN-{FEATURE_NAME}.md Latest: {LATEST_VERDICT} {MUST_FIX}/{SHOULD_FIX} | Issues: {TOP_ISSUES} History: {ITER_SUMMARY} Choose an action.
TOP_ISSUES derivation:
ITER_SUMMARY derivation:
OPTIONS (each option MUST have both label and description):
Label: "Approve plan" Description: "Reviewer: {LATEST_SUMMARY}. Plan approved and finalized. Run /spec-workflow:implement to begin implementation. Coverage: REQ {REQ_MAPPED}/{REQ_TOTAL}, AC {AC_MAPPED}/{AC_TOTAL}, NFR {NFR_MAPPED}/{NFR_TOTAL}. Tasks: {TASK_COUNT} total."
Label: "Request revisions" Description: "Last review: {LATEST_VERDICT} (must_fix={MUST_FIX}, should_fix={SHOULD_FIX}). Summary: {LATEST_SUMMARY}. Reviewer requested: {REQUESTED_REVISIONS_SNIPPET}. Selecting this will revise the plan, re-run plan-reviewer, then re-present this gate."
REQUESTED_REVISIONS_SNIPPET derivation:
Label: "Review now (open in VS Code)" Description: "Opens plan and review log in VS Code for review. This gate re-appears after. Plan: docs/plans/PLAN-{FEATURE_NAME}.md. Review: docs/reviews/REVIEW-PLAN-{FEATURE_NAME}.md. Fallback (CMD): type docs\plans\PLAN-{FEATURE_NAME}.md"
Label: "Done — review later" Description: "Plan saved. Resume later with: /spec-workflow:implement docs/plans/PLAN-{FEATURE_NAME}.md"
5. Response handling:
/spec-workflow:implement docs/plans/PLAN-{FEATURE_NAME}.md to implement."code "docs/plans/PLAN-{FEATURE_NAME}.md" and code "docs/reviews/REVIEW-PLAN-{FEATURE_NAME}.md" via Bash. If code command fails, print fallback: type docs\plans\PLAN-{FEATURE_NAME}.md (CMD) or cat docs/plans/PLAN-{FEATURE_NAME}.md (bash). Then re-present the same AskUserQuestion gate (do NOT advance)./spec-workflow:implement docs/plans/PLAN-{FEATURE_NAME}.md."npx claudepluginhub bryceewatson/bryce-labs-toolkit --plugin spec-workflow/makeCreates structured implementation plan in docs/plans/yyyymmdd-<task-name>.md for described feature or task via interactive context gathering and focused questions.
/planProduces a step-by-step technical implementation plan from an approved feature spec, identifying files, functions, and data flows without writing code.
/planCreates detailed implementation plans interactively through research docs, file reads, and user dialog for features, refactors, or integrations.
/prp-planGenerates detailed feature implementation plan from description or PRD file path, with codebase analysis, pattern extraction, user story, and complexity assessment.
/prp-planGenerates feature implementation plan via codebase exploration, analysis, and web research. For PRD files, parses phases and selects next actionable one based on status and dependencies.
/planBreaks project into small verifiable tasks with acceptance criteria, dependencies, checkpoints. Reads spec/codebase, presents plan for review, saves to tasks/plan.md and tasks/todo.md.