explaingit

hanishsaini/lore

0PythonAudience · developerComplexity · 3/5ActiveSetup · moderate

TLDR

Local-first memory layer for AI coding assistants that reads git history, ADRs, and postmortems and serves the reasons behind past decisions back through MCP.

Mindmap

mindmap
  root((Lore))
    Inputs
      Git commits
      Pull requests
      ADRs
      Postmortems
    Outputs
      Decision recall
      Postmortem hits
      Related history
    Use Cases
      Avoid repeating reverts
      Surface incident context
      Enforce conventions
    Tech Stack
      Python
      SQLite
      sqlite-vec
      MCP

Things people build with this

USE CASE 1

Give Claude Code or Cursor recall of past architecture decisions, reverts, and postmortems via MCP.

USE CASE 2

Run a local-first decision index over a repo with no API key using the pattern-based heuristic mode.

USE CASE 3

Plug in Anthropic, Groq, Gemini, or local Ollama for higher-quality decision extraction.

USE CASE 4

Demo the workflow against a preloaded fictional payments codebase without setup.

Tech stack

PythonSQLitesqlite-vecMCP

Getting it running

Difficulty · moderate Time to first run · 30min

pip install lore-cli then lore init plus lore ingest; full LLM extraction needs an API key but heuristic mode runs without one.

License is not stated in the available content.

In plain English

Lore is a tool that gives AI coding assistants like Claude Code, Cursor, and Codex a memory of your team's past decisions. The author's framing is that these assistants know a lot about syntax, frameworks, and public APIs, but they know nothing about why your codebase looks the way it does. They will confidently suggest the same change that broke production last quarter because no one told them it was tried and reverted. Lore reads your git history, your architecture decision records, and your postmortems, pulls out the reasons behind past choices, and serves those reasons back to the assistant when it is about to make a related change. The headline example in the README shows the assistant about to add Redis caching to a payment endpoint. Before writing any code it queries Lore and gets back three relevant items: a previous Redis revert linked to a Stripe webhook race condition, a convention banning in-memory caching on payment writes, and an incident postmortem about duplicate charges. It then proposes a different approach. The pipeline behind that demo has a few stages. Lore ingests commits, pull requests, and markdown files for ADRs and postmortems. A signal pre-filter drops about 80 percent of routine work so the rest can be processed cheaply. A decision-extraction stage either calls a language model (Anthropic, Groq, Gemini, OpenRouter, DeepSeek, NVIDIA NIM, or local Ollama) or falls back to a pattern-based heuristic mode that needs no API key. Extracted decisions are embedded with a small local model and stored in SQLite using the sqlite-vec extension and FTS5 full-text search. Retrieval combines vector and keyword search through reciprocal rank fusion, then applies boosts for source type, severity, and recency. The assistant talks to Lore through MCP (Model Context Protocol), with tools named recall_decision, find_postmortems, and related_history. Everything is local-first; your data stays on your machine unless you wire it up to a cloud LLM yourself. Installation is pip install lore-cli, then lore init and lore ingest . inside a project. A lore demo command runs against a preloaded fictional payments codebase with no API key needed.

Copy-paste prompts

Prompt 1
Install Hanishsaini/Lore, run lore init and lore ingest on my current repo, and wire it into Claude Code over MCP.
Prompt 2
Show how Lore's recall_decision tool would respond when I ask Cursor to add Redis caching to a Stripe webhook endpoint.
Prompt 3
Configure Lore to use local Ollama for decision extraction instead of a cloud LLM, and explain the heuristic fallback.
Prompt 4
Write an ADR in the format that Lore's ingest pipeline extracts cleanly, including the decision, context, and consequences.
Prompt 5
Sketch how Lore combines sqlite-vec vector search and FTS5 keyword search via reciprocal rank fusion.
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.