Skip to content
Back to Lore

Technical detail

How Lore is built and served

The indexing pipeline, the three-layer knowledge model, and the tool surface agents actually call.

Pipeline

From repository to queryable knowledge

Seven stages. Stages one through five run on first index; six and seven run continuously after that.

  1. 01

    Ingest

    Clone the repository and parse every file into an AST with tree-sitter, which covers 100+ languages.

  2. 02

    Build the graph

    Extract symbols and relationships into a graph database, with stable node IDs so later runs can be diffed against earlier ones.

  3. 03

    Summarize hierarchically

    Describe functions, then modules, then subsystems, then the whole repository — each level built on the summaries below it.

  4. 04

    Discover flows

    Traverse the graph from entry points to sinks, then name and describe each flow and the use case it serves.

  5. 05

    Extract conventions

    Read the explicit sources — lint configs, ADRs, contribution guides — and infer the rest from patterns repeated across the code.

  6. 06

    Index incrementally

    On each commit, re-process only what changed and everything that depends on it, so the knowledge base never goes stale.

  7. 07

    Serve

    Expose the knowledge base through MCP tools, and render documentation and diagrams as views over the same data.

MCP tools

Narrow tools, not one ask-anything endpoint

Agents pull exactly the context they need, which keeps answers grounded and token budgets sane.

search_semantic
Natural-language search across the generated summaries.
get_symbol
Fetch a symbol with its definition, location, and immediate context.
get_callers
Everything that calls into a given symbol.
get_callees
Everything a given symbol calls out to.
get_dependencies
Module and package dependencies for an area of the code.
list_flows
Every end-to-end flow discovered in the repository.
get_flow
One flow in full: entry point, path, sinks, and the use case it serves.
get_conventions
The rules that apply to a given area, with evidence.
impact_analysis
What breaks, or needs review, if a given symbol changes.
explain
A composed answer drawing on all three layers, with citations.

Design note

Why three layers rather than one index

Each layer answers a class of question the others answer badly.

A pure vector index handles “how does billing work?” and fails on “what calls this function?” — embeddings blur exactly the precision that question needs. A pure code graph is the reverse: it answers the call question exactly and cannot say what the code is for. Neither knows whether a new file matches how this team writes code.

So the structural layer stays exact, the semantic layer carries meaning, and the conventions layer carries the rules with links to the evidence behind them. The query layer picks the right one, or composes across all three and cites what it used.

Want this pointed at your codebase?

Tell us about the repository and what your team keeps re-explaining to each other, and we'll tell you whether Lore is the right shape for it.

Book a Consultation