Skip to content

Commit b748a06

Browse files
committed
Clean up a few bits in our .agents
1 parent e056a23 commit b748a06

File tree

10 files changed

+13
-69
lines changed

10 files changed

+13
-69
lines changed
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { publisher, version } from './constants'
33
import type { AgentConfig } from './types/agent-config'
44

55
const config: AgentConfig = {
6-
id: 'sonnet4-agent-builder',
6+
id: 'agent-builder',
77
version,
88
publisher,
99
displayName: 'Bob the Agent Builder',
@@ -17,7 +17,6 @@ const config: AgentConfig = {
1717
'code_search',
1818
'spawn_agents',
1919
'add_message',
20-
'set_output',
2120
'end_turn',
2221
],
2322
subagents: [`codebuff/file-picker@${version}`],
@@ -28,7 +27,6 @@ const config: AgentConfig = {
2827
type: 'string',
2928
},
3029
},
31-
outputMode: 'json',
3230
includeMessageHistory: false,
3331

3432
parentPrompt:
@@ -70,7 +68,7 @@ Create agent templates that are focused, efficient, and well-documented. Always
7068
7169
You have access to three example agents in \`.agents/examples/\` that demonstrate different complexity levels:
7270
73-
1. **Level 1 - Code Reviewer**: Simple agent with basic tools (read_files, write_file, set_output, end_turn)
71+
1. **Level 1 - Code Reviewer**: Simple agent with basic tools (read_files, write_file, end_turn)
7472
2. **Level 2 - Test Generator**: Intermediate agent with subagents and handleSteps logic
7573
3. **Level 3 - Documentation Writer**: Advanced agent with comprehensive tools, multiple subagents, and complex orchestration
7674
@@ -170,9 +168,7 @@ IMPORTANT: Always end your response with the end_turn tool when you have complet
170168
}
171169

172170
if (exampleAgentsResult) {
173-
const exampleFiles = exampleAgentsResult
174-
.split('\n\n')
175-
.filter(Boolean)
171+
const exampleFiles = exampleAgentsResult.split('\n\n').filter(Boolean)
176172

177173
// Write example 1
178174
if (exampleFiles[0]) {

.agents/brainstormer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ Remember: Your goal is to expand thinking, not to provide definitive answers. He
5858

5959
instructionsPrompt:
6060
'Act as a creative thought partner. Generate multiple perspectives, challenge assumptions, explore alternatives, and ask probing questions to help think through problems more thoroughly.',
61-
62-
stepPrompt:
63-
"Continue brainstorming and exploring ideas. When you're done, use the end_turn tool.",
6461
}
6562

6663
export default config

.agents/changes-reviewer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ Use the following guidelines to review the changes and suggest improvements:
7171
}
7272

7373
// Step 4: Extract file paths from git diff and status output
74-
const gitDiffOutput = gitDiffResult?.result || ''
74+
const gitDiffOutput = gitDiffResult || ''
7575
const changedFiles = gitDiffOutput
7676
.split('\n')
7777
.map((line) => line.trim())
7878
.filter((line) => line && !line.startsWith('??') && !line.includes('OSC'))
7979

80-
const gitStatusOutput = gitStatusResult?.result || ''
80+
const gitStatusOutput = gitStatusResult || ''
8181
const untrackedFiles = gitStatusOutput
8282
.split('\n')
8383
.map((line) => line.trim())

.agents/claude4-gemini-thinking.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,7 @@ User cwd: {CODEBUFF_USER_CWD}
334334
],
335335
},
336336
}
337-
const { toolResult: thinkResult } = yield 'STEP'
338-
if (thinkResult?.toolName === 'end_turn') break
337+
yield 'STEP'
339338
}
340339
},
341340
}

.agents/file-explorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const config: AgentConfig = {
5353
yield {
5454
toolName: 'set_output',
5555
args: {
56-
results: spawnResult?.result,
56+
results: spawnResult,
5757
},
5858
}
5959
},

.agents/file-picker.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ const config: AgentConfig = {
2525
2626
You are an expert at finding relevant files in a codebase.
2727
28-
29-
{CODEBUFF_TOOLS_PROMPT}
30-
31-
{CODEBUFF_AGENTS_PROMPT}
32-
3328
{CODEBUFF_FILE_TREE_PROMPT}
3429
3530
{CODEBUFF_SYSTEM_INFO_PROMPT}
@@ -40,7 +35,7 @@ In your report, please give an analysis that includes the full paths of files th
4035
stepPrompt:
4136
'Do not use the find_files tool or any tools again. Just give your response.',
4237
handleSteps: function* ({ agentState, prompt, params }) {
43-
const toolResult = yield {
38+
yield {
4439
toolName: 'find_files',
4540
args: { prompt: prompt ?? '' },
4641
}

.agents/git-committer.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,7 @@ const config: AgentConfig = {
99
displayName: 'Git Committer',
1010
model: 'anthropic/claude-4-sonnet-20250522',
1111

12-
toolNames: [
13-
'read_files',
14-
'run_terminal_command',
15-
'set_output',
16-
'add_message',
17-
'end_turn',
18-
],
19-
20-
outputSchema: {
21-
type: 'object',
22-
properties: {
23-
success: { type: 'boolean' },
24-
message: { type: 'string' },
25-
commitHash: { type: 'string' },
26-
},
27-
required: ['success', 'message'],
28-
},
12+
toolNames: ['read_files', 'run_terminal_command', 'add_message', 'end_turn'],
2913

3014
inputSchema: {
3115
prompt: {
@@ -46,9 +30,6 @@ const config: AgentConfig = {
4630
instructionsPrompt:
4731
'Follow the steps to create a good commit: analyze changes with git diff and git log, read relevant files for context, stage appropriate files, analyze changes, and create a commit with proper formatting including the Codebuff footer.',
4832

49-
stepPrompt:
50-
'Continue with the git commit process. Make sure to end your response by using set_output to output a structured summary of what you committed and whether it was successful.',
51-
5233
handleSteps: function* ({ agentState, prompt, params }: AgentStepContext) {
5334
// Step 1: Run git diff and git log to analyze changes
5435
yield {

.agents/planner.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,12 @@ const config: AgentConfig = {
2222
includeMessageHistory: true,
2323

2424
parentPrompt: 'Agent that formulates a comprehensive plan to a prompt.',
25-
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
26-
27-
You are an expert software architect. You are good at creating comprehensive plans to tackle the user request.
28-
29-
{CODEBUFF_TOOLS_PROMPT}
30-
31-
{CODEBUFF_AGENTS_PROMPT}`,
25+
systemPrompt: `You are an expert software architect. You are good at creating comprehensive plans to tackle the user request.`,
3226
instructionsPrompt: `Steps for your response:
3327
1. Use the <think_deeply> tool to think through cruxes for the plan, and tricky cases. Consider alternative approaches. Be sure to close the tool call with </think_deeply>.
3428
2. Write out your plan in a concise way.
3529
3. Spawn 1-5 dry run agents to sketch portions of the implementation of the plan. (Important: do not forget to close the tool call with "</spawn_agents>"!)
3630
4. Synthesize all the information and rewrite the full plan to be the best it can be. Use the end_turn tool.`,
37-
stepPrompt:
38-
'Do not forget to use the end_turn tool to end your response. Make sure the final plan is the best it can be.',
3931
}
4032

4133
export default config

.agents/researcher.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,8 @@ In your report, provide a thorough analysis that includes:
3333
- Code examples or patterns when applicable
3434
- Actionable recommendations
3535
36-
Always end your response with the end_turn tool.\
37-
\
38-
{CODEBUFF_TOOLS_PROMPT}\
39-
\
40-
{CODEBUFF_AGENTS_PROMPT}\
41-
\
42-
{CODEBUFF_FILE_TREE_PROMPT}\
43-
\
44-
{CODEBUFF_SYSTEM_INFO_PROMPT}\
45-
\
46-
{CODEBUFF_GIT_CHANGES_PROMPT}`,
47-
instructionsPrompt: '',
48-
stepPrompt:
49-
"Don't forget to end your response with the end_turn tool: <end_turn></end_turn>",
36+
Always end your response with the end_turn tool.`,
37+
stepPrompt: "Don't forget to end your response with the end_turn tool.",
5038
handleSteps: function* ({ agentState, prompt, params }) {
5139
yield {
5240
toolName: 'web_search',

.agents/superagent.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ const config: AgentConfig = {
3333

3434
parentPrompt:
3535
'Superagent that can spawn multiple code editing agents to complete a task.',
36-
systemPrompt: `You are an expert orchestrator that can solve any problem, including coding tasks.
37-
38-
{CODEBUFF_TOOLS_PROMPT}
39-
40-
{CODEBUFF_AGENTS_PROMPT}`,
36+
systemPrompt: `You are an expert orchestrator that can solve any problem, including coding tasks.`,
4137
instructionsPrompt: `Answer the user\'s question or complete the task by spawning copies of the base agent.
4238
4339
If you have all the information you need, just write out the response and do not spawn any agents.

0 commit comments

Comments
 (0)