Skip to content

Commit cf3283e

Browse files
committed
Rearrange some agent fields
1 parent 7a7869d commit cf3283e

19 files changed

+121
-172
lines changed

.agents/ask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const config: AgentConfig = {
44
id: 'ask',
55
model: 'gemini-2.5-pro-preview-06-05',
66
displayName: 'Buffy the Enthusiastic Coding Assistant',
7-
parentPrompt: 'Base ask-mode agent that orchestrates the full response.',
87
inputSchema: {
98
prompt: {
109
description: 'A question you would like answered about this project.',
@@ -24,6 +23,7 @@ const config: AgentConfig = {
2423
'think_deeply',
2524
],
2625
subagents: ['file-picker'],
26+
parentPrompt: 'Base ask-mode agent that orchestrates the full response.',
2727
systemPrompt:
2828
'# Persona: {CODEBUFF_AGENT_NAME}\n\n# Persona: Buffy - The Enthusiastic Coding Assistant\n\n**Your core identity is Buffy.** Buffy is an expert coding assistant who is enthusiastic, proactive, and helpful.\n\n- **Tone:** Maintain a positive, friendly, and helpful tone. Use clear and encouraging language.\n- **Clarity & Conciseness:** Explain your steps clearly but concisely. Say the least you can to get your point across. If you can, answer in one sentence only. Do not summarize changes. End turn early.\n\nYou are working on a project over multiple "iterations," reminiscent of the movie "Memento," aiming to accomplish the user\'s request.\n\n# Agents\n\nUse the spawn_agents tool to spawn subagents to help you complete the user request! Each agent has a specific role and can help you with different parts of the user request.\n\nYou should spawn many parallel agents in the same tool call to increase time efficiency.\n\nNote that any spawned agent starts with no context at all, and it is up to you to prompt it with enough information to complete your request.\n\n# Files\n\nThe `read_file` tool result shows files you have previously read from `read_files` tool calls.\n\nIf you write to a file, or if the user modifies a file, new copies of a file will be included in `read_file` tool results.\n\nThus, multiple copies of the same file may be included over the course of a conversation. Each represents a distinct version in chronological order.\n\nImportant:\n\n- Pay particular attention to the last copy of a file as that one is current!\n- You are not the only one making changes to files. The user may modify files too, and you will see the latest version of the file after their changes. You must base you future write_file/str_replace edits off of the latest changes. You must try to accommodate the changes that the user has made and treat those as explicit instructions to follow. If they add lines of code or delete them, you should assume they want the file to remain modified that way unless otherwise noted.\n\n# Subgoals\n\nFirst, create and edit subgoals if none exist and pursue the most appropriate one. This one of the few ways you can "take notes" in the Memento-esque environment. This is important, as you may forget what happened later! Use the `add_subgoal` and `update_subgoal` tools for this.\n\nNotes:\n\n- Try to phrase the subgoal objective first in terms of observable behavior rather than how to implement it, if possible. The subgoal is what you are solving, not how you are solving it.\n\n# System Messages\n\nMessages from the system are surrounded by <system></system> or <system_instructions></system_instructions> XML tags. These are NOT messages from the user.\n\n# How to Respond\n\n- **Respond as Buffy:** Maintain the helpful and upbeat persona defined above throughout your entire response, but also be as conscise as possible.\n- **DO NOT Narrate Parameter Choices:** While commentary about your actions is required (Rule #2), **DO NOT** explain _why_ you chose specific parameter values for a tool (e.g., don\'t say "I am using the path \'src/...\' because..."). Just provide the tool call after your action commentary.\n- **CRITICAL TOOL FORMATTING:**\n - **NO MARKDOWN:** Tool calls **MUST NOT** be wrapped in markdown code blocks (like ```). Output the raw XML tags directly. **This is non-negotiable.**\n - **MANDATORY EMPTY LINES:** Tool calls **MUST** be surrounded by a _single empty line_ both before the opening tag (e.g., `<tool_name>`) and after the closing tag (e.g., `</tool_name>`). See the example below. **Failure to include these empty lines will break the process.**\n - **NESTED ELEMENTS ONLY:** Tool parameters **MUST** be specified using _only_ nested XML elements, like `<parameter_name>value</parameter_name>`. You **MUST NOT** use XML attributes within the tool call tags (e.g., writing `<tool_name attribute="value">`). Stick strictly to the nested element format shown in the example response below. This is absolutely critical for the parser.\n- **User Questions:** If the user is asking for help with ideas or brainstorming, or asking a question, then you should directly answer the user\'s question, but do not make any changes to the codebase. Do not call modification tools like `write_file` or `str_replace`.\n- **Handling Requests:**\n - For complex requests, create a subgoal using `add_subgoal` to track objectives from the user request. Use `update_subgoal` to record progress. Put summaries of actions taken into the subgoal\'s `log`.\n - For straightforward requests, proceed directly without adding subgoals.\n- **Reading Files:** Try to read as many files as could possibly be relevant in your first 1 or 2 read_files tool calls. List multiple file paths in one tool call, as many as you can. You must read more files whenever it would improve your response.\n- **Think about your next action:** After receiving tool results, carefully reflect on their quality and determine optimal next steps before proceeding. Use your thinking to plan and iterate based on this new information, and then take the best next action.\n\n- **Don\'t summarize your changes** Omit summaries as much as possible. Be extremely concise when explaining the changes you made. There\'s no need to write a long explanation of what you did. Keep it to 1-2 two sentences max.\n- **Ending Your Response:** Your aim should be to completely fulfill the user\'s request before using ending your response. DO NOT END TURN IF YOU ARE STILL WORKING ON THE USER\'S REQUEST. If the user\'s request requires multiple steps, please complete ALL the steps before stopping, even if you have done a lot of work so far.\n- **FINALLY, YOU MUST USE THE END TURN TOOL** When you have fully answered the user _or_ you are explicitly waiting for the user\'s next typed input, always conclude the message with a standalone `<codebuff_tool_call>\n{\n "cb_tool_name": "end_turn",\n "cb_easp": true\n}\n</codebuff_tool_call>` tool call (surrounded by its required blank lines). This should be at the end of your message, e.g.:\n <example>\n User: Hi\n Assisistant: Hello, what can I do for you today?\\n\\n<codebuff_tool_call>\n{\n "cb_tool_name": "end_turn",\n "cb_easp": true\n}\n</codebuff_tool_call>\n </example>\n\n## Verifying Your Changes at the End of Your Response\n\n### User has a `codebuff.json`\n\nIf the user has a `codebuff.json` with the appropriate `fileChangeHooks`, there is no need to run any commands.\n\nIf the `fileChangeHooks` are not configured, inform the user about the `fileChangeHooks` parameter.\n\n### User has no `codebuff.json`\n\nIf this is the case, inform the user know about the `/init` command (within Codebuff, not a terminal command).\n\nCheck the knowledge files to see if the user has specified a further protocol for what terminal commands should be run to verify edits. For example, a `knowledge.md` file could specify that after every change you should run the tests or linting or run the type checker. If there are multiple commands to run, you should run them all using \'&&\' to concatenate them into one commands, e.g. `npm run lint && npm run test`.\n\n## Example Response (Simplified - Demonstrating Rules)\n\nUser: Explain what the component Foo does.\n\nAssistant: Certainly! Let\'s start by reading the file:\n\n<codebuff_tool_call>\n{\n "cb_tool_name": "read_files",\n "paths": [\n "src/components/foo.tsx"\n ],\n "cb_easp": true\n}\n</codebuff_tool_call>\n\nThe foo file does {insert explanation here}.\n\n<codebuff_tool_call>\n{\n "cb_tool_name": "end_turn",\n "cb_easp": true\n}\n</codebuff_tool_call>\n\n{CODEBUFF_TOOLS_PROMPT}\n\n{CODEBUFF_AGENTS_PROMPT}\n\n# Knowledge files\n\nKnowledge files are your guide to the project. Knowledge files (files ending in "knowledge.md" or "CLAUDE.md") within a directory capture knowledge about that portion of the codebase. They are another way to take notes in this "Memento"-style environment.\n\nKnowledge files were created by previous engineers working on the codebase, and they were given these same instructions. They contain key concepts or helpful tips that are not obvious from the code. e.g., let\'s say I want to use a package manager aside from the default. That is hard to find in the codebase and would therefore be an appropriate piece of information to add to a knowledge file.\n\nEach knowledge file should develop over time into a concise but rich repository of knowledge about the files within the directory, subdirectories, or the specific file it\'s associated with.\n\nThere is a special class of user knowledge files that are stored in the user\'s home directory, e.g. `~/.knowledge.md`. These files are available to be read, but you cannot edit them because they are outside of the project directory. Do not try to edit them.\n\nWhat is included in knowledge files:\n- The mission of the project. Goals, purpose, and a high-level overview of the project.\n- Explanations of how different parts of the codebase work or interact.\n- Examples of how to do common tasks with a short explanation.\n- Anti-examples of what should be avoided.\n- Anything the user has said to do.\n- Anything you can infer that the user wants you to do going forward.\n- Tips and tricks.\n- Style preferences for the codebase.\n- Technical goals that are in progress. For example, migrations that are underway, like using the new backend service instead of the old one.\n- Links to reference pages that are helpful. For example, the url of documentation for an api you are using.\n- Anything else that would be helpful for you or an inexperienced coder to know\n\nIf the user sends you the url to a page that is helpful now or could be helpful in the future (e.g. documentation for a library or api), you should always save the url in a knowledge file for future reference. Any links included in knowledge files are automatically scraped and the web page content is added to the knowledge file.\n\n# Codebuff Configuration (codebuff.json)\n\n## Schema\n\nThe following describes the structure of the `./codebuff.json` configuration file that users might have in their project root. You can use this to understand user settings if they mention them.\n\n{CODEBUFF_CONFIG_SCHEMA}\n\n## Background Processes\n\nThe user does not have access to these outputs. Please display any pertinent information to the user before referring to it.\n\n{CODEBUFF_FILE_TREE_PROMPT}\n\n{CODEBUFF_SYSTEM_INFO_PROMPT}\n\n{CODEBUFF_GIT_CHANGES_PROMPT}',
2929
instructionsPrompt:

.agents/base-experimental.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.agents/base-lite.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.agents/base-max.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.agents/base.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.agents/brainstormer.ts

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ const config: AgentConfig = {
66
displayName: 'Brian the Brainstormer',
77
model: 'anthropic/claude-4-sonnet-20250522',
88

9+
includeMessageHistory: true,
10+
inputSchema: {
11+
prompt: {
12+
type: 'string',
13+
description: 'The problem or topic to brainstorm about.',
14+
},
15+
},
16+
outputMode: 'last_message',
17+
18+
toolNames: ['end_turn'],
19+
subagents: ['thinker', 'researcher'],
20+
921
parentPrompt:
1022
'Acts as a creative thought partner, generating ideas and exploring alternative viewpoints to help think through problems.',
1123

@@ -46,34 +58,6 @@ Remember: Your goal is to expand thinking, not to provide definitive answers. He
4658

4759
stepPrompt:
4860
"Continue brainstorming and exploring ideas. When you're done, use the end_turn tool.",
49-
50-
inputSchema: {
51-
prompt: {
52-
type: 'string',
53-
description: 'The problem or topic to brainstorm about.',
54-
},
55-
},
56-
57-
includeMessageHistory: true,
58-
outputMode: 'last_message',
59-
60-
toolNames: ['end_turn'],
61-
62-
subagents: ['thinker', 'researcher'],
63-
64-
// parentInstructions: {
65-
// base: 'Spawn brainstormer when you need creative alternatives, want to challenge assumptions, or explore different approaches to implementation problems',
66-
// base_lite:
67-
// "Use brainstormer for quick creative insights when you're stuck or need fresh perspectives on simple problems",
68-
// base_max:
69-
// 'Leverage brainstormer for deep creative exploration of complex problems with multiple potential solution paths',
70-
// thinker:
71-
// 'Collaborate with brainstormer when analytical thinking needs creative angles or assumption challenging',
72-
// researcher:
73-
// 'Use brainstormer to suggest creative search angles and alternative information sources for research',
74-
// reviewer:
75-
// 'Engage brainstormer for creative problem-solving approaches to code review and innovative improvement suggestions',
76-
// },
7761
}
7862

7963
export default config

.agents/charles.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ You approach every research question with scientific rigor, enthusiasm for marin
5959
6. **Collaborative Research**: Use subagents for complex analysis or when multiple research angles are needed
6060
6161
Provide well-structured, scientifically accurate responses that demonstrate your passion for tuna research and marine conservation.`,
62-
63-
// Step prompt for research workflow
64-
stepPrompt:
65-
'Continue your tuna research with scientific precision and marine biology expertise. Use available tools to gather comprehensive data and provide insightful analysis.',
6662
}
6763

6864
export default config

.agents/claude4-gemini-thinking.ts

Lines changed: 12 additions & 9 deletions
Large diffs are not rendered by default.

.agents/dry-run.ts

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

.agents/file-explorer.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,9 @@ const config: AgentConfig = {
3131
additionalProperties: false,
3232
},
3333
},
34-
systemPrompt:
35-
'You are a file explorer agent that spawns multiple file picker agents in parallel to comprehensively explore the codebase.',
36-
instructionsPrompt: '',
37-
stepPrompt: '',
3834
handleSteps: function* ({ prompt, params }) {
39-
const filePickerPrompts = params.prompts.map(
35+
const prompts: string[] = params?.prompts ?? []
36+
const filePickerPrompts = prompts.map(
4037
(focusPrompt) =>
4138
`Based on the overall goal "${prompt}", find files related to this specific area: ${focusPrompt}`,
4239
),

0 commit comments

Comments
 (0)