@@ -2557,6 +2557,42 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
25572557 } ) ,
25582558 ) ;
25592559
2560+ it . effect ( "includes CLAUDE.md for Claude writers only when it differs from AGENTS.md" , ( ) =>
2561+ Effect . gen ( function * ( ) {
2562+ const repoDir = yield * makeTempDir ( "t3code-git-manager-" ) ;
2563+ yield * initRepo ( repoDir ) ;
2564+ NodeFS . writeFileSync ( NodePath . join ( repoDir , "AGENTS.md" ) , "Use imperative subjects.\n" ) ;
2565+ NodeFS . copyFileSync ( NodePath . join ( repoDir , "AGENTS.md" ) , NodePath . join ( repoDir , "CLAUDE.md" ) ) ;
2566+ NodeFS . writeFileSync ( NodePath . join ( repoDir , "README.md" ) , "hello\n" ) ;
2567+ const commitInstructions : Array < string | undefined > = [ ] ;
2568+
2569+ const { manager } = yield * makeManager ( {
2570+ serverSettings : {
2571+ textGenerationModelSelection : {
2572+ instanceId : ProviderInstanceId . make ( "claudeAgent" ) ,
2573+ model : "claude-sonnet-4-5" ,
2574+ } ,
2575+ } ,
2576+ textGeneration : {
2577+ generateCommitMessage : ( input ) => {
2578+ commitInstructions . push ( input . policy ?. commitInstructions ) ;
2579+ return Effect . succeed ( { subject : "Update readme" , body : "" } ) ;
2580+ } ,
2581+ } ,
2582+ } ) ;
2583+
2584+ yield * runStackedAction ( manager , { cwd : repoDir , action : "commit" } ) ;
2585+
2586+ NodeFS . writeFileSync ( NodePath . join ( repoDir , "CLAUDE.md" ) , "Mention the Claude provider.\n" ) ;
2587+ NodeFS . writeFileSync ( NodePath . join ( repoDir , "README.md" ) , "hello again\n" ) ;
2588+ yield * runStackedAction ( manager , { cwd : repoDir , action : "commit" } ) ;
2589+
2590+ expect ( commitInstructions [ 0 ] ) . toContain ( "Local AGENTS.md:\nUse imperative subjects." ) ;
2591+ expect ( commitInstructions [ 0 ] ) . not . toContain ( "Local CLAUDE.md:" ) ;
2592+ expect ( commitInstructions [ 1 ] ) . toContain ( "Local CLAUDE.md:\nMention the Claude provider." ) ;
2593+ } ) ,
2594+ ) ;
2595+
25602596 it . effect ( "falls back when the dedicated source control writer is unavailable" , ( ) =>
25612597 Effect . gen ( function * ( ) {
25622598 const repoDir = yield * makeTempDir ( "t3code-git-manager-" ) ;
0 commit comments