codegraph_context
Builds a bounded, token-budgeted code subgraph for AI coding tasks, tracing callers, dependencies, and imports within hop limits, then returns ranked nodes, paths, budget usage, and drop reasons.
Instructions
Build a bounded, token-budgeted context subgraph for an AI coding task. Finds query-matching seed nodes, expands callers/dependencies/imports up to max_hops, ranks candidates, and returns compact nodes, relationship paths, budget usage, candidate counts, and per-item drop reasons.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Project root | |
| top_k | No | Maximum query seed nodes (default 5) | |
| max_hops | No | Maximum graph expansion depth (default 2, max 5) | |
| question | No | Current code task or architecture question | |
| token_budget | No | Maximum approximate tokens for nodes and edges |