DEV Community

EliotShift
EliotShift

Posted on

Why I built LORE: AI keeps forgetting why your code exists

Every time I start a new AI coding session, I have to explain everything from scratch.

"We use PostgreSQL because..."
"Our auth uses JWT with 24h expiry..."
"The API follows REST with /api/v1/..."

The AI forgets. Every. Single. Time.

After the 50th time explaining the same decisions, I built LORE.

What is LORE?

LORE is an MCP server that reads your existing codebase and automatically extracts architectural decisions — no manual work needed.

cd your-project
lore init
Enter fullscreen mode Exit fullscreen mode

That's it. LORE generates a LORE.md with everything your AI needs to know:

## Database
### 🟢 PostgreSQL as primary database
**Why**: Found pg/postgres in dependencies
**Rules**: Use connection pooling always

## Authentication
### 🟢 JWT-based authentication
**Rules**: Never store secrets in code
Enter fullscreen mode Exit fullscreen mode

The Problem It Solves

AI coding tools like Claude Code and Cursor are powerful. But they have zero memory between sessions.

Every new session = complete amnesia.

Your team spent months deciding:

  • Why PostgreSQL over MongoDB
  • Why JWT over sessions
  • Why Zod over Yup

The next AI session knows none of this.

LORE remembers so you don't have to repeat yourself.

How It Works

LORE reads your:

  • package.json → detects frameworks, libraries, databases
  • .env.example → detects security patterns
  • docker-compose.yml → detects deployment decisions

Then generates a structured LORE.md that plugs directly into your MCP settings.

Quick Start

npm install -g lore-mcp
cd your-project
lore init
lore status
Enter fullscreen mode Exit fullscreen mode

MCP Integration (Claude Code / Cursor)

{
  "mcpServers": {
    "lore": {
      "command": "node",
      "args": ["/path/to/lore-mcp/dist/index.js"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

What's Next

  • lore doctor — diagnose setup issues ✅
  • lore status — view all decisions ✅
  • LORE INTEGRITY — verify decisions are actually implemented in code
  • VS Code Extension
  • LORE NETWORK — share anonymous architectural patterns

Open Source

LORE is fully open source and local-first. No data leaves your machine.

github.com/EliotShift/lore-mcp

Built in one day from Morocco 🇲🇦


Enter fullscreen mode Exit fullscreen mode

Top comments (0)