一键导入
ccc-plan
Feature planning flow for CC Commander. Runs a structured 3-5 question spec interview, then delegates to the planner agent in the background to write an…
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Feature planning flow for CC Commander. Runs a structured 3-5 question spec interview, then delegates to the planner agent in the background to write an…
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ccc-plan |
| description | Feature planning flow for CC Commander. Runs a structured 3-5 question spec interview, then delegates to the planner agent in the background to write an… |
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep","Agent","AskUserQuestion","EnterPlanMode","ExitPlanMode","mcp__ccd_session__mark_chapter","TodoWrite"] |
| argument-hint | [new | bug | refactor | linear | <idea in quotes>] |
User has an idea. Job: turn it into a structured plan file before any code gets written. We cascade through a spec interview, then fire the planner agent in the background to produce the plan at the session-bound path returned by EnterPlanMode — so it renders in Claude Code Desktop's native Plan pane. Return a one-line summary + path.
This is the "evals before specs before code" gate. Every multi-day feature routes through here.
Before showing any UI, determine the session plan file path:
If "Plan File Info" block is present in the system-reminder context (Desktop already activated plan mode for this session, surfacing a path like ~/.claude/plans/<whimsy-name>.md):
PLAN_PATHEnterPlanMode again — it is already activeIf NO "Plan File Info" block is detected:
EnterPlanMode tool — this switches the session into plan modeEnterPlanMode returns the session-bound path (e.g., ~/.claude/plans/spirited-oak-forest.md)PLAN_PATHPLAN_PATH is the canonical write target for the rest of this skill. Do not write to any other path under ~/.claude/plans/.
Why this matters: Desktop's native Plan pane only reads the session-bound path it created. Writing to a fixed
~/.claude/plans/ccc-<date>-<slug>.mdpath produces a plan the pane cannot find — it shows "no plan yet" even after the skill runs.
Call mcp__ccd_session__mark_chapter with:
title: "Feature planning"summary: one-line summary of what the user wants to plan (infer from any argument passed, or use "Structured feature plan" if unknown yet)Output exactly these three sections in order:
**CC Commander** · v{VERSION} · Planner · spec-first, plan-before-code
Read VERSION from ${CODEX_PLUGIN_ROOT}/.claude-plugin/plugin.json.
Detect planning context with a single parallel Bash call:
ls ~/.claude/plans/ 2>/dev/null | wc -l → prior plansgit rev-parse --abbrev-ref HEAD 2>/dev/null → current branchls tasks/todo.md 2>/dev/null → active task listgit log --oneline -5 2>/dev/null → recent activityRender:
🧭 Planner: branch
<branch>·<N>prior plans · tasks/todo.md:<present|absent>· last commit:<age>
If no project context: "🧭 No repo detected — planning will write to session plan path only."
AskUserQuestion with 4 pathsNever render a numbered list. Never ask the user to type anything but free-form answers inside AskUserQuestion follow-ups. Call AskUserQuestion:
question: "What kind of plan are we writing?"
header: "CC Commander planner"
multiSelect: false
options:
- label: "💡 New feature from a description"
description: "You describe the idea — we interview, then produce a full implementation plan."
preview: "5 clarifying questions → planner agent → plan file. ~3-5 minutes."
- label: "🐛 Plan a bug fix"
description: "Bug-focused plan — reproduction, hypothesis, fix scope, regression tests, operationalization."
preview: "Uses debugger + planner agents. Iron Law: no fix without root cause."
- label: "♻️ Refactor existing code"
description: "Refactor plan with before/after contracts, test-first safety net, incremental steps."
preview: "Reads the code first, then plans. Safer for big changes."
- label: "📌 Build from a Linear issue"
description: "Pull a CC- issue — we turn the title + description into a scoped plan with acceptance criteria."
preview: "Pulls via the linear MCP. Writes CC-<N> into the plan slug."
Recommendation logic (⭐):
/ccc-review with findings → ⭐ "Refactor existing code"Each path runs 3-5 AskUserQuestion calls in sequence, each with ≤4 options. User always has a free-form "Other — let me type it" option when the answer doesn't fit.
mcp__linear__list_issues (4 most recent open, plus "Other — paste ID")Invoke the planner subagent via the Agent tool with:
planner if registered)PLAN_PATH (the session-bound path from Step 0) — NOT to any fixed ccc-<date>-<slug>.md path<!-- generated by /ccc-plan · <ISO timestamp> -->commander/cowork-plugin/rules/workflow-first.mdWhile the agent runs, show a progress note in the main thread: "🔄 planner agent drafting your plan — 30-60 seconds..."
The planner agent writes markdown in this shape:
<!-- generated by /ccc-plan · <ISO 8601 timestamp> -->
# <Feature title>
**Date:** <YYYY-MM-DD>
**Path:** <new | bug | refactor | linear>
**Branch:** <current branch or "none">
**Linear:** <CC-N or "none">
## Problem statement
<2-3 sentences, plain English.>
## Evals — what does done look like?
- [ ] <concrete verifiable criterion>
- [ ] <concrete verifiable criterion>
- [ ] <concrete verifiable criterion>
## Evals — what does broken look like?
- <failure mode 1>
- <failure mode 2>
## Plan
### Phase 1 — <name>
- [ ] <step> (est. <time>)
- [ ] <step> (est. <time>)
### Phase 2 — <name>
- [ ] <step>
### Phase 3 — <name>
- [ ] <step>
## Recommended agents
- **<agent>** — <why>
- **<agent>** — <why>
## Risks
| Risk | Likelihood | Mitigation |
|------|------------|------------|
| <risk> | H/M/L | <one-line> |
## Next command
/ccc-build # or /ccc-review or /ccc-ship
---
Generated by `/ccc-plan` — <timestamp>
After the planner agent returns, call mcp__ccd_session__mark_chapter with:
title: "Plan drafted — pending approval"summary: the one-line summary returned by the planner agentCall the ExitPlanMode tool. This signals Claude Code Desktop that the plan is ready for review. The native Plan pane then surfaces the plan and presents approve/modify/reject UI.
Why ExitPlanMode is required: Writing the file alone is not enough. The Plan pane only activates after
ExitPlanModeis called. Skipping this call means the user sees "no plan yet" even though the file was written correctly.
After ExitPlanMode returns:
✅ Plan written to the session plan path (visible in the Desktop Plan pane)
<one-line summary from the agent>
The Plan pane is now active — approve, modify, or reject from there.
Next: `/ccc-build <type>` to start, or review the plan first.
Then offer one more AskUserQuestion:
- "🔨 Start building now (go to /ccc-build)"
- "👀 Show me the plan in chat"
- "📌 File this to Linear as a new issue"
- "↩️ Done for now"
After ExitPlanMode, ask:
AskUserQuestion:
question: "Save a copy to tasks/plans/<slug>.md for git tracking?"
options:
- label: "✅ Yes — save a project copy"
description: "Copies the plan to tasks/plans/<slug>.md. Good for git history + team sharing."
- label: "⏭️ No — session copy is enough"
description: "Skip. The session plan path is already written."
If yes:
<slug> as kebab-case summary of the feature (6-8 words max)mkdir -p tasks/plans/ via BashPLAN_PATH → tasks/plans/<slug>.mdtasks/plans/<slug>.md"This is a second artifact — not a replacement for PLAN_PATH. The Desktop Plan pane reads PLAN_PATH; the project copy is for git history and team sharing.
After the flow completes (with or without the optional copy), call TodoWrite with the Phase 1 tasks extracted from the plan. Mark them all as pending. This seeds the session todo list so the user can track progress immediately.
ccc --plan or ccc build --spec commands~/.claude/plans/ccc-<date>-<slug>.md (fixed name). Use the session-bound path from EnterPlanMode instead — Desktop's Plan pane only reads the path it created, not fixed filenames.ExitPlanMode. Writing the file alone does NOT trigger the Plan pane. The tool call is required to signal Desktop that the plan is ready for review.VERSION from plugin.json — never hardcode.PLAN_PATH (session-bound from EnterPlanMode) — never to a fixed ccc-<date> path.<!-- generated by /ccc-plan · <ISO timestamp> --> for auditability.PLAN_PATH must be set before the planner agent runs.PLAN_PATH to the planner subagent in the prompt. The agent must write to that exact path, not construct its own.EnterPlanMode fails (tool not available in this context), fall back: write to ~/.claude/plans/ccc-$(date +%Y-%m-%d)-<slug>.md and note in the response that the Desktop Plan pane may not detect it automatically./ccc-plan "magic link auth"), skip the picker AND question 1 — use that as the problem statement and start at question 2.model: sonnet to the Agent tool — opus is overkill for plan synthesis.ExitPlanMode after writing — even if the user dismisses early. The Plan pane only activates on the tool call.Bottom line: detect/enter plan mode → mark chapter → 4-path picker → 3-5 cascading questions → planner agent writes plan to session path → mark chapter "drafted" → ExitPlanMode triggers Desktop Plan pane → optional project copy → TodoWrite phase 1 tasks. User never sees a wall of spec in chat; it's always an artifact surfaced in the native Plan pane.
⚙️ Fable contract: plan before build · verifier ≠ worker · prove before alarm · loops need gates · leave durable state —
rules/fable-method.md
Visual, filterable catalog of every CC Commander skill, agent, and command. Cascades from broad category picker into 4-at-a-time detail cards. Use when the user types…
Visual, filterable catalog of every CC Commander skill, agent, and command. Cascades from broad category picker into 4-at-a-time detail cards. Use when the user types…
Build something new — web app, API, CLI, or mobile. Guided spec interview routes to the right template, then scaffolds. Use when: 'build something', 'new project', 'create app'.
Show what changed in the latest CC Commander update. Reads CHANGELOG.md and renders the most-recent version section in a digestible summary. Use when the user types…
CC Commander interactive discovery tool. Renders a live flow diagram of every /ccc-* workflow by reading the plugin directly as single source of truth. Use when the…
Adversarial multi-agent debate (antfooding): fan out N agents that argue and critique a design or diff from distinct lenses until issues resolve, then synthesize a verdict.