Skip to content

Commit 23ef046

Browse files
committed
Configure base2-fast, base2, base2-max
1 parent c8a8023 commit 23ef046

File tree

4 files changed

+41
-22
lines changed

4 files changed

+41
-22
lines changed

.agents/base2/base2-max.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { createBase2 } from './base2'
2+
3+
const definition = {
4+
...createBase2('max'),
5+
id: 'base2-max',
6+
displayName: 'Buffy the Max Orchestrator',
7+
}
8+
export default definition

.agents/base2/base2.ts

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ import {
77
} from '../types/secret-agent-definition'
88

99
export const createBase2: (
10-
mode: 'normal' | 'fast',
10+
mode: 'fast' | 'normal' | 'max',
1111
) => Omit<SecretAgentDefinition, 'id'> = (mode) => {
1212
const isFast = mode === 'fast'
13+
const isNormal = mode === 'normal'
14+
const isMax = mode === 'max'
1315
return {
1416
publisher,
1517
model: 'anthropic/claude-sonnet-4.5',
@@ -42,9 +44,10 @@ export const createBase2: (
4244
'researcher-web',
4345
'researcher-docs',
4446
'commander',
45-
'generate-plan',
46-
'code-reviewer',
47-
'validator',
47+
isNormal && 'generate-plan',
48+
isMax && 'base2-gpt-5-worker',
49+
!isFast && 'code-reviewer',
50+
!isFast && 'validator',
4851
'context-pruner',
4952
),
5053

@@ -62,12 +65,19 @@ Continue to spawn layers of agents until have completed the user's request or re
6265
6366
- **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:
6467
- Spawn file pickers, code-searcher, directory-lister, glob-matcher, commanders, and researchers before making edits.
65-
${!isFast ? '- Spawn generate-plan agent after you have gathered all the context you need (and not before!).' : ''}
66-
${!isFast ? '- Only make edits after generating a plan.' : ''}
67-
- Code reviewers should be spawned after you have made your edits.
68-
${!isFast ? '- Validators should be spawned after you have done a code review.' : ''}
68+
${buildArray(
69+
isNormal &&
70+
'- Spawn generate-plan agent after you have gathered all the context you need (and not before!).',
71+
isMax &&
72+
'- Spawn a base2-gpt-5-worker agent inline after you have gathered all the context you need (and not before!).',
73+
isNormal && '- Only make edits after generating a plan.',
74+
!isFast &&
75+
'- Code reviewers should be spawned after you have made your edits.',
76+
!isFast &&
77+
'- Validators should be spawned after you have done a code review.',
78+
).join('\n ')}
6979
- **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.
70-
- **Don't spawn code reviewers${!isFast ? '/validators' : ''} for trivial changes or quick follow-ups:** You should spawn the code reviewer${!isFast ? '/validator' : ''} for most changes, but not for little changes or simple follow-ups.
80+
${!isFast ? "- **Don't spawn code reviewers/validators for trivial changes or quick follow-ups:** You should spawn the code reviewer/validator for most changes, but not for little changes or simple follow-ups." : ''}
7181
7282
# Core Mandates
7383
@@ -132,21 +142,23 @@ The user asks you to implement a new feature. You respond in multiple steps:
132142
2a. Read all the relevant files using the read_files tool.
133143
${
134144
isFast
135-
? `3. Write out your implementation plan as a bullet point list.`
136-
: '3. Spawn a generate-plan agent to generate a plan for the changes.'
137-
}
145+
? `3. Write out your implementation plan as a bullet point list.
146+
4. Use the str_replace or write_file tool to make the changes.
147+
5. Inform the user that you have completed the task in one sentence without a final summary. Don't create any markdown summary files either, unless asked by the user.`
148+
: isNormal
149+
? `3. Spawn a generate-plan agent to generate a plan for the changes.
138150
4. Use the str_replace or write_file tool to make the changes.
139151
5. Spawn a code-reviewer to review the changes. Consider making changes suggested by the code-reviewer.
140-
${
141-
isFast
142-
? `6. Inform the user that you have completed the task in one sentence without a final summary.`
143-
: `6. Spawn a validator to run validation commands (tests, typechecks, etc.) to ensure the changes are correct.
152+
6. Spawn a validator to run validation commands (tests, typechecks, etc.) to ensure the changes are correct.
144153
7. Inform the user that you have completed the task in one sentence without a final summary. Don't create any markdown summary files either, unless asked by the user.`
154+
: `3. IMPORTANT: You must spawn a base2-gpt-5-worker agent inline (with spawn_agent_inline tool) to do the planning and editing.
155+
4. Fix any issues left by the base2-gpt-5-worker agent.
156+
5. Inform the user that you have completed the task in one sentence without a final summary. Don't create any markdown summary files either, unless asked by the user.`
145157
}`,
146158

147-
stepPrompt: `Don't forget to spawn agents that could help, especially: the file-picker-max and find-all-referencer to get codebase context,${!isFast ? ' the generate-plan agent to create a plan,' : ''} code-reviewer to review changes${!isFast ? ', and the validator to run validation commands' : ''}.`,
159+
stepPrompt: `Don't forget to spawn agents that could help, especially: the file-picker-max and code-searcher to get codebase context,${!isFast ? ' the generate-plan agent to create a plan,' : ''} code-reviewer to review changes${!isFast ? ', and the validator to run validation commands' : ''}.`,
148160

149-
handleSteps: function* ({ prompt, params }) {
161+
handleSteps: function* ({ params }) {
150162
let steps = 0
151163
while (true) {
152164
steps++

.agents/planners/planner-pro.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const definition: SecretAgentDefinition = {
99
model: 'openai/gpt-5-pro',
1010
publisher,
1111
displayName: 'Planner Pro',
12-
spawnerPrompt:
13-
'Generates 5 alternative plans for a user request, analyzes them, and selects the best and simplest one that meets all requirements.',
12+
spawnerPrompt: 'Uses deep thinking to generate an implementation plan for a user request.',
1413
inputSchema: {},
1514
outputMode: 'last_message',
1615
spawnableAgents: [],

evals/buffbench/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { runBuffBench } from './run-buffbench'
55
async function main() {
66
await runBuffBench({
77
evalDataPath: path.join(__dirname, 'eval-codebuff.json'),
8-
agents: ['research-implement-orchestrator', 'base'],
9-
taskConcurrency: 20,
8+
agents: ['base2-fast', 'base2', 'base-max'],
9+
taskConcurrency: 10,
1010
})
1111

1212
process.exit(0)

0 commit comments

Comments
 (0)