Orchestrating AI Agents for Large-Scale Refactoring
summary
Built an AST-based deterministic analyzer that walks 40,000 files, emits a dependency tree of extractable leaves, and drives a migration pipeline of micro-prompts and atomic steps with deterministic validations and retries. The system runs micro-scripts for safe refactors (move constants, import cleanup), an automated results are the same test that compares old vs new implementations, and a Human-in-the-loop gate for AI blockers. Outcome: 155 files/week (310 PRs/week) to compress an 8-year estimate into six months.
AI-written summary · about
chapters (13)
- 0:00Introduction and context
- 5:42Why refactor the monolith
- 7:53Morfex dependency analyzer
- 9:16Morfex PR generation
- 12:04Micro-prompts and validations
- 13:52Migration builder and safety
- 15:40Zero-behavior-change testing
- 17:25Full Morfex workflow
- 18:54Scaling to 310 PRs per week
- 20:21Auto-merge and human oversight
- 22:04Merge decision control
- 22:48R&D feedback and trust
- 23:56Key takeaways and culture
related talks
01h 16mAutomating Large Scale Refactors with Parallel Agents
28mAI Migration at SCALE: Make Complex Code Tasks 10X Faster (The Blueprint)
01h 00mAI-Driven Code Refactoring: Improving Legacy Codebases Automatically
30mArchitecting Integrity: Responsible Software Evolution in the AI Era
32mFrom Toil To Triumph: Harnessing Agentic AI To Streamline Infrastructure as Code
25mFrom AI Chaos to Production Ready: Using AI Agents to Improve Your Code Quality
26mAST + AI = Developer Co-Pilot 2.0
21mAutomating Front-End Refactoring
