diff --git a/crates/tinyagents-graph/src/todos/test.rs b/crates/tinyagents-graph/src/todos/test.rs index e1b745abd..c8fb476d6 100644 --- a/crates/tinyagents-graph/src/todos/test.rs +++ b/crates/tinyagents-graph/src/todos/test.rs @@ -365,7 +365,7 @@ mod tool_tests { let tool = TodoTool::new(store()); let description = Tool::description(&tool); assert!( - description.contains("only after its work has actually run"), + description.contains("only after its work has run"), "an item is completed after its result exists: {description}" ); assert!( @@ -373,15 +373,15 @@ mod tool_tests { "writing the list is not the work: {description}" ); assert!( - description.contains("immediately carry out the next step"), + description.contains("do the next step"), "the model advances after bookkeeping: {description}" ); assert!( - description.contains("unless this update completes the final item"), + description.contains("unless the list is finished"), "a terminal completion does not require a nonexistent next step: {description}" ); assert!( - description.contains("next model turn"), + description.contains("next turn"), "sequential providers may advance on their next turn: {description}" ); } diff --git a/crates/tinyagents-graph/src/todos/tool.rs b/crates/tinyagents-graph/src/todos/tool.rs index 568fa4265..b2d48f03c 100644 --- a/crates/tinyagents-graph/src/todos/tool.rs +++ b/crates/tinyagents-graph/src/todos/tool.rs @@ -23,15 +23,15 @@ use tinytools::{Tool, ToolPolicy, ToolResult, ToolRunContext, ToolSideEffects}; const TODO_TOOL_NAME: &str = "todo"; -const TODO_DESCRIPTION: &str = "Your todo list for this thread. Pass the complete list every \ - time; it replaces what was there. Use it for work with 3+ steps: write the steps up front, \ - keep exactly one `in_progress`, mark each `completed` only after its work has actually run \ - and its result is in this conversation. Writing the list is bookkeeping, not work: after \ - updating it, immediately carry out the next step, unless this update completes the final item. \ - Providers that cannot issue parallel tool calls may make that call in the next model turn, and \ - one update per response is enough. Omit \ - `todos` to read the current list. The list is bound \ - automatically to the current thread — do not pass a thread id."; +/// Paid on every request of every agent that carries the tool, so each rule +/// is stated once, tersely. The rules themselves are load-bearing: see the +/// `description_states_…` test for the failure each one prevents. +const TODO_DESCRIPTION: &str = "This thread's todo list, for work with 3+ steps. Pass the \ + complete list each time (it replaces the old one); omit `todos` to read it. Keep one item \ + `in_progress`; mark an item `completed` only after its work has run and its result is in \ + the conversation. Writing the list is bookkeeping, not work: in the same response (or your \ + next turn, if you cannot call tools in parallel) do the next step, unless the list is \ + finished."; /// The `todo` harness [`Tool`], backed by a [`Store`](tinyagents_harness::store::Store). pub struct TodoTool {