commit_gate: no wandering off with a dirty tree
Stops an AI from finishing a task while leaving its changes uncommitted.
how it works
Stop hook that keys on files this session actually edited (parsed from transcript Edit/Write calls) rather than cwd git status, so it never fires on repos the agent only read; blocks and lets the model write the commit.
Agent hook: A script that runs automatically at a moment in an AI session (before a command, when it stops) to steer or guard it.