Skip to content

Commit e5d69d2

Browse files
committed
Update base2 fast to use sonnet, no validation, no todos
1 parent 92fd34d commit e5d69d2

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.agents/base2/base2.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function createBase2(
1717
},
1818
): Omit<SecretAgentDefinition, 'id'> {
1919
const {
20-
hasNoValidation = false,
20+
hasNoValidation = mode === 'fast',
2121
planOnly = false,
2222
hasCodeReviewer = false,
2323
hasCodeReviewerBestOfN = false,
@@ -32,11 +32,7 @@ export function createBase2(
3232

3333
return {
3434
publisher,
35-
model: isGpt5
36-
? 'openai/gpt-5.1'
37-
: isFast
38-
? 'z-ai/glm-4.6:nitro'
39-
: 'anthropic/claude-sonnet-4.5',
35+
model: isGpt5 ? 'openai/gpt-5.1' : 'anthropic/claude-sonnet-4.5',
4036
...(isGpt5 && {
4137
reasoningModel: {
4238
effort: 'high',
@@ -66,7 +62,7 @@ export function createBase2(
6662
'spawn_agents',
6763
'read_files',
6864
'read_subtree',
69-
'write_todos',
65+
!isFast && 'write_todos',
7066
'str_replace',
7167
'write_file',
7268
isGpt5 && 'task_completed',
@@ -161,8 +157,11 @@ For other questions, you can direct them to codebuff.com, or especially codebuff
161157
# Other response guidelines
162158
163159
${buildArray(
164-
'- Your goal is to produce the highest quality results, even if it comes at the cost of more credits used.',
165-
'- Speed is a secondary goal.',
160+
!isFast &&
161+
'- Your goal is to produce the highest quality results, even if it comes at the cost of more credits used.',
162+
!isFast && '- Speed is important, but a secondary goal.',
163+
isFast &&
164+
'- 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.',
166165
'- If a tool fails, try again, or try a different tool or approach.',
167166
'- 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.',
168167
isSonnet &&
@@ -257,8 +256,14 @@ The user asks you to implement a new feature. You respond in multiple steps:
257256
258257
${buildArray(
259258
EXPLORE_PROMPT,
260-
`- Important: Read as many files as could possibly be relevant to the task over several steps to improve your understanding of the user's request and produce the best possible code changes. Find more examples within the codebase similar to the user's request, dependencies that help with understanding how things work, tests, etc. This is frequently 12-20 files, depending on the task.`,
261-
`- 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.${hasCodeReviewer ? ' Include a step to review the code changes with the code-reviewer agent after you have made them.' : ''}${hasCodeReviewerBestOfN ? ' Include a step to review the code changes with the code-reviewer-best-of-n agent after you have made them.' : ''}${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} Skip write_todos for simple tasks like quick edits or answering questions.`,
259+
!isFast &&
260+
`- Important: Read as many files as could possibly be relevant to the task over several steps to improve your understanding of the user's request and produce the best possible code changes. Find more examples within the codebase similar to the user's request, dependencies that help with understanding how things work, tests, etc. This is frequently 12-20 files, depending on the task.`,
261+
!isFast &&
262+
`- 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.${hasCodeReviewer ? ' Include a step to review the code changes with the code-reviewer agent after you have made them.' : ''}${hasCodeReviewerBestOfN ? ' Include a step to review the code changes with the code-reviewer-best-of-n agent after you have made them.' : ''}${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} Skip write_todos for simple tasks like quick edits or answering questions.`,
263+
isFast &&
264+
'- Implement the changes in one go. Pause after making all the changes to see the tool results of your edits.',
265+
isFast &&
266+
'- Do a single typecheck targeted for your changes at most (if applicable for the project). Or skip this step if the change was small.',
262267
!isFast &&
263268
!withImplementorGpt5 &&
264269
`- IMPORTANT: You must spawn the ${isGpt5 ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} 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.`,
@@ -295,7 +300,7 @@ function buildImplementationStepPrompt({
295300
`Keep working until the user's request is completely satisfied${!hasNoValidation ? ' and validated' : ''}, or until you require more information from the user.`,
296301
!isFast &&
297302
`You must spawn the ${withImplementorGpt5 ? 'editor-implementor-gpt-5' : isGpt5 ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement code changes, since it will generate the best code changes.`,
298-
`After completing the user request, summarize your changes in a sentence 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 already summarized your changes then just end your turn.`,
303+
`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 already summarized your changes then just end your turn.`,
299304
isGpt5 &&
300305
`IMPORTANT: You must include at least one tool call ("<codebuff_tool_call>") per message response. If you are completely done with the user's request or require more information from the user, you must call the task_completed tool to end your turn.`,
301306
).join('\n')

0 commit comments

Comments
 (0)