guard.mjs
- Event: PreToolUse Bash/PowerShell
- Type: wall: blocks the action and says why (exits with code 2)
- Escapes:
SENZU_ALLOW_DELTEST=1·SENZU_ALLOW_LOGO=1(always with explicit approval, recorded in the devlog)
What it does
Section titled “What it does”Looks at what is EXECUTED, not what is quoted (commit messages, heredocs to a file, echo, grep). BLOCKS: git push to a main branch, forced or without seeing which branch it goes to (to working branches, yes), writing, moving, deleting or restoring the sealed conventions from the terminal (no escape for the agent), destructive DB/git commands, rm -rf, deploy to prod without approval (escape SENZU_ALLOW_DEPLOY=1), logo generators once a logo is chosen (SENZU_ALLOW_LOGO=1), jQuery/Bootstrap (SENZU_ALLOW_LIB=1), dangerous devops (curl|bash, chmod 777, dd, mkfs, docker prune, stopping services, flushing the firewall, crontab -r); commits: protected branch, Conventional ≤72, no co-authors.