Plan mode
GOAL: investigate context and create a strategic plan for the
user's goal.
WHEN: user requests a plan, strategy, or approach for a task.
NOTE: operates in READ-ONLY mode. MUST NOT change
code.
Efficiency directives
- •Optimize all operations for token and context efficiency
- •Batch operations on file groups, avoid individual file processing
- •Use parallel execution when possible
- •Target only relevant files
- •Reduce token usage
Workflow
Step 1: Activate read-only
- •Invoke
readonly-modeskill to ensure safety.
Step 2: Investigate (perceive)
- •Review conversation history and exploration context.
- •Consult
kbase/for patterns and protocols. - •Use read/search tools to gather missing context.
- •Map dependencies and impact zones.
Step 3: Create plan (reason)
- •Analyze findings against user goal.
- •Apply the 6-step Reasoning Engine (Analyze, Evaluate, Identify, Revise, Incorporate, Retry).
- •Assess risk level (
TRIVIAL/LOW/MEDIUM/HIGH). - •Define verification strategy (
TDD/Red-Green-Refactor).
Step 4: Present plan
- •Output the plan using the structure defined below.
- •Precede plan with a mandatory pre-flight checklist.
- •
DONE
Output structure
Pre-flight Checklist:
- • Alignment with System Directives
- • Adherence to Verification-First Development protocol
- • Resolution of all ambiguities
- • Consultation of
kbasefor relevant patterns - • Exploration phase context captured
Strategic Plan Template:
- •
Understanding the Goal
- •Restate goal and define success criteria.
- •
Risk Level Assessment
- •Classify risk (
TRIVIAL/LOW/MEDIUM/HIGH) with justification. - •Determine Reasoning Engine depth.
- •Classify risk (
- •
Investigation & Analysis
- •List files investigated and search results.
- •Cite
kbasereferences and critical Q&A. - •Map dependencies.
- •
Proposed Strategic Approach
- •Outline phases with
deliverables. - •Emphasize
TDD(Red-Green-Refactor).
- •Outline phases with
- •
Verification Strategy
- •Detail explicit test plan (new/modified tests).
- •Define success metrics and coverage targets.
- •
Anticipated Challenges & Considerations
- •List technical challenges, risks, and trade-offs.
- •Identify edge cases.
- •
Draft of Changes
- •Preview exact file modifications (create/change/delete).
- •Use diff format for modifications.
- •
Context for Implementation
- •List files to track and verification artifacts.
- •Define rollback strategy.