Skip to content

Commit debc1eb

Browse files
committed
Use opus editor in default base2
1 parent 4ef9d1c commit debc1eb

File tree

3 files changed

+14
-32
lines changed

3 files changed

+14
-32
lines changed

.agents/base2/base2-editor.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

.agents/base2/base2.ts

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,9 @@ export function createBase2(
1111
options?: {
1212
hasNoValidation?: boolean
1313
planOnly?: boolean
14-
useEditor?: boolean
1514
},
1615
): Omit<SecretAgentDefinition, 'id'> {
17-
const {
18-
hasNoValidation = mode === 'fast',
19-
planOnly = false,
20-
useEditor = false,
21-
} = options ?? {}
16+
const { hasNoValidation = mode === 'fast', planOnly = false } = options ?? {}
2217
const isDefault = mode === 'default'
2318
const isFast = mode === 'fast'
2419
const isMax = mode === 'max'
@@ -70,7 +65,7 @@ export function createBase2(
7065
'researcher-docs',
7166
isLite ? 'commander-lite' : 'commander',
7267
isLite && 'editor-gpt-5',
73-
useEditor && 'editor',
68+
isDefault && 'editor',
7469
isMax && 'editor-best-of-n-max',
7570
isMax && 'thinker-best-of-n-opus',
7671
!isLite && 'code-reviewer-opus',
@@ -125,7 +120,7 @@ Use the spawn_agents tool to spawn specialized agents to help you complete the u
125120
'- Spawn context-gathering agents (file pickers, code-searcher, directory-lister, glob-matcher, and web/docs researchers) before making edits.',
126121
isLite &&
127122
'- Spawn the editor-gpt-5 agent to implement the changes after you have gathered all the context you need.',
128-
useEditor &&
123+
isDefault &&
129124
'- Spawn the editor agent to implement the changes after you have gathered all the context you need.',
130125
isMax &&
131126
'- Spawn the thinker-best-of-n-opus after gathering context to solve complex problems.',
@@ -179,9 +174,9 @@ ${buildArray(
179174
[ You read a few other relevant files using the read_files tool ]
180175
181176
${
182-
useEditor
177+
isDefault
183178
? `[ You implement the changes using the editor agent ]`
184-
: isDefault || isFast
179+
: isFast
185180
? '[ You implement the changes using the str_replace or write_file tools ]'
186181
: isLite
187182
? '[ You implement the changes using the editor-gpt-5 agent ]'
@@ -235,16 +230,15 @@ ${PLACEHOLDER.GIT_CHANGES_PROMPT}
235230
isMax,
236231
isLite,
237232
hasNoValidation,
238-
useEditor,
239233
}),
240234
stepPrompt: planOnly
241235
? buildPlanOnlyStepPrompt({})
242236
: buildImplementationStepPrompt({
237+
isDefault,
243238
isFast,
244239
isMax,
245240
hasNoValidation,
246241
isSonnet,
247-
useEditor,
248242
}),
249243

250244
handleSteps: function* ({ params }) {
@@ -277,15 +271,13 @@ function buildImplementationInstructionsPrompt({
277271
isMax,
278272
isLite,
279273
hasNoValidation,
280-
useEditor,
281274
}: {
282275
isSonnet: boolean
283276
isFast: boolean
284277
isDefault: boolean
285278
isMax: boolean
286279
isLite: boolean
287280
hasNoValidation: boolean
288-
useEditor: boolean
289281
}) {
290282
return `Act as a helpful assistant and freely respond to the user's request however would be most helpful to the user. Use your judgement to orchestrate the completion of the user's request using your specialized sub-agents and tools as needed. Take your time and be comprehensive. Don't surprise the user. For example, don't modify files if the user has not asked you to do so at least implicitly.
291283
@@ -301,14 +293,12 @@ ${buildArray(
301293
`- 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.`,
302294
isLite &&
303295
'- 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.',
304-
useEditor &&
296+
isDefault &&
305297
'- 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.',
306298
isMax &&
307299
`- IMPORTANT: You must spawn the editor-best-of-n-max 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. 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.`,
308-
(isDefault || isFast) &&
309-
'- Implement the changes using the str_replace or write_file tools.',
310300
isFast &&
311-
'- Implement the changes in one go. Pause after making all the changes to see the tool results of your edits.',
301+
'- Implement the changes using the str_replace or write_file tools. Implement all the changes in one go.',
312302
isFast &&
313303
'- Do a single typecheck targeted for your changes at most (if applicable for the project). Or skip this step if the change was small.',
314304
(isDefault || isMax) &&
@@ -320,27 +310,27 @@ ${buildArray(
320310
}
321311

322312
function buildImplementationStepPrompt({
313+
isDefault,
323314
isFast,
324315
isMax,
325316
hasNoValidation,
326317
isSonnet,
327-
useEditor,
328318
}: {
319+
isDefault: boolean
329320
isFast: boolean
330321
isMax: boolean
331322
hasNoValidation: boolean
332323
isSonnet: boolean
333-
useEditor: boolean
334324
}) {
335325
return buildArray(
336326
isMax &&
337327
`Keep working until the user's request is completely satisfied${!hasNoValidation ? ' and validated' : ''}, or until you require more information from the user.`,
338-
useEditor &&
339-
`You must spawn the 'editor' agent to implement code changes, since it will do the best job of implementing the changes.`,
340328
isMax &&
341329
`You must spawn the 'editor-best-of-n-max' agent to implement code changes, since it will generate the best code changes.`,
342330
isMax && 'Spawn the thinker-best-of-n-opus to solve complex problems.',
343-
`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.`,
331+
(isDefault || isMax) &&
332+
'Spawn code-reviewer-opus to review the changes after you have implemented the changes and in parallel with typechecking or testing.',
333+
`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.`,
344334
).join('\n')
345335
}
346336

.agents/editor/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ OR for new files or major rewrites:
5959
${
6060
model === 'gpt-5'
6161
? ''
62-
: `IMPORTANT: Before you start writing your implementation, you should use <think> tags to think about the best way to implement the changes. You should think really really hard to make sure you implement the changes in the best way possible. Take as much time as you to think through all the cases to produce the best changes.
62+
: `Before you start writing your implementation, you should use <think> tags to think about the best way to implement the changes.
6363
6464
You can also use <think> tags interspersed between tool calls to think about the best way to implement the changes.
6565

0 commit comments

Comments
 (0)