Expand description
Code structure graph — code.graph, code.query, code.affected_by,
fragment.search.
Port of the v26 CodeStructureGraph surface: scan a project, extract
symbols (functions, classes, methods, imports) and edges (calls,
imports, inheritance), then answer structural questions:
code.graph— build (or refresh) the graph for a project rootcode.query— natural-language queries: “what calls X”, “what does X call”, “path from A to B”, “explain X”, “god nodes”, “search X”code.affected_by— everything transitively affected by changing a symbol (reverse call-graph BFS)fragment.search— locate the file/line fragments mentioning a query
Extraction is regex-based per language (no parser dependency), bounded
by file count and file size, and the graph is shared across calls so a
single code.graph build serves many queries.
Structs§
- Code
Affected ByTool code.affected_by— find symbols affected by a change.- Code
Edge - A directed relationship between two nodes.
- Code
Graph - The shared code structure graph.
- Code
Graph Tool code.graph— build (or refresh) the code structure graph.- Code
Node - A symbol in the code graph.
- Code
Query Tool code.query— natural-language queries against the code graph.- Fragment
Search Tool fragment.search— locate code fragments mentioning a query.
Functions§
- register_
code - Register the code tools (4) against a shared graph.