Protect Main Branch
Advisory only. It is skill text, and nothing stops a violation.
Acts on
Agent instructions
When
As instructions the agent reads
Tested
4 of 4 pass
In a git repo
At commit
What it does
Keeps agents off main and master: a git hook reads the current branch at commit time and parses the refs being pushed at push time. The hook refuses a violation only where it is installed. As skill text alone this is advice, and nothing stops one.
Chock adds friction. It is not a security boundary.
Advisory inside the agent. In a repo set up with chock init, chock enforces it at commit.
Its label on each agent
The catalog grades each policy on each agent. Pick an agent to build with this policy:
- Claude Code TestedAdvisory Advisory only. It is skill text, and nothing stops a violationBuild →
- Cursor TestedAdvisory Text only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declaresBuild →
- Codex TestedAdvisory Text only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declaresBuild →
- GitHub Copilot TestedAdvisory Text only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declaresBuild →
- Devin TestedAdvisory Text only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declaresBuild →
- Grok Tested Not graded yet for GrokBuild →
- goose Tested Not graded yet for gooseBuild →
- Antigravity Tested Not graded yet for AntigravityBuild →
- OpenHands Untested Not graded yet for OpenHandsBuild →
- Kimi Code Untested Not graded yet for Kimi CodeBuild →
- Factory Droid Untested Not graded yet for Factory DroidBuild →
See it in action
Refused
The agent is on main and runs git commit.
Allowed
The agent is on a feature branch and commits.
Both examples are this policy's own test cases.
What it misses
This policy does not state what it misses.
Latest change
0.0.4 · · Description wording only (IR-F4): it said the policy is enforced, but on every agent client the plugin carries skill text only and an agent can commit on main. It now says what the git hook checks and that skill text alone is advice. Behaviour unchanged.