The modern merge queue solution
Speed up your CI and merge with agents
Merge the moment PR checks pass. When main breaks, an agent finds the cause and opens the repair PR. No queue, no rebuilds, no waiting.
Build your software factory
- CI cost
- ⅓ the spend
- Merge speed
- 2× faster
Setup
Get Turnstile running in six steps
Turnstile enforces from day one. PRs merge as soon as their own checks pass, and when main breaks, an agent finds the cause and opens the fix.
Before you start
- Your CI runs on GitHub Actions for
pull_requestand for pushes to the default branch. - You’re an admin on the repo.
- You have Node.js installed, for
npx. - You have an Anthropic API key for the repair agent.
-
Install
Install the GitHub App
Choose the repo you want to speed up. Turnstile reads your recent CI runs to learn what’s already broken on main.
Install on GitHub -
Install
Generate the setup PR
In a local checkout of the repo, run:
npx @withturnstile/cli setup --server https://<your Turnstile host>This command:
- reads which checks your default branch requires today,
- adds a
turnstile-verdictjob to each CI workflow, - adds a
.github/turnstile.ymlconfig file, - opens a PR with those changes and a checklist you’ll use in step 5.
Don’t merge it yet. Steps 3 and 4 add to the same PR.
-
Repair agent
Add the repair agent
When main breaks, this agent finds the commit that broke it and opens a fix PR.
- Copy the repair workflow into
.github/workflows/on the setup PR’s branch. Set its install command so the agent can run your tests. - In the repo’s Settings → Secrets and variables → Actions, add your Anthropic API key as
ANTHROPIC_API_KEY.
- Copy the repair workflow into
-
Configure
Turn on enforcement and repairs
On the same branch, set these in
.github/turnstile.yml:mode: enforce fix: enabled: trueSmall repair PRs, under 20 changed lines by default, merge on their own once Turnstile passes them. Larger ones stay open and tag the author of the change that broke main. To review every repair by hand, add
auto_merge_under_lines: 0underfix.Now merge the setup PR.
-
Branch rules
Update your branch protection
For your default branch, make these changes. The setup PR lists the exact check names:
- Require the
Turnstile verdictchecks. - Stop requiring the CI checks they cover. Those keep running and still show on PRs.
- Turn off the merge queue.
- Turn off Require branches to be up to date before merging.
- In the repo’s general settings, turn on Allow auto-merge so small repairs can merge.
To roll back, restore your old required checks and set
mode: observeandfix.enabled: false. - Require the
-
Maintain
Keep the checks in sync
Whenever you add or remove a CI job, run:
npx @withturnstile/cli syncPut it in a pre-commit hook or your
AGENTS.mdso nobody has to remember.
Prefer a single check? Skip the CLI in steps 2 and 6. Commit .github/turnstile.yml yourself with your CI workflows listed under workflows:. Then in step 5, require the App’s turnstile check instead.