orchestrata_ultimate.refactor.codemod.analysis
Reference › orchestrata_ultimate › refactor › codemod › analysis
SPEC-110 read-only analysis passes (FR-011, REQ-110-031 / REQ-110-032).
The analysis package holds the seven read-only analysis passes of SPEC-110 (FR-011, REQ-110-031 and 032), each answering a question about a loaded codebase without changing it; the tests compare graph counts and module bytes before and after to prove it. They run on the code intelligence graph and the forest of the codemod workspace, and scripts.codemod analyze is the entry point (the S2 packet in the refactor package narrative lists its query options).
The analyzers: blast_radius (what a change could reach), breaking_change (signature changes and their importers), complexity with metrics, test_coverage, abstraction, coupling and dead_code. The shared parts are the protocol with its target resolver and the JSON encoder. Result types live in _types. Each analyzer is constructed over the graph (the complexity analyzer also takes the forest), takes an optional target, and returns a frozen result record. Start with protocol.
11 modules, 967 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
SPEC-110 read-only analysis passes (FR-011, REQ-110-031 / REQ-110-032). | 45 |
abstraction |
AbstractionAnalyzer — read-only adapter over CodeIntelligenceGraph.abstraction_level. |
43 |
blast_radius |
BlastRadiusAnalyzer — read-only adapter over CodeIntelligenceGraph.blast_radius. |
48 |
breaking_change |
BreakingChangeDetector — signature diffs of a ChangeSet, fanned out to importers. | 150 |
complexity |
ComplexityAnalyzer — per-function complexity from the forest's ast overlay. |
107 |
coupling |
CouplingAnalyzer — read-only adapter over CodeIntelligenceGraph.coupling_score. |
48 |
dead_code |
DeadCodeDetector — modules no entry point reaches (module granularity only). | 104 |
encode |
AnalysisResultEncoder — analysis results as JSON-serialisable dicts. | 47 |
metrics |
ComplexityMetrics — cyclomatic, nesting and cognitive complexity over ast nodes. |
169 |
protocol |
The AnalysisPass protocol and the shared target resolver (SPEC-110 FR-011). | 56 |
test_coverage |
TestCoverageMapper — which functions have tests, by TESTED_BY edge or name. | 150 |