Analysis
Tools for answering “what does this affect?” and “how did this evolve?“
code_impact
Section titled “code_impact”Severity-scored blast radius. Run before any refactor.
code_impact(name="UserService", depth=3)Returns CRITICAL / HIGH / MEDIUM / LOW dependents. See the full reference.
code_hotspots
Section titled “code_hotspots”Most-called, most-complex, or largest symbols in the project.
code_hotspots(type="called") # most-called functionscode_hotspots(type="complex") # highest cyclomatic complexitycode_hotspots(type="large") # most lines of codeGood for finding where to focus optimization or test coverage.
code_dead
Section titled “code_dead”Find code with no callers — potential dead code.
code_dead()Returns symbols with zero inbound edges. Review before deleting — some are intentional entry points (CLI commands, event handlers).
code_diff_context
Section titled “code_diff_context”Git diff plus all affected callers. Better than git diff.
code_diff_context()code_diff_context(base="HEAD~3")Shows changed lines AND every function in the graph that depends on what changed. Answers “what does this PR actually affect?“
code_changelog
Section titled “code_changelog”Function-level git history. Better than git log.
code_changelog(name="processPayment")code_changelog(name="UserService")Shows commits that touched this specific function — not the whole file.
code_summary
Section titled “code_summary”Full project overview: architecture, key modules, entry points.
code_summary()Start here when exploring an unfamiliar project.
code_map
Section titled “code_map”ASCII architecture diagram of the project.
code_map()Shows modules and their relationships as a visual graph in text form.
code_error_context
Section titled “code_error_context”Get the code around an error line number — useful when mapping stack traces back to source.
code_error_context(file="src/services/payment.ts", line=142)