Skip to Content
Cheat Sheet/review-pr

/review-pr

Review a pull request and produce a GO / NO-GO recommendation against acceptance criteria, code quality, testing, and security — the gate that decides whether a PR is mergeable.

When to use it

The everyday path is automatic: /work-ticket chains /review-pr on CI green, so the reviewer agent has the next move ready when the worker finishes. You don’t normally type /review-pr directly. Type it when you want to manually re-review a PR (e.g., after the author pushed a fix), when a PR landed in the In Review column without going through /work-ticket, or when you want a fresh review pass with the latest review template.

The recommendation is structured: requirements, code quality, testing, security, an explicit recommendation, required changes if NO-GO, and optional suggestions. The reviewer agent reads every changed file (not just the diff summary) and applies a fixed list of red flags that produce an automatic NO-GO.

In this project, the reviewer is allowed to set GitHub APPROVED state when (a) the recommendation is GO and (b) every required CI check passes. NO-GO, any failing check, or any pending check → comment only. This is a project-specific override of the framework’s “agents never approve” rule; the rationale is solo-mode operation (see CLAUDE.md “Agentic Approval Policy”). The human still performs the merge click.

Don’t use this to “double-check” a PR you already approved manually — that’s busywork. The reviewer agent’s job is the first-pass review, not the second-pass confirmation.

How it fits

/work-ticket produces the PR; CI gates pass/fail; /review-pr produces the recommendation. The human merges (or, under /drain, the agent-merge gate’s 7-condition workflow merges autonomously).

What it does (quick)

  • Finds the PR (queries In Review column or uses the provided number)
  • Captures the CI status check rollup (drives the approve-vs-comment decision)
  • Reads every changed file (not just diff summary)
  • Applies red-flag detection — hardcoded secrets, failing checks, missing tests, security vulnerabilities — each forcing automatic NO-GO
  • Posts a structured review comment with the recommendation
  • Sets APPROVED state via gh pr review --approve when GO + CI green; posts comment only otherwise
  • /work-ticket — upstream; chains this command on green CI
  • /architect-review — escalation path when a PR raises an architectural question this command flags as out of scope
  • /release-decision — the higher-level go/no-go gate for a whole release; this command operates per PR

Canonical spec: .claude/commands/review-pr.md

Last updated on