Strategic planning for complex tasks. Default creates phased implementation plan. Use --detailed for task-level pseudocode breakdown.
Create a detailed implementation plan for $ARGUMENTS before writing any code.
| Mode | Command | Output |
|------|---------|--------|
| Strategic | /create-plan [feature] | Phased plan with architecture decisions |
| Detailed | /create-plan [task] --detailed | Pseudocode, file changes, test cases |
| From Spec | /create-plan --from-spec | Generate plan from existing spec |
Strategic mode (default):
Detailed mode (--detailed):
Skip for: Simple single-file changes, obvious bug fixes.
"Pour your energy into the plan so Claude can 1-shot the implementation."
A good plan means:
┌─────────────────────────────────────────────────────────────────┐
│ STRATEGIC PLANNING │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. UNDERSTAND REQUIREMENTS │
│ └── What exactly needs to be built? │
│ │
│ 2. RESEARCH CODEBASE │
│ └── Existing patterns, related code, constraints │
│ │
│ 2.5 CHECK FOR SPEC TESTS │
│ └── If thoughts/tests/ manifest exists, integrate │
│ │
│ 3. DESIGN APPROACH │
│ └── Consider 2+ options, recommend one │
│ │
│ 4. IDENTIFY RISKS │
│ └── Edge cases, potential issues, unknowns │
│ │
│ 5. CREATE PHASED PLAN │
│ └── Step-by-step with files and changes │
│ │
│ 6. GET APPROVAL │
│ └── Confirm plan before implementation │
│ │
└─────────────────────────────────────────────────────────────────┘
Before designing the approach, check if /generate-tests has already been run:
thoughts/tests/ manifest matching the spec slugAll spec tests pass: <pm> test -- [test-files] to Done CriteriaNo spec test files were modified (immutability preserved) to Done Criteria/generate-tests first)Save to: thoughts/plans/YYYY-MM-DD_[feature-slug].md
# Implementation Plan: [Feature Name]
**Date**: YYYY-MM-DD
**Status**: Draft | Approved | In Progress | Complete
---
## Overview
[1-2 sentence summary]
## Requirements
- [ ] [Requirement 1]
- [ ] [Requirement 2]
- [ ] [Requirement 3]
---
## Approach Analysis
### Option A: [Name]
**Description**: [How it works]
**Pros**: [List]
**Cons**: [List]
**Complexity**: Low/Medium/High
### Option B: [Name]
**Description**: [How it works]
**Pros**: [List]
**Cons**: [List]
**Complexity**: Low/Medium/High
### Recommendation
[Option X] because [reasoning]
---
## Files to Create/Modify
| File | Action | Purpose |
|------|--------|---------|
| src/domain/entities/X.ts | Create | Domain entity |
| src/application/usecases/Y.ts | Create | Business logic |
| src/infrastructure/repos/Z.ts | Modify | Add new method |
---
## Implementation Phases
### Phase 1: Domain Layer
#### Task 1.1: Create Entity
**File**: `src/domain/entities/X.ts`
```typescript
// Exact code to write
export interface X {
id: string;
name: string;
}
File: src/domain/repositories/XRepository.ts
// Exact code to write
[...]
[...]
[...]
Define the dependency graph for parallel execution with /execute-plan.
dependencies:
1.1: [] # No dependencies — Phase 1
1.2: [] # No dependencies — Phase 1
2.1: [1.1, 1.2] # Needs both — Phase 2
2.2: [1.1] # Needs entity only — Phase 2
3.1: [2.1, 2.2] # Needs app layer — Phase 3
Rules:
[] = no dependencies (first phase)Verifiable checklist — each item must be testable with a command or concrete observation.
<pm> test -- [test-files]<pm> run typecheck && <pm> run lint && <pm> testEach criterion must be verifiable and specific:
Good: GET /api/users returns 200 with JSON array
Bad: API works correctly
Good: npm run typecheck passes with zero errors
Bad: Types are fine
Detect package manager first (check lockfiles: pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → bun, else npm).
After implementation:
<pm> run typecheck<pm> test/post-review (auto-invoked after plan completion)
---
## Detailed Mode Workflow (`--detailed`)
Use when a specific task needs granular breakdown with pseudocode.
┌─────────────────────────────────────────────────────────────────┐ │ DETAILED TASK PLANNING │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ 1. IDENTIFY TASK │ │ └── Reference from plan (e.g., "Task 2.3") │ │ │ │ 2. UNDERSTAND CONTEXT │ │ └── Read plan, related files, dependencies │ │ │ │ 3. DESIGN PSEUDOCODE │ │ └── File-by-file changes, function signatures │ │ │ │ 4. DEFINE TEST CASES │ │ └── Unit, integration, manual tests │ │ │ │ 5. SAVE DOCUMENT │ │ └── thoughts/plans/[feature]_[task]_detailed.md │ │ │ └─────────────────────────────────────────────────────────────────┘
### Detailed Plan Template
Save to: `thoughts/plans/[feature]-[task-code]_detailed.md`
```markdown
# Task Plan: [Task Name]
**Date**: YYYY-MM-DD
**Parent Plan**: thoughts/plans/[plan-file].md
**Task**: [Task code, e.g., 2.3]
---
## Goal
[What this task accomplishes]
## Dependencies
- **Requires**: [Previous tasks that must be complete]
- **Enables**: [Tasks that depend on this one]
---
## Files to Modify
### 1. `path/to/file.ts`
**Purpose**: [Why this file changes]
**Current state**:
```typescript
// Relevant existing code
Changes:
// Pseudocode for changes
// Add: [description]
// Modify: [description]
path/to/new/file.tsPurpose: [What this file does]
Structure:
// Pseudocode outline
// Imports
import { ... } from '...'
// Types
interface ... {
...
}
// Main logic
export function ... {
// Step 1: ...
// Step 2: ...
}
| Test | Input | Expected Output | |------|-------|-----------------| | [Test name] | [Input] | [Output] |
| Case | How to Handle | |------|---------------| | [Edge case] | [Handling] |
Detect package manager (pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → bun, else npm):
<pm> run typecheck && <pm> run lint && <pm> test
---
## When Things Go Sideways
If implementation hits problems:
1. **Stop immediately** - Don't keep pushing
2. **Re-enter plan mode**: "Enter plan mode and re-plan"
3. **Document what went wrong**
4. **Create new plan** with lessons learned
---
## Tips
1. **Spend 30% planning, 70% implementing** - But don't skimp on planning
2. **Include exact code snippets** - No "implement X here" placeholders
3. **Use `--detailed` for complex tasks** - When a phase task needs breakdown
4. **Save plans to `thoughts/plans/`** - Reference them later
5. **Consider 2+ approaches** - Don't jump to first solution
---
## Examples
```bash
/create-plan user-authentication # Strategic plan for feature
/create-plan task-2.3 --detailed # Detailed pseudocode for specific task
/create-plan --from-spec # Generate plan from thoughts/specs/
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer