plan
/plan - Task Planning Command
Section titled “/plan - Task Planning Command”Purpose
Section titled “Purpose”Create structured implementation plans with task breakdown, dependencies, and time estimates for complex work.
/plan [task description or feature request]Arguments
Section titled “Arguments”$ARGUMENTS: Description of the task, feature, or work to plan
Create a detailed implementation plan for: $ARGUMENTS
Workflow
Section titled “Workflow”Phase 1: Understanding
Section titled “Phase 1: Understanding”-
Parse Requirements
- Identify core functionality needed
- List explicit requirements
- Note implicit requirements
- Identify acceptance criteria
-
Clarify Ambiguities
- Ask questions if unclear
- List assumptions made
- Note dependencies on decisions
Phase 2: Research
Section titled “Phase 2: Research”-
Explore Codebase
- Find related implementations
- Identify patterns to follow
- Locate integration points
- Note conventions
-
Technical Research (if needed)
- Research unfamiliar technologies
- Find best practices
- Identify potential pitfalls
Phase 3: Task Breakdown
Section titled “Phase 3: Task Breakdown”-
Decompose Work
- Break into atomic tasks
- Each task: 15-60 minutes
- Clear completion criteria
-
Order by Dependencies
- What blocks what
- Parallel opportunities
- Critical path
-
Add Estimates
- S: <30 min
- M: 30-60 min
- L: 1-2 hours
- XL: 2-4 hours
Phase 4: Documentation
Section titled “Phase 4: Documentation”-
Create Plan Document
- Summary
- Task list
- Files to modify
- Risks
-
Track with TodoWrite
- Add all tasks
- Set initial status
Output
Section titled “Output”Implementation Plan
Section titled “Implementation Plan”## Plan: [Feature/Task Name]
### Summary[2-3 sentence overview of what will be built]
### Scope
**In Scope**- [What will be done]
**Out of Scope**- [What won't be done]
**Assumptions**- [Key assumptions made]
---
### Tasks
#### Phase 1: Setup [Total: Xh]| # | Task | Size | Depends On ||---|------|------|------------|| 1 | Create data model | M | - || 2 | Set up database migration | S | 1 || 3 | Add model tests | M | 1 |
#### Phase 2: Core Implementation [Total: Xh]| # | Task | Size | Depends On ||---|------|------|------------|| 4 | Implement service layer | L | 1 || 5 | Add business logic | M | 4 || 6 | Write service tests | M | 5 |
#### Phase 3: API Layer [Total: Xh]| # | Task | Size | Depends On ||---|------|------|------------|| 7 | Create API endpoints | M | 5 || 8 | Add validation | S | 7 || 9 | Write API tests | M | 8 |
#### Phase 4: Integration [Total: Xh]| # | Task | Size | Depends On ||---|------|------|------------|| 10 | Integrate with frontend | M | 7 || 11 | End-to-end testing | M | 10 || 12 | Update documentation | S | 11 |
---
### Files to Create/Modify
**Create**- `src/models/feature.py` - Data model- `src/services/feature.py` - Business logic- `src/api/feature.py` - API endpoints- `tests/test_feature.py` - Tests
**Modify**- `src/api/__init__.py` - Register routes- `docs/api.md` - API documentation
---
### Dependencies
**External**- [Package X] - For [purpose]
**Internal**- Requires [existing feature] to be complete
---
### Risks
| Risk | Impact | Mitigation ||------|--------|------------|| [Risk 1] | High | [How to mitigate] || [Risk 2] | Medium | [How to mitigate] |
---
### Questions for Stakeholders1. [Question about requirement]2. [Question about edge case]
---
### Success Criteria- [ ] All tasks completed- [ ] Tests passing with 80%+ coverage- [ ] API documentation updated- [ ] Code reviewed and approvedPlan Templates
Section titled “Plan Templates”Feature Plan
Section titled “Feature Plan”For new functionality
Bug Fix Plan
Section titled “Bug Fix Plan”For debugging and fixing issues
Refactor Plan
Section titled “Refactor Plan”For code improvements
Migration Plan
Section titled “Migration Plan”For data or system migrations
Detailed Mode (Superpowers Methodology)
Section titled “Detailed Mode (Superpowers Methodology)”Use --detailed flag for superpowers-style plans with 2-5 minute tasks:
/plan --detailed [task description]Detailed Mode Features
Section titled “Detailed Mode Features”Reference: .claude/skills/methodology/writing-plans/SKILL.md
When --detailed is specified:
- Bite-sized tasks: 2-5 minutes each (vs standard 15-60 min)
- Exact file paths: Always include full paths
- Complete code samples: Actual code, not descriptions
- TDD steps per task: Write test → verify fail → implement → verify pass → commit
- Expected command outputs: Specify what success looks like
Detailed Task Template
Section titled “Detailed Task Template”## Task [N]: [Task Name]
**Files**:- Create: `path/to/new-file.ts`- Modify: `path/to/existing-file.ts`- Test: `path/to/test-file.test.ts`
**Steps**:
1. Write failing test ```typescript // Exact test code-
Verify test fails
Terminal window npm test -- --grep "test name"# Expected: 1 failing -
Implement minimally
// Exact implementation code -
Verify test passes
Terminal window npm test -- --grep "test name"# Expected: 1 passing -
Commit
Terminal window git commit -m "feat: add [feature]"
### Execution After Planning
Use `/execute-plan [plan-file]` for subagent-driven execution with code review gates.
**Reference**: `.claude/skills/methodology/executing-plans/SKILL.md`
## Flags
| Flag | Description | Example ||------|-------------|---------|| `--mode=[mode]` | Use specific behavioral mode | `--mode=brainstorm` || `--detailed` | Use superpowers methodology (2-5 min tasks) | `--detailed` || `--depth=[1-5]` | Planning thoroughness level | `--depth=4` || `--format=[fmt]` | Output format (concise/detailed/json) | `--format=detailed` || `--save=[path]` | Save plan to file | `--save=plans/auth.md` || `--checkpoint` | Create checkpoint after planning | `--checkpoint` |
### Flag Usage Examples
```bash/plan --detailed "implement user authentication"/plan --mode=brainstorm "redesign checkout flow"/plan --depth=5 --save=plans/migration.md "database migration"/plan --format=json "api endpoint structure"Mode Recommendations
Section titled “Mode Recommendations”| Mode | Best For |
|---|---|
default | Standard planning |
brainstorm | Exploratory planning, multiple approaches |
deep-research | Complex features needing investigation |
implementation | Quick plans for clear tasks |
MCP Integration
Section titled “MCP Integration”This command leverages MCP servers for enhanced planning:
Reasoning - Structured Planning (Primary)
Section titled “Reasoning - Structured Planning (Primary)”ALWAYS use Reasoning for task decomposition:- Break complex tasks into logical thought sequences- Track dependencies between steps- Revise plan as understanding deepens- Use for risk identification and mitigation planningMemory - Decision Persistence
Section titled “Memory - Decision Persistence”Store and recall planning context:- Remember decisions from previous planning sessions- Recall user preferences for task sizing- Store architectural patterns for reuse- Create entities for major features/componentsWeb Search - Technology Research
Section titled “Web Search - Technology Research”When planning involves unfamiliar technologies:- Fetch current documentation for accurate estimates- Understand API patterns before estimating complexity- Identify potential integration challengesFilesystem - Codebase Analysis
Section titled “Filesystem - Codebase Analysis”For accurate file identification:- Use list_dir to understand project structure- Use grep_search to find existing patterns- Identify files to create vs modifyVariations
Section titled “Variations”Modify behavior via CLAUDE.md:
- Task size definitions (standard: 15-60 min, detailed: 2-5 min)
- Required plan sections
- Estimation approach
- Risk assessment criteria
Gap Analysis Rule
Section titled “Gap Analysis Rule”Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.