Stop reviewing PRs top-to-bottom: introducing prbrief
Large pull requests waste hours because reviewers open them top-to-bottom with no map. The default diff UI sorts by path. Your eyes start at README.md or package-lock.json while the migration and the auth change wait in
Large pull requests waste hours because reviewers open them top-to-bottom with no map. The default diff UI sorts by path. Your eyes start at README.md or package-lock.json while the migration and the auth change wait in the middle.
That is not a small inconvenience. Reviewers lose context, authors get shallow feedback, and risky changes ship with less scrutiny than a CSS tweak.
The industry response has mostly been more SaaS or ask an LLM to summarize the PR. Both can help. Neither should be required to answer basic questions:
- Which modules absorbed the blast radius?
- Are migrations, schemas, or auth in this diff?
- What order should I read the files?
- Which production files changed without tests?
Those answers live in the git range itself. So I built prbrief: a local-first CLI that turns any diff into a structured review briefing. No API key. No cloud. Deterministic heuristics. Seconds.
What it does
npx prbrief --base main
npx prbrief --base origin/main --md
npx prbrief --base main --json -o brief.json
You get:
- Clusters β files grouped by package/app/module with risk scores
- Hotspots β highest-risk files and why (migration, auth, churnβ¦)
- Review order β contracts and security before tests and docs
- Test gaps β production source changed with no matching test path
- Signals β secrets, lockfile skew, mass deletes, oversized PRs
Output formats: terminal (default), markdown for PR bodies, JSON for CI and tools. There is also a library API for editor plugins.
Why not "just use AI"?
LLM PR summaries are useful after you have structure. Alone they drift, hallucinate intent, need credentials, and fail offline. prbrief deliberately does not call a model. Same input, same output. Paste the markdown into a model later if you want prose β the map comes first.
Honest limits
Risk scores are heuristics, not static analysis or coverage. A path named auth is not automatically a vulnerability. Test-gap detection looks at paths in the same diff, not your coverage database. The point is attention prioritization, not automated approval.
Try it
npm install -g prbrief
prbrief --base main --md
- npm: https://www.npmjs.com/package/prbrief
- GitHub: https://github.com/SybilGambleyyu/prbrief
- Site: https://prbrief.pages.dev
If you review code for a living, the goal is simple: open the risky parts first, skip the noise, and leave comments where they matter.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.