- Moved all hookify configuration files from `.claude/` to `.claude/hooks/` subdirectory for better organization - Added four new blocking hooks to prevent common error handling anti-patterns: - `block-broad-exception-handler`: Prevents catching generic `Exception` with only logging - `block-datetime-now-fallback`: Blocks returning `datetime.now()` as fallback on parse failures to prevent data corruption - `block-default
898 B
898 B
name, enabled, event, action, pattern
| name | enabled | event | action | pattern |
|---|---|---|---|---|
| block-makefile-bash | true | bash | block | (>>?\s*Makefile|sed\s+.*-i.*Makefile|sed\s+-i.*Makefile|perl\s+-[pi].*Makefile|tee\s+.*Makefile|(mv|cp)\s+\S+\s+Makefile\b|>\s*Makefile) |
🚫 BLOCKED: Bash Command Modifying Makefile
You are attempting to modify the Makefile via a bash command.
Blocked operations include:
- Redirection:
echo ... > Makefile,cat ... >> Makefile - In-place edits:
sed -i ... Makefile,perl -pi ... Makefile - File writes:
tee ... Makefile - File moves/copies:
mv ... Makefile,cp ... Makefile
Allowed operations:
- Reading:
cat Makefile,head Makefile,tail Makefile - Searching:
grep ... Makefile - Running targets:
make <target>
If you need to modify the Makefile:
- Ask the user for explicit permission
- Explain what change is needed and why
- Wait for approval before proceeding