You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add AI Agent Guide with 6-step workflow, command reference, and MCP mapping
New docs/ai-agent-guide.md covering token-saving patterns, the orient-locate-
understand-context-impact-verify workflow, complete command reference with MCP
tool mappings (17 tools), Claude Code hooks documentation, CLAUDE.md template,
CI/CD integration, and agent tips.
Updates README.md: MCP tool count 13→17, modernized CLAUDE.md template with
context/explain/where commands, added AI Agent Guide cross-reference.
Updates docs/recommended-practices.md: added cross-references to the new guide,
updated MCP tools list with context/explain/where/list_repos, modernized the
CLAUDE.md template.
Copy file name to clipboardExpand all lines: README.md
+30-13Lines changed: 30 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ Most code graph tools make you choose: **fast local analysis with no AI, or powe
93
93
|**⚡**|**Always-fresh graph**| Three-tier change detection: journal (O(changed)) → mtime+size (O(n) stats) → hash (O(changed) reads). Sub-second rebuilds even on large codebases. Competitors re-index everything from scratch; Merkle-tree approaches still require O(n) filesystem scanning |
94
94
|**🔓**|**Zero-cost core, LLM-enhanced when you want**| Full graph analysis with no API keys, no accounts, no cost. Optionally bring your own LLM provider for richer embeddings and AI-powered search — your code only goes to the provider you already chose |
95
95
|**🔬**|**Function-level, not just files**| Traces `handleAuth()` → `validateToken()` → `decryptJWT()` and shows 14 callers across 9 files break if `decryptJWT` changes |
96
-
|**🤖**|**Built for AI agents**|13-tool [MCP server](https://modelcontextprotocol.io/) — AI assistants query your graph directly. Single-repo by default, your code doesn't leak to other projects |
96
+
|**🤖**|**Built for AI agents**|17-tool [MCP server](https://modelcontextprotocol.io/) — AI assistants query your graph directly. Single-repo by default, your code doesn't leak to other projects |
97
97
|**🌐**|**Multi-language, one CLI**| JS/TS + Python + Go + Rust + Java + C# + PHP + Ruby + HCL in a single graph — no juggling Madge, pyan, and cflow |
98
98
|**💥**|**Git diff impact**|`codegraph diff-impact` shows changed functions, their callers, and full blast radius — ships with a GitHub Actions workflow |
99
99
|**🧠**|**Semantic search**| Local embeddings by default, LLM-powered embeddings when opted in — multi-query with RRF ranking via `"auth; token; JWT"`|
@@ -132,7 +132,7 @@ Here is a cold, analytical breakdown to help you decide which tool fits your wor
@@ -141,7 +141,7 @@ Here is a cold, analytical breakdown to help you decide which tool fits your wor
141
141
#### Choose Codegraph if:
142
142
143
143
***You need the fastest possible incremental rebuilds.** Codegraph’s three-tier change detection (journal → mtime+size → hash) achieves true O(changed) when the watcher is running — only touched files are processed. Narsil’s Merkle trees still require O(n) filesystem scanning to recompute hashes on every rebuild, even when nothing changed. On a 3,000-file project, this is the difference between near-instant and noticeable.
144
-
***You want to optimize AI agent reasoning.** Large Language Models degrade in performance and hallucinate when overwhelmed with choices. Codegraph’s tight 13-tool surface area ensures agents quickly understand their capabilities without wasting context window tokens.
144
+
***You want to optimize AI agent reasoning.** Large Language Models degrade in performance and hallucinate when overwhelmed with choices. Codegraph’s tight 17-tool surface area ensures agents quickly understand their capabilities without wasting context window tokens.
145
145
***You are concerned about supply chain attacks.** To support 90 tools, SBOMs, and neural embeddings, a tool must pull in a massive dependency tree. Codegraph keeps its dependencies minimal, dramatically reducing the risk of malicious code sneaking onto your machine.
146
146
***You want deterministic blast-radius checks.** Features like `diff-impact` are built specifically to tell you exactly how a changed function cascades through your codebase before you merge a PR.
147
147
***You value a strong standalone CLI.** You want to query your code graph locally without necessarily spinning up an AI agent.
| 🧠 |**Semantic search**| Embeddings-powered natural language search with multi-query RRF ranking |
192
192
| 👀 |**Watch mode**| Incrementally update the graph as files change |
193
-
| 🤖 |**MCP server**|13-tool MCP server for AI assistants; single-repo by default, opt-in multi-repo |
193
+
| 🤖 |**MCP server**|17-tool MCP server for AI assistants; single-repo by default, opt-in multi-repo |
194
194
| 🔒 |**Your code, your choice**| Zero-cost core with no API keys. Optionally enhance with your LLM provider — your code only goes where you send it |
195
195
196
196
## 📦 Commands
@@ -391,7 +391,7 @@ Metrics are normalized per file for cross-version comparability. Times above are
391
391
392
392
### MCP Server
393
393
394
-
Codegraph includes a built-in [Model Context Protocol](https://modelcontextprotocol.io/) server with 13 tools, so AI assistants can query your dependency graph directly:
394
+
Codegraph includes a built-in [Model Context Protocol](https://modelcontextprotocol.io/) server with 17 tools, so AI assistants can query your dependency graph directly:
395
395
396
396
```bash
397
397
codegraph mcp # Single-repo mode (default) — only local project
Add this to your project's `CLAUDE.md` to help AI agents use codegraph:
408
+
Add this to your project's `CLAUDE.md` to help AI agents use codegraph (full template in the [AI Agent Guide](docs/ai-agent-guide.md#claudemd-template)):
409
409
410
410
```markdown
411
411
## Code Navigation
412
412
413
413
This project uses codegraph. The database is at `.codegraph/graph.db`.
414
414
415
-
-**Before modifying a function**: `codegraph fn <name> --no-tests`
416
-
-**Before modifying a file**: `codegraph deps <file>`
For AI-specific integration, see the **[AI Agent Guide](docs/ai-agent-guide.md)** — a comprehensive reference covering the 6-step agent workflow, complete command-to-MCP mapping, Claude Code hooks, and token-saving patterns.
475
+
459
476
## 🔁 CI / GitHub Actions
460
477
461
478
Codegraph ships with a ready-to-use GitHub Actions workflow that comments impact analysis on every pull request.
0 commit comments