Action types

Hold the prod deploy for a named human

Your coding agent can branch, commit and merge at full tilt. The one step that reaches customers, the production code.deploy, waits for a person to sign off, and every release lands on a signed record.

code.deploycode.mergeinfra.migraterequest_clearancecb.guard({ action }, fn)
✦✦✦ AI agents code.deploy cleared

The problem

An agent that opens PRs and ships them is great until the night it pushes an unreviewed migration to prod, or auto-merges its own change off a flaky green build. So teams yank its deploy rights. Now a human is back to rubber-stamping every dependency bump and one-line copy fix, which is exactly the toil you bought the agent to kill.

The code itself isn't the scary part. The scary part is the instant it hits production. You want the agent free below that line, branch, commit, open the PR, merge to staging, and you want one person, by name, accountable for the release. Plus a record that says who cleared which commit, to which environment, and when.

How ClearedBy handles it

  1. 01

    The agent asks before it ships to prod

    When a release is ready, the agent calls request_clearance with the deploy it wants: service, environment, commit SHA, the diff or PR link. That call blocks on a verdict, so there's no ai-code-deploy-approval that quietly routes around the gate.

  2. 02

    Your policy clears the dull stuff, holds the rest

    Docs sites, non-prod environments, a green pipeline during work hours: cleared in milliseconds. A production code.deploy, anything carrying a DB migration, or a touch to a protected service gets held for a named reviewer.

  3. 03

    Someone clears the release

    The reviewer reads the diff, the target environment and CI status from a fast queue, Slack, or their phone, then approves, rejects, or sends it back. Approval is the only thing that hands the agent a short-lived credential to run the deploy. No standing prod access ever sits with the bot.

  4. 04

    Every release is sealed to a signer

    Cleared, auto-cleared or rejected, each code.deploy is written into a tamper-evident, hash-linked record bound to the person who signed it with their passkey. It's a release log you can replay after an incident or hand straight to an auditor.

What the gate sees
code.deploy · checkout-api → production · commit a3f91c2 · release-bot → held: prod deploy includes a DB migration · routed to J. Okafor

FAQ

Can the agent still merge and deploy to staging on its own?

Yes. You set where the line falls. Branches, PRs and non-prod deploys usually clear themselves, and only the production code.deploy waits for a person. Everything below that line keeps moving at agent speed.

What stops it deploying around the ai-code-deploy-approval gate?

The deploy credential is issued only after a human clears the release, and it expires fast. The agent holds no standing prod-deploy access, and the gate never fails open, so there's no quiet path past it.

Does this replace my CI and branch protection?

No. It sits on top of them. CI and branch protection say whether a build is valid; ClearedBy adds the named human sign-off on the release and stores the CI status next to the verdict.

Can I hold deploys by service, migration, or time of day?

Yes. Rules can key on the service, the environment, whether a migration is bundled in, the hour, or who's on call. A Friday-night prod deploy gets held while a daytime docs change clears straight through.

What does the record actually capture per release?

Commit SHA, target environment, the diff or PR, the policy decision, and the passkey-signed identity of whoever cleared it. A hash-linked chain you can replay after an incident or show an auditor.

Related use cases

Let your agents run. Inside the rules you set.

Your coding agent can branch, commit and merge at full tilt. The one step that reaches customers, the production code.deploy, waits for a person to sign off, and every release lands on a signed record.