with one click
cplan
// Research the codebase and create a structured implementation plan. Use when the user says 'plan this', 'create a plan', 'how should we implement', or wants to turn a feature description into a structured implementation plan.
// Research the codebase and create a structured implementation plan. Use when the user says 'plan this', 'create a plan', 'how should we implement', or wants to turn a feature description into a structured implementation plan.
Explore requirements and approaches through collaborative dialogue before writing a right-sized requirements document and planning implementation. Use for feature ideas, problem framing, when the user says 'let's brainstorm', or when they want to think through options before deciding what to build.
Document a solved problem as reusable institutional knowledge with parallel research. Use when the user says 'document this', 'compound', 'save learnings', or wants to capture a solution for future reference.
Scaffold a new custom agent — reviewers, researchers, or workflow agents. Use when asked to create, scaffold, or add a new agent.
Enhance an existing plan with parallel research agents for depth, best practices, and implementation details. Use when the user says 'deepen the plan', 'research more', or when a plan has high-risk dimensions that need more investigation.
Review requirements or plan documents using parallel persona agents that surface role-specific issues. Use when a requirements document or plan document exists and the user wants to improve it, or when invoked by /cplan for quality gating.
Commit, push, and open a PR with an adaptive, value-first description. Use when the user says "commit and PR", "push and open a PR", "ship this", "create a PR", "open a pull request", or wants to go from working changes to an open pull request in one step. Also handles "update the PR description" or "refresh the PR description".
| name | cplan |
| description | Research the codebase and create a structured implementation plan. Use when the user says 'plan this', 'create a plan', 'how should we implement', or wants to turn a feature description into a structured implementation plan. |
| argument-hint | Describe the feature, bug fix, or improvement to plan |
Transform feature descriptions, bug reports, or improvement ideas into well-structured implementation plans.
/brainstorm defines WHAT to build. /cplan defines HOW to build it. /work executes the plan.
This skill produces a durable implementation plan. It does not implement code, run tests, or learn from execution-time results.
This skill dispatches read-only research subagents in parallel during Step 1. These agents must exist in the agents/ directory:
cexplore — codebase patterns and conventions (always)clearnings — past solutions from docs/solutions/ (conditional)cdocs — external documentation via Context7 MCP (conditional)cbestpractices — industry standards and community patterns (conditional)cspecflow — user flow completeness analysis (optional, runs in Step 4 before finalizing)Read these on-demand at the step that needs them — do not bulk-load at start:
references/plan-template.md — template structure with all sections and examplesreferences/depth-levels.md — classification (Lightweight/Standard/Deep) with quality barreferences/section-mapping.md — maps research findings to plan sectionsIf no feature description is provided, ask: "What would you like to plan? Please describe the feature, bug fix, or improvement you have in mind."
Search docs/brainstorms/ for files matching the feature topic. A brainstorm is relevant if the topic semantically matches and it was created within the last 30 days.
If a relevant brainstorm exists:
(see origin: <source-path>)If multiple brainstorms match, use #askQuestions to let the user pick.
If the brainstorm has Resolve Before Planning questions:
/brainstorm to resolve them, or (b) convert to explicit assumptions and continueIf no relevant brainstorm exists, assess whether the request is clear enough for direct planning:
/brainstorm firstNot every task needs all agents. Always run cexplore.
| Agent | Run when... | Skip when... |
|---|---|---|
clearnings | Task touches areas where past problems were documented, or domain is complex | Simple rename, trivial config change |
cdocs | Task involves external libraries, APIs, or frameworks | Pure internal refactor with no external deps |
cbestpractices | Architectural decisions, new technology adoption, or patterns where industry guidance matters | Bug fixes, small UI tweaks, internal plumbing |
External research decision heuristics:
cdocs/cbestpractices for security, payments, auth, external APIs, data migrations, or when the codebase has fewer than 3 direct examples of the needed patternLaunch selected agents in parallel. Pass each the feature description and any origin document context.
Review all findings. If gaps remain:
cdocs or cbestpractices with targeted queries| Level | When | Units |
|---|---|---|
| Lightweight | Simple bugs, small improvements, config changes | 1-3 |
| Standard | Most features, complex bugs, multi-file changes | 3-6 |
| Deep | Major features, architectural changes, cross-cutting | 4-8, phased |
Reclassification: If classified as Lightweight but research reveals the work touches external APIs, CI config, exported interfaces, environment variables consumed by other systems, or shared types — reclassify to Standard.
If depth is unclear, ask one targeted question and continue.
If the user, brainstorm, or research signals TDD, test-first, characterization-first, or external delegation — carry it forward in relevant implementation unit execution notes. Only ask the user if posture would materially change sequencing.
feat: Add user authentication, fix: Prevent checkout double-submitfeat, fix, refactordocs/plans/YYYY-MM-DD-NNN-<type>-<descriptive-name>-plan.md
Create the plan file. Adapt sections to depth level — omit sections that add no value for the specific work.
All file paths in the plan must be repo-relative (e.g., src/models/user.ts), never absolute paths.
---
title: "[Plan Title]"
type: feat|fix|refactor
status: active
date: YYYY-MM-DD
origin: docs/brainstorms/YYYY-MM-DD-<topic>.md # when planning from a brainstorm
---
1-2 paragraphs: what is changing and why.
The user/business problem and context. Reference the origin doc when present.
In scope: ... Out of scope: ...
Summarize findings from research agents:
docs/solutions/| Decision | Chosen approach | Why | Alternatives considered |
|---|
Include when the work involves DSL/API surface design, multi-component integration, complex data flow, state-heavy lifecycle, or branching logic. Choose the right medium:
| Work involves... | Best form |
|---|---|
| DSL or API surface | Pseudo-code grammar or contract sketch |
| Multi-component integration | Mermaid sequence or component diagram |
| Data pipeline | Data flow sketch |
| State-heavy lifecycle | State diagram |
| Complex branching | Flowchart |
| Mode/flag combos | Decision matrix |
Frame as: "Directional guidance for review, not implementation specification."
Skip for well-patterned or straightforward work.
Break work into ordered, checkable units. Each unit = one meaningful atomic change.
For each unit:
- [ ] **Unit N: [Name]**
**Goal:** What this unit achieves
**Requirements:** R1, R2
**Dependencies:** None | Unit N
**Files:**
- Create: `path/to/new-file`
- Modify: `path/to/existing-file`
- Test: `path/to/test-file`
**Approach:** Key design decisions, data flow, integration notes (2-5 sentences)
**Execution note:** _(optional)_ TDD red-first | characterization-first | external-delegate
**Patterns to follow:** Existing code at `path/to/similar`
**Test scenarios:**
- Happy path: [specific input -> expected outcome]
- Edge case: [boundary condition -> expected outcome]
- Error path: [failure mode -> expected outcome]
- Integration: [cross-layer scenario -> expected outcome]
**Verification:** How to know this unit is complete (outcomes, not commands)
Rules for units:
Test expectation: none — [reason]Omit categories that don't apply. For lightweight plans, a few bullets suffice.
| Risk | Likelihood | Impact | Mitigation |
|---|
Add only the sections that genuinely help:
For Standard or Deep plans where the feature involves multiple user types, state machines, or multi-step workflows, run cspecflow against the draft plan before finalizing.
cspecflowdocs/specflows/ — reference it from the plan when relevantSkip when: Lightweight plans, pure refactors, or single linear flow with no branching.
Check before writing:
/brainstormIf an origin document exists, re-read it and verify:
/brainstormdocs/plans/YYYY-MM-DD-NNN-<type>-<name>-plan.mddocs/plans/.latestdocs/plans/[filename]"Score the plan against these risk dimensions:
| Dimension | Low risk | High risk |
|---|---|---|
| Scope | Single module | Cross-cutting |
| Novelty | Follows existing patterns | New patterns needed |
| Dependencies | Self-contained | External APIs, migrations |
| Reversibility | Easy to revert | Hard to undo (data migrations, API contracts) |
If gaps are found, suggest the /deepen skill with specific sections that need strengthening.
Use #askQuestions to ask what the user wants to do next:
| Option | When to show |
|---|---|
Write Tests First (TDD) (Recommended) — load the /test skill | Always (default for Standard/Deep) |
Start Implementation — load the /work skill | Always |
Deepen Plan — load the /deepen skill | When 2+ high-risk dimensions or user requests |
| Review and refine — iterate on the plan | Always |
After the user picks a next skill, announce the handover and load the chosen skill. Example: "Loading /work to start implementation."
path/class references over brittle line numbers- [ ] syntaxdocs/plans/xxx.md" — don't repeat the full plan in chat