lucidiff GitHub

Understand a pull request before you review it.

lucidiff reads a PR and writes one self-contained HTML page: what changed and why, how the parts connect, what can break, and what to test. Every risk cites the exact lines, and the citations are checked against the diff.

The explainer for pallets/click#3777: title, summary, and cards for 3 files, 3 risks, and 6 checks

Real pull requests, live model output

Each page below explains a merged PR from a popular open-source project, written by claude-opus-5-5 in one model call. Open one and try the flow diagram, the risk links, and the checklist.

Every risk on these pages was confirmed by running the PR's own code. How they were made

One page per PR

A single HTML file that follows your light or dark setting and is easy to share.

  • SummaryWhat the PR does and why, in plain technical English.
  • ChangesOne card per file: what changed and why it matters.
  • FlowA diagram of how the changed parts connect.
  • RisksSeverity, the failure mechanism, and a link to the exact lines.
  • Test checklistSpecific checks to run, with checkboxes that remember their state.

Built to be accurate

An explainer is only useful if you can trust it.

  • The model never writes HTML. It fills a JSON schema, and lucidiff renders a fixed, accessible template.
  • Citations are checked. A risk whose lines are not in the diff is dropped, and the page says how many were.
  • No invented concerns. Zero risks is a valid answer. Style nits are not risks.
  • Full context. For GitHub PRs and git ranges, the model sees the whole changed files, not only the diff.
  • Diagrams that render. The flow is a validated graph compiled to Mermaid, with one repair attempt and a text fallback.
  • Secrets stay local. Likely secrets are redacted before anything is sent to the model.

Try it

You need Node.js 22.12 or later and an API key for Anthropic, OpenAI, or the Vercel AI Gateway. The npm package is coming soon. For now, run it from source:

# Install and build
git clone https://github.com/Rishabjs03/pr-karpathy.git lucidiff
cd lucidiff
corepack enable && pnpm install && pnpm build

# Explain any public PR
export ANTHROPIC_API_KEY=...
node packages/cli/dist/bin.js https://github.com/pallets/click/pull/3777 --open