Skip to content

Commit c36a16e

Browse files
committed
Switch to code-searcher instead of code_search tool
1 parent dbc24dd commit c36a16e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

agents/base2/base2.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ export function createBase2(
6767
!noAskUser && 'ask_user',
6868
'skill',
6969
'set_output',
70-
'code_search',
7170
'list_directory',
7271
'glob',
7372
),
7473
spawnableAgents: buildArray(
7574
!isMax && 'file-picker',
7675
isMax && 'file-picker-max',
76+
'code-searcher',
7777
'researcher-web',
7878
'researcher-docs',
7979
'basher',
@@ -124,7 +124,7 @@ export function createBase2(
124124
- Add thoughtful details like hover states, transitions, and micro-interactions
125125
- Apply design principles: hierarchy, contrast, balance, and movement
126126
- Create an impressive demonstration showcasing web development capabilities
127-
- **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately using the code_search tool.
127+
- **Refactoring Awareness:** Whenever you modify an exported symbol like a function or class or variable, you should find and update all the references to it appropriately by spawning a code-searcher agent.
128128
- **Testing:** If you create a unit test, you should run it to see if it passes, and fix it if it doesn't.
129129
- **Package Management:** When adding new packages, use the basher agent to install the package rather than editing the package.json file with a guess at the version number to use (or similar for other languages). This way, you will be sure to have the latest version of the package. Do not install packages globally unless asked by the user (e.g. Don't run \`npm install -g <package-name>\`). Always try to use the package manager associated with the project (e.g. it might be \`pnpm\` or \`bun\` or \`yarn\` instead of \`npm\`, or similar for other languages).
130130
- **Code Hygiene:** Make sure to leave things in a good state:
@@ -141,7 +141,7 @@ Use the spawn_agents tool to spawn specialized agents to help you complete the u
141141
- **Spawn multiple agents in parallel:** This increases the speed of your response **and** allows you to be more comprehensive by spawning more total agents to synthesize the best response.
142142
- **Sequence agents properly:** Keep in mind dependencies when spawning different agents. Don't spawn agents in parallel that depend on each other.
143143
${buildArray(
144-
'- 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+
'- Spawn context-gathering agents (file pickers, code searchers, and web/docs researchers) before making edits. Use the list_directory and glob tools directly for searching and exploring the codebase.',
145145
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.',
146146
isFree && `Spawn the thinker-with-files-gemini agent for complex problems — it's very smart. Skip it for routine edits and clearly-scoped changes. Pass the relevant filePaths since it has no conversation history.`,
147147
isDefault &&
@@ -197,11 +197,11 @@ ${buildArray(
197197
<user>please implement [a complex new feature]</user>
198198
199199
<response>
200-
[ You spawn 3 file-pickers and a docs researcher in parallel to find relevant files and do research online. You use the code_search, list_directory, and glob tools directly to search the codebase. ]
200+
[ You spawn 3 file-pickers, 2 code-searchers, and a docs researcher in parallel to find relevant files and do research online. You use the list_directory and glob tools directly to search the codebase. ]
201201
202202
[ You read a few of the relevant files using the read_files tool in two separate tool calls ]
203203
204-
[ You use code_search and glob tools, and spawn another file-picker to find more relevant files ]
204+
[ You spawn another file-picker and code-searcher to find more relevant files, and use glob tools ]
205205
206206
[ You read a few other relevant files using the read_files tool ]${!noAskUser
207207
? `\n\n[ You ask the user for important clarifications on their request or alternate implementation strategies using the ask_user tool ]`
@@ -300,7 +300,7 @@ ${PLACEHOLDER.GIT_CHANGES_PROMPT}
300300
}
301301
}
302302

303-
const EXPLORE_PROMPT = `- Iteratively spawn file pickers, bashers, and web/docs researchers to gather context as needed. Use the code_search, list_directory, and glob tools directly for searching and exploring the codebase. The file-picker agent in particular is very useful to find relevant files -- try spawning multiple in parallel (say, 2-5) to explore different parts of the codebase. Use read_subtree if you need to grok a particular part of the codebase. Read all the relevant files using the read_files tool.`
303+
const EXPLORE_PROMPT = `- Iteratively spawn file pickers, code searchers, bashers, and web/docs researchers to gather context as needed. Use the list_directory and glob tools directly for searching and exploring the codebase. The file-picker and code-searcher agents are very useful to find relevant files -- try spawning multiple in parallel (say, 2-5 file-pickers and 1-3 code-searchers) to explore different parts of the codebase. Use read_subtree if you need to grok a particular part of the codebase. Read all the relevant files using the read_files tool.`
304304

305305
function buildImplementationInstructionsPrompt({
306306
isSonnet,

agents/file-explorer/code-searcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const codeSearcher: SecretAgentDefinition = {
4949
id: 'code-searcher',
5050
displayName: 'Code Searcher',
5151
spawnerPrompt:
52-
'Mechanically runs multiple code search queries (using ripgrep line-oriented search) and returns up to 250 results across all source files, showing each line that matches the search pattern. Excludes git-ignored files.',
52+
`Mechanically runs multiple code search queries (using ripgrep line-oriented search) and returns up to 250 results across all source files, showing each line that matches the search pattern. Excludes git-ignored files. You MUST pass searchQueries in params. Example input: { "params": { "searchQueries": [{ "pattern": "createUser", "flags": "-g *.ts" }, { "pattern": "deleteUser", "flags": "-g *.ts" }, { "pattern": "UserSchema", "maxResults": 5 }] } }`,
5353
model: 'anthropic/claude-sonnet-4.5',
5454
publisher,
5555
includeMessageHistory: false,

0 commit comments

Comments
 (0)