Skip to content

Commit 25ade7b

Browse files
authored
feat(plan): update planning workflow to encourage multi-select with descriptions of options (#20491)
1 parent ac4d0c2 commit 25ade7b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

packages/core/src/core/__snapshots__/prompts.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The following tools are available in Plan Mode:
109109
## Rules
110110
1. **Read-Only:** You cannot modify source code. You may ONLY use read-only tools to explore, and you can only write to \`/tmp/plans/\`. If the user asks you to modify source code directly, you MUST explain that you are in Plan Mode and must first create a plan and get approval.
111111
2. **Write Constraint:** \`write_file\` and \`replace\` may ONLY be used to write .md plan files to \`/tmp/plans/\`. They cannot modify source code.
112-
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use \`ask_user\` to clarify.
112+
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use \`ask_user\` to clarify. Use multi-select to offer flexibility and include detailed descriptions for each option to help the user understand the implications of their choice.
113113
4. **Inquiries and Directives:** Distinguish between Inquiries and Directives to minimize unnecessary planning.
114114
- **Inquiries:** If the request is an **Inquiry** (e.g., "How does X work?"), answer directly. DO NOT create a plan.
115115
- **Directives:** If the request is a **Directive** (e.g., "Fix bug Y"), follow the workflow below.
@@ -277,7 +277,7 @@ The following tools are available in Plan Mode:
277277
## Rules
278278
1. **Read-Only:** You cannot modify source code. You may ONLY use read-only tools to explore, and you can only write to \`/tmp/plans/\`. If the user asks you to modify source code directly, you MUST explain that you are in Plan Mode and must first create a plan and get approval.
279279
2. **Write Constraint:** \`write_file\` and \`replace\` may ONLY be used to write .md plan files to \`/tmp/plans/\`. They cannot modify source code.
280-
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use \`ask_user\` to clarify.
280+
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use \`ask_user\` to clarify. Use multi-select to offer flexibility and include detailed descriptions for each option to help the user understand the implications of their choice.
281281
4. **Inquiries and Directives:** Distinguish between Inquiries and Directives to minimize unnecessary planning.
282282
- **Inquiries:** If the request is an **Inquiry** (e.g., "How does X work?"), answer directly. DO NOT create a plan.
283283
- **Directives:** If the request is a **Directive** (e.g., "Fix bug Y"), follow the workflow below.
@@ -564,7 +564,7 @@ The following tools are available in Plan Mode:
564564
## Rules
565565
1. **Read-Only:** You cannot modify source code. You may ONLY use read-only tools to explore, and you can only write to \`/tmp/project-temp/plans/\`. If the user asks you to modify source code directly, you MUST explain that you are in Plan Mode and must first create a plan and get approval.
566566
2. **Write Constraint:** \`write_file\` and \`replace\` may ONLY be used to write .md plan files to \`/tmp/project-temp/plans/\`. They cannot modify source code.
567-
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use \`ask_user\` to clarify.
567+
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use \`ask_user\` to clarify. Use multi-select to offer flexibility and include detailed descriptions for each option to help the user understand the implications of their choice.
568568
4. **Inquiries and Directives:** Distinguish between Inquiries and Directives to minimize unnecessary planning.
569569
- **Inquiries:** If the request is an **Inquiry** (e.g., "How does X work?"), answer directly. DO NOT create a plan.
570570
- **Directives:** If the request is a **Directive** (e.g., "Fix bug Y"), follow the workflow below.

packages/core/src/prompts/snippets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ ${options.planModeToolsList}
472472
## Rules
473473
1. **Read-Only:** You cannot modify source code. You may ONLY use read-only tools to explore, and you can only write to \`${options.plansDir}/\`. If the user asks you to modify source code directly, you MUST explain that you are in Plan Mode and must first create a plan and get approval.
474474
2. **Write Constraint:** ${formatToolName(WRITE_FILE_TOOL_NAME)} and ${formatToolName(EDIT_TOOL_NAME)} may ONLY be used to write .md plan files to \`${options.plansDir}/\`. They cannot modify source code.
475-
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use ${formatToolName(ASK_USER_TOOL_NAME)} to clarify.
475+
3. **Efficiency:** Autonomously combine discovery and drafting phases to minimize conversational turns. If the request is ambiguous, use ${formatToolName(ASK_USER_TOOL_NAME)} to clarify. Use multi-select to offer flexibility and include detailed descriptions for each option to help the user understand the implications of their choice.
476476
4. **Inquiries and Directives:** Distinguish between Inquiries and Directives to minimize unnecessary planning.
477477
- **Inquiries:** If the request is an **Inquiry** (e.g., "How does X work?"), answer directly. DO NOT create a plan.
478478
- **Directives:** If the request is a **Directive** (e.g., "Fix bug Y"), follow the workflow below.

packages/core/src/tools/definitions/__snapshots__/coreToolsModelSnapshots.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview >
859859
860860
exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview > snapshot for tool: ask_user 1`] = `
861861
{
862-
"description": "Ask the user one or more questions to gather preferences, clarify requirements, or make decisions.",
862+
"description": "Ask the user one or more questions to gather preferences, clarify requirements, or make decisions. When using this tool, prefer providing multiple-choice options with detailed descriptions and enable multi-select where appropriate to provide maximum flexibility.",
863863
"name": "ask_user",
864864
"parametersJsonSchema": {
865865
"properties": {

packages/core/src/tools/definitions/model-family-sets/gemini-3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ The agent did not use the todo list because this task could be completed by a ti
558558
ask_user: {
559559
name: ASK_USER_TOOL_NAME,
560560
description:
561-
'Ask the user one or more questions to gather preferences, clarify requirements, or make decisions.',
561+
'Ask the user one or more questions to gather preferences, clarify requirements, or make decisions. When using this tool, prefer providing multiple-choice options with detailed descriptions and enable multi-select where appropriate to provide maximum flexibility.',
562562
parametersJsonSchema: {
563563
type: 'object',
564564
required: ['questions'],

0 commit comments

Comments
 (0)