IMPORTANT: YOU MUST FOLLOW BELOW TEMPLATE ON PLANNING MODE
[Clear, single-sentence description of what needs to be accomplished]
[debugging | implementation | refactoring | architecture | optimization | migration | research]
[Specific boundaries of what is included and excluded from this task]
[Description of existing codebase/system state relevant to the task]
[Description of desired end state after task completion]
- Technical: [language versions, dependencies, performance requirements]
- Structural: [existing architecture patterns, code conventions]
- Functional: [must maintain compatibility, specific APIs to use/avoid]
Problem Symptoms:
- [Observable behavior/error]
- [When it occurs]
- [Frequency/conditions]
Hypothesis:
- [Potential cause]: [Why this might be the issue]
- [Potential cause]: [Why this might be the issue]
Investigation Path:
- [Where to look first]
- [What to test]
- [How to isolate]
Feature Requirements:
- Core: [Must-have functionality]
- Extended: [Additional capabilities]
Integration Points:
- [Existing system/API to connect with]
- [Data flow direction and format]
New Components:
- [Component name]: [Purpose and responsibility]
- [Component name]: [Purpose and responsibility]
Design Decisions:
- Pattern: [Pattern choice and rationale]
- Structure: [How components will be organized]
- Communication: [How components will interact]
Scalability Considerations:
- [Current load requirements]
- [Future growth vectors]
- [Bottleneck mitigation]
Trade-offs:
- [Option A] vs [Option B]: [Decision and reasoning]
Code Smells Identified:
- [Issue]: [Why it needs refactoring]
- [Issue]: [Why it needs refactoring]
Refactoring Strategy:
- [Technique]: [How it improves the code]
- [Technique]: [How it improves the code]
Preservation Requirements:
- [What behavior must remain unchanged]
- [What interfaces must stay compatible]
Performance Baseline:
- Current Metrics: [Measured performance data]
- Bottlenecks: [Identified slow points]
Optimization Targets:
- [Metric]: [Current] -> [Target]
- [Metric]: [Current] -> [Target]
Optimization Approaches:
- [Technique]: [Expected improvement]
- [Technique]: [Expected improvement]
Source System:
- Technology: [Current stack/version]
- Data Structure: [How data is organized]
- Dependencies: [What relies on current system]
Target System:
- Technology: [New stack/version]
- Data Structure: [How data will be organized]
- Benefits: [Why migrating]
Migration Strategy:
- [Phase]: [What gets migrated]
- Rollback Plan: [How to revert if needed]
Knowledge Gaps:
- [What needs to be understood]
- [Technologies to evaluate]
Research Questions:
- [Specific question to answer]
- [Specific question to answer]
Evaluation Criteria:
- [How to measure/compare options]
- [Decision factors]
Expected Deliverables:
- [Documentation/POC/Recommendation]
- [Component/Module/File path]: [Brief description of changes needed]
- [Component/Module/File path]: [Brief description of changes needed]
[Component A] -> [Component B]: [Dependency relationship] [Component B] -> [Component C]: [Dependency relationship]
- High: [Critical areas that could break existing functionality]
- Medium: [Areas requiring careful attention but manageable]
- Low: [Routine changes with minimal risk]
[High-level strategy: bottom-up, top-down, parallel development, iterative refinement]
Phase 1: [Foundation/Prerequisites] Phase 2: [Core Implementation] Phase 3: [Integration/Connection] Phase 4: [Verification/Cleanup]
1.1 Task: [Specific action] - Input: [What's needed to start] - Action: [Exact steps to perform] - Output: [What will be produced] - Validation: [How to verify completion]
1.2 Task: [Specific action] - Input: [What's needed to start] - Action: [Exact steps to perform] - Output: [What will be produced] - Validation: [How to verify completion]
2.1 Task: [Specific action] - Input: [What's needed to start] - Action: [Exact steps to perform] - Output: [What will be produced] - Validation: [How to verify completion]
3.1 Task: [Specific action] - Input: [What's needed to start] - Action: [Exact steps to perform] - Output: [What will be produced] - Validation: [How to verify completion]
4.1 Task: [Specific action] - Input: [What's needed to start] - Action: [Exact steps to perform] - Output: [What will be produced] - Validation: [How to verify completion]
After Phase 1: [What must be verified before proceeding] After Phase 2: [What must be verified before proceeding] After Phase 3: [What must be verified before proceeding]
Phase 1: [How to undo if needed] Phase 2: [How to undo if needed] Phase 3: [How to undo if needed]
If [condition] at [phase.step]: -> Then: [action path A] -> Else: [action path B]
- [Test scenario]: [Expected outcome]
- [Test scenario]: [Expected outcome]
- [Test scenario]: [Expected outcome]
- Functional: [What must work correctly]
- Performance: [Measurable improvements if applicable]
- Quality: [Code standards met, no regressions]
- All execution steps completed successfully
- Target state achieved as specified
- All acceptance tests passing
- Success metrics met or exceeded
- Code follows established patterns and conventions
- No commented-out code or debug statements remain
- Error handling implemented for edge cases
- Code is readable and self-documenting where possible
- Unit tests written/updated for new/modified code
- Integration tests passing
- Manual testing completed for user-facing changes
- No regression in existing functionality
- Code comments added for complex logic
- README updated if applicable
- API documentation updated if interfaces changed
- Configuration changes documented
- Temporary files/code removed
- Unused imports/dependencies removed
- Build artifacts cleaned
- Development/debug configurations reverted
- Solution works in clean environment
- No unintended side effects observed
- Performance impact acceptable
- Security considerations addressed
- Root cause identified and documented
- Fix applied and tested
- Cannot reproduce original issue
- Related issues prevented
- All feature requirements implemented
- Integration points connected and tested
- Edge cases handled
- Feature usable end-to-end
- Design patterns consistently applied
- Component interfaces defined and stable
- Scalability goals achievable
- Technical debt minimized
- Code structure improved without behavior changes
- Test coverage maintained or improved
- Performance metrics equal or better
- Code complexity reduced
- Performance targets achieved
- Benchmarks documented
- No functional regressions
- Resource usage improved
- Data successfully migrated and verified
- All functionality working in new system
- Rollback tested and documented
- Deprecation notices added where needed
- All research questions answered
- Recommendations documented with rationale
- Proof of concept validated if applicable
- Decision matrix completed
- Decision: [What was decided] Reasoning: [Why this choice] Impact: [How it affects other components]
- Pattern: [Name/Description] Location: [Where to apply] Purpose: [Why chosen] Example: [Brief code structure]
[Critical information for execution phase]
- [File locations and naming conventions]
- [Variable names and their purposes]
- [Key functions/methods to use or avoid]
- Challenge: [Potential issue during execution] Mitigation: [How to handle if encountered]
[Assumptions made during planning that execution should verify]
[Explicitly what NOT to do during execution]
[Items for potential follow-up tasks]
- Set Task Type in overview section
- Use ONLY the matching Task-Specific Analysis section
- Use ONLY the matching Task-Specific Completion checklist
- Remove all other task-specific sections and these instructions
- Adjust phase names and execution steps based on task complexity
- Add/remove phases as needed (typically 3-5 phases work best)