Adds a PreToolUse(Bash) hook (block-backslash-winpath.sh) that rejects commands
redirecting/writing to a backslashed Windows drive path (e.g. > D:\claudetools\
.claude\current-mode). On Git Bash those strip the backslashes and PUA-substitute
':' (U+F03A), creating garbled junk files that have repeatedly polluted the repo.
The hook quote-strips the command first, so the pattern appearing inside strings
or commit messages does not false-trigger; Windows-tool args (icacls, pwsh -File)
and forward-slash/relative paths pass. Wired into settings.json so every machine
picks it up on /sync. Pairs with the sync.sh staging guard.
Also: CLAUDE.md note on the Windows mode-write path; record jq install on GURU-KALI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The UserPromptSubmit hook only probed D:/claudetools and C:/claudetools, so
on machines where the repo lives elsewhere (e.g. BEAST at
C:/Users/guru/ClaudeTools) no candidate matched and the for-loop's final test
returned 1 — surfacing a hook error on every prompt AND skipping coord-message
delivery. Now try $CLAUDE_PROJECT_DIR and $HOME/ClaudeTools first (keep D:/C:
for other layouts) and end with `true` so a missing script is a no-op, not an
error.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hook now tries D:/claudetools then C:/claudetools so it works on both
Mike's machine and Howard's without either needing machine-local config.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>