prbrief turns any git range into a high-signal review briefing: module clusters, risk hotspots, a sensible reading order, and test-gap hints — in seconds, on your machine, with no API key.
$ npx prbrief --base main prbrief — PR review briefing ──────────────────────────────────────────────────────────────── range a1b2c3d4e5f6...HEAD stats 28 files +612/−140 6 commits (2 noise, 5 tests) Summary 28 files · 4 modules · focus: packages/api, packages/web · flags: migration Signals CRITICAL 1 database migration — confirm rollback plan WARN 2 files touch auth/security-sensitive areas Suggested review order 1. packages/api/migrations/20260701_add_entitlements.sql 2. packages/api/src/auth/session.ts 3. packages/api/src/billing/invoice.ts …
Runs on git only. No cloud, no telemetry, no model quota. Safe for private monorepos.
Same diff ⇒ same briefing. Heuristics you can explain in code review, not opaque scores.
Terminal for humans, markdown for PR bodies, JSON for CI and editor plugins.
Drop-in GitHub Action example posts an updating briefing comment on every PR.
$ npm install -g prbrief $ prbrief --base main --md $ prbrief --base origin/main --json -o brief.json
| Section | Why it saves time |
|---|---|
| Clusters | See which package/app absorbed the risk before opening files |
| Hotspots | Migrations, schemas, auth, and large churn rise to the top |
| Review order | Read contracts and security before tests and docs |
| Test gaps | Production source changed with no matching test path in the diff |
| Signals | Secrets, lockfile skew, mass deletes, oversized PRs |
import { analyze, formatMarkdown } from "prbrief"; const brief = analyze({ base: "main", head: "HEAD" }); console.log(formatMarkdown(brief));