review-pr-stacklisted
Install: claude install-skill Yefclub/agent-review-kit
# Review a stack / sequence of PRs
Read the [shared review contract](../../contracts/review-contract.md) before executing this workflow. Its evidence, candidate ledger, execution and verdict rules apply throughout.
Stacked PRs each build on the one below. The golden rule: **review each PR against its own base**, so you only see what that layer introduces — not the whole tower.
## Stage 0 — Scale & cost
Per-PR fan-out (swarm + verifier) has no ceiling. Count the PRs first. **Above ~20 PRs**, surface the cost and offer:
- (a) group by theme and review a representative PR per group,
- (b) sample the highest-risk PRs (large diffs; auth / money / data-migration paths),
- (c) run an explicitly requested multi-round audit using available host capabilities for an exhaustive run — only on explicit "use a workflow".
Never silently fan a swarm over hundreds of PRs — a ~200-PR stack is millions of tokens.
## Stage 1 — Establish the order
Get the explicit list from the user, or enumerate:
```bash
gh pr list --state open --json number,title,baseRefName,headRefName --limit 50
```
Build the chain by linking each PR's `baseRefName` to the `headRefName` below it (bottom PR's base is the trunk, e.g. `main`/`dev`). If the project uses the `gh-stack` extension or Graphite/Sapling, use it to read the stack. Confirm the order with the user before diving in if it's not obvious.
## Stage 2 — Review each layer (bottom → top)
For each PR in order, run the **`review-pr`** pipeline, but scope the