Skip to content

Commit 31fe73b

Browse files
committed
Rename spawnPurposePrompt to spawnerPrompt
1 parent 496d4f7 commit 31fe73b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+197
-106
lines changed

.agents/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Codebuff Agents
2+
3+
This directory contains your custom Codebuff agents. Each agent is a TypeScript file that defines an AI agent with specific capabilities and behavior.
4+
5+
## Getting Started
6+
7+
1. **Edit an existing agent**: Start with `my-custom-agent.ts` and modify it for your needs
8+
2. **Check out the examples and types**: See the examples and types directories to draw inspiration and learn what's possible.
9+
3. **Test your agent**: Run `codebuff --agent your-agent-name`
10+
4. **Publish your agent**: Run `codebuff publish your-agent-name`
11+
12+
## File Structure
13+
14+
- `types/` - TypeScript type definitions
15+
- `examples/` - Example agents for reference
16+
- `my-custom-agent.ts` - Your first custom agent (edit this!)
17+
- Add any new agents you wish to the .agents directory
18+
19+
## Agent Basics
20+
21+
Each agent file exports an `AgentDefinition` object with:
22+
23+
- `id`: Unique identifier (lowercase, hyphens only)
24+
- `displayName`: Human-readable name
25+
- `model`: AI model to use (see OpenRouter for options)
26+
- `toolNames`: Tools the agent can use
27+
- `instructionsPrompt`: Instructions for the agent's behavior
28+
- `spawnerPrompt`: When other agents should spawn this one
29+
- `spawnableAgents`: Which agents *this* agent can spawn
30+
31+
## Common Tools
32+
33+
- `read_files` - Read file contents
34+
- `write_file` - Create or modify files
35+
- `str_replace` - Make targeted edits
36+
- `run_terminal_command` - Execute shell commands
37+
- `code_search` - Search for code patterns
38+
- `spawn_agents` - Delegate to other agents
39+
- `end_turn` - Finish the response
40+
41+
See `types/tools.ts` for more information on each tool!
42+
43+
## Need Help?
44+
45+
- Check the type definitions in `types/agent-definition.ts`
46+
- Look at examples in the `examples/` directory
47+
- Join the Codebuff Discord community (https://discord.com/invite/mcWTGjgTj3)
48+
49+
Happy agent building! 🤖

.agents/agent-builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const definition: AgentDefinition = {
88
id: 'agent-builder',
99
model: 'anthropic/claude-4-sonnet-20250522',
1010
displayName: 'Bob the Agent Builder',
11-
spawnPurposePrompt:
11+
spawnerPrompt:
1212
'Enhanced base agent that can create custom agents and handle all coding tasks with deterministic agent creation behavior',
1313

1414
toolNames: [

.agents/ask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const definition: SecretAgentDefinition = {
2828
'think_deeply',
2929
],
3030
spawnableAgents: [`codebuff/file-picker@${version}`],
31-
spawnPurposePrompt:
31+
spawnerPrompt:
3232
'Base ask-mode agent that orchestrates the full response.',
3333
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
3434

.agents/base-experimental.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const definition: SecretAgentDefinition = {
3838
`codebuff/thinker@${version}`,
3939
`codebuff/reviewer@${version}`,
4040
],
41-
spawnPurposePrompt: 'Base agent that orchestrates the full response.',
41+
spawnerPrompt: 'Base agent that orchestrates the full response.',
4242
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
4343
4444
**Your core identity is {CODEBUFF_AGENT_NAME}.** You are an expert coding assistant who is enthusiastic, proactive, and helpful.

.agents/base-lite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const definition: SecretAgentDefinition = {
3838
`codebuff/thinker@${version}`,
3939
`codebuff/reviewer@${version}`,
4040
],
41-
spawnPurposePrompt: 'Base agent that orchestrates the full response.',
41+
spawnerPrompt: 'Base agent that orchestrates the full response.',
4242
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
4343
4444
**Your core identity is {CODEBUFF_AGENT_NAME}.** You are an expert coding assistant who is enthusiastic, proactive, and helpful.

.agents/base-max.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const definition: SecretAgentDefinition = {
3838
`codebuff/thinker@${version}`,
3939
`codebuff/reviewer@${version}`,
4040
],
41-
spawnPurposePrompt: 'Base agent that orchestrates the full response.',
41+
spawnerPrompt: 'Base agent that orchestrates the full response.',
4242
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
4343
4444
**Your core identity is {CODEBUFF_AGENT_NAME}.** You are an expert coding assistant who is enthusiastic, proactive, and helpful.

.agents/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const definition: SecretAgentDefinition = {
3838
`codebuff/thinker@${version}`,
3939
`codebuff/reviewer@${version}`,
4040
],
41-
spawnPurposePrompt: 'Base agent that orchestrates the full response.',
41+
spawnerPrompt: 'Base agent that orchestrates the full response.',
4242
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
4343
4444
**Your core identity is {CODEBUFF_AGENT_NAME}.** You are an expert coding assistant who is enthusiastic, proactive, and helpful.

.agents/brainstormer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const definition: AgentDefinition = {
2424
`codebuff/researcher@${version}`,
2525
],
2626

27-
spawnPurposePrompt:
27+
spawnerPrompt:
2828
'Acts as a creative thought partner, generating ideas and exploring alternative viewpoints to help think through problems.',
2929

3030
systemPrompt: `# Persona: Brian the Brainstormer - Creative Thought Partner

.agents/changes-reviewer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const definition: AgentDefinition = {
1414

1515
includeMessageHistory: false,
1616

17-
spawnPurposePrompt:
17+
spawnerPrompt:
1818
'Spawn when you need to review code changes in the git diff or staged changes',
1919

2020
toolNames: ['read_files', 'run_terminal_command', 'spawn_agents'],

.agents/claude4-gemini-thinking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const definition: SecretAgentDefinition = {
3434
},
3535
outputMode: 'last_message',
3636

37-
spawnPurposePrompt: 'Base agent that orchestrates the full response.',
37+
spawnerPrompt: 'Base agent that orchestrates the full response.',
3838
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
3939
4040
**Your core identity is {CODEBUFF_AGENT_NAME}.** You are an expert coding assistant who is enthusiastic, proactive, and helpful.

0 commit comments

Comments
 (0)