From 247879f276990c82899b7e191d49d05df34f8e25 Mon Sep 17 00:00:00 2001 From: wangziqi Date: Fri, 10 Jul 2026 14:13:07 +0800 Subject: [PATCH] docs: add CodeGraph repository guidance Document the preferred CodeGraph-first workflow for locating and understanding indexed code. --- AGENTS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..f3fca9a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,10 @@ + +## CodeGraph + +In repositories indexed by CodeGraph (a `.codegraph/` directory exists at the repo root), reach for it BEFORE grep/find or reading files when you need to understand or locate code: + +- **MCP tool** (when available): `codegraph_explore` answers most code questions in one call — the relevant symbols' verbatim source plus the call paths between them, including dynamic-dispatch hops grep can't follow. Name a file or symbol in the query to read its current line-numbered source. If it's listed but deferred, load it by name via tool search. +- **Shell** (always works): `codegraph explore ""` prints the same output. + +If there is no `.codegraph/` directory, skip CodeGraph entirely — indexing is the user's decision. +