Skip to content

Commit 1c18bda

Browse files
committed
Promote base2-gpt-5 to base2-max
1 parent bfb8eff commit 1c18bda

File tree

3 files changed

+12
-34
lines changed

3 files changed

+12
-34
lines changed

.agents/base2/base2-gpt-5-worker.ts renamed to .agents-graveyard/base2-gpt-5-worker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { buildArray } from '@codebuff/common/util/array'
2-
import { createBase2 } from './base2'
3-
import type { SecretAgentDefinition } from '../types/secret-agent-definition'
2+
3+
import { createBase2 } from '../.agents/base2/base2'
4+
5+
import type { SecretAgentDefinition } from '../.agents/types/secret-agent-definition'
46

57
const base2 = createBase2('max')
68

.agents/base2/base2-gpt-5.ts

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

.agents/base2/base2.ts

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ export const createBase2: (
1010
mode: 'fast' | 'max',
1111
options?: {
1212
hasNoValidation?: boolean
13-
isGpt5?: boolean
1413
},
1514
) => Omit<SecretAgentDefinition, 'id'> = (mode, options) => {
16-
const { hasNoValidation = false, isGpt5 = false } = options ?? {}
15+
const { hasNoValidation = false } = options ?? {}
1716
const isFast = mode === 'fast'
1817
const isMax = mode === 'max'
18+
const isGpt5 = isMax
1919

2020
return {
2121
publisher,
@@ -47,7 +47,6 @@ export const createBase2: (
4747
includeMessageHistory: true,
4848
toolNames: buildArray(
4949
'spawn_agents',
50-
isMax && 'spawn_agent_inline',
5150
'read_files',
5251
'write_todos',
5352
'str_replace',
@@ -63,11 +62,7 @@ export const createBase2: (
6362
'researcher-web',
6463
'researcher-docs',
6564
'commander',
66-
isFast &&
67-
(isGpt5
68-
? 'best-of-n-orchestrator-gpt-5'
69-
: 'best-of-n-orchestrator-fast'),
70-
isMax && 'base2-gpt-5-worker',
65+
isGpt5 ? 'best-of-n-orchestrator-gpt-5' : 'best-of-n-orchestrator-fast',
7166
'context-pruner',
7267
),
7368

@@ -86,10 +81,7 @@ Continue to spawn layers of agents until have completed the user's request or re
8681
- **Sequence agents properly:** Keep in mind dependencies when spawning different agents. Don't spawn agents in parallel that depend on each other. Be conservative sequencing agents so they can build on each other's insights:
8782
- Spawn ${isGpt5 ? 'file pickers, code-searcher, directory-lister, glob-matcher, commanders, and researchers' : 'the file researcher and optionally the web researcher and docs researcher'} before making edits.${isGpt5 ? '' : ' After that, spawn further agents to gather context as needed (e.g. the code-searcher, directory-lister, glob-matcher, commanders, and researchers).'}
8883
${buildArray(
89-
isFast &&
90-
`- Spawn a ${isGpt5 ? 'best-of-n-orchestrator-gpt-5' : 'best-of-n-orchestrator-fast'} agent to implement the changes after you have gathered all the context you need (and not before!).`,
91-
isMax &&
92-
'- Spawn a base2-gpt-5-worker agent inline after you have gathered all the context you need (and not before!).',
84+
`- Spawn a ${isGpt5 ? 'best-of-n-orchestrator-gpt-5' : 'best-of-n-orchestrator-fast'} agent to implement the changes after you have gathered all the context you need (and not before!).`,
9385
).join('\n ')}
9486
- **Spawn with the correct prompt and/or params:** Each agent has a schema for the input it expects. The prompt is an optional string, and the params is a json object. Note that some agents don't take any input prompt or params.
9587
- **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.
@@ -161,22 +153,17 @@ ${buildArray(
161153
`- Consider spawning other agents or reading more files as needed to gather comprehensive context to answer the user's request. When in doubt, read more files!`,
162154
isGpt5 &&
163155
`- Spawn file pickers, code-searcher, directory-lister, glob-matcher, commanders, and researchers to gather context as needed. Read all the relevant files using the read_files tool. Read as many files as possible so that you have a comprehensive context on the user's request.`,
164-
isFast &&
165-
`- Use the write_todos tool to write out your step-by-step implementation plan.${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'}`,
166-
isFast &&
167-
`- You must spawn the ${isGpt5 ? 'best-of-n-orchestrator-gpt-5' : 'best-of-n-orchestrator-fast'} agent to implement the code changes, since it will generate the best code changes from multiple implementation proposals, which the user wants you to do.`,
168-
isMax &&
169-
`- IMPORTANT: You must spawn a base2-gpt-5-worker agent inline (with spawn_agent_inline tool) to do the planning and editing.`,
156+
`- Use the write_todos tool to write out your step-by-step implementation plan.${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'}`,
157+
`- You must spawn the ${isGpt5 ? 'best-of-n-orchestrator-gpt-5' : 'best-of-n-orchestrator-fast'} agent to implement the code changes, since it will generate the best code changes from multiple implementation proposals, which the user wants you to do.`,
170158
!hasNoValidation &&
171159
`- Test your changes${isFast ? ' briefly' : ''} by running appropriate validation commands for the project (e.g. typechecks, tests, lints, etc.). You may have to explore the project to find the appropriate commands. Don't skip this step!`,
172160
`- Inform the user that you have completed the task in one sentence or a few short bullet points. Don't create any markdown summary files or example documentation files, unless asked by the user. If you already finished the user request and said you're done, then don't say anything else.`,
173161
isGpt5 && `- Use the task_completed tool.`,
174162
).join('\n')}`,
175163
stepPrompt: buildArray(
176-
(isMax || isGpt5) &&
164+
isMax &&
177165
`Keep working until the user's request is completely satisfied${!hasNoValidation ? ' and validated' : ''}. `,
178-
isFast &&
179-
`You must spawn the ${isGpt5 ? 'best-of-n-orchestrator-gpt-5' : 'best-of-n-orchestrator-fast'} agent to implement any code changes. Don't forget to do this! `,
166+
`You must spawn the ${isGpt5 ? 'best-of-n-orchestrator-gpt-5' : 'best-of-n-orchestrator-fast'} agent to implement any code changes. Don't forget to do this! `,
180167
`After completing the user request, summarize your changes in a sentence or a few short bullet points. Do not create any summary markdown files or example documentation files, unless asked by the user. If you already summarized your changes, then end turn and don't say anything else.`,
181168
isGpt5 &&
182169
`IMPORTANT: if you are completely done with the user's request, you must call the task_completed tool to end your turn.`,

0 commit comments

Comments
 (0)