protected-commit
Installation
SKILL.md
protected-commit
The gate is content-bound and fails closed. Read what it told you, then use the owning command — or stop and say the path is currently unreachable.
What the gate actually is
scripts/protected-state-check.js runs on every pre-commit (lefthook job
protected-state, no glob, so it sees every commit). For each staged file it
calls assertProtectedWriteAllowed, and any file that matches a protected
surface needs a one-time, content-bound Kernel capability issued for the
exact actor, worktree, surface, path, bytes, and source HEAD.
[verified 2026-08-13 — lib/protected-state-authority.js]
Ask the code which surface a path is on rather than guessing:
node -e "console.log(require('./lib/protected-state-surfaces').assertProtectedWriteAllowed('AGENTS.md'))"