Docs · Pull requests
PR review loop
Zero manages the full PR lifecycle — from draft to reviewer feedback to re-runs. Merge stays with the human.
Draft PR
After a Work item reaches VERIFYING, Zero can open a draft PR against the configured base branch. The PR body is composed from session summaries and attached proof artifacts — see PR body composition.
GET /api/cases/:id/pr/draft POST /api/cases/:id/pr/create
The draft is not visible to reviewers until you mark it ready. Use this window to review the PR body and proof comment before publishing.
Mark ready
When the draft looks correct, mark the PR ready for review. Zero runs a readiness check before publishing.
GET /api/cases/:id/pr/ready-check POST /api/cases/:id/pr/mark-ready
On mark-ready, Zero posts a proof comment to the PR thread — see Proof comment.
Pull reviews
Zero polls GitHub for reviewer comments and surfaces them in the Work item console.
GET /api/cases/:id/pr/reviews GET /api/cases/:id/pr/reviews/unresolved GET /api/cases/:id/pr/status
Unresolved reviews block progression. Each review can be added to the feedback queue or resolved manually.
POST /api/cases/:id/pr/reviews/:review_id/add-to-feedback POST /api/cases/:id/pr/reviews/:review_id/resolve
Address feedback
Reviews added to the feedback queue trigger a new session. Zero runs, produces a diff, and re-attaches proof. Previous proof artifacts remain in case memory — they are not replaced.
POST /api/cases/:id/pr/address-feedback
After the session completes, review the diff and accept before moving back to ready. The loop repeats until all reviews are resolved.
Resolve and sync
Once all reviews are resolved, sync PR state back to GitHub and confirm ready status.
POST /api/cases/:id/pr/sync-state GET /api/cases/:id/pr/state-timeline
The state timeline returns a chronological log of PR state transitions — useful for auditing how many rounds the review took.
Merge
Zero does not merge PRs. Merge is always a human action in GitHub. Zero's role ends when the PR is in a passing, all-reviews-resolved, ready state.
See also: Proof evidence, Review agent changes.