A transit authority wants no code from its coding agent to reach the repository unless the automated test suite passes, and needs an enforcement point that runs automatically around the commit step. Which Antigravity mechanism should the team configure to enforce this gate?
Select an answer to reveal the explanation.
Short Explanation
A hook is like the turnstile at a subway platform — it doesn't ask nicely, it just physically stops you if you haven't paid. Instructions and reminders rely on the agent choosing to comply every single time, but a hook wires the check straight into the commit action itself, so failing tests never even get the chance to land. That's the difference between hoping the gate holds and building it so it can't be skipped.
Full Explanation
The mechanism is automated enforcement at a lifecycle event: a hook attaches to the commit action itself and runs the test suite as a gate, so a failing run blocks the commit before it ever completes, regardless of what the agent "intends" to do. A skill supplies knowledge the agent can draw on for review-style tasks, but it's advisory — it doesn't execute anything automatically or physically prevent a commit from happening. A rules file shapes the agent's behavior and instructs it to run tests first, which is closer, but it's still a behavioral instruction the agent follows rather than a hard-wired gate; a reasoning slip or a shortcut under pressure can bypass an instruction in a way it cannot bypass code that runs automatically. A subagent dedicated to reminding the primary agent adds a coordination step but still depends on the primary agent choosing to listen, so it inherits the same weakness as an instruction rather than closing it. The scope caveat: a hook enforces the specific event it's attached to, so a policy meant to gate multiple steps (commit, merge, deploy) needs a hook configured at each relevant point. Operational check: attempt a commit with a deliberately failing test locally and confirm the commit is actually rejected, not merely logged.