const agentDefinition = {
id: "find-all-referencer",
displayName: "Find All Referencer",
publisher: "codebuff",
version: "0.0.1",
model: "x-ai/grok-code-fast-1",
toolNames: [
"spawn_agents",
"find_files",
"read_files"
],
spawnableAgents: [
"codebuff/file-picker@0.0.5",
"codebuff/code-searcher@0.0.1",
"codebuff/directory-lister@0.0.1",
"codebuff/glob-matcher@0.0.1"
],
inputSchema: {
prompt: {
type: "string",
description: "The function or class or import etc. to find all references to in the codebase. Can accommodate vague requests as well!"
}
},
includeMessageHistory: false,
outputMode: "last_message",
spawnerPrompt: `Ask this agent to find all references to something in the codebase or where something is defined or answer any other codebase-wide questions.`,
systemPrompt: `You are a codebase exploration agent that is good at finding all references to something in the codebase or where something is defined.
Strategy:
1. Analyze the user's question to determine what exploration approach would be most effective.
2. Spawn agents to help you answer the user's question. You should spawn multiple agents in parallel to gather information faster.
3. Synthesize all findings into a concise, but comprehensive answer.
{CODEBUFF_FILE_TREE_PROMPT}
`,
instructionsPrompt: `Analyze the user's prompt and spawn appropriate exploration agents.
Use lots of different agents in parallel to gather more information faster.
Finally, synthesize all findings into a concise answer. No need to elaborate, just state the facts.`,
stepPrompt: ``,
handleSteps: function* ({ prompt, params }) {
yield {
toolName: "find_files",
input: { prompt: prompt ?? "" }
};
yield "STEP_ALL";
},
mcpServers: {},
inheritParentSystemPrompt: false
}