AI-Driven Code Refactoring: Improving Legacy Codebases Automatically
summary
Automatic pipeline extracts project metadata and file structure with plain scripts, then uses a local Olama model (running qun 3) to analyze each file and Gemini to compile a codebase summary and refactor plan; a demo React “monkey trail” app is refactored end-to-end with generated tests, utils extraction and conversion of a class to hooks. Claims a 90% drop in refactor time, follows metadata→structure→file analysis→transform phases, and outputs runnable tests and a step‑by‑step refactor plan using Olama + Gemini for verification.
AI-written summary · about
chapters (8)
- 0:00Introduction and context
- 2:20The case for AI refactoring
- 13:43Four phases of refactoring
- 15:18Phase 1: Gathering insights
- 20:19Analysis workflow demonstration
- 36:40Phase 2 and 3: Prepare and transform
- 52:26Phase 4: Aftermath and validation
- 57:41Best practices and conclusion
related talks
26mOrchestrating AI Agents for Large-Scale Refactoring
47mExploring a complex codebase with AI
25mManage large refactors with JSCodeShift
01h 16mAutomating Large Scale Refactors with Parallel Agents
45mAI Assistance for Software Teams: The State of Play
30mAI First Legacy Migration
37mAI-Driven Developer Productivity at Scale
08mMigrating from COBOL with AI: A Moonshot Demo
