|
7 | 7 | } from '../types/secret-agent-definition' |
8 | 8 |
|
9 | 9 | export const createBase2: ( |
10 | | - mode: 'normal' | 'max', |
11 | | -) => Omit<SecretAgentDefinition, 'id'> = () => { |
| 10 | + mode: 'normal' | 'fast', |
| 11 | +) => Omit<SecretAgentDefinition, 'id'> = (mode) => { |
| 12 | + const isFast = mode === 'fast' |
12 | 13 | return { |
13 | 14 | publisher, |
14 | 15 | model: 'anthropic/claude-sonnet-4.5', |
@@ -61,11 +62,12 @@ Continue to spawn layers of agents until have completed the user's request or re |
61 | 62 |
|
62 | 63 | - **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: |
63 | 64 | - Spawn file pickers, code-searcher, directory-lister, glob-matcher, commanders, and researchers before making edits. |
64 | | - - Spawn generate-plan agent after you have gathered all the context you need (and not before!). |
65 | | - - Only make edits after generating a plan. |
66 | | - - Code reviewers/validators should be spawned after you have made your 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.' : ''} |
67 | 69 | - **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. |
68 | | -- **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. |
| 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. |
69 | 71 |
|
70 | 72 | # Core Mandates |
71 | 73 |
|
@@ -128,13 +130,21 @@ The user asks you to implement a new feature. You respond in multiple steps: |
128 | 130 | 1a. Read all the relevant files using the read_files tool. |
129 | 131 | 2. Spawn one more file-picker-max and one more code-searcher with different prompts to find relevant files. |
130 | 132 | 2a. Read all the relevant files using the read_files tool. |
131 | | -3. Spawn a generate-plan agent to generate a plan for the changes. |
| 133 | +${ |
| 134 | + 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 | +} |
132 | 138 | 4. Use the str_replace or write_file tool to make the changes. |
133 | 139 | 5. Spawn a code-reviewer to review the changes. Consider making changes suggested by the code-reviewer. |
134 | | -6. Spawn a validator to run validation commands (tests, typechecks, etc.) to ensure the changes are correct. |
135 | | -7. Inform the user that you have completed the task in one sentence without a final summary.`, |
136 | | - |
137 | | - stepPrompt: `Don't forget to spawn agents that could help, especially: the file-picker-max and find-all-referencer to get codebase context, the generate-plan agent to create a plan, code-reviewer to review changes, and the validator to run validation commands.`, |
| 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. |
| 144 | +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.` |
| 145 | +}`, |
| 146 | + |
| 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' : ''}.`, |
138 | 148 |
|
139 | 149 | handleSteps: function* ({ prompt, params }) { |
140 | 150 | let steps = 0 |
|
0 commit comments