Descriptions:
Web Dev Cody shares a structured prompting strategy for managing large AI-assisted refactors — a common pain point where agentic coding tools lose coherence across hundreds of file changes. The core technique involves generating a plan folder of sequentially numbered Markdown files before writing any code, with each file representing a discrete phase. The AI agent — Claude Code, Cursor Composer, or Gemini — works through these files one at a time, pausing for developer review at each phase boundary.
The video uses a real refactor as the example: splitting a monolithic Electron/Next.js desktop app called Automaker into a monorepo with separate packages for a Docker REST API, a web app, an Electron wrapper, a marketing site, and shared core libraries. Cody explains that he primed Claude Opus 4.5 or Gemini 3 (chosen for large context windows) with the architectural goals in plain language, then asked it to produce the phased plan itself — including file-level detail drawn from a codebase inspection — rather than writing the plan manually.
The key insight is phase-gating: rather than asking an agent to execute a thousand-file refactor in one shot, the plan structure gives the developer natural checkpoints to catch drift, adjust assumptions, and keep the agent on track. The approach is tool-agnostic and applicable to any large restructuring task across Claude Code, Cursor, or similar agentic coding environments.
📺 Source: Web Dev Cody · Published December 11, 2025
🏷️ Format: Workflow Case Study







