From 09306cbff8014c94d2b952039cab07ccb2af9646 Mon Sep 17 00:00:00 2001 From: Ammar Date: Tue, 28 Oct 2025 23:20:29 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=A4=96=20fix:=20Remove=20premature=20?= =?UTF-8?q?commitment=20from=20todo=5Fwrite=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tools/toolDefinitions.ts | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/utils/tools/toolDefinitions.ts b/src/utils/tools/toolDefinitions.ts index a310d8e13..be1d1f950 100644 --- a/src/utils/tools/toolDefinitions.ts +++ b/src/utils/tools/toolDefinitions.ts @@ -144,26 +144,17 @@ export const TOOL_DEFINITIONS = { todo_write: { description: "Create or update the todo list for tracking multi-step tasks (limit: 7 items). " + - "Use this for ALL complex, multi-step plans to keep the user informed of progress. " + - "Replace the entire list on each call - the AI should track which tasks are completed. " + - "\n\n" + - "Structure the list with high precision at the center:\n" + - "- Old completed work: Summarize into 1 overview item (e.g., 'Set up project infrastructure (4 tasks)')\n" + - "- Recent completions: Keep detailed (last 1-2 items)\n" + - "- Current work: One in_progress item with clear description\n" + - "- Immediate next steps: Detailed pending items (next 2-3 actions)\n" + - "- Far future work: Summarize into phase items (e.g., 'Testing and polish (3 items)')\n" + + "The TODO list is prominently displayed to the user at the bottom of the chat. " + + "Replace the entire list on each call - the AI tracks which tasks are completed.\n" + "\n" + - "Update frequently as work progresses. As tasks complete, older completions should be " + - "condensed to make room. Similarly, summarized future work expands into detailed items " + - "as it becomes immediate. " + - "\n\n" + "Mark ONE task as in_progress at a time. " + "Order tasks as: completed first, then in_progress (max 1), then pending last. " + - "Before finishing your response, ensure all todos are marked as completed. " + "Use appropriate tense in content: past tense for completed (e.g., 'Added tests'), " + "present progressive for in_progress (e.g., 'Adding tests'), " + - "and imperative/infinitive for pending (e.g., 'Add tests').", + "and imperative/infinitive for pending (e.g., 'Add tests').\n" + + "\n" + + "Update the list as work progresses. If work fails or the approach changes, update " + + "the list to reflect reality - only mark tasks complete when they actually succeed.", schema: z.object({ todos: z.array( z.object({ From 1d0fcff0c8251fb42649b605d2e7566e64701ed0 Mon Sep 17 00:00:00 2001 From: Ammar Date: Wed, 29 Oct 2025 00:05:43 +0000 Subject: [PATCH 2/5] Add summarization guidance and clarify visibility --- src/utils/tools/toolDefinitions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/tools/toolDefinitions.ts b/src/utils/tools/toolDefinitions.ts index be1d1f950..2e625aeb5 100644 --- a/src/utils/tools/toolDefinitions.ts +++ b/src/utils/tools/toolDefinitions.ts @@ -144,7 +144,7 @@ export const TOOL_DEFINITIONS = { todo_write: { description: "Create or update the todo list for tracking multi-step tasks (limit: 7 items). " + - "The TODO list is prominently displayed to the user at the bottom of the chat. " + + "The TODO list is displayed to the user at all times. " + "Replace the entire list on each call - the AI tracks which tasks are completed.\n" + "\n" + "Mark ONE task as in_progress at a time. " + @@ -153,6 +153,9 @@ export const TOOL_DEFINITIONS = { "present progressive for in_progress (e.g., 'Adding tests'), " + "and imperative/infinitive for pending (e.g., 'Add tests').\n" + "\n" + + "If you hit the 7-item limit, summarize older completed items into one line " + + "(e.g., 'Completed initial setup (3 tasks)').\n" + + "\n" + "Update the list as work progresses. If work fails or the approach changes, update " + "the list to reflect reality - only mark tasks complete when they actually succeed.", schema: z.object({ From 7d136a9e5e0f837be05069a3b456fff16d5c9a83 Mon Sep 17 00:00:00 2001 From: Ammar Date: Wed, 29 Oct 2025 00:10:31 +0000 Subject: [PATCH 3/5] Clarify status_set: only claim success when certain --- src/utils/tools/toolDefinitions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/tools/toolDefinitions.ts b/src/utils/tools/toolDefinitions.ts index 2e625aeb5..152e481d9 100644 --- a/src/utils/tools/toolDefinitions.ts +++ b/src/utils/tools/toolDefinitions.ts @@ -183,7 +183,7 @@ export const TOOL_DEFINITIONS = { "WHEN TO SET STATUS:\n" + "- Set status when beginning concrete work (file edits, running tests, executing commands)\n" + "- Update status as work progresses through distinct phases\n" + - "- Set a final status before completing that reflects the outcome\n" + + "- Set a final status before completing, but only claim success when certain (e.g., after confirming checks passed)\n" + "- DO NOT set status during initial exploration, file reading, or planning phases\n" + "\n" + "The status is cleared when a new user message comes in. Validate your approach is feasible \n" + From ae57a18c0086c35a3c59328628ef8da6e427f900 Mon Sep 17 00:00:00 2001 From: Ammar Date: Wed, 29 Oct 2025 00:11:04 +0000 Subject: [PATCH 4/5] Use 'after completion' for clearer sequencing --- src/utils/tools/toolDefinitions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/tools/toolDefinitions.ts b/src/utils/tools/toolDefinitions.ts index 152e481d9..2e106a011 100644 --- a/src/utils/tools/toolDefinitions.ts +++ b/src/utils/tools/toolDefinitions.ts @@ -183,7 +183,7 @@ export const TOOL_DEFINITIONS = { "WHEN TO SET STATUS:\n" + "- Set status when beginning concrete work (file edits, running tests, executing commands)\n" + "- Update status as work progresses through distinct phases\n" + - "- Set a final status before completing, but only claim success when certain (e.g., after confirming checks passed)\n" + + "- Set a final status after completion, only claim success when certain (e.g., after confirming checks passed)\n" + "- DO NOT set status during initial exploration, file reading, or planning phases\n" + "\n" + "The status is cleared when a new user message comes in. Validate your approach is feasible \n" + From 0f4a04630ed2b1f18e8f154f3666c457c6cbc555 Mon Sep 17 00:00:00 2001 From: Ammar Date: Wed, 29 Oct 2025 00:14:43 +0000 Subject: [PATCH 5/5] Retrigger CI