Build, version, and deploy the context your AI depends on.
Lorepack compiles a directory of documents, spreadsheets and project artifacts into an immutable, content-addressed build that can be inspected, diffed, deployed, activated and rolled back, then read by chat models and coding agents over MCP, HTTP, or a bounded export.
Think Git and Terraform for AI context. It is not another local RAG server: retrieval is a runtime capability, the build lifecycle is the product.
source artifacts → plan → deterministic build → immutable version
→ validate → activate atomically → diff / roll back
Pre-v0.1. Under active construction, not yet installable.
lore does not exist as a published package. Everything shown below runs today from a clone,
and the images are generated from a real build by pnpm docs:capture, but nothing is
released. Follow along in the backlog.
Working now: the local lifecycle, every parser below, typed tables with a read-only SQL
surface, declared precedence rules, retrieval with provenance, MCP and HTTP serving, the
lore connect flow for Claude Code, Codex and VS Code, and Studio. Still to come: the
Cloudflare projection.
lore dev ./project-context # discover, build, serve, watch, and print where everything is
lore connect claude-code # configure an AI client, and prove it answerslore dev on a folder that has never seen Lorepack writes the configuration, builds, activates,
serves and starts watching. There is nothing to set up first.
Everything the build decided is inspectable without re-running it, including the decisions that removed a file:
Every result carries the file, the heading path and the lines it came from. A result without one is a bug, not a style issue:
lore dev prints a Studio URL: six routes served from static files by the same process that
serves the API, on the same port, with no toolchain and no network.
The Playground answers the question that matters most before you trust any of this: what would a model actually receive for this task, and what was left out. Every passage carries its provenance, every omission carries its reason, and a ranking heuristic is labelled as one rather than presented as a score of truth.
The other five are Overview, Sources, Tables, Versions and Diagnostics. Tables appears only
when the build has one, and its console runs a read-only SELECT through the same validator and
the same limits as the tool a model calls. Take the tour, with a
screenshot of each.
Studio is read-mostly. The only routes that change anything exist solely under lore dev, and
they refuse any browser origin that is not a loopback literal.
Node.js >=24.15 <25, and that is the whole list. No Python, Docker, compiler toolchain,
native add-on, model download, API key or account.
The floor is 24.15 because that is the first release where node:sqlite exposes the
authorizer and per-connection limits the read-only SQL surface depends on. Lorepack also
needs SQLite compiled with FTS5, which every official Node build has; see
SQLite FTS5 availability for the verified matrix and
what happens if yours does not.
- The build is the source of truth. Every runtime is a projection of an immutable build.
- Deterministic. Identical inputs produce an identical build ID on every OS.
- Provenance always. Every result traces to a file, section, page, sheet or cell range.
- No surprises on first run. No Python, Docker, compiler toolchain, native add-on, model download, API key or account.
- Never invents truth. Precedence between sources is declared by you, never guessed.
- Markdown, HTML, DOCX, CSV, XLSX, text-layer PDF, plain text and source code. A file with an extension Lorepack does not know is named in the build's exclusions rather than silently skipped. A scanned PDF is refused outright rather than indexed as an empty document: OCR is out of scope for v0.1.
- A spreadsheet becomes a typed table, not prose, queried with SQL rather than searched as
text. Types are inferred conservatively and refuse to be clever:
00123stays text, a 19-digit id stays text, and03/04/2026stays text because the file never says which country wrote it. Excel formulas are stored as text and never evaluated. A worksheet whose layout is not a table is described and reported, never invented into one. - The SQL surface is one read-only SELECT over one table, run in a process that is killed on a deadline, behind an authorizer that permits that table and nothing else in the build. It cannot write, cannot reach another table, and cannot read the catalog.
- Lexical retrieval only. BM25 with declared ranking hints. No embeddings in the default install, and the score is presented as a ranking heuristic because that is what it is.
- One project, one machine. No tenancy, no accounts, no hosted control plane.
- The scale envelope is 2,500 files and 1 GB. Past that Lorepack asks you to confirm and says plainly that the behaviour is untested rather than unsupported.
- Precedence is declared, never detected. Lorepack will not tell you which of two documents is correct, and does not claim to have found a conflict.
| Working agreement for contributors and agents | AGENTS.md |
| Full architecture specification | Lorepack_Local_First_MVP_Architecture_Final.md |
| How to contribute | CONTRIBUTING.md |
| Reporting a vulnerability | SECURITY.md |
The lore command line |
docs/architecture/cli.md |
| How a build is produced, and why the stage order matters | docs/architecture/build-orchestration.md |
| What belongs in a build, and what does not | docs/architecture/discovery.md |
| How each format is read, and what is deliberately dropped | docs/architecture/parsers.md |
| Every security surface, and the test that holds it | docs/architecture/security.md |
| How a build is deployed, and which rules the orchestration enforces | docs/architecture/deployment.md |
| How a model reaches a build, over MCP and HTTP | docs/architecture/serving.md |
| Studio: behaviour, the manual passes, and the design direction | docs/architecture/studio.md |
| How typed tables are stored, named and queried | docs/architecture/local-storage.md |
| A tour of Studio, one screenshot per route | docs/studio-tour.md |
| Why each dependency is here, with the checks it passed | docs/architecture/dependencies.md |
| Connecting Claude Code | docs/integrations/claude-code.md |
| Connecting Codex | docs/integrations/codex.md |
| Connecting VS Code | docs/integrations/vscode.md |
