You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/base2/base2.ts
+30-18Lines changed: 30 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,11 @@ import {
7
7
}from'../types/secret-agent-definition'
8
8
9
9
exportconstcreateBase2: (
10
-
mode: 'normal'|'fast',
10
+
mode: 'fast'|'normal'|'max',
11
11
)=>Omit<SecretAgentDefinition,'id'>=(mode)=>{
12
12
constisFast=mode==='fast'
13
+
constisNormal=mode==='normal'
14
+
constisMax=mode==='max'
13
15
return{
14
16
publisher,
15
17
model: 'anthropic/claude-sonnet-4.5',
@@ -42,9 +44,10 @@ export const createBase2: (
42
44
'researcher-web',
43
45
'researcher-docs',
44
46
'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',
48
51
'context-pruner',
49
52
),
50
53
@@ -62,12 +65,19 @@ Continue to spawn layers of agents until have completed the user's request or re
62
65
63
66
- **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:
64
67
- 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 ')}
69
79
- **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/validatorsfor trivial changes or quick follow-ups:** You should spawn the code reviewer/validatorfor most changes, but not for little changes or simple follow-ups." : ''}
71
81
72
82
# Core Mandates
73
83
@@ -132,21 +142,23 @@ The user asks you to implement a new feature. You respond in multiple steps:
132
142
2a. Read all the relevant files using the read_files tool.
133
143
${
134
144
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.
138
150
4. Use the str_replace or write_file tool to make the changes.
139
151
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.
144
153
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.`
145
157
}`,
146
158
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' : ''}.`,
0 commit comments