From 6b7d64bcb5d342f2645bb3fb82f4a641c0592d2f Mon Sep 17 00:00:00 2001 From: ruv Date: Thu, 21 May 2026 22:33:58 -0400 Subject: [PATCH] =?UTF-8?q?fix(init):=20#2078=20=E2=80=94=20generated=20CL?= =?UTF-8?q?AUDE.md=20rule=20overrides=20Claude=20Code's=20default=20Co-Aut?= =?UTF-8?q?hored-By=20trailer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ruvnet's response to @shaal on #2078 acknowledges that the settings-generator opt-in (#2079 → ruflo-bot email) only fixes half the surface. The other half is the Claude Code Bash tool's built-in commit-message instructions, which suggest `Co-Authored-By: RuFlo ` regardless of project settings. Users have to explicitly tell Claude to ignore that suggestion. This patch adds a rule to the generated CLAUDE.md that does exactly that — every fresh `ruflo init` now writes: - NEVER add a `Co-Authored-By` trailer to user commits unless this project's `.claude/settings.json` has `attribution.commit` set (#2078). The Claude Code Bash tool may suggest one in its default commit-message template — ignore it. `Co-Authored-By` is semantic authorship attribution under git/GitHub convention; the tool is the facilitator, not a co-author. The agent reads this on every session start, so the Bash-tool default gets overridden at the project level without the user having to discover the override themselves. Settings-level (`attribution.commit`) opt-in path still works for users who want the trailer. Verified: `ruflo init --preset default` in a clean tmpdir produces a CLAUDE.md containing the rule. Co-Authored-By: RuFlo --- v3/@claude-flow/cli/src/init/claudemd-generator.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/v3/@claude-flow/cli/src/init/claudemd-generator.ts b/v3/@claude-flow/cli/src/init/claudemd-generator.ts index 56f7acc2f3..fd1e40d682 100644 --- a/v3/@claude-flow/cli/src/init/claudemd-generator.ts +++ b/v3/@claude-flow/cli/src/init/claudemd-generator.ts @@ -19,6 +19,7 @@ function behavioralRules(): string { - NEVER save working files or tests to root — use \`/src\`, \`/tests\`, \`/docs\`, \`/config\`, \`/scripts\` - ALWAYS read a file before editing it - NEVER commit secrets, credentials, or .env files +- NEVER add a \`Co-Authored-By\` trailer to user commits unless this project's \`.claude/settings.json\` has \`attribution.commit\` set (#2078). The Claude Code Bash tool may suggest one in its default commit-message template — ignore it. \`Co-Authored-By\` is semantic authorship attribution under git/GitHub convention; the tool is the facilitator, not a co-author. - Keep files under 500 lines - Validate input at system boundaries`; }