Skip to content

Commit da16b7b

Browse files
committed
New file-picker: Use grok 4 fast instead of haiku. Delete file-picker max.
1 parent 3182574 commit da16b7b

File tree

16 files changed

+103
-136
lines changed

16 files changed

+103
-136
lines changed

.agents/base2/base2-with-planner-pro.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const createBase2: (
3434
includeMessageHistory: true,
3535
toolNames: ['spawn_agents', 'read_files', 'str_replace', 'write_file'],
3636
spawnableAgents: buildArray(
37-
'file-picker-max',
37+
'file-picker',
3838
'code-searcher',
3939
'directory-lister',
4040
'glob-matcher',
@@ -124,17 +124,17 @@ ${PLACEHOLDER.GIT_CHANGES_PROMPT}
124124
125125
The user asks you to implement a new feature. You respond in multiple steps:
126126
127-
1. Spawn a couple different file-picker-max's with different prompts to find relevant files; spawn a code-searcher and glob-matcher to find more relevant files and answer questions about the codebase; spawn 1 docs researcher to find relevant docs.
127+
1. Spawn a couple different file-picker's with different prompts to find relevant files; spawn a code-searcher and glob-matcher to find more relevant files and answer questions about the codebase; spawn 1 docs researcher to find relevant docs.
128128
1a. Read all the relevant files using the read_files tool.
129-
2. Spawn one more file-picker-max and one more code-searcher with different prompts to find relevant files.
129+
2. Spawn one more file-picker and one more code-searcher with different prompts to find relevant files.
130130
2a. Read all the relevant files using the read_files tool.
131131
3. Important: Spawn a planner-pro agent to generate a plan for the changes.
132132
4. Use the str_replace or write_file tool to make the changes.
133133
5. Spawn a code-reviewer to review the changes. Consider making changes suggested by the code-reviewer.
134134
6. Spawn a validator to run validation commands (tests, typechecks, etc.) to ensure the changes are correct.
135135
7. Inform the user that you have completed the task in one sentence without a final summary.`,
136136

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 planner-pro agent to create a plan, the code reviewer to review changes, and the validator to run validation checks.`,
137+
stepPrompt: `Don't forget to spawn agents that could help, especially: the file-picker and find-all-referencer to get codebase context, the planner-pro agent to create a plan, the code reviewer to review changes, and the validator to run validation checks.`,
138138

139139
handleSteps: function* ({ prompt, params }) {
140140
let steps = 0

.agents/base2/base2.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function createBase2(
6262
isGpt5 && 'task_completed',
6363
),
6464
spawnableAgents: buildArray(
65-
'file-picker-max',
65+
'file-picker',
6666
'code-searcher',
6767
'directory-lister',
6868
'glob-matcher',
@@ -151,6 +151,7 @@ ${PLACEHOLDER.GIT_CHANGES_PROMPT}
151151
? buildPlanOnlyInstructionsPrompt({})
152152
: buildImplementationInstructionsPrompt({
153153
isGpt5,
154+
isFast,
154155
isDefault,
155156
isMax,
156157
hasNoValidation,
@@ -180,16 +181,17 @@ ${PLACEHOLDER.GIT_CHANGES_PROMPT}
180181
}
181182
}
182183

183-
const definition = { ...createBase2('default'), id: 'base2' }
184-
export default definition
184+
const EXPLORE_PROMPT = `- Spawn file pickers, code-searcher, directory-lister, glob-matcher, commanders, and web/docs researchers to gather context as needed. The file-picker agent in particular is very useful to use to find relevant files -- try spawning mulitple in parallel to explore different parts of the codebase. Read all the relevant files using the read_files tool. Read as many files as possible so that you have a comprehensive context on the user's request.`
185185

186186
function buildImplementationInstructionsPrompt({
187187
isGpt5,
188+
isFast,
188189
isDefault,
189190
isMax,
190191
hasNoValidation,
191192
}: {
192193
isGpt5: boolean
194+
isFast: boolean
193195
isDefault: boolean
194196
isMax: boolean
195197
hasNoValidation: boolean
@@ -201,10 +203,11 @@ function buildImplementationInstructionsPrompt({
201203
The user asks you to implement a new feature. You respond in multiple steps:
202204
203205
${buildArray(
204-
`- Spawn file pickers, code-searcher, directory-lister, glob-matcher, commanders, and web/docs researchers to gather context as needed. The file-picker-max agent in particular is very useful to use to find relevant files. Read all the relevant files using the read_files tool. Read as many files as possible so that you have a comprehensive context on the user's request.`,
206+
EXPLORE_PROMPT,
205207
`- Important: Read as many files as could possibly be relevant to the task to improve your understanding of the user's request and produce the best possible code changes. This is frequently 12-20 files, depending on the task.`,
206208
`- For multi-step tasks, use the write_todos tool to write out your step-by-step implementation plan. Include ALL of the applicable tasks in the list.${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} Skip write_todos for trivial tasks like single-line edits or simple questions.`,
207-
`- You must spawn the ${isGpt5 ? 'best-of-n-editor-gpt-5' : 'best-of-n-editor'} 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 small and trivial.`,
209+
!isFast &&
210+
`- You must spawn the ${isGpt5 ? 'best-of-n-editor-gpt-5' : 'best-of-n-editor'} 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 small and trivial.`,
208211
!hasNoValidation &&
209212
`- 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!`,
210213
`- Inform the user that you have completed the task in one sentence or a few short bullet points. Don't create any markdown summary files or example documentation files, unless asked by the user. If you already finished the user request and said you're done, then don't say anything else.`,
@@ -220,7 +223,7 @@ function buildPlanOnlyInstructionsPrompt({}: {}) {
220223
The user asks you to implement a new feature. You respond in multiple steps:
221224
222225
${buildArray(
223-
`- Spawn file pickers, code-searcher, directory-lister, glob-matcher, commanders, and researchers to gather context as needed. The file-picker-max agent in particular is very useful to use to find relevant files. Read all the relevant files using the read_files tool. Read as many files as possible so that you have a comprehensive context on the user's request.`,
226+
EXPLORE_PROMPT,
224227
`- After exploring the codebase, translate the user request into a clear and concise spec. If the user is just asking a question, you can answer it instead of writing a spec.
225228
226229
## Creating a spec
@@ -287,3 +290,6 @@ function buildPlanOnlyStepPrompt({}: {}) {
287290
`Your are in plan mode. Do not make any file changes. Do not call write_file or str_replace. Do not spawn the best-of-n-editor agent to implement. Do not use the write_todos tool.`,
288291
).join('\n')
289292
}
293+
294+
const definition = { ...createBase2('default'), id: 'base2' }
295+
export default definition

.agents/base2/task-researcher/base2-gpt-5-with-task-researcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const createBase2WithTaskResearcher: () => Omit<
3838
toolNames: ['spawn_agents', 'read_files', 'str_replace', 'write_file'],
3939
spawnableAgents: buildArray(
4040
'task-researcher',
41-
'file-picker-max',
41+
'file-picker',
4242
'code-searcher',
4343
'directory-lister',
4444
'glob-matcher',

.agents/base2/task-researcher/base2-with-task-researcher-planner-pro.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const createBase2WithTaskResearcher: () => Omit<
3838
toolNames: ['spawn_agents', 'read_files', 'str_replace', 'write_file'],
3939
spawnableAgents: buildArray(
4040
'task-researcher',
41-
'file-picker-max',
41+
'file-picker',
4242
'code-searcher',
4343
'directory-lister',
4444
'glob-matcher',

.agents/base2/task-researcher/base2-with-task-researcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const createBase2WithTaskResearcher: () => Omit<
4242
],
4343
spawnableAgents: buildArray(
4444
'task-researcher2',
45-
'file-picker-max',
45+
'file-picker',
4646
'code-searcher',
4747
'directory-lister',
4848
'glob-matcher',

.agents/file-explorer/file-lister.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const definition: SecretAgentDefinition = {
55
id: 'file-lister',
66
displayName: 'Liszt the File Lister',
77
publisher,
8-
model: 'anthropic/claude-haiku-4.5',
8+
model: 'x-ai/grok-4-fast',
99
spawnerPrompt:
1010
'Lists up to 12 files that are relevant to the prompt within the given directories. Unless you know which directories are relevant, omit the directories parameter. This agent is great for finding files that could be relevant to the prompt.',
1111
inputSchema: {
@@ -62,7 +62,7 @@ Again: Do not write anything else other than the file paths on new lines.
6262
toolName: 'read_subtree',
6363
input: {
6464
paths: directories,
65-
maxTokens: 200_000,
65+
maxTokens: 500_000,
6666
},
6767
}
6868

.agents/file-explorer/file-picker-max.ts

Lines changed: 0 additions & 82 deletions
This file was deleted.

.agents/file-explorer/file-picker.ts

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,72 @@ const definition: SecretAgentDefinition = {
1010
id: 'file-picker',
1111
displayName: 'Fletcher the File Fetcher',
1212
publisher,
13-
model: 'google/gemini-2.5-flash',
13+
model: 'google/gemini-2.0-flash-001',
14+
reasoningOptions: {
15+
enabled: false,
16+
effort: 'low',
17+
exclude: false,
18+
},
1419
spawnerPrompt:
15-
'Spawn to find relevant files in a codebase related to the prompt. Cannot do string searches on the codebase.',
20+
'Spawn to find relevant files in a codebase related to the prompt. Cannot do string searches on the codebase, but does a fuzzy search. Unless you know which directories are relevant, omit the directories parameter. This agent is extremely effective at finding files in the codebase that could be relevant to the prompt.',
1621
inputSchema: {
1722
prompt: {
1823
type: 'string',
1924
description: 'A coding task to complete',
2025
},
26+
params: {
27+
type: 'object' as const,
28+
properties: {
29+
directories: {
30+
type: 'array' as const,
31+
items: { type: 'string' as const },
32+
description:
33+
'Optional list of paths to directories to look within. If omitted, the entire project tree is used.',
34+
},
35+
},
36+
required: [],
37+
},
2138
},
2239
outputMode: 'last_message',
2340
includeMessageHistory: false,
24-
toolNames: ['find_files'],
25-
spawnableAgents: [],
26-
27-
systemPrompt: `You are an expert at finding relevant files in a codebase. ${PLACEHOLDER.FILE_TREE_PROMPT_SMALL}`,
41+
toolNames: ['spawn_agents'],
42+
spawnableAgents: ['file-lister'],
2843

44+
systemPrompt: `You are an expert at finding relevant files in a codebase. ${PLACEHOLDER.FILE_TREE_PROMPT}`,
2945
instructionsPrompt: `Instructions:
30-
Provide a short report of the locations in the codebase that could be helpful. Focus on the files that are most relevant to the user prompt.
31-
In your report, please give a very concise analysis that includes the full paths of files that are relevant and (briefly) how they could be useful.
46+
Provide an extremely short report of the locations in the codebase that could be helpful. Focus on the files that are most relevant to the user prompt. Leave out irrelevant locations.
47+
In your report, please give a very concise analysis that includes the full paths of files that are relevant and (extremely briefly) how they could be useful.
3248
`.trim(),
3349

34-
handleSteps: function* ({ agentState, prompt, params }) {
35-
yield {
36-
toolName: 'find_files',
37-
input: { prompt: prompt ?? '' },
50+
handleSteps: function* ({ prompt, params }) {
51+
const { toolResult: fileListerResults } = yield {
52+
toolName: 'spawn_agents',
53+
input: {
54+
agents: [
55+
{
56+
agent_type: 'file-lister',
57+
prompt: prompt ?? '',
58+
params: params ?? {},
59+
},
60+
],
61+
},
3862
} satisfies ToolCall
39-
yield 'STEP_ALL'
63+
64+
const fileListerResult = fileListerResults?.[0]
65+
const filesStr =
66+
fileListerResult && fileListerResult.type === 'json'
67+
? ((fileListerResult.value as any)?.[0]?.value?.value as string)
68+
: ''
69+
const files = filesStr.split('\n').filter(Boolean)
70+
71+
yield {
72+
toolName: 'read_files',
73+
input: {
74+
paths: files,
75+
},
76+
}
77+
78+
yield 'STEP'
4079
},
4180
}
4281

.agents/orchestrator/iterative-orchestrator/base2-with-files-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { SecretAgentDefinition } from 'types/secret-agent-definition'
22
import { createBase2 } from '../../base2/base2'
33

44
const definition: SecretAgentDefinition = {
5-
...createBase2('fast'),
5+
...createBase2('default'),
66
id: 'base2-with-files-input',
77
displayName: 'Buffy the Fast Orchestrator',
88

.agents/orchestrator/iterative-orchestrator/iterative-orchestrator-step.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const definition: SecretAgentDefinition = {
1111
'Orchestrates the completion of a large task through batches of independent steps.',
1212
toolNames: ['spawn_agents', 'read_files', 'set_output'],
1313
spawnableAgents: [
14-
'file-picker-max',
14+
'file-picker',
1515
'code-searcher',
1616
'directory-lister',
1717
'glob-matcher',

0 commit comments

Comments
 (0)