Skip to content

Commit 62c66b1

Browse files
committed
feat: enhance documentation for ask_followup and update_todo_list schemas with usage examples and guidelines
1 parent bf255fb commit 62c66b1

File tree

2 files changed

+53
-9
lines changed

2 files changed

+53
-9
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@ export function generateAskFollowupQuestionSchema(args: ToolArgs): BaseToolSchem
1515
{
1616
name: "follow_up",
1717
type: "string",
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>'`,
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.)
19+
20+
Question1: Your question here
21+
Example1:
22+
<suggest>First suggestion</suggest>
23+
<suggest mode="code">Action with mode switch</suggest>
24+
25+
Question2: What is the path to the frontend-config.json file?
26+
Example2:
27+
<suggest>./src/frontend-config.json</suggest>
28+
<suggest>./config/frontend-config.json</suggest>
29+
<suggest>./frontend-config.json</suggest>
30+
`,
1931
required: true,
2032
},
2133
],

src/core/prompts/tools/schemas/update-todo-list-schema.ts

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Replace the entire TODO list with an updated checklist reflecting the current st
1111
- Use a single-level markdown checklist (no nesting or subtasks).
1212
- List todos in the intended execution order.
1313
- Status options:
14-
[ ] Task description (pending)
15-
[x] Task description (completed)
16-
[-] Task description (in progress)
14+
- [ ] Task description (pending)
15+
- [x] Task description (completed)
16+
- [-] Task description (in progress)
1717
1818
**Status Rules:**
19-
[ ] = pending (not started)
20-
[x] = completed (fully finished, no unresolved issues)
21-
[-] = in_progress (currently being worked on)
19+
- [ ] = pending (not started)
20+
- [x] = completed (fully finished, no unresolved issues)
21+
- [-] = in_progress (currently being worked on)
2222
2323
**Core Principles:**
2424
- Before updating, always confirm which todos have been completed since the last update.
@@ -29,13 +29,45 @@ Replace the entire TODO list with an updated checklist reflecting the current st
2929
- Only mark a task as completed when it is fully accomplished (no partials, no unresolved dependencies).
3030
- If a task is blocked, keep it as in_progress and add a new todo describing what needs to be resolved.
3131
- Remove tasks only if they are no longer relevant or if the user requests deletion.
32+
33+
**When to Use:**
34+
- The task is complicated or involves multiple steps or requires ongoing tracking.
35+
- You need to update the status of several todos at once.
36+
- New actionable items are discovered during task execution.
37+
- The user requests a todo list or provides multiple tasks.
38+
- The task is complex and benefits from clear, stepwise progress tracking.
39+
40+
**When NOT to Use:**
41+
- There is only a single, trivial task.
42+
- The task can be completed in one or two simple steps.
43+
- The request is purely conversational or informational.
44+
45+
**Task Management Guidelines:**
46+
- Mark task as completed immediately after all work of the current task is done.
47+
- Start the next task by marking it as in_progress.
48+
- Add new todos as soon as they are identified.
49+
- Use clear, descriptive task names.
3250
`,
3351
parameters: [
3452
{
3553
name: "todos",
3654
type: "string",
37-
description:
38-
"The complete TODO list in Markdown checklist format. Use '[ ]' for pending, '[x]' for completed, and '[-]' for in-progress tasks.",
55+
description: `The complete TODO list without prefix '-'.
56+
57+
**Usage Example:**
58+
[x] Analyze requirements
59+
[x] Design architecture
60+
[-] Implement core logic
61+
[ ] Write tests
62+
[ ] Update documentation
63+
64+
*After completing "Implement core logic" and starting "Write tests":*
65+
[x] Analyze requirements
66+
[x] Design architecture
67+
[x] Implement core logic
68+
[-] Write tests
69+
[ ] Update documentation
70+
[ ] Add performance benchmarks `,
3971
required: true,
4072
},
4173
],

0 commit comments

Comments
 (0)