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
Copy file name to clipboardExpand all lines: .agents/base/ask.ts
+1-23Lines changed: 1 addition & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -99,17 +99,7 @@ Messages from the system are surrounded by <system>${closeXml('system')} or <sys
99
99
100
100
## Verifying Your Changes at the End of Your Response
101
101
102
-
### User has a \`codebuff.json\`
103
-
104
-
If the user has a \`codebuff.json\` with the appropriate \`fileChangeHooks\`, there is no need to run any commands.
105
-
106
-
If the \`fileChangeHooks\` are not configured, inform the user about the \`fileChangeHooks\` parameter.
107
-
108
-
### User has no \`codebuff.json\`
109
-
110
-
If this is the case, inform the user know about the \`/init\` command (within Codebuff, not a terminal command).
111
-
112
-
Check the knowledge files to see if the user has specified a further protocol for what terminal commands should be run to verify edits. For example, a \`knowledge.md\` file could specify that after every change you should run the tests or linting or run the type checker. If there are multiple commands to run, you should run them all using '&&' to concatenate them into one commands, e.g. \`npm run lint && npm run test\`.
102
+
Check the knowledge files to see if the user has specified a protocol for what commands should be run to verify edits. If so, follow it. Otherwise, suggest the most relevant checks for the change.
113
103
114
104
## Example Response (Simplified - Demonstrating Rules)
115
105
@@ -152,18 +142,6 @@ What is included in knowledge files:
152
142
153
143
If the user sends you the url to a page that is helpful now or could be helpful in the future (e.g. documentation for a library or api), you should always save the url in a knowledge file for future reference. Any links included in knowledge files are automatically scraped and the web page content is added to the knowledge file.
154
144
155
-
# Codebuff Configuration (codebuff.json)
156
-
157
-
## Schema
158
-
159
-
The following describes the structure of the \`./codebuff.json\` configuration file that users might have in their project root. You can use this to understand user settings if they mention them.
160
-
161
-
${PLACEHOLDER.CONFIG_SCHEMA}
162
-
163
-
## Background Processes
164
-
165
-
The user does not have access to these outputs. Please display any pertinent information to the user before referring to it.
Copy file name to clipboardExpand all lines: .agents/base/base-prompts.ts
+1-19Lines changed: 1 addition & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -104,16 +104,6 @@ ${
104
104
105
105
## Verifying Your Changes at the End of Your Response
106
106
107
-
### User has a \`codebuff.json\`
108
-
109
-
If the user has a \`codebuff.json\` with the appropriate \`fileChangeHooks\`, there is no need to run any commands.
110
-
111
-
If the \`fileChangeHooks\` are not configured, inform the user about the \`fileChangeHooks\` parameter.
112
-
113
-
### User has no \`codebuff.json\`
114
-
115
-
If this is the case, inform the user know about the \`/init\` command (within Codebuff, not a terminal command).
116
-
117
107
Check the knowledge files to see if the user has specified a further protocol for what terminal commands should be run to verify edits. For example, a \`knowledge.md\` file could specify that after every change you should run the tests or linting or run the type checker. If there are multiple commands to run, you should run them all using '&&' to concatenate them into one commands, e.g. \`npm run lint && npm run test\`.
118
108
119
109
## Example Response (Simplified - Demonstrating Rules)
@@ -202,15 +192,7 @@ Once again: BE CONCISE!
202
192
203
193
If the user sends you the url to a page that is helpful now or could be helpful in the future (e.g. documentation for a library or api), you should always save the url in a knowledge file for future reference. Any links included in knowledge files are automatically scraped and the web page content is added to the knowledge file.
204
194
205
-
# Codebuff Configuration (codebuff.json)
206
-
207
-
## Schema
208
-
209
-
The following describes the structure of the \`./codebuff.json\` configuration file that users might have in their project root. You can use this to understand user settings if they mention them.
210
-
211
-
${PLACEHOLDER.CONFIG_SCHEMA}
212
-
213
-
## Background Processes
195
+
# Background Processes
214
196
215
197
The user does not have access to these outputs. Please display any pertinent information to the user before referring to it.
Copy file name to clipboardExpand all lines: .agents/base2/base2.ts
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ export function createBase2(
75
75
isDefault&&'thinker',
76
76
isLite&&'editor-gpt-5',
77
77
isDefault&&'editor',
78
-
isMax&&'editor-multi-prompt2',
78
+
isMax&&'editor-multi-prompt',
79
79
isMax&&'thinker-best-of-n-opus',
80
80
!isLite&&'code-reviewer',
81
81
'context-pruner',
@@ -138,7 +138,7 @@ Use the spawn_agents tool to spawn specialized agents to help you complete the u
138
138
(isDefault||isMax)&&
139
139
`- Spawn the ${isDefault ? 'thinker' : 'thinker-best-of-n-opus'} after gathering context to solve complex problems or when the user asks you to think about a problem.`,
140
140
isMax&&
141
-
`- IMPORTANT: You must spawn the editor-multi-prompt2 agent to implement the changes after you have gathered all the context you need. You must spawn this agent for non-trivial changes, since it writes much better code than you would with the str_replace or write_file tools. Don't spawn the editor in parallel with context-gathering agents.`,
141
+
`- IMPORTANT: You must spawn the editor-multi-prompt agent to implement the changes after you have gathered all the context you need. You must spawn this agent for non-trivial changes, since it writes much better code than you would with the str_replace or write_file tools. Don't spawn the editor in parallel with context-gathering agents.`,
142
142
'- Spawn commanders sequentially if the second command depends on the the first.',
143
143
!isFast&&
144
144
!isLite&&
@@ -165,6 +165,7 @@ ${buildArray(
165
165
isFast&&
166
166
'- Prioritize speed: quickly getting the user request done is your first priority. Do not call any unnecessary tools. Spawn more agents in parallel to speed up the process. Be extremely concise in your responses. Use 2 words where you would have used 2 sentences.',
167
167
'- If a tool fails, try again, or try a different tool or approach.',
168
+
'- **Use <think></think> tags for moderate reasoning:** When you need to work through something moderately complex (e.g., understanding code flow, planning a small refactor, reasoning about edge cases, planning which agents to spawn), wrap your thinking in <think></think> tags. Spawn the thinker agent for anything more complex.',
168
169
'- Context is managed for you. The context-pruner agent will automatically run as needed. Gather as much context as you need without worrying about it.',
169
170
isSonnet&&
170
171
`- **Don't create a summary markdown file:** The user doesn't want markdown files they didn't ask for. Don't create them.`,
@@ -192,7 +193,7 @@ ${
192
193
? '[ You implement the changes using the str_replace or write_file tools ]'
193
194
: isLite
194
195
? '[ You implement the changes using the editor-gpt-5 agent ]'
195
-
: '[ You implement the changes using the editor-multi-prompt2 agent ]'
196
+
: '[ You implement the changes using the editor-multi-prompt agent ]'
196
197
}
197
198
198
199
${
@@ -311,14 +312,16 @@ ${buildArray(
311
312
'If needed, use the ask_user tool to ask the user for clarification on their request or alternate implementation strategies. It is good to get context on the codebase before asking questions so you can ask informed questions.',
312
313
(isDefault||isMax)&&
313
314
`- For any task requiring 3+ steps, use the write_todos tool to write out your step-by-step implementation plan. Include ALL of the applicable tasks in the list.${isFast ? '' : ' You should include a step to review the changes after you have implemented the changes.'}:${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} You may be able to do reviewing and validation in parallel in the same step. Skip write_todos for simple tasks like quick edits or answering questions.`,
314
-
isDefault&&
315
-
`- For complex problems, spawn the thinker agent to help find the best solution, or when the user asks you to think about a problem.`,
315
+
(isDefault||isMax)&&
316
+
`- For quick problems, use <think></think> tags to think through the problem. For anything more complex, spawn the thinker agent to help find the best solution.`,
317
+
isMax&&
318
+
'You should use <think></think> tags all the time to help arrive at the best solution!',
316
319
isLite&&
317
320
'- IMPORTANT: You must spawn the editor-gpt-5 agent to implement the changes after you have gathered all the context you need. This agent will do the best job of implementing the changes so you must spawn it for all changes. Do not pass any prompt or params to the editor agent when spawning it. It will make its own best choices of what to do.',
318
321
isDefault&&
319
322
'- IMPORTANT: You must spawn the editor agent to implement the changes after you have gathered all the context you need. This agent will do the best job of implementing the changes so you must spawn it for all non-trivial changes. Do not pass any prompt or params to the editor agent when spawning it. It will make its own best choices of what to do.',
320
323
isMax&&
321
-
`- IMPORTANT: You must spawn the editor-multi-prompt2 agent to implement non-trivial code changes, since it will generate the best code changes from multiple implementation proposals. This is the best way to make high quality code changes -- strongly prefer using this agent over the str_replace or write_file tools, unless the change is very straightforward and obvious.`,
324
+
`- IMPORTANT: You must spawn the editor-multi-prompt agent to implement non-trivial code changes, since it will generate the best code changes from multiple implementation proposals. This is the best way to make high quality code changes -- strongly prefer using this agent over the str_replace or write_file tools, unless the change is very straightforward and obvious.`,
322
325
isFast&&
323
326
'- Implement the changes using the str_replace or write_file tools. Implement all the changes in one go.',
324
327
isFast&&
@@ -355,7 +358,7 @@ function buildImplementationStepPrompt({
355
358
isMax&&
356
359
`Keep working until the user's request is completely satisfied${!hasNoValidation ? ' and validated' : ''}, or until you require more information from the user.`,
357
360
isMax&&
358
-
`You must spawn the 'editor-multi-prompt2' agent to implement code changes, since it will generate the best code changes.`,
361
+
`You must spawn the 'editor-multi-prompt' agent to implement code changes, since it will generate the best code changes.`,
359
362
(isDefault||isMax)&&
360
363
'Spawn code-reviewer to review the changes after you have implemented the changes and in parallel with typechecking or testing.',
361
364
`After completing the user request, summarize your changes in a sentence${isFast ? '' : ' or a few short bullet points'}.${isSonnet ? " Don't create any summary markdown files or example documentation files, unless asked by the user." : ''} Don't repeat yourself, especially if you have already concluded and summarized the changes in a previous step -- just end your turn.`,
instructionsPrompt: `You are an expert code editor with deep understanding of software engineering principles. You were spawned to generate an implementation for the user's request.
37
37
38
-
Your task is to write out ALL the code changes needed to complete the user's request in a single comprehensive response.
38
+
Your task is to write out ALL the code changes needed to complete the user's request.
39
39
40
-
Important: You can not make any other tool calls besides editing files. You cannot read more files, write todos, spawn agents, or set output. Do not call any of these tools!
41
-
42
-
Write out what changes you would make using the tool call format below. Use this exact format for each file change:
40
+
IMPORTANT: Use propose_str_replace and propose_write_file tools to make your edits. These tools draft changes without actually applying them - they will be reviewed first. DO NOT use any other tools. Do not spawn any agents, read files, or set output.
43
41
42
+
You can make multiple tool calls across multiple steps to complete the implementation. Only the file changes will be passed on, so you can say whatever you want to help you think. Do not write any final summary as that would be a waste of tokens because no one is reading it.
44
43
<codebuff_tool_call>
45
44
{
46
45
"cb_tool_name": "str_replace",
@@ -116,15 +115,64 @@ More style notes:
116
115
- Optional arguments are code smell and worse than required arguments.
117
116
- New components often should be added to a new file, not added to an existing file.
118
117
119
-
Write out your complete implementation now, formatting all changes as tool calls as shown above.`,
120
-
121
-
handleSteps: function*(){
122
-
yield'STEP'
118
+
Write out your complete implementation now. Do not write any final summary.`,
0 commit comments