Reasoning-Driven Refactor Engine: Finding Architectural Debt
Use Structural map of a repository (classes, functions, data flow). Then use Gemini 3's long context to map against "best practices" from books like Designing Data Intensive Applications.
Example: Your orderService is becoming a God Object. if you scale to 5,000 requests/sec, this specific database lock in the line X will cause a system wide hang.
Issues: It requires a the AI to maintain a mental model of the entire system, not just a single snippet.











