Chock.sh Build your plugin

Policies

Protect Main Branch

Protect Main Branch: what it does, its label on each agent, what it misses, and examples.

Catalog policy protect-main-branch, version 0.0.4, labelled advisory on Claude Code.

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.

On each agent

AgentLabelWhat it does there
Claude CodeAdvisoryAdvisory only. It is skill text, and nothing stops a violation
CursorAdvisoryText only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declares
CodexAdvisoryText only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declares
GitHub CopilotAdvisoryText only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declares
DevinAdvisoryText only in a plugin. Nothing in the plugin stops a violation. The plugin does not carry the enforcement the manifest declares
GrokNot gradedNot graded yet for Grok
gooseNot gradedNot graded yet for goose
AntigravityNot gradedNot graded yet for Antigravity
OpenHandsNot gradedNot graded yet for OpenHands
Kimi CodeNot gradedNot graded yet for Kimi Code
Factory DroidNot gradedNot graded yet for Factory Droid

What it misses

This policy does not state what it misses.

Examples from its eval suite

Refused: The agent is on main and runs git commit.

Allowed: The agent is on a feature branch and commits.

More

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.