From c1163b02aa601adb6455cd0f34b87e6c2ae0ae2b Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Wed, 30 Jul 2025 19:37:57 -0600 Subject: [PATCH] docs: document optional todos param for new_task (#6329) --- .../architect-mode-prompt.snap | 19 ++++++++++++++++++- .../ask-mode-prompt.snap | 19 ++++++++++++++++++- .../mcp-server-creation-disabled.snap | 19 ++++++++++++++++++- .../mcp-server-creation-enabled.snap | 19 ++++++++++++++++++- .../partial-reads-enabled.snap | 19 ++++++++++++++++++- .../consistent-system-prompt.snap | 19 ++++++++++++++++++- .../with-computer-use-support.snap | 19 ++++++++++++++++++- .../with-diff-enabled-false.snap | 19 ++++++++++++++++++- .../system-prompt/with-diff-enabled-true.snap | 19 ++++++++++++++++++- .../with-diff-enabled-undefined.snap | 19 ++++++++++++++++++- .../with-different-viewport-size.snap | 19 ++++++++++++++++++- .../system-prompt/with-mcp-hub-provided.snap | 19 ++++++++++++++++++- .../system-prompt/with-undefined-mcp-hub.snap | 19 ++++++++++++++++++- src/core/prompts/tools/new-task.ts | 19 ++++++++++++++++++- src/shared/tools.ts | 2 +- 15 files changed, 253 insertions(+), 15 deletions(-) diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap index 632273dea0..1ee254ddf6 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap @@ -354,6 +354,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -361,12 +365,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap index 09b6b04348..8217a4d0a2 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap @@ -251,6 +251,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -258,12 +262,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap index 632273dea0..1ee254ddf6 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap @@ -354,6 +354,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -361,12 +365,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap index 7ca32b80a1..28699e9eb1 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap @@ -403,6 +403,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -410,12 +414,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap index 7dce6219f3..30c24344e8 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap @@ -359,6 +359,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -366,12 +370,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap index 632273dea0..1ee254ddf6 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap @@ -354,6 +354,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -361,12 +365,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap index 419049609e..f142b2e9b8 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap @@ -407,6 +407,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -414,12 +418,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap index 632273dea0..1ee254ddf6 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap @@ -354,6 +354,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -361,12 +365,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap index 7a60f1d403..ce65ddc176 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap @@ -442,6 +442,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -449,12 +453,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap index 632273dea0..1ee254ddf6 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap @@ -354,6 +354,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -361,12 +365,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap index 191816f180..e315c0eca8 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap @@ -407,6 +407,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -414,12 +418,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap index 7ca32b80a1..28699e9eb1 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap @@ -403,6 +403,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -410,12 +414,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap index 632273dea0..1ee254ddf6 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap @@ -354,6 +354,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -361,12 +365,25 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + + ## update_todo_list diff --git a/src/core/prompts/tools/new-task.ts b/src/core/prompts/tools/new-task.ts index 7301b7b422..d2bd3183b5 100644 --- a/src/core/prompts/tools/new-task.ts +++ b/src/core/prompts/tools/new-task.ts @@ -7,6 +7,10 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) A markdown checklist string to initialize the new task's todo list. Use the same single-level checklist format as update_todo_list. If provided, Task parses this during initialization to create the todoList. If omitted, the task starts without a todoList. + +Notes: +- settings.todoListEnabled only gates prompting behavior (i.e., whether update_todo_list is made available in prompts). Passing todos here does not force prompting if todoListEnabled is disabled. Usage: @@ -14,10 +18,23 @@ Usage: Your initial instructions here -Example: +Example (without todos): code Implement a new feature for the application. + +Example (with todos): + +code +Implement user authentication + +[ ] Set up authentication middleware +[ ] Create login endpoint +[ ] Create logout endpoint +[-] Add session management +[x] Write tests for authentication + + ` } diff --git a/src/shared/tools.ts b/src/shared/tools.ts index 67972243fe..047c2fe351 100644 --- a/src/shared/tools.ts +++ b/src/shared/tools.ts @@ -155,7 +155,7 @@ export interface SwitchModeToolUse extends ToolUse { export interface NewTaskToolUse extends ToolUse { name: "new_task" - params: Partial, "mode" | "message">> + params: Partial, "mode" | "message" | "todos">> } export interface SearchAndReplaceToolUse extends ToolUse {