SI Learning
0% read

MODULE 12 / 18 · PART 4 · SHIP & SUSTAIN

Legacy & Migration

Prefer incremental coexistence to a heroic big-bang rewrite.

40 min + practice20 copy-ready promptsJump to prompts ↓

THE SHORT ANSWER

What this module changes.

Legacy code must be read from behavior, not documentation. Capture current behavior, find seams, and make every stage shippable.

Legacy prompts should favor incremental over heroic. The strangler pattern beats the big bang almost every time.

The Excel workbook that runs the business is legacy code. So is the Access database, the WordPress plugin and the PHP script nobody wants to touch. Treat their formulas, exceptions and month-end rituals as requirements before you replace them.

THE MODULE PROMPT LIBRARY

20 prompts for legacy & migration.

Copy any prompt, replace the [bracketed] slots with your own project context, and attach the files the agent needs. Use “Copy all prompts” when you want the full module in one place.

20 copy-ready prompts. Bracket text is a slot for your own context — replace it before you send the prompt.

Prompt 01

How do I migrate this incrementally? Give me the steps, the intermediate states, and what is shippable at each one.

Why it worksIncremental migration keeps the system working throughout.

Prompt 02

Write the characterization tests for this legacy code before we touch it: [code]. Capture the current behavior, bugs included.

Why it worksYou cannot safely change code you cannot verify.

Prompt 03

What does this legacy code actually do? Explain it as if the original author is unavailable and the comments are lies.

Why it worksLegacy code must be read from behavior, not from documentation.

Prompt 04

Identify the seams in this legacy module where we can introduce a new implementation behind an interface.

Why it worksSeams are what make strangler-fig migration possible.

Prompt 05

Design the strangler fig for [legacy system]: the routing, the coexistence period, and the cutover criteria.

Why it worksCoexistence and cutover criteria are what make the migration finishable.

Prompt 06

What is the riskiest part of this migration, and how do we de-risk it first?

Why it worksFront-loading the riskiest step prevents late-stage surprises.

Prompt 07

How do we run the old and new implementations in parallel and compare their outputs?

Why it worksShadow comparison is the strongest evidence that a migration is correct.

Prompt 08

What data migration is required, and how do we handle records written during the migration window?

Why it worksThe dual-write window is where most migrations lose data.

Prompt 09

Write the rollback plan for this migration at each stage, including the point of no return.

Why it worksKnowing where you can no longer go back changes how carefully you step.

Prompt 10

Which parts of this legacy system can we simply delete rather than migrate?

Why it worksThe cheapest migration is the one you do not have to do.

Prompt 11

What is the business logic hidden in this legacy code that is not documented anywhere?

Why it worksUndocumented behavior is the real risk in any migration.

Prompt 12

Propose the interface that lets new and old code coexist without either knowing about the other.

Why it worksAn anti-corruption layer keeps the new system clean.

Prompt 13

How do we freeze the legacy system so it stops growing while we migrate it?

Why it worksA moving target cannot be migrated.

Prompt 14

Estimate the migration effort by component and identify the long pole.

Why it worksMigrations are usually gated by one component; find it early.

Prompt 15

What tests do we need before, during, and after the migration to prove nothing broke?

Why it worksMigration testing is a sequence, not a single gate.

Prompt 16

Write the cutover runbook for [migration]: the sequence, the checks, the abort criteria, and the owners.

Why it worksCutover is a procedure; procedures need runbooks.

Prompt 17

What is the cost of doing nothing? Quantify the ongoing maintenance burden of the legacy system.

Why it worksJustifies the migration investment in terms the business understands.

Prompt 18

How do we handle the legacy data model's inconsistencies during migration?

Why it worksLegacy data is almost never as clean as the schema claims.

Prompt 19

Propose the phased plan for [migration] with a value delivery at the end of each phase.

Why it worksPhases that deliver value survive budget reviews.

Prompt 20

What would make us abandon this migration halfway, and how do we avoid that state?

Why it worksThe half-migrated system is the worst possible outcome.

PRACTICE · 20–30 MINUTES

Try it on a project you actually own.

Draw the strangler path for one legacy workflow: seam, facade, coexistence, cutover and rollback. Mark the point of no return.

  1. Pick one prompt from this module that matches a real task.
  2. Replace every bracketed slot with context from the feature you are working on now.
  3. Attach only the files the agent needs. Keep secrets, credentials and personal data out of the chat.
  4. Ask for the artifact — a spec, diff, test, runbook or decision note — and the evidence that it works.
  5. Record what changed and what remains unverified in the repository.

Want the same prompts across every module? Search the full prompt library or return to the course overview.