Skip to content

Commit eb3adc7

Browse files
committed
fix: streamline ask_followup_question schema documentation for clarity and conciseness
1 parent 020382c commit eb3adc7

File tree

1 file changed

+11
-34
lines changed

1 file changed

+11
-34
lines changed

src/core/prompts/tools/schemas/ask-followup-question-schema.ts

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,45 @@ import { BaseToolSchema } from "./base-tool-schema"
44
export function generateAskFollowupQuestionSchema(args: ToolArgs): BaseToolSchema {
55
const schema: BaseToolSchema = {
66
name: "ask_followup_question",
7-
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.`,
7+
description: `Ask the user a question to gather additional information needed to complete the task. Use when you need clarification or more details to proceed effectively.`,
88
parameters: [
99
{
1010
name: "question",
1111
type: "string",
12-
description:
13-
"The question to ask the user. This should be a clear, specific question that addresses the information you need.",
12+
description: "A clear, specific question addressing the information needed",
1413
required: true,
1514
},
1615
{
1716
name: "follow_up",
1817
type: "string",
19-
description: `A list of 2-4 suggested answers that logically follow from the question, ordered by priority or logical sequence. Each suggestion must:
20-
1. Be provided in its own <suggest> tag
21-
2. Be specific, actionable, and directly related to the completed task
22-
3. Be a complete answer to the question - the user should not need to provide additional information or fill in any missing details. DO NOT include placeholders with brackets or parentheses.
23-
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
24-
- When using the mode attribute, focus the suggestion text on the action to be taken rather than mentioning the mode switch, as the mode change is handled automatically and indicated by a visual badge`,
18+
description: `A list of 2-4 suggested answers, each in its own <suggest> tag. Suggestions must be complete, actionable answers without placeholders. Optionally include mode attribute to switch modes (code/architect/etc.), such as '<suggest mode="mode-slug">suggestion text</suggest>'`,
2519
required: true,
2620
},
2721
],
2822
systemPropmt: `## ask_followup_question
29-
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.
23+
Description: Ask the user a question to gather additional information needed to complete the task. Use when you need clarification or more details to proceed effectively.
24+
3025
Parameters:
31-
- question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need.
32-
- 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:
33-
1. Be provided in its own <suggest> tag
34-
2. Be specific, actionable, and directly related to the completed task
35-
3. Be a complete answer to the question - the user should not need to provide additional information or fill in any missing details. DO NOT include placeholders with brackets or parentheses.
36-
4. Optionally include a mode attribute to switch to a specific mode when the suggestion is selected: <suggest mode="mode-slug">suggestion text</suggest>
37-
- When using the mode attribute, focus the suggestion text on the action to be taken rather than mentioning the mode switch, as the mode change is handled automatically and indicated by a visual badge
26+
- question: (required) A clear, specific question addressing the information needed
27+
- follow_up: (required) A list of 2-4 suggested answers, each in its own <suggest> tag. Suggestions must be complete, actionable answers without placeholders. Optionally include mode attribute to switch modes (code/architect/etc.)
28+
3829
Usage:
3930
<ask_followup_question>
4031
<question>Your question here</question>
4132
<follow_up>
42-
<suggest>
43-
Your suggested answer here
44-
</suggest>
45-
<suggest mode="code">
46-
Implement the solution
47-
</suggest>
33+
<suggest>First suggestion</suggest>
34+
<suggest mode="code">Action with mode switch</suggest>
4835
</follow_up>
4936
</ask_followup_question>
5037
51-
Example: Requesting to ask the user for the path to the frontend-config.json file
38+
Example:
5239
<ask_followup_question>
5340
<question>What is the path to the frontend-config.json file?</question>
5441
<follow_up>
5542
<suggest>./src/frontend-config.json</suggest>
5643
<suggest>./config/frontend-config.json</suggest>
5744
<suggest>./frontend-config.json</suggest>
5845
</follow_up>
59-
</ask_followup_question>
60-
61-
Example: Asking a question with mode switching options
62-
<ask_followup_question>
63-
<question>How would you like to proceed with this task?</question>
64-
<follow_up>
65-
<suggest mode="code">Start implementing the solution</suggest>
66-
<suggest mode="architect">Plan the architecture first</suggest>
67-
<suggest>Continue with more details</suggest>
68-
</follow_up>
6946
</ask_followup_question>`,
7047
}
7148
return schema

0 commit comments

Comments
 (0)