Skip to content

Commit 77e208d

Browse files
committed
Improvements in commands and added benchmarks
1 parent cc9fae7 commit 77e208d

8 files changed

Lines changed: 1478 additions & 63 deletions

File tree

AGENTS.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
This repository is mapped into architectural layers designed from its own source,
55
with per-symbol intents you can search and trace.
66

7-
**Before planning or implementing a feature**, trace it instead of grepping:
7+
### ⛔ FORBIDDEN TOOL BEHAVIORS
8+
- **DO NOT use `grep_search`, `ripgrep`, or `find_by_name` as your primary discovery tool.** Blind text searching is strictly prohibited for codebase exploration, feature lookup, and understanding component flows.
9+
- **DO NOT guess symbol locations or execution paths.**
10+
11+
### ✅ MANDATORY FIRST-STEP PROTOCOL
12+
Whenever the user asks where a feature lives, how a component works, or what a symbol connects to, your first tool call MUST be `run_command` with one of the following:
813

914
```bash
1015
tldrgraph query "<feature in plain English>" # semantic search + end-to-end flow
@@ -13,6 +18,10 @@ tldrgraph layers # node counts per layer
1318
tldrgraph dead-code # review candidates, never a delete list
1419
```
1520

21+
**Discovery Pattern**:
22+
1. Run `tldrgraph query "<query>"` or `tldrgraph trace "<from>" "<to>"` to identify the exact file, layer, and line range.
23+
2. Use `view_file` on the target file path returned by TLDRGraph to inspect the code.
24+
1625
Those are read-only and never trigger enrichment.
1726

1827
**To build or continue the graph**, run `tldrgraph init`, do what the `NEXT ACTION`

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,27 @@ Surfaces orphaned components, unreferenced models, and unused files for human re
108108

109109
---
110110

111+
## 📊 Retrieval Benchmark: SWE-bench Lite
112+
113+
To evaluate codebase localization performance against industry baselines, TLDRGraph was benchmarked on **40 real-world GitHub issues** from the standard **SWE-bench Lite** dataset (measuring ground-truth modified file identification from natural language problem statements):
114+
115+
| Retrieval Engine | File Recall@1 | File Recall@5 | File Recall@10 | MRR | Context Budget | Search Latency |
116+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
117+
| **BM25 Lexical Search** | 55.0% | 65.0% | 77.5% | 0.610 | ~28,500 tokens | 1.01 ms |
118+
| **Chunked Dense Vector RAG** | 42.5% | 70.0% | 77.5% | 0.535 | ~22,400 tokens | 22.37 ms |
119+
| **Mem0 (Memory Vector Store)** | 35.0% | 70.0% | 77.5% | 0.508 | ~12,000 tokens | 22.69 ms |
120+
| **Graphify (AST Knowledge Graph)** | 57.5% | 65.0% | 72.5% | 0.616 | ~9,500 tokens | 0.76 ms |
121+
| **Aider Repo-Map (AST PageRank)** | 55.0% | 67.5% | 77.5% | 0.611 | ~8,200 tokens | 1.09 ms |
122+
| **TLDRGraph (AST Zero-Token)** | **60.0%** | **75.0%** | **82.5%** | **0.672** | **~2,400 tokens** | 23.44 ms |
123+
| **TLDRGraph (4-5 Line LLM Enriched)** | **62.5%** | **72.5%** | **80.0%** | **0.682** | **~3,200 tokens** | 23.93 ms |
124+
125+
> **Key Takeaways:**
126+
> - **State-of-the-Art MRR (0.682)**: Combining agent-designed architectural layers with deep semantic intent achieves **0.682 MRR** and **62.5% Recall@1** (beating Mem0's 35.0%, Chunked RAG's 42.5%, Aider's 55.0%, and Graphify's 57.5%).
127+
> - **Broad Multi-Layer Recall**: **TLDRGraph (AST Zero-Token)** scores **75.0% Recall@5** and **82.5% Recall@10** with **0 LLM tokens spent**.
128+
> - **2.5×–4.0× Token Efficiency**: Compact, structured intent flows require only **~2,400–3,200 tokens** compared to ~8,200 tokens for Aider, ~9,500 tokens for Graphify, ~12,000 tokens for Mem0, and ~28,500 tokens for raw file chunking.
129+
130+
---
131+
111132
## 🤖 Works with any coding agent
112133

113134
TLDRGraph is driven **by** your agent, not the other way around. It never needs

0 commit comments

Comments
 (0)