What problem does it solve? Agent instructions written in prose often lose to competing context the agent has read. When an agent repeatedly breaks a rule despite instructions, moving that rule into code—permission checks, hooks, or script guards—makes enforcement deterministic and unavoidable. ## Core Features & Use Cases - Permission Rules: Block commands by pattern (e.g., Bash(gh repo delete *)) checked against every subcommand, even inside loops and subshells. - PreToolUse Hooks: Guard irreversible or public actions (GitHub deletes, npm publishes) by scanning command text and inline scripts before execution. - Commit Identity Guard: Prevent commits authored with a forbidden email address while still allowing searches for that address. - Use Case: An agent keeps deleting production posts by mistake. Wire a hook that asks before any public delete runs, forcing explicit human approval for each one-way door. ## Quick Start Copy the guard scripts into .claude/hooks/, replace the example rules with your own one-way doors and blocked identities, run the test file to validate them, then wire both hooks in .claude/settings.json with PreToolUse matchers and onFailure: block.