File tree Expand file tree Collapse file tree
packages/agent/src/adapters/claude Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -313,20 +313,28 @@ export class ClaudeAcpAgent extends BaseAcpAgent implements Agent {
313313 addAcpMcpServer ( mcpServers , this , sessionId , this . clientCapabilities ) ;
314314 }
315315
316+ const branchNamingInstructions = `
317+ # Branch Naming
318+
319+ Before pushing a "workspace-*" branch to origin, rename it to something descriptive based on the work done. Do this automatically without asking the user.
320+ ` ;
321+
316322 let systemPrompt : Options [ "systemPrompt" ] = {
317323 type : "preset" ,
318324 preset : "claude_code" ,
325+ append : branchNamingInstructions ,
319326 } ;
327+
320328 if ( params . _meta ?. systemPrompt ) {
321329 const customPrompt = params . _meta . systemPrompt ;
322330 if ( typeof customPrompt === "string" ) {
323- systemPrompt = customPrompt ;
331+ systemPrompt = customPrompt + branchNamingInstructions ;
324332 } else if (
325333 typeof customPrompt === "object" &&
326334 "append" in customPrompt &&
327335 typeof customPrompt . append === "string"
328336 ) {
329- systemPrompt . append = customPrompt . append ;
337+ systemPrompt . append = customPrompt . append + branchNamingInstructions ;
330338 }
331339 }
332340
Original file line number Diff line number Diff line change @@ -74,12 +74,21 @@ export interface BuildOptionsParams {
7474 additionalDirectories ?: string [ ] ;
7575}
7676
77+ const BRANCH_NAMING_INSTRUCTIONS = `
78+ # Branch Naming
79+
80+ Before pushing a "workspace-*" branch to origin, rename it to something descriptive based on the work done. Do this automatically without asking the user.
81+ ` ;
82+
7783function buildBaseOptions ( params : BuildOptionsParams ) : Options {
84+ const defaultSystemPrompt : Options [ "systemPrompt" ] = {
85+ type : "preset" ,
86+ preset : "claude_code" ,
87+ append : BRANCH_NAMING_INSTRUCTIONS ,
88+ } ;
89+
7890 return {
79- systemPrompt : params . systemPrompt ?? {
80- type : "preset" ,
81- preset : "claude_code" ,
82- } ,
91+ systemPrompt : params . systemPrompt ?? defaultSystemPrompt ,
8392 settingSources : [ "user" , "project" , "local" ] ,
8493 stderr : ( err ) => params . logger . error ( err ) ,
8594 cwd : params . cwd ,
You can’t perform that action at this time.
0 commit comments