From 9da52de8ea53911e6ab825632aec0747501df19b Mon Sep 17 00:00:00 2001 From: Eric Dahl Date: Sun, 3 May 2026 23:36:09 -0400 Subject: [PATCH] chore(git): strip Cursor co-author trailers in prepare-commit-msg Runs after beads; removes Co-authored-by/Made-with Cursor lines so agent commits stay human-only. --- .beads/hooks/prepare-commit-msg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.beads/hooks/prepare-commit-msg b/.beads/hooks/prepare-commit-msg index f0aec3c..d8ba711 100755 --- a/.beads/hooks/prepare-commit-msg +++ b/.beads/hooks/prepare-commit-msg @@ -22,3 +22,12 @@ if command -v bd >/dev/null 2>&1; then if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi fi # --- END BEADS INTEGRATION v1.0.3 --- +# Drop Cursor agent trailers (IDE may inject despite Cursor Settings → Agent → Attribution). +if [ -n "${1:-}" ] && [ -f "$1" ]; then + _strip_tmp="$1.strip.$$" + if grep -vE '^Co-authored-by: Cursor|^Made-with: Cursor' "$1" > "$_strip_tmp" 2>/dev/null; then + mv "$_strip_tmp" "$1" + else + rm -f "$_strip_tmp" + fi +fi