Add Plan Mode to replace TODO system

Plan Mode is a cognitive forcing system that requires reasoning about:
- Happy path
- Negative case
- Boundary condition

New tools:
- plan_read: Read current plan for session
- plan_write: Create/update plan with YAML content (validates structure)
- plan_approve: Mark current revision as approved

New command:
- /feature <description>: Start Plan Mode for a new feature

Plan schema requires:
- plan_id, revision, approved_revision
- items with id, description, state, touches, checks (happy/negative/boundary)
- evidence and notes required when marking items done

Verification:
- plan_verify() called automatically when all items are done/blocked

Removed:
- todo_read, todo_write tools
- todo.rs module and related tests
This commit is contained in:
Dhanji R. Prasanna
2026-02-02 14:38:25 +11:00
parent 7fc9eb0778
commit a63950d8f5
12 changed files with 997 additions and 942 deletions

View File

@@ -7,7 +7,7 @@ use anyhow::Result;
use tracing::{debug, warn};
use crate::tools::executor::ToolContext;
use crate::tools::{acd, file_ops, memory, misc, research, shell, todo, webdriver};
use crate::tools::{acd, file_ops, memory, misc, plan, research, shell, webdriver};
use crate::ui_writer::UiWriter;
use crate::ToolCall;
@@ -32,9 +32,10 @@ pub async fn dispatch_tool<W: UiWriter>(
"write_file" => file_ops::execute_write_file(tool_call, ctx).await,
"str_replace" => file_ops::execute_str_replace(tool_call, ctx).await,
// TODO management
"todo_read" => todo::execute_todo_read(tool_call, ctx).await,
"todo_write" => todo::execute_todo_write(tool_call, ctx).await,
// Plan Mode
"plan_read" => plan::execute_plan_read(tool_call, ctx).await,
"plan_write" => plan::execute_plan_write(tool_call, ctx).await,
"plan_approve" => plan::execute_plan_approve(tool_call, ctx).await,
// Miscellaneous tools
"screenshot" => misc::execute_take_screenshot(tool_call, ctx).await,