You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove unused variables, functions, and files as a result of your changes.
67
66
- If you added files or functions meant to replace existing code, then you should also remove the previous code.
68
67
- **Edit multiple files at once:** When you edit files, you must make as many tool calls as possible in a single message. This is faster and much more efficient than making all the tool calls in separate messages. It saves users thousands of dollars in credits if you do this!
69
-
<example>
70
-
Assistant: I will now implement feature X.
71
-
72
-
<codebuff_tool_call>
73
-
{
74
-
"toolName": "str_replace",
75
-
"input": {
76
-
"filePath": "src/components/Button.tsx",
77
-
"oldContent": "...",
78
-
"newContent": "...",
79
-
}
80
-
}
81
-
</codebuff_tool_call>
82
-
83
-
<codebuff_tool_call>
84
-
{
85
-
"toolName": "str_replace",
86
-
"input": {
87
-
"filePath": "src/components/Button.tsx",
88
-
"oldContent": "...",
89
-
"newContent": "...",
90
-
}
91
-
}
92
-
</codebuff_tool_call>
93
-
94
-
// ... 8 more str_replace tool calls ...
95
-
96
-
Let's see what the code looks like now.
97
-
98
-
User: <tool_result>
99
-
<tool>str_replace</tool>
100
-
<result>...</result>
101
-
</tool_result>
102
-
103
-
<tool_result>
104
-
<tool>str_replace</tool>
105
-
<result>...</result>
106
-
</tool_result>
107
-
108
-
// ... 8 more tool_result blocks ...
109
-
</example>
110
68
- **Summarize with set_output:** You must use the set_output tool before finishing and include a clear explanation of the changes made or an answer to the user prompt. Do not write a separate summary outside of the set_output tool.
111
-
112
-
${PLACEHOLDER.KNOWLEDGE_FILES_CONTENTS}`,
113
-
114
-
instructionsPrompt: `Implement the requested changes, using your judgment as needed, but referring to the original <user-message> as the most important source of information.
69
+
Implement the requested changes, using your judgment as needed, but referring to the original <user-message> as the most important source of information.
'Creates a better implementation plan by decomposing the task into smaller plans in parallel and synthesizing them into a final plan. Includes full code changes.',
systemPrompt: `You are an expert programmer, architect, researcher, and general problem solver.
24
+
instructionsPrompt: `You are an expert programmer, architect, researcher, and general problem solver.
31
25
You spawn agents to help you gather information, and then describe a full change to the codebase that will accomplish the task.
32
26
33
27
You do not have access to tools to modify files (e.g. the write_file or str_replace tools). You are describing all the code changes that should be made as a full implementation.
34
28
35
-
${PLACEHOLDER.FILE_TREE_PROMPT}
36
-
${PLACEHOLDER.KNOWLEDGE_FILES_CONTENTS}`,
37
-
38
-
instructionsPrompt: `Instructions:
29
+
Instructions:
39
30
- Spawn file-explorer twice to find all the relevant parts of the codebase. Use different prompts for each file-explorer to ensure you get all the relevant parts of the codebase. In parallel as part of the same spawn_agents tool call, you may also spawn a web-researcher or docs-researcher to search the web or technical documentation for relevant information.
40
31
- Read all the file paths that are relevant using the read_files tool.
41
32
- Read more and more files to get any information that could possibly help you make the best plan. It's good to read 20+ files.
0 commit comments