Complexity Analyzer
Complexity is the enemy. Good design reduces the complexity developers face.
Three Symptoms
- •
Change Amplification: Simple change requires modifications in many places
- •Duplicated magic values, scattered configuration, tight coupling
- •
Cognitive Load: Too much knowledge needed to complete a task
- •Too many parameters, deep nesting, complex conditionals, hidden state, non-obvious side effects
- •
Unknown Unknowns: Not obvious what to modify or what info is needed
- •Missing docs on non-obvious behavior, implicit contracts, hidden dependencies, action-at-a-distance
Red Flags
- •Shallow modules (interface nearly as complex as implementation)
- •Information leakage (implementation details in interfaces)
- •Pass-through methods (just call another method)
- •Conjoined methods (must be called together)
- •Temporal decomposition (split by execution order, not information hiding)
Output
Complexity level (Low/Medium/High/Critical), findings with location/symptom/impact/suggestion, prioritized refactoring recommendations.