dep_graph
Generate dependency graphs for a file or entire project, revealing nodes, edges, and cycles to guide impact analysis and fix circular imports.
Instructions
Import dependency graph of a file (transitive N levels) or the whole project (scope=project → nodes/edges/cycles). Circular deps? fix_imports. Changing a dep? impact_analysis first.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File path relative to workspace_dir (e.g. "scripts/lib/tools/spawn.mjs"). Omit or use scope=project for whole-project graph. | |
| depth | No | Transitive depth (default 3, max 10). File mode only. | |
| scope | No | B13: scope=project → whole-project module graph {nodes, edges, cycles}. Mutually exclusive with file. | |
| workspace_dir | Yes | REQUIRED: project root (abs). reindex first if new. |