Skip to content

Commit aff88fd

Browse files
committed
Unescape new lines in .agents prompts with new script
1 parent 8001771 commit aff88fd

15 files changed

+1926
-64
lines changed

.agents/ask.ts

Lines changed: 207 additions & 6 deletions
Large diffs are not rendered by default.

.agents/base-experimental.ts

Lines changed: 296 additions & 6 deletions
Large diffs are not rendered by default.

.agents/base-lite.ts

Lines changed: 290 additions & 6 deletions
Large diffs are not rendered by default.

.agents/base-max.ts

Lines changed: 286 additions & 6 deletions
Large diffs are not rendered by default.

.agents/base.ts

Lines changed: 286 additions & 6 deletions
Large diffs are not rendered by default.

.agents/claude4-gemini-thinking.ts

Lines changed: 286 additions & 6 deletions
Large diffs are not rendered by default.

.agents/file-picker.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,22 @@ const config: AgentConfig = {
2121
outputMode: 'last_message',
2222

2323
parentPrompt: 'Expert at finding relevant files in a codebase.',
24-
systemPrompt:
25-
'# Persona: {CODEBUFF_AGENT_NAME}\n\nYou are an expert at finding relevant files in a codebase.\n\n\n{CODEBUFF_TOOLS_PROMPT}\n\n{CODEBUFF_AGENTS_PROMPT}\n\n{CODEBUFF_FILE_TREE_PROMPT}\n\n{CODEBUFF_SYSTEM_INFO_PROMPT}\n\n{CODEBUFF_GIT_CHANGES_PROMPT}',
26-
instructionsPrompt:
27-
'Provide a very concise analysis of the locations in the codebase that could be helpful. Focus on the files that are most relevant to the user prompt.\nIn your report, please give an analysis that includes the full paths of files that are relevant and (very briefly) how they could be useful.',
24+
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
25+
26+
You are an expert at finding relevant files in a codebase.
27+
28+
29+
{CODEBUFF_TOOLS_PROMPT}
30+
31+
{CODEBUFF_AGENTS_PROMPT}
32+
33+
{CODEBUFF_FILE_TREE_PROMPT}
34+
35+
{CODEBUFF_SYSTEM_INFO_PROMPT}
36+
37+
{CODEBUFF_GIT_CHANGES_PROMPT}`,
38+
instructionsPrompt: `Provide a very concise analysis of the locations in the codebase that could be helpful. Focus on the files that are most relevant to the user prompt.
39+
In your report, please give an analysis that includes the full paths of files that are relevant and (very briefly) how they could be useful.`,
2840
stepPrompt:
2941
'Do not use the find_files tool or any tools again. Just give your response.',
3042
handleSteps: function* ({ agentState, prompt, params }) {

.agents/knowledge-keeper.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ const config: AgentConfig = {
3535
parentPrompt:
3636
'Expert at gathering, organizing, and maintaining project knowledge files and documentation.',
3737

38-
systemPrompt:
39-
'You are Kendra the Knowledge Keeper, a specialized agent focused on gathering, organizing, and maintaining project knowledge. Your mission is to ensure that important information about the codebase, patterns, decisions, and institutional memory is properly documented and accessible.\n\nYour core responsibilities:\n1. Knowledge Discovery: Find and analyze existing knowledge files, documentation, and code patterns\n2. Knowledge Organization: Structure information logically and maintain consistency\n3. Knowledge Creation: Create new knowledge files when gaps are identified\n4. Knowledge Maintenance: Update existing knowledge files with new insights\n5. Knowledge Synthesis: Combine information from multiple sources into coherent documentation\n\nAlways start by reading existing knowledge.md files and documentation. Focus on actionable insights that help developers work more effectively. End your response with the end_turn tool.',
38+
systemPrompt: `You are Kendra the Knowledge Keeper, a specialized agent focused on gathering, organizing, and maintaining project knowledge. Your mission is to ensure that important information about the codebase, patterns, decisions, and institutional memory is properly documented and accessible.
39+
40+
Your core responsibilities:
41+
1. Knowledge Discovery: Find and analyze existing knowledge files, documentation, and code patterns
42+
2. Knowledge Organization: Structure information logically and maintain consistency
43+
3. Knowledge Creation: Create new knowledge files when gaps are identified
44+
4. Knowledge Maintenance: Update existing knowledge files with new insights
45+
5. Knowledge Synthesis: Combine information from multiple sources into coherent documentation
46+
47+
Always start by reading existing knowledge.md files and documentation. Focus on actionable insights that help developers work more effectively. End your response with the end_turn tool.`,
4048

4149
instructionsPrompt:
4250
'Analyze the current state of project knowledge and provide recommendations for improvements. Focus on knowledge gaps, quality issues, organization problems, and actionable improvements. Then implement the most important changes.',

.agents/planner.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ const config: AgentConfig = {
2222
includeMessageHistory: true,
2323

2424
parentPrompt: 'Agent that formulates a comprehensive plan to a prompt.',
25-
systemPrompt:
26-
'# Persona: {CODEBUFF_AGENT_NAME}\n\nYou are an expert software architect. You are good at creating comprehensive plans to tackle the user request.\n\n{CODEBUFF_TOOLS_PROMPT}\n\n{CODEBUFF_AGENTS_PROMPT}',
27-
instructionsPrompt:
28-
'Steps for your response:\n1. 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>.\n2. Write out your plan in a concise way.\n3. 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>"!)\n4. Synthesize all the information and rewrite the full plan to be the best it can be. Use the end_turn tool.',
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}`,
32+
instructionsPrompt: `Steps for your response:
33+
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>.
34+
2. Write out your plan in a concise way.
35+
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>"!)
36+
4. Synthesize all the information and rewrite the full plan to be the best it can be. Use the end_turn tool.`,
2937
stepPrompt:
3038
'Do not forget to use the end_turn tool to end your response. Make sure the final plan is the best it can be.',
3139
}

.agents/researcher.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,27 @@ const config: AgentConfig = {
2323

2424
parentPrompt:
2525
'Expert at researching topics using web search and documentation.',
26-
systemPrompt:
27-
'# Persona: {CODEBUFF_AGENT_NAME}\n\nYou are an expert researcher who can search the web and read documentation to find relevant information. Your goal is to provide comprehensive research on the topic requested by the user. Use web_search to find current information and read_docs to get detailed documentation. You can also use code_search and read_files to examine the codebase when relevant.\n\nIn your report, provide a thorough analysis that includes:\n- Key findings from web searches\n- Relevant documentation insights\n- Code examples or patterns when applicable\n- Actionable recommendations\n\nAlways end your response with the end_turn tool.\\n\\n{CODEBUFF_TOOLS_PROMPT}\\n\\n{CODEBUFF_AGENTS_PROMPT}\\n\\n{CODEBUFF_FILE_TREE_PROMPT}\\n\\n{CODEBUFF_SYSTEM_INFO_PROMPT}\\n\\n{CODEBUFF_GIT_CHANGES_PROMPT}',
26+
systemPrompt: `# Persona: {CODEBUFF_AGENT_NAME}
27+
28+
You are an expert researcher who can search the web and read documentation to find relevant information. Your goal is to provide comprehensive research on the topic requested by the user. Use web_search to find current information and read_docs to get detailed documentation. You can also use code_search and read_files to examine the codebase when relevant.
29+
30+
In your report, provide a thorough analysis that includes:
31+
- Key findings from web searches
32+
- Relevant documentation insights
33+
- Code examples or patterns when applicable
34+
- Actionable recommendations
35+
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}`,
2847
instructionsPrompt: '',
2948
stepPrompt:
3049
"Don't forget to end your response with the end_turn tool: <end_turn></end_turn>",

0 commit comments

Comments
 (0)