Update analyze extension instructions (#9585)

Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2026-06-10 16:51:00 -04:00
committed by GitHub
parent 9455f8a56a
commit fde407c9d3
2 changed files with 18 additions and 8 deletions
@@ -58,10 +58,15 @@ impl AnalyzeClient {
let info = InitializeResult::new(ServerCapabilities::builder().enable_tools().build())
.with_server_info(Implementation::new(EXTENSION_NAME, "1.0.0").with_title("Analyze"))
.with_instructions(indoc! {"
Analyze code structure using tree-sitter AST parsing. Three auto-selected modes:
- Directory path → structure overview (file tree with function/class counts)
- File path → semantic details (functions, classes, imports, call counts)
- Any path + focus parameter → symbol call graph (incoming/outgoing chains)
Index code structure via tree-sitter. Use to navigate or summarize an unfamiliar
and large codebase. Returns one of three views:
1) Directory path file tree with LOC, function, and class counts
(depth-limited).
2) File path → list of functions (with signatures), classes, imports,
and call counts. Functions called >3x are marked •N.
3) Any path + `focus` → incoming/outgoing call graph for a symbol
(case-sensitive).
For large codebases, delegate analysis to a subagent and retain only the summary.
"});
@@ -39,10 +39,15 @@ Use list_resources and read_resource to work with extension data and resources.
## analyze
### Instructions
Analyze code structure using tree-sitter AST parsing. Three auto-selected modes:
- Directory path → structure overview (file tree with function/class counts)
- File path → semantic details (functions, classes, imports, call counts)
- Any path + focus parameter → symbol call graph (incoming/outgoing chains)
Index code structure via tree-sitter. Use to navigate or summarize an unfamiliar
and large codebase. Returns one of three views:
1) Directory path file tree with LOC, function, and class counts
(depth-limited).
2) File path → list of functions (with signatures), classes, imports,
and call counts. Functions called >3x are marked •N.
3) Any path + `focus` → incoming/outgoing call graph for a symbol
(case-sensitive).
For large codebases, delegate analysis to a subagent and retain only the summary.