Tarjan SCC Circular Import Detector & Topological Blast-Radius Solver
audit_module_dependency_cyclesRuns Tarjan's Strongly Connected Components (SCC) algorithm on a module import map to detect circular dependencies, compute parallel topological build waves, and trace downstream change blast radius. Use when auditing multi-file import graphs for circular cycles or determining which downstream files must be re-tested after an edit; for extracting function-level symbols and cyclomatic complexity inside a single source file, use analyze_ast_symbol_graph instead. Read-only call (32 KB, 60 RPM): accepts 'modules_json' (with enum defaults), uses '?demo=true' or L402 (75 sats); HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| modules_json | Yes | JSON string or object mapping each module name to its array of imported module names (e.g. '{"a":["b"],"b":[]}'). | |
| analysis_scope | No | Graph analysis output mode; defaults to 'cycles_waves_and_blast_radius' when omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total_modules | Yes | Total number of graph vertices analyzed. | |
| circular_scc_groups | Yes | Strongly connected component cycles discovered via Tarjan's algorithm. | |
| topological_build_waves | Yes | Dependency-ordered parallel build/test execution waves. | |
| transitive_blast_radius | Yes | All upstream callers transitively impacted by the modified modules. | |
| circular_dependencies_detected | Yes | True if one or more circular dependency cycles exist. |