What every pull request passes
GitHub runs one workflow, ship, on each ready pull request. Every job runs on a self-hosted runner. A first job, route, picks the runner for gates. Then four stages run in order, gates, review, verify and land. Each runs an agents-git command that sets a check run on the pull request’s head commit. A job fails closed unless the stage before it left a pass marker for the same head. The workflow runs as main has it, never as the pull request has it, so a branch cannot rewrite the stages that judge it. A draft pull request runs no stage.
The pull request’s policy is ops/policies/agents.json. The rest of this page says what that file asks for.
agents/gates covers everything a script can judge, before any model reads the change. agents-git gates runs these.
- The static gates, on the diff from the merge base, with the policy from
main. What the runner checks on a change lists each one. - The pull request text rules from Send a change through the loop.
- A scan of each new commit and of the pull request’s text for secrets, personal details and banned names.
- The box commands, which are
typecheck,typecheck-app,lint,style,names,enforcement, which istest/step0.ts, androutes, which istest/step37.ts, so every route, shape, page and agent tool needs its line in the feature map’ssurface.json. They run withmain’s copy of the lint and compiler config,test/names.ts,test/step0.ts,test/style.tsand the policy, so a change cannot loosen what judges it.test/step37.tsruns from the change’s own head, so a change that fixes the route detector is judged by its fix. - Each changed check that carries
// runs-in: box, run onmain’s code, where it must fail, and on the change, where it must pass.
review
Section titled “review”agents/review is a review by Codex, on a different model than the one a commit’s Co-Authored-By trailer names. Codex reads the change in a clean, read-only copy of main, with the brief in .claude/skills/review.md and the pull request’s text, and answers in a fixed shape. The brief tells it to read AGENTS.md and the coding standards first, and to judge the change by them. A regression is always blocking, and so is a bug, a check that cannot fail for the defect it names, and a security, auth, billing, data, migration or concurrency problem.
- The findings go on the pull request as a review, and the blocking ones sit on their lines.
- A model with no room gets one more try after a wait, then the fallback model. If neither answers, the line stops.
- Codex’s usage limit on the account stops the line on the try that hits it, since the fallback model shares the login. The stop names the limit, gives the time Codex said and the command that starts the review again. The session has nothing to fix, and a person starts the run again. A limit on one model gets the usual tries.
- A patch that already has a review keeps it, so the same change is not asked twice.
- The reviewer reads the diff of each protected path in full and names each one in its answer.
agents-git reviewrefuses an answer that leaves one out. - A finding about security, auth, billing, data, migrations or concurrency is judged like any other, and a blocking one stops the land until a fix has been reviewed again.
verify
Section titled “verify”agents/verdict is a verdict from a fresh agent on Claude, on another model than the author’s. It drives the change on a private copy of Agents, with a database of its own, using main’s verify-agents skill and feature map. It gives a verdict for each feature the change touches. The verdict must reach the policy’s floor for what the change touches.
- A change to code needs
unit-test-verified. - A change to documents only needs none.
- A change under
app/ordesktop/needslive-ui-verified. A feature it touches whose file on main has no step run withbin/agentsctl browserorbin/agentsctl desktophas no screen to drive, so that feature needslive-api-verified, unless the change touches one of that feature’s own paths underapp/ordesktop/, no other feature it touches needslive-ui-verified, or its map takes a changed path from the feature main gives it to. A feature new on the branch needslive-ui-verified.
When main moves under a pull request that passed, verify runs again, but a check’s pass can stand. It stands when main’s rule files are unchanged, land’s merge of the new main into the head the check passed on gives this head’s tree, and main’s change touched neither the check’s own file nor a path of a feature that lists it. Any change of the pull request’s own runs every check again. A path no feature lists keeps no pass, unless it is under docs/ or is a step file. The loop’s own tools, the policy, a rule file, a package file and a file under test/ that is no step file each keep no pass either. A check that runs again runs in full, and the verdict names each group of passes it kept, with main’s two commits, and each that ran again, with why. A walk stands only on the same merge base, or across a move of main by docs, the loop’s files and step files nothing an instance runs names.
The evidence goes to a verify-evidence artifact on the workflow run.
land reads every open pull request that is not a draft, oldest first. It squash-merges the oldest one whose agents/gates, agents/review and agents/verdict have passed on a head up to date with main. It skips one with a failed check, and one whose checks still run keeps no other from landing. Each pass needs a seal that only a run of main’s ship.yaml can upload, since a pull request’s own workflow can set a check run too.
- A pull request behind
mainis brought up to date with a merge thatlandmakes itself, and its stages run again. A conflict in a file the policy lists as append-only is resolved by joining both sides’ lines. Any other conflict stops that pull request for a person and names each file. One that is already up to date withmainstill lands. - With none to merge,
landbrings up to date the oldest pull request that passed, unless an older one is up to date and still running. After a land it brings up to date the oldest other one that passed or, with none, the oldest with no failed check, and thefollowworkflow pullsmaininto the main checkout.
No person waits in this line. The author runs agents-git finish --ready, which pushes and marks the pull request ready, and the loop does the rest.
The whole suite
Section titled “The whole suite”The whole suite, npm run check, does not run on each pull request. agents-git nightly runs it on GitHub’s main unless that tree already has a pass, records a pass by tree in ~/.agents-app/ship/suite-passes.jsonl, and opens one issue for each red tree. agents-git suite --ref <commit> runs it on any commit and records a pass the same way. agents-git suite <pr> --budget <seconds> runs it on what the squash merge would put on main, in two parts, and starts only when more than 30% of memory is free.
Protected paths
Section titled “Protected paths”A change that touches a protected path is named for the reviewer, with its diff. The policy lists them under protectedPaths. They fall into these groups.
- The rules agents read, such as
AGENTS.md,CLAUDE.mdand.claude/**. - The lint, compiler and package config, such as
eslint.config.js,tsconfig*.jsonandpackage.json. - The checks that guard the rules, such as
test/names.tsandtest/style.ts. - The framework’s own code, under
shared/gates/and in files such asshared/policy.tsandserver/runner.ts. - The loop’s own tools, under
daemon/agents-git/, itshooksfolder included. These are the gates, review, verify and land commands and the session hooks. - The schema, in
server/migrations/. - The sandbox and deploy files, under
ops/,box/and incompose.yaml. - The workflows GitHub runs the loop from, under
.github/.
GitHub refuses a push that changes .github/workflows from a login that may not change workflows, and finish says so.
Who may merge
Section titled “Who may merge”main changes only through a pull request on GitHub, and branch protection holds that for everyone, admins included. The before-tool hook refuses gh pr merge and a push to main in a copy. Only land merges.