Skip to content

Commit ac78db7

Browse files
committed
Remove some base2 experiments
1 parent bbd5f8f commit ac78db7

File tree

5 files changed

+6
-84
lines changed

5 files changed

+6
-84
lines changed

.agents/base2/base2-max-with-code-reviewer-best-of-n.ts

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

.agents/base2/base2-max-with-decision-maker.ts

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

.agents/base2/base2-with-code-reviewer-best-of-n.ts

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

.agents/base2/base2-with-editor-implementor-gpt-5.ts

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

.agents/base2/base2.ts

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,9 @@ export function createBase2(
1111
options?: {
1212
hasNoValidation?: boolean
1313
planOnly?: boolean
14-
hasCodeReviewer?: boolean
15-
hasCodeReviewerBestOfN?: boolean
16-
withImplementorGpt5?: boolean
17-
withDecisionMaker?: boolean
1814
},
1915
): Omit<SecretAgentDefinition, 'id'> {
20-
const {
21-
hasNoValidation = mode === 'fast',
22-
planOnly = false,
23-
hasCodeReviewer = false,
24-
hasCodeReviewerBestOfN = false,
25-
withImplementorGpt5 = false,
26-
withDecisionMaker = false,
27-
} = options ?? {}
16+
const { hasNoValidation = mode === 'fast', planOnly = false } = options ?? {}
2817
const isDefault = mode === 'default'
2918
const isFast = mode === 'fast'
3019
const isMax = mode === 'max'
@@ -70,14 +59,10 @@ export function createBase2(
7059
'researcher-web',
7160
'researcher-docs',
7261
'commander',
73-
withDecisionMaker && 'decision-maker',
74-
withImplementorGpt5 && 'editor-implementor-gpt-5',
75-
isDefault && !withImplementorGpt5 && 'editor-best-of-n',
76-
isMax && !withImplementorGpt5 && 'editor-best-of-n-gpt-5',
62+
isDefault && 'editor-best-of-n',
63+
isMax && 'editor-best-of-n-gpt-5',
7764
isDefault && 'thinker-best-of-n',
7865
isMax && 'thinker-best-of-n-gpt-5',
79-
hasCodeReviewer && 'code-reviewer',
80-
hasCodeReviewerBestOfN && 'code-reviewer-best-of-n',
8166
'context-pruner',
8267
),
8368

@@ -127,15 +112,8 @@ Use the spawn_agents tool to spawn specialized agents to help you complete the u
127112
- **Sequence agents properly:** Keep in mind dependencies when spawning different agents. Don't spawn agents in parallel that depend on each other.
128113
${buildArray(
129114
'- Spawn context-gathering agents (file pickers, code-searcher, directory-lister, glob-matcher, and web/docs researchers) before making edits.',
130-
!withImplementorGpt5 &&
131-
`- Spawn a ${isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} 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.`,
132-
withImplementorGpt5 &&
133-
`- Spawn a editor-implementor-gpt-5 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.`,
115+
`- Spawn a ${isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} 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.`,
134116
'- Spawn commanders sequentially if the second command depends on the the first.',
135-
hasCodeReviewer &&
136-
'- Spawn a code-reviewer agent to review the code changes after you have made them.',
137-
hasCodeReviewerBestOfN &&
138-
'- Spawn a code-reviewer-best-of-n agent to review the code changes after you have made them.',
139117
).join('\n ')}
140118
- **No need to include context:** When prompting an agent, realize that many agents can already see the entire conversation history, so you can be brief in prompting them without needing to include context.
141119
@@ -183,10 +161,6 @@ ${PLACEHOLDER.GIT_CHANGES_PROMPT}
183161
isDefault,
184162
isMax,
185163
hasNoValidation,
186-
hasCodeReviewer,
187-
hasCodeReviewerBestOfN,
188-
withImplementorGpt5,
189-
withDecisionMaker,
190164
}),
191165
stepPrompt: planOnly
192166
? buildPlanOnlyStepPrompt({})
@@ -195,7 +169,6 @@ ${PLACEHOLDER.GIT_CHANGES_PROMPT}
195169
isMax,
196170
hasNoValidation,
197171
isSonnet,
198-
withImplementorGpt5,
199172
}),
200173

201174
handleSteps: function* ({ params }) {
@@ -227,20 +200,12 @@ function buildImplementationInstructionsPrompt({
227200
isDefault,
228201
isMax,
229202
hasNoValidation,
230-
hasCodeReviewer,
231-
hasCodeReviewerBestOfN,
232-
withImplementorGpt5,
233-
withDecisionMaker,
234203
}: {
235204
isSonnet: boolean
236205
isFast: boolean
237206
isDefault: boolean
238207
isMax: boolean
239208
hasNoValidation: boolean
240-
hasCodeReviewer: boolean
241-
hasCodeReviewerBestOfN: boolean
242-
withImplementorGpt5: boolean
243-
withDecisionMaker: boolean
244209
}) {
245210
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.
246211
@@ -252,23 +217,14 @@ ${buildArray(
252217
EXPLORE_PROMPT,
253218
!isFast &&
254219
`- 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.`,
255-
withDecisionMaker &&
256-
`- Before planning or implementing, spawn decision-maker agents for a few of the most important decisions that need to be made. This will improve the quality of your decisions and your implementation.`,
257220
!isFast &&
258-
`- 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.`,
221+
`- 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.${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.`,
259222
isFast &&
260223
'- Implement the changes in one go. Pause after making all the changes to see the tool results of your edits.',
261224
isFast &&
262225
'- Do a single typecheck targeted for your changes at most (if applicable for the project). Or skip this step if the change was small.',
263226
!isFast &&
264-
!withImplementorGpt5 &&
265227
`- IMPORTANT: You must spawn the ${isMax ? '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.`,
266-
withImplementorGpt5 &&
267-
`- IMPORTANT: You must spawn the editor-implementor-gpt-5 agent to implement non-trivial code changes, since it will generate the best code changes using a smarter reasoning model. 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.`,
268-
hasCodeReviewer &&
269-
`- Spawn a code-reviewer agent to review the code changes after you have made them. You can skip this step for small changes that are obvious and don't require a review.`,
270-
hasCodeReviewerBestOfN &&
271-
`- Spawn a code-reviewer-best-of-n agent to review the code changes after you have made them. You can skip this step for small changes that are obvious and don't require a review.`,
272228
!hasNoValidation &&
273229
`- Test your changes${isMax ? '' : ' briefly'} by running appropriate validation commands for the project (e.g. typechecks, tests, lints, etc.).${isMax ? ' Start by type checking the specific area of the project that you are editing and then test the entire project if necessary.' : ' If you can, only typecheck/test the area of the project that you are editing, rather than the entire project.'} You may have to explore the project to find the appropriate commands. Don't skip this step!`,
274230
`- Inform the user that you have completed the task in one sentence or a few short bullet points.${isSonnet ? " Don't create any markdown summary files or example documentation files, unless asked by the user." : ''}`,
@@ -280,19 +236,17 @@ function buildImplementationStepPrompt({
280236
isMax,
281237
hasNoValidation,
282238
isSonnet,
283-
withImplementorGpt5,
284239
}: {
285240
isFast: boolean
286241
isMax: boolean
287242
hasNoValidation: boolean
288243
isSonnet: boolean
289-
withImplementorGpt5: boolean
290244
}) {
291245
return buildArray(
292246
isMax &&
293247
`Keep working until the user's request is completely satisfied${!hasNoValidation ? ' and validated' : ''}, or until you require more information from the user.`,
294248
!isFast &&
295-
`You must spawn the ${withImplementorGpt5 ? 'editor-implementor-gpt-5' : isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement code changes, since it will generate the best code changes.`,
249+
`You must spawn the ${isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement code changes, since it will generate the best code changes.`,
296250
`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.`,
297251
).join('\n')
298252
}

0 commit comments

Comments
 (0)