What problem does it solve? Legacy codebases accumulate complexity, hidden performance bottlenecks like N+1 queries and O(N^2) loops, and risky monolithic structures that are dangerous to change without a proven methodology. ## Core Features & Use Cases - Safe Refactoring Patterns: Apply the Strangler Fig pattern, Branch by Abstraction, and pure-function extraction to modernize legacy code without breaking production. - Performance Engineering: Diagnose bottlenecks with flamegraphs, eBPF profiling, and k6 load testing, then fix algorithmic complexity, memory allocation, and N+1 query problems. - Complexity Reduction: Reduce SonarJS cognitive complexity using lookup tables, early returns, component splitting, and React hook extraction. - Use Case: When an endpoint takes 5 seconds to load, load the performance references to identify missing database indexes or network waterfalls, then refactor with green tests as a safety net. ## Quick Start Ask the assistant to analyze a slow endpoint or a deeply nested function and propose a safe, test-backed refactoring plan.