@sdsrs/code-graph 0.5.15 → 0.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +40 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -43,6 +43,46 @@ Single binary, embedded SQLite, bundled sqlite-vec extension, optional local emb
43
43
 
44
44
  Every design decision — from token-aware compression to node_id-based snippet expansion — is optimized for LLM context windows. Works out of the box with Claude Code, Cursor, Windsurf, and any MCP-compatible client.
45
45
 
46
+ ## Efficiency: code-graph vs Traditional Tools
47
+
48
+ Real-world benchmarks comparing code-graph-mcp tools against traditional approaches (Grep + Read + Glob) on a 33-file Rust project (~537 AST nodes).
49
+
50
+ ### Tool Call Reduction
51
+
52
+ | Scenario | Traditional | code-graph | Savings |
53
+ |----------|:-----------:|:----------:|:-------:|
54
+ | Project architecture overview | 5-8 calls | 1 call (`project_map`) | **~85%** |
55
+ | Find function by concept | 3-5 calls | 1 call (`semantic_code_search`) | **~75%** |
56
+ | Trace 2-level call chain | 8-15 calls | 1 call (`get_call_graph`) | **~90%** |
57
+ | Pre-change impact analysis | 10-20+ calls | 1 call (`impact_analysis`) | **~95%** |
58
+ | Module structure & exports | 5+ calls | 1 call (`module_overview`) | **~80%** |
59
+ | File dependency mapping | 3-5 calls | 1 call (`dependency_graph`) | **~75%** |
60
+ | Similar code detection | N/A | 1 call (`find_similar_code`) | **unique** |
61
+
62
+ ### Overall Session Efficiency
63
+
64
+ | Metric | Without code-graph | With code-graph | Improvement |
65
+ |--------|:------------------:|:---------------:|:-----------:|
66
+ | Tool calls per navigation task | ~6 | ~1.2 | **~80% fewer** |
67
+ | Source lines read into context | ~8,000 lines | ~400 lines (structured) | **~95% less** |
68
+ | Navigation token cost | ~36K tokens | ~7K tokens | **~80% saved** |
69
+ | Full session token savings | — | — | **40-60%** |
70
+
71
+ ### What code-graph Uniquely Enables
72
+
73
+ - **Impact analysis** — "Changing `conn` affects 33 functions across 4 files, 78 tests at HIGH risk" — impossible to derive manually with Grep
74
+ - **Transitive call tracing** — Follow `main` → `run_serve` → `handle_message` → `handle_tools_call` → `conn` in one query
75
+ - **Semantic search** — Find `authenticate_session` when searching "handle user login"
76
+ - **Dependency strength** — Not just "file A imports file B", but "file A uses 38 symbols from file B"
77
+
78
+ ### When Traditional Tools Are Still Better
79
+
80
+ | Use Case | Best Tool |
81
+ |----------|-----------|
82
+ | Exact string / constant search | Grep |
83
+ | Reading a file to edit it | Read |
84
+ | Finding files by name pattern | Glob |
85
+
46
86
  ## Architecture
47
87
 
48
88
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdsrs/code-graph",
3
- "version": "0.5.15",
3
+ "version": "0.5.17",
4
4
  "description": "MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,10 +33,10 @@
33
33
  "node": ">=16"
34
34
  },
35
35
  "optionalDependencies": {
36
- "@sdsrs/code-graph-linux-x64": "0.5.15",
37
- "@sdsrs/code-graph-linux-arm64": "0.5.15",
38
- "@sdsrs/code-graph-darwin-x64": "0.5.15",
39
- "@sdsrs/code-graph-darwin-arm64": "0.5.15",
40
- "@sdsrs/code-graph-win32-x64": "0.5.15"
36
+ "@sdsrs/code-graph-linux-x64": "0.5.17",
37
+ "@sdsrs/code-graph-linux-arm64": "0.5.17",
38
+ "@sdsrs/code-graph-darwin-x64": "0.5.17",
39
+ "@sdsrs/code-graph-darwin-arm64": "0.5.17",
40
+ "@sdsrs/code-graph-win32-x64": "0.5.17"
41
41
  }
42
42
  }