Skip to content

Compass: a Rust code graph that gives AI agents local context on demand

Compass is a local-first knowledge graph engine built in Rust that indexes code artifacts on demand for AI coding agents — no background scanning, no server.

Compass is a local-first knowledge graph engine for code, built in Rust, that indexes project artifacts only when a user or AI agent explicitly triggers it. No background scanning, no file watchers.

The repo landed on Hacker News with 7 points and one comment — barely a blip. But the design choices matter for anyone building agent context pipelines.

  • Local-first, no server: The graph lives on disk alongside your repo. Nothing leaves the machine.
  • On-demand indexing: No autoscan, no file watcher. The graph builds or rebuilds only when a skill runs.
  • Claude Code integration: Skills like /eh:optimize-context build or rebuild the graph. /eh:orchestrate and /eh:work-on-plan refresh it automatically after workers finish, using the list of files they touched.
  • Dual-licensed: MIT or Apache-2.0.
  • Inspired by Graphify: Built in Rust, described as “evolving beyond” its predecessor.

The core bet: AI coding agents need structured context — code relationships, artifact links, dependency graphs — not just raw file dumps stuffed into a prompt. Compass builds that graph locally so agents can query it without a cloud round-trip or a background daemon eating CPU.

NOTE

The no-autoscan design is deliberate. Every refresh is the consequence of an explicit action — a user-invoked skill or an agent completing work. Activation doesn’t touch disk until something actually runs.

That puts Compass in a different lane from Sourcegraph or GitHub code search, which index continuously and serve from a server. The bet is that agents work better with a structured graph they can query locally than with raw file retrieval or server-side search results.

Compass is early — 7 HN points, 1 comment, and the repo is still finding its audience. If you’re running Claude Code on large repos and hitting context limits, the skill-based graph approach is worth a look. The repo is here.