Zephr

Intelligence · Lens

One map of your codebase,shared by every agent.

Lens is the code-intelligence plane underneath your agents: lexical, structural, semantic, and graph search over the refs your organisation has admitted. Every result carries its path, its ref, its commit, how fresh the index was, and which plane served it — so an answer can never quietly be about a different version of your repository than the one you are working in.

Local Lens shippedHosted Lens evolvingLocal mode— no account required
How it works

Four planes, one ref.

A repository is admitted once. Lens indexes it four ways, and the ref topology binds every index to a specific commit. A query fans out across the planes and comes back as one ranked, cited answer — pinned to the ref it was true on.

Lexical

Local shipped · Hosted planned
zephr_grep

ugrep-class literal and regex search across every admitted ref — the plane that never hallucinates because it never interprets.

Structural

Local shipped · Hosted planned
zephr_lsp

Tree-sitter and LSP symbol resolution: definitions, references, call sites, and enclosing scope rather than string matches.

Semantic

Substrate shipped · Hosted planned
zephr_search

Code embeddings for the questions no grep answers — "where do we enforce this", not "where does this string appear".

Repo graph

Planned
zephr_search

Import, ownership, and ref edges, so a result can say what depends on it and which branch it was true on.

Ref topology is what keeps the other three planes honest across branches: without it, a result from a stale index is indistinguishable from a current one. It is planned, and until it lands, Lens answers say so on the record rather than in a footnote.

The artifact

One question, answered with receipts.

This is the shape of a Lens answer — real markup, not a screenshot. Select it, copy the commit, read it with styles off. Note what the answer refuses to hide: the plane that served it, the ref it was pinned to, and the one hit whose file moved after indexing.

Agent · queryUnreviewed

Where is auth enforced?

A plain-language question, not a regex. Lens resolves it against the planes it can actually serve right now and reports which one that was.

Agent
Claude Code · sonnet
Ref
refs/heads/main
Commit
7b3d9e015c8a4f26d1b0e3947ac52f81d6084b3c
Generation
gen-4812
asked once · answered from an index, not a guess
Lens · serving planeLocal index · 2 commits behind

Where this answer came from

Hosted Lens is not serving this repository yet, so the query fell back to local Lens. That is a different answer with different freshness, and the card says so before you read a single result.

Served by
Local Lens · zephrd
Hosted
Not indexed for this repository
Indexed
2026-03-04T09:02:41Z — 2 commits behind the queried ref
Egress
None. Source and embeddings stayed on the host.
plane stated before results, not after
Lens · answer4 hits · 1 flagged

Authentication is enforced at two points, not one.

Route middleware rejects an unauthenticated request, and scope admission rejects an authenticated request that is not bound to the project it is reaching into. An answer that named only the first would be true and useless.

  • apps/api/src/middleware/require-session.ts L18–L54structuralcurrentEvery authenticated route resolves to this middleware through the router symbol graph.indexed at the queried commit
  • apps/api/src/router/routes.ts L61–L118structuralcurrentDeclares which routes mount the middleware — and the four that deliberately do not.indexed at the queried commit
  • packages/core/src/scope/admission.ts L140–L203semanticcurrentSecond enforcement point: scope admission rejects a bound capability before the handler runs.indexed at the queried commit
  • apps/api/src/middleware/legacy-token.ts L9–L31lexicalbehindMatches the query text, but the file changed after the index was built.modified 2 commits after indexing — reported, not silently dropped

Illustrative example — not live data

What exists today

Shipped, evolving, and honestly missing.

Cloud-first Lens is the design commitment (ADR-028). Local Lens is the part you can run today. The gap between them is a build, not a footnote — so it is listed here at the same size as everything that works.

  • Local Lens (privacy / offline mode)

    Shipped

    The full tool surface served by zephrd from the machine the code is on. No source and no embeddings leave the host.

  • Lexical search over admitted refs

    Local shipped · Hosted planned

    Literal and regex search with path, ref, and line-range citations on every hit.

  • Structural / LSP analysis

    Local shipped · Hosted planned

    Tree-sitter parsing plus language-server symbol resolution for definitions, references, and enclosing scope.

  • Semantic code search

    Substrate shipped · Hosted planned

    Vector substrate (Qdrant) is in place and capacity-tested. The hosted embedding pipeline, and the provider gates it needs, are not built.

  • Hosted ingestion & index orchestration

    Planned

    Admitting a repository once and having every machine query the same index. This is the missing piece of cloud-first Lens — not a slow one.

  • Repo graph queries

    Planned

    Import, ownership, and ref edges as first-class query targets (ADR-028).

  • Ref-aware overlays for unpushed work

    Planned

    Querying a local working ref against the hosted index, so uncommitted work is visible without publishing it (ADR-029).

  • Serving-plane disclosure on every result

    Local shipped · Hosted planned

    Each answer states whether it came from the hosted index or local Lens, at which ref and generation, and how fresh that index is.

Status labels follow docs/PRODUCT-DESIGN.md. "Shipped" means substantially implemented; "Evolving" means real foundations with active work remaining; "Planned" means designed and not yet built.

Ask your codebase a question it can prove the answer to.