You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Agent/Middleware/WriteTodosTool.php
+60-60Lines changed: 60 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -31,66 +31,66 @@ public function __construct(protected AgentState $state)
31
31
parent::__construct(
32
32
name: 'write_todos',
33
33
description: <<<TODO
34
-
Use this tool to create and manage a structured task list for your current work session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
35
-
36
-
Only use this tool if you think it will be helpful in staying organized. If the user's request is trivial and takes less than 3 steps, it is better to NOT use this tool and just do the task directly.
37
-
38
-
## When to Use This Tool
39
-
Use this tool in these scenarios:
40
-
41
-
1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
42
-
2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
43
-
3. User explicitly requests todo list - When the user directly asks you to use the todo list
44
-
4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
45
-
5. The plan may need future revisions or updates based on results from the first few steps
46
-
47
-
## How to Use This Tool
48
-
1. When you start working on a task - Mark it as in_progress BEFORE beginning work.
49
-
2. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation.
50
-
3. You can also update future tasks, such as deleting them if they are no longer necessary, or adding new tasks that are necessary. Don't change previously completed tasks.
51
-
4. You can make several updates to the todo list at once. For example, when you complete a task, you can mark the next task you need to start as in_progress.
52
-
53
-
## When NOT to Use This Tool
54
-
It is important to skip using this tool when:
55
-
1. There is only a single, straightforward task
56
-
2. The task is trivial and tracking it provides no benefit
57
-
3. The task can be completed in less than 3 trivial steps
58
-
4. The task is purely conversational or informational
59
-
60
-
## Task States and Management
61
-
62
-
1. **Task States**: Use these states to track progress:
63
-
- pending: Task not yet started
64
-
- in_progress: Currently working on (you can have multiple tasks in_progress at a time if they are not related to each other and can be run in parallel)
65
-
- completed: Task finished successfully
66
-
67
-
2. **Task Management**:
68
-
- Update task status in real-time as you work
69
-
- Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
70
-
- Complete current tasks before starting new ones
71
-
- Remove tasks that are no longer relevant from the list entirely
72
-
- IMPORTANT: When you write this todo list, you should mark your first task (or tasks) as in_progress immediately!.
73
-
- IMPORTANT: Unless all tasks are completed, you should always have at least one task in_progress to show the user that you are working on something.
74
-
75
-
3. **Task Completion Requirements**:
76
-
- ONLY mark a task as completed when you have FULLY accomplished it
77
-
- If you encounter errors, blockers, or cannot finish, keep the task as in_progress
78
-
- When blocked, create a new task describing what needs to be resolved
79
-
- Never mark a task as completed if:
80
-
- There are unresolved issues or errors
81
-
- Work is partial or incomplete
82
-
- You encountered blockers that prevent completion
83
-
- You couldn't find necessary resources or dependencies
84
-
- Quality standards haven't been met
85
-
86
-
4. **Task Breakdown**:
87
-
- Create specific, actionable items
88
-
- Break complex tasks into smaller, manageable steps
89
-
- Use clear, descriptive task names
90
-
91
-
Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully
92
-
Remember: If you only need to make a few tool calls to complete a task, and it is clear what you need to do, it is better to just do the task directly and NOT call this tool at all.
93
-
TODO
34
+
Use this tool to create and manage a structured task list for your current work session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
35
+
36
+
Only use this tool if you think it will be helpful in staying organized. If the user's request is trivial and takes less than 3 steps, it is better to NOT use this tool and just do the task directly.
37
+
38
+
## When to Use This Tool
39
+
Use this tool in these scenarios:
40
+
41
+
1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
42
+
2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
43
+
3. User explicitly requests todo list - When the user directly asks you to use the todo list
44
+
4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
45
+
5. The plan may need future revisions or updates based on results from the first few steps
46
+
47
+
## How to Use This Tool
48
+
1. When you start working on a task - Mark it as in_progress BEFORE beginning work.
49
+
2. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation.
50
+
3. You can also update future tasks, such as deleting them if they are no longer necessary, or adding new tasks that are necessary. Don't change previously completed tasks.
51
+
4. You can make several updates to the todo list at once. For example, when you complete a task, you can mark the next task you need to start as in_progress.
52
+
53
+
## When NOT to Use This Tool
54
+
It is important to skip using this tool when:
55
+
1. There is only a single, straightforward task
56
+
2. The task is trivial and tracking it provides no benefit
57
+
3. The task can be completed in less than 3 trivial steps
58
+
4. The task is purely conversational or informational
59
+
60
+
## Task States and Management
61
+
62
+
1. **Task States**: Use these states to track progress:
63
+
- pending: Task not yet started
64
+
- in_progress: Currently working on (you can have multiple tasks in_progress at a time if they are not related to each other and can be run in parallel)
65
+
- completed: Task finished successfully
66
+
67
+
2. **Task Management**:
68
+
- Update task status in real-time as you work
69
+
- Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
70
+
- Complete current tasks before starting new ones
71
+
- Remove tasks that are no longer relevant from the list entirely
72
+
- IMPORTANT: When you write this todo list, you should mark your first task (or tasks) as in_progress immediately!.
73
+
- IMPORTANT: Unless all tasks are completed, you should always have at least one task in_progress to show the user that you are working on something.
74
+
75
+
3. **Task Completion Requirements**:
76
+
- ONLY mark a task as completed when you have FULLY accomplished it
77
+
- If you encounter errors, blockers, or cannot finish, keep the task as in_progress
78
+
- When blocked, create a new task describing what needs to be resolved
79
+
- Never mark a task as completed if:
80
+
- There are unresolved issues or errors
81
+
- Work is partial or incomplete
82
+
- You encountered blockers that prevent completion
83
+
- You couldn't find necessary resources or dependencies
84
+
- Quality standards haven't been met
85
+
86
+
4. **Task Breakdown**:
87
+
- Create specific, actionable items
88
+
- Break complex tasks into smaller, manageable steps
89
+
- Use clear, descriptive task names
90
+
91
+
Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully
92
+
Remember: If you only need to make a few tool calls to complete a task, and it is clear what you need to do, it is better to just do the task directly and NOT call this tool at all.
0 commit comments