// POLICY GATES

Policy gates

Policies decide how much Leroy does on its own. Every piece of work passes three gates — picking it up, starting to code, and shipping the PR — and at each gate Leroy either runs on Auto or waits for you. You set this once, then refine it per source or per repo as you build trust.

01 The three gates

Each gate has two settings: Auto — Leroy keeps going — or Always ask — Leroy pauses and the ticket lands in your Needs you queue until you approve.

01IntakePicking up work · before triage
Auto
Leroy triages new work the moment it arrives.
Always ask
New tickets wait for your go-ahead before Leroy looks at them.
02PlanStarting to code · after the plan is ready
Auto
Coding starts as soon as the plan is ready.
Always ask
Leroy shows you the plan and waits for your approval before writing any code.
03ShipShipping the PR · before merge
Auto
Leroy merges the pull request once its checks pass.
Always ask
The PR waits for your review and approval before it merges.

When a gate is set to Always ask and fires, the ticket pauses at a named review status — intake review, plan review, or in review at ship — and waits in your Needs youqueue with exactly what it's waiting on. Nothing is lost; it sits there until you act.

02 Set once, refine by source & repo

You set a baseline for the whole account, then override it where you need to. The most specific rule wins:

1
Account default
Your baseline for every gate, across all work.
2
By source
Override per origin — e.g. From Sentry, plan: Always ask. Beats the account default for that source.
3
By repo
Override per repository — e.g. On payments-api, ship: Always ask. Beats both the source rule and the account default.
i
Try it. On the Policies screen, run any ticket through the resolver — pick a source, repo, and changed files — and Leroy shows exactly which gates fire and which rule decided each one. It uses the same logic that runs in production, so what you see is what you get.

03 Presets

Start from a preset and adjust — or click one any time to reset all three gates at once.

Cautious
Asks at all three gates. Best while you're learning to trust Leroy.
intake: askplan: askship: ask
Balanceddefault
Picks up and plans on its own, asks before shipping the PR.
intake: autoplan: autoship: ask
Autonomous
All three gates on auto. Hard stops still apply.
intake: autoplan: autoship: auto

04 Hard stops

Two safeguards apply no matter how the gates are set — even in full Autonomous mode:

Spend cap per task

Set a dollar cap per ticket. If a piece of work runs over it, Leroy stops, marks the ticket stuck, and asks you before spending more.

Risky paths

List file globs that should always get a second look — billing/**, auth/**, infra config. If a change touches one of them, Leroy pauses for your approval before shipping, even when Ship is on Auto.

!
Hard stops can't be auto'd away. They sit above the gates — a cost overrun or a risky-path change always waits for you.

05 Trusted teammates

Tickets a teammate files from the web app skip the intakegate by default — they're a trusted human, not an inbound signal to triage. If someone's submissions need a closer look, flip them to gated on the team screen and their tickets go through intake review like everything else. (This applies to intake only, and only to tickets created in the app.)