fix(todo): make todo opt-in and soften its prompts (#12123)
This commit is contained in:
@@ -2,6 +2,7 @@ use crate::session::builder::ExtensionFailure;
|
||||
use anstream::{adapter::strip_str, eprintln, println};
|
||||
use bat::WrappingMode;
|
||||
use console::{measure_text_width, style, Color, StyledObject, Term};
|
||||
use goose::agents::platform_extensions::todo::TODO_WRITE_TOOL_NAME_COMPLETE;
|
||||
use goose::config::Config;
|
||||
use goose::conversation::message::{
|
||||
ActionRequiredData, Message, MessageContent, SystemNotificationContent, SystemNotificationType,
|
||||
@@ -593,7 +594,7 @@ fn render_tool_request(req: &ToolRequest, theme: Theme, debug: bool) {
|
||||
"execute_typescript" | "execute_code" => render_execute_code_request(call, debug),
|
||||
"delegate" => render_delegate_request(call, debug),
|
||||
"subagent" => render_delegate_request(call, debug),
|
||||
"todo__write" => render_todo_request(call, debug),
|
||||
TODO_WRITE_TOOL_NAME_COMPLETE => render_todo_request(call, debug),
|
||||
"load" => {}
|
||||
_ => render_default_request(call, debug),
|
||||
},
|
||||
|
||||
@@ -51,7 +51,7 @@ pub static PLATFORM_EXTENSIONS: Lazy<HashMap<&'static str, PlatformExtensionDef>
|
||||
display_name: "Todo",
|
||||
description:
|
||||
"Enable a todo list for goose so it can keep track of what it is doing",
|
||||
default_enabled: true,
|
||||
default_enabled: false,
|
||||
unprefixed_tools: false,
|
||||
hidden: false,
|
||||
client_factory: |ctx| Some(Box::new(todo::TodoClient::new(ctx).unwrap())),
|
||||
|
||||
@@ -15,6 +15,8 @@ use serde::{Deserialize, Serialize};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
pub static EXTENSION_NAME: &str = "todo";
|
||||
pub const TODO_WRITE_TOOL_NAME: &str = "todo_write";
|
||||
pub const TODO_WRITE_TOOL_NAME_COMPLETE: &str = "todo__todo_write";
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
|
||||
struct TodoWriteParams {
|
||||
@@ -37,17 +39,11 @@ impl TodoClient {
|
||||
indoc! {r#"
|
||||
Your todo content is automatically available in your context.
|
||||
|
||||
Workflow:
|
||||
- Start: write initial checklist
|
||||
- During: update progress
|
||||
- End: verify all complete
|
||||
|
||||
Template:
|
||||
- [x] Requirement 1
|
||||
- [ ] Task
|
||||
- [ ] Sub-task
|
||||
- [ ] Requirement 2
|
||||
- [ ] Another task
|
||||
Use it as brief planning notes for yourself:
|
||||
- When given a multi-step task, you may jot a short plan
|
||||
- Update it only if your plan changes
|
||||
- Items never need to be checked off, closed out, or verified
|
||||
- Never redo or re-verify completed work because of these notes
|
||||
"#}
|
||||
.to_string(),
|
||||
);
|
||||
@@ -115,13 +111,13 @@ impl TodoClient {
|
||||
serde_json::to_value(schema).expect("Failed to serialize TodoWriteParams schema");
|
||||
|
||||
vec![Tool::new(
|
||||
"todo_write".to_string(),
|
||||
TODO_WRITE_TOOL_NAME.to_string(),
|
||||
indoc! {r#"
|
||||
Overwrite the entire TODO content.
|
||||
|
||||
The content persists across conversation turns and compaction. Use this for:
|
||||
- Task tracking and progress updates
|
||||
- Important notes and reminders
|
||||
- A short plan for a multi-step task, rewritten only when the plan changes
|
||||
- Durable notes and reminders you want to keep in view
|
||||
|
||||
WARNING: This operation completely replaces the existing content. Always include
|
||||
all content you want to keep, not just the changes.
|
||||
@@ -164,7 +160,7 @@ impl McpClientTrait for TodoClient {
|
||||
) -> Result<CallToolResult, Error> {
|
||||
let session_id = &ctx.session_id;
|
||||
let content = match name {
|
||||
"todo_write" => self.handle_write_todo(session_id, arguments).await,
|
||||
TODO_WRITE_TOOL_NAME => self.handle_write_todo(session_id, arguments).await,
|
||||
_ => Err(format!("Unknown tool: {}", name)),
|
||||
};
|
||||
|
||||
@@ -190,13 +186,11 @@ impl McpClientTrait for TodoClient {
|
||||
.ok()?;
|
||||
|
||||
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(state) if !state.content.trim().is_empty() => Some(format!(
|
||||
"Planning notes (for your reference; items need not be closed out):\n{}\n",
|
||||
state.content
|
||||
)),
|
||||
_ => Some("Current tasks and notes:\n(none)\n".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-11
@@ -141,17 +141,11 @@ You have these skills at your disposal, when it is clear they can help you solve
|
||||
### Instructions
|
||||
Your todo content is automatically available in your context.
|
||||
|
||||
Workflow:
|
||||
- Start: write initial checklist
|
||||
- During: update progress
|
||||
- End: verify all complete
|
||||
|
||||
Template:
|
||||
- [x] Requirement 1
|
||||
- [ ] Task
|
||||
- [ ] Sub-task
|
||||
- [ ] Requirement 2
|
||||
- [ ] Another task
|
||||
Use it as brief planning notes for yourself:
|
||||
- When given a multi-step task, you may jot a short plan
|
||||
- Update it only if your plan changes
|
||||
- Items never need to be checked off, closed out, or verified
|
||||
- Never redo or re-verify completed work because of these notes
|
||||
|
||||
## tom
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Platform extensions are built-in extensions that provide global features like co
|
||||
- [Extension Manager](/docs/mcp/extension-manager-mcp): Discover, enable, and disable extensions dynamically during sessions (enabled by default)
|
||||
- [Skills](/docs/guides/context-engineering/using-skills): Discover and load skill instructions from built-in and filesystem skills (enabled by default)
|
||||
- [Summon](/docs/mcp/summon-mcp): Load knowledge sources and delegate tasks to subagents (enabled by default)
|
||||
- [Todo](/docs/mcp/todo-mcp): Manage task lists and track progress across sessions (enabled by default)
|
||||
- [Todo](/docs/mcp/todo-mcp): Manage task lists and track progress across sessions
|
||||
- [Top of Mind](/docs/mcp/tom-mcp): Inject persistent instructions into goose's working memory every turn
|
||||
|
||||
### Toggling Built-in Extensions
|
||||
|
||||
@@ -10,7 +10,7 @@ import GooseBuiltinInstaller from '@site/src/components/GooseBuiltinInstaller';
|
||||
|
||||
The Todo extension helps goose stay organized by breaking complex work into a series of steps and keeping you updated as it completes each step.
|
||||
|
||||
goose automatically knows to use the Todo extension for tasks involving multiple files/components or uncertain scope. At the start of the task, goose will create an internal checklist, read and update progress as it works, and verify that all tasks are completed.
|
||||
The Todo extension is not enabled by default. Once enabled, goose can jot down a short plan for multi-step tasks and update it if the plan changes. The notes are shown to goose every turn and survive context compaction, but goose is not asked to check items off or re-verify finished work.
|
||||
|
||||
:::tip
|
||||
You can ask goose to "show me the current todo list" at any time to see what's being tracked.
|
||||
@@ -20,7 +20,7 @@ This tutorial will cover enabling and using the Todo extension.
|
||||
|
||||
## Configuration
|
||||
|
||||
<PlatformExtensionNote/>
|
||||
<PlatformExtensionNote defaultEnabled={false}/>
|
||||
|
||||
<Tabs groupId="interface">
|
||||
<TabItem value="ui" label="goose Desktop" default>
|
||||
|
||||
Reference in New Issue
Block a user