~/diffwatch
AI-powered PR review platform with multi-persona feedback
// overview
An AI code review tool that ingests a pull request and returns actionable feedback in under 15 seconds. Runs parallel analysis across diffs, CI status, vulnerability signals, and bundle impact, then surfaces the results through four distinct reviewer personas.
// problem
Code review is one of the highest-leverage activities on a team, but it's slow and inconsistent — reviewers focus on different things, miss security issues, or skip context. I wanted a tool that could give the same thorough, multi-angle review automatically in the time it takes to open a PR.
// approach
Built a parallel analysis pipeline in Next.js that fans out across diff parsing, CI API calls, and vulnerability pattern matching simultaneously. Each Gemini prompt is scoped to a specific reviewer persona so the feedback voice is distinct and purposeful — not a single blob of AI text. Streaming output via Server-Sent Events keeps the UI responsive while the analysis runs.
// highlights
- ▸Actionable PR feedback generated in <15s
- ▸Parallel analysis pipeline: diffs, CI status, vulnerabilities, bundle impact
- ▸Multi-persona review system — Architect, Security, PM, Intern — with streaming output
- ▸Commit history analysis, risk detection, and anti-pattern flagging
// learnings
Prompt scoping is everything. Giving the model a narrow, well-defined role (security reviewer vs. PM) produces far more useful output than asking a general question. The parallel fan-out also cut latency by ~60% vs. sequential calls.