#!/bin/sh
# Rosea commit-msg hook — CLAUDE.md §5.2: NO AI ATTRIBUTION IN COMMITS, EVER.
# Imported from Ludus; NoAlgoTube needed a history rewrite to remove 18 of these.

msg_file="$1"

if grep -qiE '^(Co-Authored-By:.*(Claude|Anthropic|GPT|Copilot|Codex))|Claude-Session:|Generated with \[Claude Code\]|🤖 Generated with' "$msg_file"; then
	echo "BLOCKED: commit message contains an AI attribution trailer." >&2
	echo "  Strip the trailer and commit again (CLAUDE.md §5.2)." >&2
	exit 1
fi

exit 0
