trie
trie is a self-hosted context infrastructure tool for coding agents, distributed as a command-line utility that installs via `uv tool install` from GitHub. It creates and maintains a meaning + intent index as plain Markdown files inside the user's git repository, under `triefacts/`. The meaning side records what each symbol does, regenerated when source changes; the intent side records why a symbol is that way, captured as notes at edit time. Both are committed alongside code and enforced by an offline commit gate. trie integrates with coding agents by overriding their `grep` and `read` tools and adding graph tools. `trie read` returns a symbol's prose plus caller/callee one-liners; `--history` appends the intent trail. `trie trace` shows call paths between symbols. This reduces dozens of speculative file reads to a few round-trips of prose. The commit gate verifies that prose matches source and that every changed symbol has an intent note, blocking dishonest commits and generating a per-commit digest in `triefacts/triediffs/`. Because everything is plain Markdown in git, context is versioned, reviewed, merged, and gated like code. It works offline for gates, requires no hosted service, and supports Python, TypeScript, JavaScript, Go, Rust, C, and Lua. The project is pre-alpha and built with itself: every commit in its repository passes the gate it ships.
- Category
- AI Agents
- Pricing
- Free
Problem solved
Coding agents start every session from zero, re-deriving codebases by grep and guesswork, and record nothing for future sessions. trie fixes this by maintaining a versioned meaning and intent index in the repo, kept fresh by sync and kept honest by a commit gate, so agents can answer what and why questions in a few tool calls.
Use cases
- Give coding agents persistent context about symbol meanings via `trie read`
- Record intent notes for changed symbols before committing
- Block commits that change symbols without updating prose or intent notes
- Answer why-code-is-the-way-it-is questions with `trie read --history`
- Trace blast radius between symbols with `trie trace`
- Maintain per-branch context indexes versioned with code
- Review context updates in PR diffs alongside code changes
- Run offline commit gates in CI or pre-commit hooks
Audience
- Developers
- Startups
- Enterprise
- Hobbyists
Pros
- No services to host; everything lives in the git repo as Markdown
- Commit gate enforces context freshness and intent recording
- Works offline for gates; no API key needed for verification
- Language support for Python, TypeScript, JavaScript, Go, Rust, C, Lua
- Versioned, reviewed, and merged like code
Cons
- Pre-alpha software
- Requires Python 3.11+, uv, ripgrep, and an Anthropic API key for prose generation
- Prose generation depends on Anthropic; not fully self-contained
- Optional language servers needed for type-aware reference precision
- No hosted service or managed UI
Official website: https://computerreinvention.com/trie
Canonical LambdaBase page: https://www.lambdabase.com/tools/trie