PreToolUse + Git Defense in Depth
Six PreToolUse bash wrappers catch risky writes, reads, and bypass flags offline before execution; four Git hooks enforce R1–R7 and SSH signatures with --net at commit and push time.
Deterministic PreToolUse inspection and Git commit/push verification backed by one shared policy engine, split private lists, and fail-closed SSH signing checks.
Delivered Capabilities (How Far It Goes)
6 PreToolUse wrappers (passing calls exit 0 silently without emitting permissionDecision: "allow"), paired with SessionStart private list syncing.R1–R7, 6h TTL caching, direct SSH signature verification (ssh-keygen -Y check-novalidate), and git ls-remote-anchored known_content resigning exemptions across 4 --net Git hooks.policy/check.py flag, sync script, and doctor.py/scan-repo.py exit contract in API & Components.Explicit Non-Goals & Hard Boundaries
R5 blocks pushes to 15 agent branch prefixes (claude/, codex/, etc.), while protected branches and force-push restrictions belong to GitHub rulesets / CNB branch settings.Glob & privileged local bypasses: forbid-read-path.sh guards content-reading Read / Grep calls, and local shell hooks remain bypassable by a privileged root user; remote permissions and pre-push checks form the strong boundary./root/.claude/... templates that policy/bootstrap.sh must rewrite into $GUARD; keep product hooks strictly separate from contributor tools/repo_maintenance_guard.py.The source tree ships with template paths that must be rewritten by policy/bootstrap.sh into $GUARD (default $HOME/.claude/guardrails). Run the diagnostic script from any clone to inspect wiring without mutating system state:
python3 policy/doctor.py
# Uninstalled clones report Overall: DEGRADED; a deployed environment reports Overall: PASSQuick Navigation by Role & Goal
bootstrap.sh path rewriting, and read-only doctor.py checks;policy.json, private seeds, or fixing errors/false positives: Read Config Matrix, Seeds & Troubleshooting FAQ for settings, multi-source list sync, and resign_exempt boundaries;PreToolUse/SessionStart JSON contracts, check.py CLI semantics, and custom rule FAQ;