Stop pasting "we already discussed this in PR #1234" to your AI agent.
Open-source CLI that turns past GitHub PR review comments into rules your agent follows automatically — so it stops repeating the mistakes your team already flagged.
One Rust binary, local SQLite, no cloud account needed.
cargo install --git https://github.com/hibrandonevans/difflore difflore-cli
cd your-repo && difflore import-reviews # learn from your team's past PR reviews (uses gh CLI)
difflore recall --diff # preview what your agent will seeDiffLore is not published on crates.io yet; use the GitHub install path above
until the difflore-cli crate is released.
Prerequisites: cargo (rustc 1.87+), git, gh (run gh auth login once).
cd your-repo
difflore import-reviews # learn from past PR reviews (uses gh CLI)
difflore recall --diff # what your agent will get next time
difflore status # rule → recall → fix → minutes saved
difflore embeddings status # inspect semantic vs keyword recallThat's it. SQLite stays on your laptop. Add difflore cloud login only when
your team wants shared sync, governance, analytics, or managed semantic
embeddings. If semantic vectors are paused, recall still works through
file-pattern and keyword matching; run difflore embeddings setup to bring
your own OpenAI-compatible embedding key.
What you'll see when a recalled rule fires:
$ difflore status
· Return 413 for body size limit errors ← learned from gin-gonic/gin
· Wrap context cancellation in errgroup ← learned from tokio-rs/tokio
Every imported rule carries a canonical source_repo, and DiffLore only
applies it inside that same repo/project by default. Retired split owner/name
metadata is never used as a recall fallback.
"Isn't this just RAG over PR comments?" Narrower. We embed and FTS-index
rules like RAG, then we re-rank by file_pattern strict-glob against the
queried file before truncation. The strict-file-match rerank is the difference
between "vaguely relevant" and "fits this exact code path."
"How is this different from Cursor Rules / .cursor/rules?" Cursor Rules,
Continue's .continue/rules, Cody's custom commands — all assume you sit
down and write the rules. DiffLore mines them from PR review history you
already have. Same MCP output shape (your agent calls search_rules),
different upstream: review comments, not hand-author. They compose: keep your
hand-written rules, let DiffLore add the ones nobody had time to write down.
→ Full side-by-side: docs/vs-cursor-rules.md.
"What data leaves my laptop?" Nothing, by default. The local path is one
Rust binary + SQLite. import-reviews uses your existing gh auth to read
GitHub PR review comments available to your gh auth; rules are written to
local SQLite. Cloud sync is opt-in (difflore cloud login) and disclosed
before any upload.
"Why should I trust the evidence?" See Evidence. Short version: current numbers are product-development evidence, not public benchmark claims.
"Will it spam my agent with suggestions?" Top-5 by default; only rules
whose file_pattern strict-globs a changed file qualify. The MCP server
serves a rule per relevant edit, not per keystroke.
See a live shared rule (no login): https://difflore.dev/rules/5ab539ef-268e-4609-acd5-e32a859e79be
Teams repeat the same review feedback:
- "Don't import from
router-coreinside adapters." - "Use
Mapping, notdict, for headers."
AI coding agents don't know that history unless you feed it to them. DiffLore turns those comments into reusable rules and injects them when the agent is working in the affected file — through MCP, installed agent hooks, or the CLI.
Current evidence is useful for product development and regression checks, but it is not yet a third-party reproducible public benchmark. Do not cite lift, recall, or apply-success numbers as public proof until AgentRulesBench publishes the corpus, runner, judge prompt, and raw results.
flowchart LR
agent["IDE / Agent<br/>(Cursor / Claude Code / Zed / Codex / 7 more)"]
cli["difflore CLI / MCP"]
sqlite[("SQLite<br/>rules + signals")]
cloud["Cloud (optional)<br/>GitHub App ingest, team sync, governance"]
agent <-->|"MCP: search_rules, get_past_verdicts, remember_rule"| cli
cli --- sqlite
cli <-.->|"sync"| cloud
The CLI is the runtime. Cloud is a collaboration layer that enriches the local rule library — never on the editor-time hot path. If cloud is unreachable, agent code generation continues with whatever local SQLite knows.
difflore --help is the source of truth. The day-one set:
difflore import-reviews # learn rules from past PR reviews
difflore recall --diff # preview what your agent will see
difflore fix [--preview] # rule-aware local patches
difflore status # trace recall → fix → saved minutes
difflore embeddings status # semantic/keyword recall health
difflore # show local memory status
Full reference: docs/cli-reference.md.
MCP tools your agent calls: search_rules, get_rules, remember_rule,
get_past_verdicts, rule_timeline, plan_pr (predict the file-count and
file-category scope of a change before editing, from the team's PR history).
- Tier 1 (lifecycle + MCP): Claude Code, Cursor, Gemini CLI, Windsurf
- Tier 2 (transport integration tracked separately): Zed
- Tier 3 (MCP only, auto-installed): Codex, Copilot CLI, Antigravity, Goose, Crush, Roo-Code, Warp
difflore agents install writes configs for the 11 auto-install clients. Zed
is tracked separately as a transport integration.
| Capability | Local | Cloud |
|---|---|---|
| Rule retrieval, MCP, installed hooks, local fix | ✅ | — |
| GitHub App ingest, team sync, governance, impact analytics | — | ✅ |
Local stays on your laptop with no SaaS dependency. Cloud adds team operation; see difflore.dev/pricing.
cargo build --workspace
cargo test --workspacePer-crate is faster during development (cargo check -p difflore-cli).
See CONTRIBUTING.md.
Pricing · Demo · Changelog · Architecture spec · vs Cursor Rules
Apache 2.0. See LICENSE.