Planning Module
The planning module provides Planning Mode functionality similar to Cursor Plan Mode, Windsurf Planning Mode, Claude Code Plan Mode, and Gemini CLI Plan Mode.Installation
Features
- PlanningAgent - Creates implementation plans before execution
- Plan and PlanStep - Dataclasses for plan structure
- TodoList - Track progress through plan steps
- PlanStorage - Persistence for plans
- ApprovalCallback - Plan approval flow
- Read-only mode - Safe research without modifications
Quick Start
Classes
Plan
Represents an implementation plan.Attributes
| Attribute | Type | Description |
|---|---|---|
title | str | Plan title |
description | str | Plan description |
steps | list[PlanStep] | List of plan steps |
created_at | datetime | Creation timestamp |
updated_at | datetime | Last update timestamp |
PlanStep
A single step in a plan.Attributes
| Attribute | Type | Description |
|---|---|---|
title | str | Step title |
description | str | Step description |
status | str | Status (pending/in_progress/completed/failed) |
dependencies | list[str] | IDs of dependent steps |
estimated_time | str | Estimated completion time |
result | str | Execution result |
TodoList
Track progress through plan steps.Methods
| Method | Description |
|---|---|
add(item) | Add a todo item |
remove(title) | Remove an item |
complete(title) | Mark item as complete |
get_pending() | Get pending items |
get_completed() | Get completed items |
TodoItem
A single todo item.PlanStorage
Persist plans to storage.PlanningAgent
Agent that creates implementation plans.ApprovalCallback
Callback for plan approval flow.Tool Lists
READ_ONLY_TOOLS
Tools allowed in planning mode (safe for research):RESTRICTED_TOOLS
Tools blocked in planning mode:RESEARCH_TOOLS
Tools safe for planning research:Usage Examples
Basic Planning Mode
Custom Planning LLM
Manual Plan Creation
Plan with Approval
Best Practices
- Use planning for complex tasks - Simple tasks don’t need planning
- Review plans before execution - Use approval callbacks
- Break down large plans - Keep steps manageable
- Track dependencies - Define step dependencies for proper ordering
- Persist plans - Save plans for review and resumption

