sanjayrohith/Dejavu

View on GitHub ↗

Repository-scoped memory for coding agent's decisions, pitfalls, and handoffs stored in one inspectable SQLite file, so agents continue instead of starting over.

21 ★2 forksTypeScriptUpdated 18d ago

What you need to know

Fast, repository-scoped memory for coding agents stored in one inspectable SQLite file — typed slips (decisions, preferences, procedures, pitfalls, facts, wip), code anchors with git-blob drift detection, handoffs, and budgeted cited recall over FTS5.

Install

bun add github:sanjayrohith/Dejavu && bunx github:sanjayrohith/Dejavu init
dejavu install claude-code

Usage

  • At session start call recall("") to get a bounded, cited context packet; at the end leave a handoff({summary, next}).
  • Remember typed slips with d.remember("...", {kind}) and correct via supersedes/contradicts links — slips are immutable.
  • Anchor a memory to code (anchors: ["src/auth.ts:42#refreshToken"]) so recall reports verified/drifted/orphaned per git blob; use touching() before editing files.
  • Wire Claude Code hooks with `dejavu install claude-code` so SessionStart (incl. after compaction), PreCompact and SessionEnd handle the loop automatically.

Key features

  • Repository isolation by default derived from nearest git origin; two checkouts share memory, unrelated projects stay isolated.
  • Budgeted, cited recall with FTS5/BM25 + supersession following, dedup, and trust (low/medium/high) kept separate from relevance.
  • Deterministic and local — no embeddings, no model calls, no daemon; ~0.1ms anchor checks and ~40ms cold hook process.
  • Dejavu eval --replay re-runs recorded content-free receipts against today's code to gate retrieval changes.
  • Shared (multi-device) mode is a tested preview over Cloudflare Worker + Durable Object SQL with SSE sync.

Best for

Developers who want coding agents to continue instead of restart between sessions, with memory scoped per repo and verified against live code.

Caveats

  • Proprietary license — readable and reviewable but not licensed for reuse.
  • Currently requires Bun.
  • Local SQLite is plaintext; do not store credentials, customer data or secrets.
  • Shared mode is a preview: do not deploy it yet (no production identity system); no SQLite-to-shared migration path.
  • Drift is a label, not a ranking input; making agents continue better than a recency packet is still a hypothesis.
Platforms: LocalClients: Claude Code · OpenCode · Pi · Any MCP client

Reviewed 2026-08-18

Topics

Stars
21★
Forks
2
Language
TypeScript
License
NOASSERTION
Created
2026-07-27
Last push
2026-08-17