Sub-10ms Hybrid File Search & Anti-Spaghetti Multi-Flow Code Graphs. ⚡
SQLite FTS5 + Model2Vec Static Retrieval Embeddings + Separate Execution Flow Graphs for Humans & Coding Agents.
Whole-repo dependency diagrams turn into unreadable spaghetti hairballs the moment a project passes 30 files, while heavy RAG indexers take minutes to embed and flood agent context windows with noisy chunks.
TLDRGraph v0.3 solves both problems from the ground up:
- Fast Hybrid File Search (
tldrgraph query) — Fuses 4-column weighted SQLite FTS5 BM25 (sub-tokenizedCamelCase,snake_case, file paths, and HTTP routes) with Model2Vec (minishlab/potion-retrieval-32M) static retrieval vectors, Reciprocal Rank Fusion (RRF), and 1-hop dependency graph boosting. Indexes 160+ files in<1 second(170× faster than transformer ONNX embeddings) and localizes files in~1–8 ms. - Separate Flow Graphs Instead of Spaghetti (
tldrgraph ui) — Instead of dumping 600 files into one tangled canvas, TLDRGraph isolates each user/system journey into its own 3-to-8 step Layered Flow Graph, paired with Subsystem-scoped Layer Swimlanes (automatically collapsing repetitive clone folders in monorepos) and 1-click file/line navigation (inline code viewer, live/__api/filereader, andvscode://filejump links). - Antigravity-Native Incremental Workflow — Works directly through Antigravity (and other
AGENTS.md/.agents/skillscoding agents) with zero external API keys:tldrgraph initwrites.tldrgraph/agent_brief.json, the agent reads real hub files to curate.tldrgraph/architecture.yaml, andtldrgraph statusdetects added/modified/removed files instantly via SHA-256 hashes.
Evaluated on 40 real-world GitHub issues from SWE-bench Lite, measuring ground-truth modified file recall, Mean Reciprocal Rank (MRR), prompt token footprint, query latency, and cold index build time:
| Retrieval Method | Recall@1 | Recall@5 | Recall@10 | MRR | Context Tokens | Query Latency | Cold Index Time |
|---|---|---|---|---|---|---|---|
| Aider Repo-Map (AST PageRank) | 17.5% | 50.0% | 72.5% | 0.331 | ~8,200 | 2.05 ms | — |
| Mem0 (Memory Vector Store) | 42.5% | 72.5% | 80.0% | 0.542 | ~12,000 | 29.14 ms | — |
| Graphify (AST Knowledge Graph) | 45.0% | 80.0% | 82.5% | 0.591 | ~9,500 | 1.27 ms | — |
| Codebase-Memory-MCP | 50.0% | 70.0% | 75.0% | 0.581 | ~14,200 | 27.21 ms | — |
| PageIndex (Tree-Based ToC) | 50.0% | 82.5% | 85.0% | 0.634 | ~11,000 | 1.19 ms | — |
| BM25 Lexical Keyword Search | 60.0% | 80.0% | 85.0% | 0.671 | ~28,500 | 19.24 ms | — |
| Chunked Dense Vector RAG | 70.0% | 95.0% | 95.0% | 0.797 | ~22,400 | 37.48 ms | 104,652 ms |
| TLDRGraph (FTS5 Zero-Model) | 70.0% | 95.0% | 97.5% | 0.792 | ~600 | 2.56 ms | 154 ms |
| TLDRGraph Hybrid (BGE-small + FTS5) | 72.5% | 95.0% | 97.5% | 0.831 | ~600 | 31.05 ms | 164,035 ms |
| TLDRGraph Hybrid (Model2Vec + FTS5) | 77.5% | 95.0% | 95.0% | 0.836 | ~600 | 8.09 ms | 964 ms |
pip install tldrgraphtldrgraph init .- Deterministically parses Python, TypeScript, JavaScript, Go, Rust, and Shell modules.
- Links cross-file imports,
@scope/pkgmonorepo aliases, and frontendfetch('/api/...')→ backend HTTP route seams. - Builds
.tldrgraph/search.db(SQLite FTS5+ SHA-256 content-cachedModel2Vecslice embeddings). - Installs Antigravity skill (
.agents/skills/tldrgraph-init/SKILL.md),AGENTS.md, and.tldrgraph/AGENT_CONTRACT.md. - Compiles the zero-CDN standalone visualizer at
.tldrgraph/TLDRGRAPH_VISUALIZER.html.
Ask Antigravity (or run the tldrgraph-init skill) to curate .tldrgraph/architecture.yaml from .tldrgraph/agent_brief.json and your hub source files, then re-run tldrgraph init ..
tldrgraph query "monthly llm budget quota enforcement"
tldrgraph query "aptitude test grading proctoring" --jsonReturns a concise ranked file table (file path, subsystem/layer scope, key symbols/routes, 1-line summary, score) so agents open exact target files immediately instead of running blind grep loops.
tldrgraph ui --serveOpens http://127.0.0.1:8777/ with three focused views:
- Flows: Separate step-by-step layered DAGs per feature/journey (
LR/TBtoggle, keyboard◀/▶walkthrough, edge labels, zero cross-flow clutter). - Architecture: High-level System Overview across subsystems + scoped Layer Swimlanes with 1-click upstream caller / downstream dependency spotlighting.
- Files & Code: Directory tree, global
/or⌘Ksearch modal, full live source viewer with highlighted symbol line ranges, connected flow pills, and 1-click Open in VS Code / Cursor (vscode://file...).
tldrgraph status
tldrgraph flows
tldrgraph layers
tldrgraph doctortldrgraph status compares live SHA-256 file hashes against .tldrgraph/graph.json in milliseconds, listing exact added_files, modified_files, and removed_files so Antigravity updates only what changed.
| File | Tracked in Git? | Purpose |
|---|---|---|
.tldrgraph/architecture.yaml |
Yes | Human- & Antigravity-editable subsystems, layers, module summaries, and separate Flow Graphs |
.tldrgraph/AGENT_CONTRACT.md |
Yes | Schema reference for coding agents |
.tldrgraph/graph.json |
Ignored | Compiled graph snapshot with SHA-256 module hashes and enriched line ranges |
.tldrgraph/search.db |
Ignored | SQLite FTS5 + SHA-256 cached Model2Vec vector store |
.tldrgraph/agent_brief.json |
Ignored | Ranked hub modules, subsystems, and dirty-file handoff for Antigravity |
.tldrgraph/TLDRGRAPH_VISUALIZER.html |
Ignored | Zero-CDN standalone interactive multi-flow visualizer |
Distributed under the MIT License.