Guide

Quality gates for coding agents

One contract in the repo, one hook at commit, and the same verdict for every agent.

What a quality gate is for

A quality gate is a point where work stops unless it shows proof. Instructions in a rules file ask an agent to behave, and most of the time it does. A gate does not ask: the commit or the pull request is refused until the owed checks pass, whichever agent wrote the change.

Where the gates go

Before an edit
headron port <file> gives an agent the route, the gates and the lessons for a file.
While working
headron gate <file> names the checks that file owes, and headron verify --changed evaluates what was modified.
At commit
A git hook runs the same check-only command for any agent, IDE extension, chat assistant or developer.
On the pull request
A reusable CI workflow runs the same contract, and drift fails the pull request.
Before you call it done
headron verify gives the final full verdict and names every check that did not run.

Set it up

uv tool install headron-software && headron doctor
cd your-repo && headron init
headron verify
headron init adds the contract and the agent wiring in one step. Target a change class when you know it, such as headron verify --changed --change security_sensitive.

How each agent picks it up

Claude Code
Reads CLAUDE.md, which points at the contract.
Codex, GitHub Copilot, Cursor, OpenCode
Share the root AGENTS.md, so no policy is duplicated per tool.
Antigravity, Junie, Hermes, VS Code
Each has a thin adapter that tells it where to enter. The rules stay in atlas.yaml.
Any MCP client
Connects to the Headron MCP server for read-only routing and docs.
Chats with no tools
Can route a named file and name its declared gates, without inventing commands.

Show the gate in your README

If your repository is gated by Headron, this badge tells contributors and their agents to expect it. It states that the gate exists, not that any particular commit passed.

Gated by Headron

[![Gated by Headron](https://headron.tech/assets/gated-by-headron.svg)](https://headron.tech/coding-agent-quality-gates.html)

Questions

Is a pre-commit hook enough for AI agents?

It is the fastest place to refuse, but git lets anyone skip a hook with a flag. Run the same contract in CI as well, so a skipped hook still meets the gate on the pull request.

Do agent rules files enforce anything?

No. A rules file is an instruction, and an instruction is not a sandbox. Use it to tell an agent what to do, and use a hook or CI to refuse what it should not land.

What happens when a check's tool is not installed?

Headron reports the check as SKIP and keeps it out of the pass count, so a missing tool can never read as a pass.

Do I have to change agents to use this?

No. Agents keep their own models and tools. The contract and the hook live in the repository, so any agent that commits there meets the same gate.

Related guides

Start

Run the free, MIT-licensed verifier or connect through MCP. Mind API adds hosted planning for agents and chats through your Headron account.