Create structured implementation plans before coding. Use when breaking down complex features, refactors, or system changes...
Ask discovery questions (5-7 max):
Feature-specific questions:
Generate inferences with confidence levels:
[INFER-HIGH]: JWT in httpOnly cookies (security best practice)
[INFER-MEDIUM]: Debounced search 300ms (balance UX + performance)
[INFER-LOW]: Max 100 results per page (prevent UI overload)
Get approval before proceeding if requirements are unclear.
Read project documentation first:
docs/product-requirements.md - project goals, existing features (F-##)docs/feature-spec/F-##-*.md - technical detailsdocs/system-design.md - architecture patternsdocs/api-contracts.yaml - API standardsdocs/design-spec.md - UI patternsInvestigation checklist:
Investigation approach (choose based on scope):
Small/contained features: Use direct tools (Grep, Glob, Read) for focused analysis.
Large/complex changes or refactors:
Delegate to Explore agents in parallel for comprehensive impact analysis:
Parallel investigation patterns:
Pattern 1: Full-stack feature/refactor
Pattern 2: Architecture + integration
Pattern 3: Single domain (contained feature)
Write plan to docs/plans/[feature-slug]/plan.md
Use templates for structure:
~/.claude/file-templates/plan.quick.template.md~/.claude/file-templates/plan.template.md~/.claude/file-templates/plan.comprehensive.template.mdPlan template structure:
# Implementation Plan: [Feature Name]
## Overview
[Brief description of what we're building and why]
## Requirements Summary
[Key requirements from clarification phase]
## Investigation Artifacts
[Link agent responses or summarize findings]
## Tasks
### Task 1: [Name]
**What:** [What needs to be done]
**Files:** [Files to create/modify]
**Dependencies:** None / Requires Task X
### Task 2: [Name]
**What:** [What needs to be done]
**Files:** [Files to create/modify]
**Dependencies:** Requires Task 1
## Parallelization Opportunities
[Identify groups of independent tasks]
## Integration Points
- [External systems or APIs]
- [Existing features that interact]
## Testing Strategy
- [Key test scenarios]
- [Coverage requirements]
## Risks
- [Potential issues or unknowns]
- [Breaking changes]
## Key Decisions
- [Important technical decisions with reasoning]
Plan size: 3-6 main tasks (break complex work into manageable chunks)
Identify parallelization:
## Batch 1 (Parallel - no shared dependencies)
- Task 1: Backend API endpoint
- Task 2: Frontend component
- Task 3: Database migration
## Batch 2 (Sequential - depends on Batch 1)
- Task 4: Integration layer
- Task 5: Tests
Default to sequential unless clear benefit to parallel execution.
Update project documentation using available commands:
Before implementation:
After implementation:
Documentation scope:
docs/product-requirements.yamldocs/feature-specs/F-##-[slug].yamldocs/user-stories/US-###-[slug].yamldocs/api-contracts.yamldocs/system-design.yamldocs/data-plan.yamldocs/design-spec.yamlShare:
Get explicit approval before implementation.
For new features:
For refactors:
For integrations:
# Plan: [Feature Name]
## Goal
[What we're building and why]
## Tasks
1. [Task] - [Files] - [Dependencies]
2. [Task] - [Files] - [Dependencies]
3. [Task] - [Files] - [Dependencies]
## Key Decisions
- [Important technical decision with reasoning]
## Risks
- [Potential issues]
Direct investigation:
Read - Examine existing code and docsGrep - Find all usages, imports, call sitesGlob - Find files by patternComprehensive investigation (refactors, large features):
# Find all imports
grep -r "import.*ComponentName" --include="*.tsx"
# Find all usages
grep -r "ComponentName" --include="*.ts"
# Find tests
grep -r "describe.*ComponentName" --include="*.test.ts"
For parallel analysis:
Explore agents for pattern discoveryagent-responses/ directorydocs/api-contracts.yaml for naming/structure patternsShare plan with stakeholders, get sign-off.
Pass plan + investigation results to implementation agents.