Gate auto-merge: let an AI agent ship code only when it's safe
A calibrated gate that decides whether an AI agent's PR is safe to merge unsupervised — and escalates to a human when it isn't. CI is the verifier.
The problem
Coding agents open PRs faster than anyone can review them. Auto-merging everything ships bad code; reviewing everything defeats the point of the agent. You need to auto-merge the ones that are actually safe and route the rest to a human.
Is this PR trustworthy enough to merge without a human, or should it be escalated to review?
CI on main + whether the change was reverted — a fully automatic signal.
cell: auto_merge
The code
Zero-dependency SDK. Mint a key on your dashboard and drop this in.
from warmwinter import WarmWinter
ww = WarmWinter(api_key="ww_YOUR_KEY",
base_url="https://api.warmwinter.io")
# Gate: is this PR safe to merge unsupervised?
merged = ww.guard(
domain="agent", decision_type="auto_merge",
stated_confidence=ci_confidence(pr), stakes="high",
cheap=lambda: auto_merge(pr), # trusted path
escalate=lambda: request_review(pr), # safe fallback
verify=lambda _: ci_passes_on_main(pr), # auto-reports the outcome
)import { WarmWinter } from "./warmwinter";
const ww = new WarmWinter({ apiKey: "ww_YOUR_KEY", baseUrl: "https://api.warmwinter.io" });
// Gate: is this PR safe to merge unsupervised?
const merged = await ww.guard({
domain: "agent", decisionType: "auto_merge",
statedConfidence: ciConfidence(pr), stakes: "high",
cheap: () => autoMerge(pr), // trusted path
escalate: () => requestReview(pr), // safe fallback
verify: () => ciPassesOnMain(pr), // auto-reports the outcome
});Why it works
The gate returns act only where it has verified — against your own resolved outcomes — that this kind of action is trustworthy; otherwise it escalates or abstains. Stakesraise the bar for riskier actions. Nothing is graded on volume — only on outcomes that actually resolved. There is no global accuracy number; trust is per cell. That calibrated humility is the point: the system tells you where it doesn't know yet.
Wrap this call in about five minutes. Free to start.
Get your API key →