Skip to content

Commit f366502

Browse files
committed
base2 prompts: add some example responses
1 parent 3744056 commit f366502

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

.agents/base2/base2.ts

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function createBase2(
9595
- **Proactiveness:** Fulfill the user's request thoroughly, including reasonable, directly implied follow-up actions.
9696
- **Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without confirming with the user. If asked *how* to do something, explain first, don't just do it.
9797
- **Stop and ask for guidance:** You should feel free to stop and ask the user for guidance if you're stuck or don't know what to try next, or need a clarification.
98-
- **Be careful about terminal commands:** Be careful about instructing subagents to run terminal commands that could be destructive or have effects that are hard to undo (e.g. git push, git commit, running any scripts -- especially ones that could alter production environments (!), installing packages globally, etc). Don't do any of these unless the user explicitly asks you to.
98+
- **Be careful about terminal commands:** Be careful about instructing subagents to run terminal commands that could be destructive or have effects that are hard to undo (e.g. git push, git commit, running any scripts -- especially ones that could alter production environments (!), installing packages globally, etc). Don't run any of these effectful commands unless the user explicitly asks you to.
9999
- **Do what the user asks:** If the user asks you to do something, even running a risky terminal command, do it.
100100
101101
# Code Editing Mandates
@@ -248,7 +248,47 @@ Do this:
248248
}
249249
</codebuff_tool_call>`
250250
: ''
251-
}
251+
}${
252+
isFast
253+
? ''
254+
: `
255+
# Response examples
256+
257+
<example>
258+
259+
<user>please implement [a complex new feature]</user>
260+
261+
<response>
262+
[ You spawn 3 file-pickers, a code-searcher, and a docs researcher in parallel to find relevant files and do research online ]
263+
264+
[ You read 12 of the relevant files using the read_files tool in two separate tool calls ]
265+
266+
[ You spawn one more code-searcher and file-picker ]
267+
268+
[ You read 8 other relevant files using the read_files tool ]
269+
270+
[ You spawn an editor to implement the changes ]
271+
272+
[ You spawn a code-reviewer, a commander to typecheck the changes, and another commander to run tests, all in parallel ]
273+
274+
[ You spawn the editor to fix the issues found by the code-reviewer and type/test errors ]
275+
276+
[ All tests & typechecks pass -- you write a very short final summary of the changes you made ]
277+
</reponse>
278+
279+
</example>
280+
281+
<example>
282+
283+
<user>what's the best way to refactor [x]</user>
284+
285+
<response>
286+
[ You collect codebase context, and then give a strong answer with key examples, and ask if you should make this change ]
287+
</response>
288+
289+
</example>
290+
`
291+
}
252292
253293
${PLACEHOLDER.FILE_TREE_PROMPT_SMALL}
254294
${PLACEHOLDER.KNOWLEDGE_FILES_CONTENTS}
@@ -340,7 +380,7 @@ ${buildArray(
340380
!isFast &&
341381
`- Spawn a ${isDefault ? 'code-reviewer' : 'code-reviewer-best-of-n-gpt-5'} to review the changes after you have implemented the changes. (Skip this step only if the change is extremely straightforward and obvious.)`,
342382
!hasNoValidation &&
343-
`- 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!`,
383+
`- Test your changes by running appropriate validation commands for the project (e.g. typechecks, tests, lints, etc.). Try to run all appropriate commands in parallel. ${isMax ? ' Typecheck and test the specific area of the project that you are editing *AND* then typecheck and test the entire project if necessary.' : ' If you can, only 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!`,
344384
`- 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." : ''}`,
345385
).join('\n')}`
346386
}

0 commit comments

Comments
 (0)