The Nine-Step Migration Roadmap

"Migrate to a new architecture" is a sentence that has sunk many roadmaps, because it hides a hundred decisions about order. The book's answer is to let the layers set the order. Start at the bottom, where nothing depends on much, and climb. Each step has the same four-part entry: what to do, how long it takes, what can go wrong and how you know it is finished.

Bottom-up, with a calendar

The book's first estimate is two weeks for a codebase of 100,000 to 500,000 lines, and the whole schedule runs about twenty-four weeks. The first four steps relocate code that already exists, in layer order:

  1. Schema (weeks 1 to 2): gather types, interfaces, validation schemas, enums and constants into one place.
  2. Utils (weeks 3 to 4): move pure helpers into a layer that may depend only on Schema.
  3. Resources (weeks 5 to 8): wrap every database, HTTP and queue integration behind a domain-typed interface.
  4. Tools (weeks 9 to 12): decompose business logic into single-responsibility tools with no dependencies on one another.

Step 5 builds the API layer, which maps external protocols onto tool calls and holds no business logic. Steps 6 to 8 then add MCP, Skills and Agents. The book points out that these three are additive rather than extractive: they are new code on top of the existing tools, not a reshuffle of old code. Step 9, the UI, runs alongside them. It needs only the API contract from Step 5, so a separate group of engineers can work on it in parallel.

Where the effort really goes

The steps are not equal, and the book says so candidly. Schema extraction is largely mechanical, and codemod tools such as jscodeshift or ts-morph can handle most of the import path rewrites. Utils needs judgement about what is really pure: the hard part is spotting a "utility" that quietly reads an environment variable or a connection. Resources is the first step that demands real design, since interfaces must hide the underlying SDK.

Tools is the heavyweight. Business logic is usually the most tangled part of a legacy system, and the book warns to expect hidden coupling, shared mutable state and calls that depend on an unwritten order. The characteristic risk is the god tool, a module that handles several concerns and resists being split. Cross-tool dependencies discovered here have to be resolved by moving the shared code downward, as Axiom A5 prescribes.

A second pattern is that steps depend on each other in both directions. In a bike-hire app whose route handlers calculate prices inline, the API step cannot finish until that pricing logic has been moved into a tool. Likewise, if the generated UI client reveals a gap in the API, the book says the team must return to Step 5.

Every step has a gate

The feature that makes the roadmap usable is its verification list. Each step ends with criteria that can be checked, mostly by tooling you already have. Some examples from the book:

  • After Schema, the linter reports no upward dependencies from it and the compiler reports no errors.
  • After Utils, coverage exceeds 95 per cent and every function is demonstrably pure or depends only on Schema types.
  • After Resources, performance benchmarks show a regression of no more than 5 per cent.
  • After Tools, each tool is self-contained, covered to at least 90 per cent, and the linter finds zero cross-tool violations.
  • After the API step, no route handler contains business logic, and every route delegates to a tool.

Those numbers connect to the earlier chapters: the coverage targets come from the testing pyramid, and the dependency checks are what lvd-lint already does. A step is only done when its gate is green, which keeps a half-finished layer from quietly becoming the new status quo.

The takeaway

The value of a roadmap is not the calendar, which you will adjust, but the discipline: one layer at a time, lowest first, each with a definition of done that a script can confirm. The book gives the full entry for all nine steps, with risks and verification for each. For how to carry out the moves without stopping the business, see the migration patterns.

What the book covers

  • The full what-to-do, duration, risks and verification entry for each of the nine steps
  • Codemod approaches for the mechanical import rewrites
  • Why Tools extraction is the highest-effort step
  • How the UI restructuring runs in parallel with MCP, Skills and Agents