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 dd621b34b8..403018c94b 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 @@ -271,6 +271,11 @@ Examples: ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 3b8f357e8c..f71ef5f963 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 @@ -168,6 +168,11 @@ Examples: ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 719e7f0ea7..68fa85bfbd 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 @@ -342,6 +342,11 @@ Example: Requesting to access an MCP resource ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 9f3ad102e8..e80a8f5cfb 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 @@ -342,6 +342,11 @@ Example: Requesting to access an MCP resource ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 2c7e9ec165..282e9562b4 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 @@ -298,6 +298,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 b4220ce2e8..31a82d1596 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 @@ -293,6 +293,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 6248770325..cad115fda7 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 @@ -346,6 +346,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 b4220ce2e8..31a82d1596 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 @@ -293,6 +293,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 1fce8bf785..add74c2483 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 @@ -381,6 +381,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 b4220ce2e8..31a82d1596 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 @@ -293,6 +293,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 d07dc1d874..5e2e894767 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 @@ -346,6 +346,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 9f3ad102e8..e80a8f5cfb 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 @@ -342,6 +342,11 @@ Example: Requesting to access an MCP resource ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: 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 b4220ce2e8..31a82d1596 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 @@ -293,6 +293,11 @@ Example: Requesting to execute ls in a specific directory if directed ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: diff --git a/src/core/prompts/tools/ask-followup-question.ts b/src/core/prompts/tools/ask-followup-question.ts index 7ece1e311d..4e71b39ebc 100644 --- a/src/core/prompts/tools/ask-followup-question.ts +++ b/src/core/prompts/tools/ask-followup-question.ts @@ -1,6 +1,11 @@ export function getAskFollowupQuestionDescription(): string { return `## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +IMPORTANT: Before asking the user for information: +1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information +2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations). +3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration. + Parameters: - question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. - follow_up: (required) A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must: