# Review and ship

URL: https://developertoolkit.ai/en/workflows/ship/
Description: Ship agent-written code on evidence: enforce a pull-request bundle in CI, route by risk class, run review-agent triage, and deploy with fast rollback.

Shipping agent-written code safely requires five controls built in sequence: a CI-enforced evidence bundle, risk-class routing via `CODEOWNERS`, independent review-agent triage before human sign-off, tamper-resistant pipeline gates, and staged delivery with rehearsed rollback. Developers ship verified work and tech leads own the policy so only `high`-risk diffs require line-by-line reading.

When agents open more pull requests than engineers can read, teams either stall the queue or rubber-stamp diffs on trust. The guides below replace both with machine-verified evidence across Stations 5 and 6 (Level 4).

## Choose your review-and-ship guide

| Bottleneck | Start with |
| --- | --- |
| Agent PR descriptions offer prose instead of proof | [The evidence bundle](/en/workflows/ship/evidence-bundle/) |
| Review queues stall or PRs loop between agents | [Agent PR review](/en/workflows/ship/agent-pr-review/) |
| Staged rollouts and rollback drills are missing | [Deploy and production gates](/en/method/lifecycle/deploy/) |
| Agents weaken tests or CI workflows to turn green | [Protecting the oracle](/en/workflows/test/protect-the-oracle/) |
| PR size budgets and risk lanes need team rules | [Running the review queue](/en/teams/review-queue/) |
| Engineers still read every generated line | [Helping the team stop reading every diff](/en/teams/trust-transfer/) |

This section follows [testing and verification](/en/workflows/test/) and hands live services to [operations](/en/workflows/operate/).

## Build the ship path in order

1. **Enforce an evidence bundle.** Map criteria to checks, declare oracle edits, and fail incomplete PRs in CI ([evidence bundle](/en/workflows/ship/evidence-bundle/)).
2. **Route by risk via `CODEOWNERS`.** Approve `low`/`standard` on evidence; escalate `high` (auth, money, schemas, migrations, loosened checks) to code owners ([governance and autonomy](/en/org/governance-autonomy/)).
3. **Run an independent review agent first.** Execute a committed checklist fresh before six-step human triage ([agent PR review](/en/workflows/ship/agent-pr-review/)).
4. **Lock CI outside agent reach.** Require default-branch status checks and protect `.github/workflows/`.
5. **Deploy progressively with rehearsed rollback.** Use flags or canaries that abort in seconds without rebuilding.

## Review agents across tools

- **Claude Code:** Run `/code-review`, configure repository reviews in `REVIEW.md`, or run read-only CI passes. See [Claude Code review automation](/en/claude-code/ship/review-automation/) and [Claude Code docs](https://code.claude.com/docs).
- **OpenAI Codex:** Store review criteria in `AGENTS.md`, trigger `@codex review` on PRs, or run sandboxed CLI reviews. See [Codex code review](/en/codex/ship/code-review/) and [Codex docs](https://developers.openai.com/codex).
- **Cursor:** Configure Bugbot in `.cursor/BUGBOT.md` alongside PR Routing & Approval aligned to non-escalation criteria. See [Bugbot](/en/cursor-ide/ship/bugbot/), [Cursor code review](/en/cursor-ide/ship/code-review/), and [Cursor docs](https://cursor.com/docs).

**Treat PR branches as untrusted input in CI**

Never load hooks, project settings, or MCP configs from a pull-request commit inside a CI job holding API keys or deploy secrets. Run tests unprivileged and load review policies from the base branch.

## Verify your ship path holds

Audit Station 6 (Release) locally with `npx @wondelai/harness-audit` ([Harness Audit](/en/harness-audit/)) and track risk-class escape rates and first-pass bundle completeness ([metrics frameworks](/en/org/metrics-frameworks/)).

## What breaks when agents ship code?

- **Stale results from earlier commits:** Require head commit SHAs and trust CI over agent prose.
- **Silent test weakening:** Protect tests and CI via `CODEOWNERS` and classify loosened checks `high`.
- **Every PR escalates:** Restrict `high`-risk globs strictly to high-blast-radius domains.
- **Slow rebuild-based rollbacks:** Gate risky behavior behind flags or canaries and rehearse rollback.
- **Noisy style comments:** Restrict review agents strictly to production-relevant severity findings.

## Official docs and next steps

- Official references: [Claude Code](https://code.claude.com/docs), [OpenAI Codex](https://developers.openai.com/codex), and [Cursor](https://cursor.com/docs).
- Start with [the evidence bundle](/en/workflows/ship/evidence-bundle/), then adopt [agent PR review](/en/workflows/ship/agent-pr-review/).
