diff --git a/crates/goose/src/agents/extension.rs b/crates/goose/src/agents/extension.rs index 3287a40b06e2..c8430f67e861 100644 --- a/crates/goose/src/agents/extension.rs +++ b/crates/goose/src/agents/extension.rs @@ -48,7 +48,7 @@ pub static PLATFORM_EXTENSIONS: Lazy PlatformExtensionDef { name: todo_extension::EXTENSION_NAME, description: - "Enable a todo list for Goose so it can keep track of what it is doing", + "Enable a todo list for goose so it can keep track of what it is doing", default_enabled: true, client_factory: |ctx| Box::new(todo_extension::TodoClient::new(ctx).unwrap()), }, diff --git a/crates/goose/src/agents/todo_extension.rs b/crates/goose/src/agents/todo_extension.rs index d5ce432d9bfc..1ab8c818fd7b 100644 --- a/crates/goose/src/agents/todo_extension.rs +++ b/crates/goose/src/agents/todo_extension.rs @@ -50,31 +50,24 @@ impl TodoClient { icons: None, website_url: None, }, - instructions: Some(indoc! {r#" - Task Management - - Use todo_write for tasks with 2+ steps, multiple files/components, or uncertain scope. - Your TODO content is automatically available in your context. + instructions: Some( + indoc! {r#" + Your todo content is automatically available in your context. Workflow: - Start: write initial checklist - During: update progress - End: verify all complete - Warning: todo_write overwrites entirely; always include ALL content you want to keep - - Keep items short, specific, action-oriented. Not using the todo tool for complex tasks is an error. - - For autonomous work, missing requirements means failure - document all requirements in TODO immediately. - Template: - - [ ] Implement feature X - - [ ] Update API - - [ ] Write tests - - [ ] Run tests - - [ ] Run lint - - [ ] Blocked: waiting on credentials - "#}.to_string()), + - [x] Requirement 1 + - [ ] Task + - [ ] Sub-task + - [ ] Requirement 2 + - [ ] Another task + "#} + .to_string(), + ), }; Ok(Self { @@ -251,12 +244,15 @@ impl McpClientTrait for TodoClient { async fn get_moim(&self) -> Option { let session_id = self.context.session_id.as_ref()?; let metadata = SessionManager::get_session(session_id, false).await.ok()?; - let state = extension_data::TodoState::from_extension_data(&metadata.extension_data)?; - if state.content.trim().is_empty() { - return None; + match extension_data::TodoState::from_extension_data(&metadata.extension_data) { + Some(state) if !state.content.trim().is_empty() => { + Some(format!("Current tasks and notes:\n{}\n", state.content)) + } + _ => Some( + "Current tasks and notes:\nOnce given a task, immediately update your todo with all explicit and implicit requirements\n" + .to_string(), + ), } - - Some(format!("Current tasks and notes:\n{}\n", state.content)) } }