Skip to content

Commit 2684e84

Browse files
committed
freebuff: use thinker-gpt to plan response
1 parent 698e19d commit 2684e84

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

agents/base2/base2.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ Use the spawn_agents tool to spawn specialized agents to help you complete the u
141141
- **Sequence agents properly:** Keep in mind dependencies when spawning different agents. Don't spawn agents in parallel that depend on each other.
142142
${buildArray(
143143
'- Spawn context-gathering agents (file pickers and web/docs researchers) before making edits. Use the code_search, list_directory, and glob tools directly for searching and exploring the codebase.',
144-
isFree && 'Do not spawn the thinker-gpt agent, unless the user asks. Not everyone has connected their ChatGPT subscription to Codebuff to allow for it.',
144+
// isFree && 'Important: Do not spawn the thinker-gpt agent, unless the user asks. Not everyone has connected their ChatGPT subscription to Codebuff to allow for it.',
145+
isFree &&
146+
'- You must spawn the thinker-gpt agent to plan your response, except for extremely simple requests that are obvious.',
145147
isDefault &&
146148
'- Spawn the editor agent to implement the changes after you have gathered all the context you need.',
147149
(isDefault || isMax) &&
148150
`- Spawn the ${isDefault ? 'thinker' : 'thinker-best-of-n-opus'} after gathering context to solve complex problems or when the user asks you to think about a problem. (gpt-5-agent is a last resort for complex problems)`,
149151
isMax &&
150152
`- IMPORTANT: You must spawn the editor-multi-prompt agent to implement the changes after you have gathered all the context you need. You must spawn this agent for non-trivial changes, since it writes much better code than you would with the str_replace or write_file tools. Don't spawn the editor in parallel with context-gathering agents.`,
151153
isFree &&
152-
'- Implement code changes using the str_replace or write_file tools directly.',
153-
isFree &&
154154
'- Spawn a code-reviewer-lite to review the changes after you have implemented the changes.',
155155
'- Spawn bashers sequentially if the second command depends on the the first.',
156156
isDefault &&
@@ -204,8 +204,10 @@ ${buildArray(
204204
[ You read a few other relevant files using the read_files tool ]${!noAskUser
205205
? `\n\n[ You ask the user for important clarifications on their request or alternate implementation strategies using the ask_user tool ]`
206206
: ''
207-
}
208-
${isDefault
207+
}${isFree
208+
? `\n\n[ You spawn the thinker-gpt agent to plan your response ]`
209+
: ''
210+
}${isDefault
209211
? `[ You implement the changes using the editor agent ]`
210212
: isFast || isFree
211213
? '[ You implement the changes using the str_replace or write_file tools ]'
@@ -337,6 +339,8 @@ ${buildArray(
337339
'- IMPORTANT: You must spawn the editor agent to implement the changes after you have gathered all the context you need. This agent will do the best job of implementing the changes so you must spawn it for all non-trivial changes. Do not pass any prompt or params to the editor agent when spawning it. It will make its own best choices of what to do.',
338340
isMax &&
339341
`- IMPORTANT: You must spawn the editor-multi-prompt agent to implement non-trivial code changes, since it will generate the best code changes from multiple implementation proposals. This is the best way to make high quality code changes -- strongly prefer using this agent over the str_replace or write_file tools, unless the change is very straightforward and obvious. You should also prompt it to implement the full task rather than just a single step.`,
342+
isFree &&
343+
'- IMPORTANT: You must spawn the thinker-gpt agent to plan your response after you have gathered all the context you need. This agent will do the best job of thinking and planning your best response so you must spawn it for all non-trivial requests. Do not pass any prompt or params to the editor agent when spawning it. It will make its own best recommendations of what to do.',
340344
isFast &&
341345
'- Implement the changes using the str_replace or write_file tools. Implement all the changes in one go.',
342346
isFast &&
@@ -380,6 +384,8 @@ function buildImplementationStepPrompt({
380384
(isDefault || isMax) &&
381385
`You must spawn a ${isDefault ? 'code-reviewer' : 'code-reviewer-multi-prompt'} to review the changes after you have implemented the changes and in parallel with typechecking or testing.`,
382386
isFree &&
387+
`You must spawn a thinker-gpt to plan your response after you have gathered all the relevant context.`,
388+
isFree &&
383389
`You must spawn a code-reviewer-lite to review the changes after you have implemented the changes and in parallel with typechecking or testing.`,
384390
`After completing the user request, summarize your changes in a sentence${isFast ? '' : ' or a few short bullet points'}.${isSonnet ? " Don't create any summary markdown files or example documentation files, unless asked by the user." : ''}.`,
385391
!isFast &&

0 commit comments

Comments
 (0)