diff --git a/memory/2026-02-27-claude-code-attribution-hook.md b/memory/2026-02-27-claude-code-attribution-hook.md new file mode 100644 index 000000000..b8eee5fbf --- /dev/null +++ b/memory/2026-02-27-claude-code-attribution-hook.md @@ -0,0 +1,13 @@ +# 2026-02-27 Session Notes + +## Claude Code Attribution Hook + +Initiated implementation of a PreToolUse hook to block git commits containing Claude Code's automatic "Co-Authored-By: Claude " attribution. The plan involves two tasks: + +1. **Hook Script Creation** - A bash script at `~/.claude/hooks/block-coauthor.sh` that reads JSON from stdin, extracts the command via `jq`, checks for `git commit` operations, and scans for the Co-Authored-By pattern (case-insensitive). Denies execution if found, allows otherwise. + +2. **Settings Registration** - Adding a PreToolUse entry to `~/.claude/settings.json` hooks object with matcher "Bash", 5-second timeout, and status message. + +Examined existing settings.json structure which already has hooks configured for SessionStart, UserPromptSubmit, and SessionEnd via signet commands. The PreToolUse hook will follow the same pattern structure. + +Session ended after reading settings.json; implementation of the hook script and settings update pending. \ No newline at end of file diff --git a/memory/memories.db-shm b/memory/memories.db-shm index f013119ef..ac4bec0c1 100644 Binary files a/memory/memories.db-shm and b/memory/memories.db-shm differ diff --git a/memory/memories.db-wal b/memory/memories.db-wal index f2fca318a..9645339f7 100644 Binary files a/memory/memories.db-wal and b/memory/memories.db-wal differ