Problem
Claude's training pipeline defaults to Co-Authored-By attribution in commits, overriding text rules that say otherwise. The current PreToolUse hooks block dangerous shell commands but have no mechanism to enforce commit message format or trailer conventions.
Proposal
Add a prepare-commit-msg git hook that:
- Strips
Co-Authored-By: Claude lines from commit messages
- Appends the correct trailers (
Coding-Agent:, Model:) if missing
- Works in worktrees (hook path resolution must handle
.git files, not just .git/ directories)
Scope
- Hook install/uninstall via
setup.sh
- Tests for hook behavior (trailer insertion, stripping, worktree safety)
- Configurable trailer values (not hardcoded to a specific model)
Context
Identified during PR #2 audit remediation — the "Generated with Claude Code" default kept leaking into PR bodies and commits despite explicit rules. Text rules reduce the problem; a hook eliminates it.
Coding-Agent: claude-code
Model: claude-opus-4-6
Problem
Claude's training pipeline defaults to
Co-Authored-Byattribution in commits, overriding text rules that say otherwise. The current PreToolUse hooks block dangerous shell commands but have no mechanism to enforce commit message format or trailer conventions.Proposal
Add a
prepare-commit-msggit hook that:Co-Authored-By: Claudelines from commit messagesCoding-Agent:,Model:) if missing.gitfiles, not just.git/directories)Scope
setup.shContext
Identified during PR #2 audit remediation — the "Generated with Claude Code" default kept leaking into PR bodies and commits despite explicit rules. Text rules reduce the problem; a hook eliminates it.
Coding-Agent: claude-code
Model: claude-opus-4-6