diff --git a/memory/2026-02-27-block-co-authored-by-attribution-hook.md b/memory/2026-02-27-block-co-authored-by-attribution-hook.md new file mode 100644 index 000000000..7cdfbe88e --- /dev/null +++ b/memory/2026-02-27-block-co-authored-by-attribution-hook.md @@ -0,0 +1,19 @@ +# 2026-02-27 Session Notes + +## Block Co-Authored-By Attribution Hook + +Nicholai requested implementation of a PreToolUse hook to block git commits containing Claude's automatic `Co-Authored-By:` attribution. The plan specifies creating a bash script at `~/.claude/hooks/block-coauthor.sh` that: + +- Reads PreToolUse JSON payload from stdin +- Extracts the git command via jq +- Searches for the pattern `Co-Authored-By:.*Claude` (case-insensitive) +- Returns `permissionDecision: "deny"` if found, otherwise allows execution + +The hook must be registered in `~/.claude/settings.json` with a 5-second timeout and status message. + +Session work: +- Reviewed existing settings.json structure to understand hook architecture +- Confirmed hook format uses event-based triggers (SessionStart, UserPromptSubmit, SessionEnd) +- Ready to implement both the script and settings modification + +Next steps: Create the hook script and update settings.json configuration. \ No newline at end of file diff --git a/memory/memories.db-shm b/memory/memories.db-shm index 7b9bb788a..d7cac14dd 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 80f2dc41c..6eb08a11b 100644 Binary files a/memory/memories.db-wal and b/memory/memories.db-wal differ