Instruction file imported from LeonMelamud/advanced-rag-system (
.cursor/rules/isolation_rules/visual-maps/plan-mode-map.mdc). Copyright stays with the author.
PLAN MODE: TASK PLANNING PROCESS MAP
TL;DR: This visual map guides the PLAN mode process, focusing on creating detailed implementation plans based on the complexity level determined during initialization, with mandatory technology validation before implementation.
🎯 MANDATORY PLANNING PRINCIPLES
🔄 DRY (Don't Repeat Yourself) - PLANNING LEVEL
- Identify reusable components during planning
- Plan for shared modules and common patterns
- Avoid planning duplicate functionality
- Design for component reuse and inheritance
- Plan shared configurations and utilities
💎 KISS (Keep It Simple, Stupid) - PLANNING LEVEL
- Plan the simplest solution that meets requirements
- Avoid over-complicated architectures
- Choose proven technologies and patterns
- Plan for maintainability and clarity
- Minimize planned dependencies and complexity
📋 PLANNING EFFICIENCY CHECKLIST
- Can existing components be reused in this plan?
- Is this the simplest approach that works?
- Are we using established patterns and technologies?
- Will this plan result in maintainable code?
- Are we avoiding unnecessary complexity?
🧭 PLAN MODE PROCESS FLOW
graph TD
Start["🚀 START PLAN MODE"] --> LoadMain["📚 LOAD MAIN RULE<br>.cursor/rules/isolation_rules/main.mdc<br>(Includes Memory Bank Verification)"]
%% After Main Rule, read additional docs and check context
LoadMain --> ReadDocs["📚 Read Reference Documents<br>.cursor/rules/isolation_rules/Core/command-execution.mdc<br>.cursor/rules/isolation_rules/Core/context-management.mdc"]
%% Context Check
ReadDocs --> ContextCheck{"🧠 Context<br>Overload?"}
ContextCheck -->|"Yes"| ContextManage["📋 CONTEXT MANAGEMENT<br>.cursor/rules/isolation_rules/Core/context-management.mdc"]
ContextManage --> UpdateMemory["📝 Update Memory Bank<br>tasks.md, activeContext.md, progress.md"]
UpdateMemory --> CreatePrompt["✍️ Create Continuation Prompt"]
CreatePrompt --> RequestWindow["🔄 Request New Window"]
%% Normal Flow
ContextCheck -->|"No"| CheckLevel{"🧩 Determine<br>Complexity Level<br>from tasks.md"}
%% Complexity Level Determination
CheckLevel -->|"Level 2"| Level2["LEVEL 2 PLANNING<br>Level2/enhancement-planning.md"]
CheckLevel -->|"Level 3"| Level3["LEVEL 3 PLANNING<br>Level3/feature-planning.md"]
CheckLevel -->|"Level 4"| Level4["LEVEL 4 PLANNING<br>Level4/system-planning.md"]
%% Level 2 Planning
Level2 --> L2Review["Review Code<br>Structure"]
L2Review --> L2Document["Document<br>Planned Changes"]
L2Document --> L2Challenges["Identify<br>Challenges"]
L2Challenges --> L2Checklist["Create Task<br>Checklist"]
L2Checklist --> L2Update["Update tasks.md<br>with Plan"]
L2Update --> L2Tech["TECHNOLOGY<br>VALIDATION"]
L2Tech --> L2Verify["Verify Plan<br>Completeness"]
%% Level 3 Planning
Level3 --> L3Review["Review Codebase<br>Structure"]
L3Review --> L3Requirements["Document Detailed<br>Requirements"]
L3Requirements --> L3Components["Identify Affected<br>Components"]
L3Components --> L3Plan["Create Comprehensive<br>Implementation Plan"]
L3Plan --> L3Challenges["Document Challenges<br>& Solutions"]
L3Challenges --> L3Update["Update tasks.md<br>with Plan"]
L3Update --> L3Tech["TECHNOLOGY<br>VALIDATION"]
L3Tech --> L3Flag["Flag Components<br>Requiring Creative"]
L3Flag --> L3Verify["Verify Plan<br>Completeness"]
%% Level 4 Planning
Level4 --> L4Analysis["Codebase Structure<br>Analysis"]
L4Analysis --> L4Requirements["Document Comprehensive<br>Requirements"]
L4Requirements --> L4Diagrams["Create Architectural<br>Diagrams"]
L4Diagrams --> L4Subsystems["Identify Affected<br>Subsystems"]
L4Subsystems --> L4Dependencies["Document Dependencies<br>& Integration Points"]
L4Dependencies --> L4Plan["Create Phased<br>Implementation Plan"]
L4Plan --> L4Update["Update tasks.md<br>with Plan"]
L4Update --> L4Tech["TECHNOLOGY<br>VALIDATION"]
L4Tech --> L4Flag["Flag Components<br>Requiring Creative"]
L4Flag --> L4Verify["Verify Plan<br>Completeness"]
%% Technology Validation Gate - NEW
L2Tech & L3Tech & L4Tech --> TechGate["⛔ TECHNOLOGY<br>VALIDATION GATE"]
TechGate --> TechSelection["Document Technology<br>Stack Selection"]
TechSelection --> TechHelloWorld["Create Hello World<br>Proof of Concept"]
TechHelloWorld --> TechDependencies["Verify Required<br>Dependencies"]
TechDependencies --> TechConfig["Validate Build<br>Configuration"]
TechConfig --> TechBuild["Complete Test<br>Build"]
TechBuild --> TechVerify["⛔ TECHNOLOGY<br>CHECKPOINT"]
%% Verification & Completion
L2Verify & L3Verify & L4Verify & TechVerify --> CheckCreative{"Creative<br>Phases<br>Required?"}
%% Mode Transition
CheckCreative -->|"Yes"| RecCreative["NEXT MODE:<br>CREATIVE MODE"]
CheckCreative -->|"No"| RecImplement["NEXT MODE:<br>IMPLEMENT MODE"]
%% Style for Technology Gate
style TechGate fill:#ff5555,stroke:#dd3333,color:white,stroke-width:3px
style TechVerify fill:#ff5555,stroke:#dd3333,color:white,stroke-width:3px
style TechSelection fill:#4da6ff,stroke:#0066cc,color:white
style TechHelloWorld fill:#4da6ff,stroke:#0066cc,color:white
style TechDependencies fill:#4da6ff,stroke:#0066cc,color:white
style TechConfig fill:#4da6ff,stroke:#0066cc,color:white
style TechBuild fill:#4da6ff,stroke:#0066cc,color:white
%% Styling
style Start fill:#4da6ff,stroke:#0066cc,color:white
style LoadMain fill:#9b59b6,stroke:#8e44ad,color:white
style ReadDocs fill:#80bfff,stroke:#4da6ff,color:black
style ContextCheck fill:#d94dbb,stroke:#a3378a,color:white
style CheckLevel fill:#d94dbb,stroke:#a3378a,color:white
📋 LEVEL-SPECIFIC PLANNING APPROACHES
graph TD
subgraph "Level 2: Enhancement"
L2A["Basic Requirements<br>Analysis"]
L2B["Simple Component<br>Identification"]
L2C["Linear Implementation<br>Plan"]
L2D["Basic Checklist<br>Creation"]
end
subgraph "Level 3: Feature"
L3A["Detailed Requirements<br>Analysis"]
L3B["Component Mapping<br>with Dependencies"]
L3C["Multi-Phase<br>Implementation Plan"]
L3D["Comprehensive<br>Checklist"]
L3E["Creative Phase<br>Identification"]
end
subgraph "Level 4: System"
L4A["Architectural<br>Requirements Analysis"]
L4B["System Component<br>Mapping"]
L4C["Subsystem<br>Integration Plan"]
L4D["Phased Implementation<br>Strategy"]
L4E["Risk Assessment<br>& Mitigation"]
L4F["Multiple Creative<br>Phase Requirements"]
end
L2A --> L2B --> L2C --> L2D
L3A --> L3B --> L3C --> L3D --> L3E
L4A --> L4B --> L4C --> L4D --> L4E --> L4F
🔧 TECHNOLOGY VALIDATION WORKFLOW
graph TD
Start["Technology<br>Validation Start"] --> Select["Technology<br>Stack Selection"]
Select --> Document["Document Chosen<br>Technologies"]
Document --> POC["Create Minimal<br>Proof of Concept"]
POC --> Build["Verify Build<br>Process Works"]
Build --> Dependencies["Validate All<br>Dependencies"]
Dependencies --> Config["Confirm Configuration<br>Files Are Correct"]
Config --> Test["Complete Test<br>Build/Run"]
Test --> Success{"All Checks<br>Pass?"}
Success -->|"Yes"| Ready["Ready for<br>Implementation"]
Success -->|"No"| Fix["Fix Technology<br>Issues"]
Fix --> Document
style Start fill:#4da6ff,stroke:#0066cc,color:white
style POC fill:#4da6ff,stroke:#0066cc,color:white
style Success fill:#ff5555,stroke:#dd3333,color:white
style Fix fill:#ff5555,stroke:#dd3333,color:white
style Ready fill:#10b981,stroke:#059669,color:white
📊 REQUIRED FILE STATE VERIFICATION
Before planning can begin, verify the file state:
graph TD
Start["File State<br>Verification"] --> CheckTasks{"tasks.md<br>initialized?"}
CheckTasks -->|"No"| ErrorTasks["ERROR:<br>Return to VAN Mode"]
CheckTasks -->|"Yes"| CheckActive{"activeContext.md<br>exists?"}
CheckActive -->|"No"| ErrorActive["ERROR:<br>Return to VAN Mode"]
CheckActive -->|"Yes"| ReadyPlan["Ready for<br>Planning"]
📝 TASKS.MD UPDATE FORMAT
During planning, update tasks.md with this structure:
# Task: [Task name]
## Description
[Detailed description]
## Complexity
Level: [2/3/4]
Type: [Enhancement/Feature/Complex System]
## Technology Stack
- Framework: [Selected framework]
- Build Tool: [Selected build tool]
- Language: [Selected language]
- Storage: [Selected storage mechanism]
## Technology Validation Checkpoints
- [ ] Project initialization command verified
- [ ] Required dependencies identified and installed
- [ ] Build configuration validated
- [ ] Hello world verification completed
- [ ] Test build passes successfully
## Status
- [x] Initialization complete
- [x] Planning complete
- [ ] Technology validation complete
- [ ] [Implementation steps]
## Implementation Plan
1. [Step 1]
- [Subtask 1.1]
- [Subtask 1.2]
2. [Step 2]
- [Subtask 2.1]
- [Subtask 2.2]
## Creative Phases Required
- [ ] [Component 1] Design
- [ ] [Component 2] Architecture
- [ ] [Component 3] Data Model
## Dependencies
- [Dependency 1]
- [Dependency 2]
## Challenges & Mitigations
- [Challenge 1]: [Mitigation strategy]
- [Challenge 2]: [Mitigation strategy]
📋 CREATIVE PHASE IDENTIFICATION
For Level 3-4 tasks, identify components requiring creative phases:
graph TD
Start["Creative Phase<br>Identification"] --> CheckComp{"Component<br>Analysis"}
CheckComp --> UI["UI/UX<br>Components"]
CheckComp --> Data["Data Model<br>Components"]
CheckComp --> Arch["Architecture<br>Components"]
CheckComp --> Algo["Algorithm<br>Components"]
UI & Data & Arch & Algo --> Decision{"Design Decisions<br>Required?"}
Decision -->|"Yes"| Flag["Flag for<br>Creative Phase"]
Decision -->|"No"| Skip["Standard<br>Implementation"]
Flag --> Document["Document in<br>tasks.md"]
📊 TECHNOLOGY VALIDATION CHECKLIST
✓ TECHNOLOGY VALIDATION CHECKLIST
- Technology stack clearly defined? [YES/NO]
- Project initialization command documented? [YES/NO]
- Required dependencies identified? [YES/NO]
- Minimal proof of concept created? [YES/NO]
- Hello world build/run successful? [YES/NO]
- Configuration files validated? [YES/NO]
- Test build completes successfully? [YES/NO]
→ If all YES: Technology validation complete - ready for next phase
→ If any NO: Resolve technology issues before proceeding
📊 PLAN VERIFICATION CHECKLIST
✓ PLAN VERIFICATION CHECKLIST
- Requirements clearly documented? [YES/NO]
- Technology stack validated? [YES/NO]
- Affected components identified? [YES/NO]
- Implementation steps detailed? [YES/NO]
- Dependencies documented? [YES/NO]
- Challenges & mitigations addressed? [YES/NO]
- Creative phases identified (Level 3-4)? [YES/NO/NA]
- tasks.md updated with plan? [YES/NO]
→ If all YES: Planning complete - ready for next mode
→ If any NO: Complete missing plan elements
🔄 MODE TRANSITION NOTIFICATION
When planning is complete, notify user with:
## PLANNING COMPLETE
✅ Implementation plan created
✅ Technology stack validated
✅ tasks.md updated with plan
✅ Challenges and mitigations documented
[✅ Creative phases identified (for Level 3-4)]
→ NEXT RECOMMENDED MODE: [CREATIVE/IMPLEMENT] MODE