Migration Engineering
Plan and execute safe migrations across system boundaries. A migration is any
change that moves data, schemas, interfaces, infrastructure, or services from a
current state to a target state while preserving correctness, availability, and
recoverability during the transition.
This skill owns the cross-system migration method — compatibility design,
staging, reconciliation, cutover, recovery, and deprecation. It does not own the
implementation details of any single technology or subsystem; those belong to
specialist skills.
When to use
Load this skill when the task involves:
| Trigger |
Example |
| A schema change that must not break existing readers or writers |
"Add a non-nullable column to a high-traffic table with zero downtime" |
| A data migration between stores or representations |
"Migrate user profiles from Postgres to a dedicated service with its own database" |
| An API version migration with a deprecation window |
"Move consumers from v1 REST to v2 GraphQL over six months" |
| An infrastructure or service migration |
"Shift a workload from self-hosted VMs to a managed platform across regions" |
| A cross-system change requiring dual-running and reconciliation |
"Replace the legacy billing engine with a new one while keeping both in sync" |
| Planning cutover, rollback, or irreversible steps for a migration |
"Define the recovery strategy for the warehouse schema migration" |
When not to use
- Single-technology quick fixes — if the change is confined to one system
with no compatibility window, no dual-running, and no cross-system coordination,
use the relevant specialist skill directly (e.g., data-engineering
for a simple DDL change, api-design-and-evolution
for a single-endpoint deprecation).
- Tool-specific how-to guides — this skill provides the method, not
vendor-specific instructions. It does not prescribe one migration technology, one
database engine, one API gateway, or one infrastructure platform.
- Migrations without a system boundary — in-place refactors, code rewrites
that don't cross a data or interface boundary, or single-service configuration
changes are not migration-engineering scope.
- Guaranteeing rollback — this skill does not claim rollback is always possible.
Some migrations include steps that are irreversible; the method requires
identifying those steps explicitly and planning acceptance, communication, and
contingency rather than implying a false safety net.
For service extraction, load references/service-extraction-patterns.md
when a boundary has been proposed and the transition pattern, coexistence shape,
or modular-monolith alternative needs assessment. Use
templates/service-extraction-assessment.md
to capture the evidence before filling the general migration plan. This skill
sequences an approved extraction; it does not decide that a monolith should be
split or identify the target architecture.
Core workflow
1. Classify and scope the migration
Determine which migration type(s) apply — real-world migrations often combine
types (a service extraction includes both a data migration and an API
migration). Document the current state, target state, boundary being crossed,
type(s) with their compatibility requirements, and affected systems, teams,
and consumers. Load references/migration-types.md
for the classification of schema, data, API, infrastructure/service, and
service-extraction migrations.
2. Design the expand/contract sequence
The expand/contract pattern is the foundational safe-migration primitive:
- Expand — add the new interface, schema, or system while the old one
continues to serve; both coexist, and existing consumers are unaffected.
- Compatibility window — a defined period during which both old and new
are available, with an explicit end condition (date, metric threshold, or
event such as all registered consumers confirmed).
- Dual-running or parallel operation — for data and service migrations,
both systems operate concurrently (dual writes, dual reads with comparison),
producing the evidence needed for the cutover decision.
- Contract — remove the old interface after the window closes and
verification confirms correctness and completeness.
Not every migration uses all four phases: an additive schema change may need
only the expand phase; a complex service extraction uses all four.
3. Plan the backfill and reconciliation
For data migrations, choose a backfill strategy — full, incremental, or
streaming (CDC/event log). Reconciliation verifies source and target match on
four dimensions — completeness, accuracy, timeliness, and consistency — runs
continuously during the compatibility window, and must pass before cutover;
a reconciliation failure is a stop condition.
4. Design the cutover
Define the exact procedure (automated where possible, with pre/post
conditions), the window and acceptable downtime, interruption points where the
cutover can be paused or reversed (a cutover with none is a risk to flag
explicitly), and the observability that confirms progress and triggers abort.
5. Define recovery paths
Every migration step has exactly one of four recovery classifications — never
conflate them: rollback (undo the change), roll-forward (fix forward in
the new state), restore (recover from backup/snapshot), and irreversible
(no reversal possible at any level). Irreversible steps require explicit
acknowledgment before execution; distinguish "we chose not to build a reversal
path" from "reversal is physically impossible." Both require acceptance,
communication, and contingency. Load
references/recovery-classification.md
when classifying concrete steps.
6. Plan deprecation and cleanup
After verified cutover: define the deprecation window for the old system in
read-only/degraded mode, track which consumers still depend on the old
interface, remove old schemas/code paths/flags/configuration/credentials/
infrastructure, and communicate at each stage (window opens, cutover scheduled,
cutover complete, window closing, removal).
7. Verify and close
Before declaring completion, collect correctness evidence (reconciliation
reports, consumer verification, error-rate comparisons, SLO compliance),
confirm observability shows the expected steady state, verify recovery
procedures were tested and irreversible steps acknowledged, and obtain owner
sign-off per phase.
Loading guide
Load references and templates on demand — do not load everything at once.
| File |
Load when |
| references/discovery-brief.md |
You need to understand how migration concepts map across sibling skills and where this skill's boundaries are |
| references/migration-types.md |
Classifying a migration (schema, data, API, infrastructure/service, service extraction) before selecting patterns |
| references/compatibility-patterns.md |
Designing forward/backward compatibility for a specific migration type |
| references/recovery-classification.md |
Classifying recovery paths (rollback, roll-forward, restore, irreversible) for a concrete migration step |
| references/planning-fields.md |
Drafting or reviewing the structured planning fields (reconciliation, evidence, observability, customer impact, ownership) a plan must address |
| references/service-extraction-patterns.md |
Assessing extraction seams and selecting strangler routing, branch by abstraction, anti-corruption, CDC, and parallel-run patterns; includes modular-monolith retention criteria |
| templates/migration-plan.md |
Producing a complete migration plan with all structured fields |
| templates/compatibility-matrix.md |
Building a compatibility matrix for a multi-consumer migration |
| templates/reconciliation-plan.md |
Designing a reconciliation strategy for a data migration |
| templates/cutover-and-recovery-record.md |
Recording cutover procedures, recovery paths, and irreversible-step acknowledgments |
| templates/service-extraction-assessment.md |
Capturing boundary evidence, coupling, ownership, coexistence, sequencing, operational risk, reversibility, and the decision to extract or retain a modular monolith |
Specialist routing
Migration engineering composes domain specialists — it never duplicates their
methodology. Route implementation details to the skill that owns the subsystem.
| Migration concern |
Route to |
| Decomposition justification and target-boundary decision |
software-architecture; this skill sequences an authorized transition |
| API contract design, versioning policy, deprecation mechanics |
api-design-and-evolution |
| Database schema evolution, ETL/ELT pipeline design, backfill operations |
data-engineering |
| Infrastructure provisioning, service networking, secret management during migration |
platform-engineering |
| Release sequencing, progressive delivery, canary rollout, artifact promotion |
release-engineering |
| SLO definition, error budgets, operational readiness, incident response during migration |
site-reliability-engineering |
| Work breakdown, dependency mapping, critical path, ownership assignment |
implementation-planning |
| Threat modeling, security review of migration surface, auth boundary changes |
secure-software-engineering |
| Test strategy, regression coverage, verification gates during migration |
qa-methodology |
| Verification verdicts, evidence standards, boundary testing |
verification-methodology |
Routing to same-wave and future skills
Migration evidence — reconciliation reports, cutover records, recovery-path
classifications, and deprecation tracking — feeds production-readiness
assessments. The production-readiness skill consumes migration plans as evidence
that a service is ready for production operation.
The production-excellence bundle composes migration-engineering alongside
production-readiness, resilience-and-recovery, capacity-and-cost-engineering,
incident-learning, and privacy-engineering. Migration-engineering contributes
the safe-change dimension to the production-excellence lifecycle.
Routing to product-lifecycle skills
When a migration is triggered by a feature retirement or product sunset,
coordinate with product-lifecycle-learning for the retirement decision
record, deprecation timeline, and customer-treatment plan.
1---2name: migration-engineering3description: Plan and execute safe cross-system migrations, including service extraction from monoliths. Use when moving data, schemas, interfaces, infrastructure, or service ownership through compatibility windows, dual-running, reconciliation, cutover, recovery, or deprecation. Do not use for deciding whether decomposition is justified, designing a target architecture, or implementing one named technology; route those to the relevant architecture or specialist skill.4license: MIT5---67# Migration Engineering89Plan and execute safe migrations across system boundaries. A migration is any10change that moves data, schemas, interfaces, infrastructure, or services from a11current state to a target state while preserving correctness, availability, and12recoverability during the transition.1314This skill owns the **cross-system migration method** — compatibility design,15staging, reconciliation, cutover, recovery, and deprecation. It does not own the16implementation details of any single technology or subsystem; those belong to17specialist skills.1819## When to use2021Load this skill when the task involves:2223| Trigger | Example |24|---|---|25| A schema change that must not break existing readers or writers | "Add a non-nullable column to a high-traffic table with zero downtime" |26| A data migration between stores or representations | "Migrate user profiles from Postgres to a dedicated service with its own database" |27| An API version migration with a deprecation window | "Move consumers from v1 REST to v2 GraphQL over six months" |28| An infrastructure or service migration | "Shift a workload from self-hosted VMs to a managed platform across regions" |29| A cross-system change requiring dual-running and reconciliation | "Replace the legacy billing engine with a new one while keeping both in sync" |30| Planning cutover, rollback, or irreversible steps for a migration | "Define the recovery strategy for the warehouse schema migration" |3132## When not to use3334- **Single-technology quick fixes** — if the change is confined to one system35 with no compatibility window, no dual-running, and no cross-system coordination,36 use the relevant specialist skill directly (e.g., [data-engineering](../data-engineering/SKILL.md)37 for a simple DDL change, [api-design-and-evolution](../api-design-and-evolution/SKILL.md)38 for a single-endpoint deprecation).39- **Tool-specific how-to guides** — this skill provides the method, not40 vendor-specific instructions. It does not prescribe one migration technology, one41 database engine, one API gateway, or one infrastructure platform.42- **Migrations without a system boundary** — in-place refactors, code rewrites43 that don't cross a data or interface boundary, or single-service configuration44 changes are not migration-engineering scope.45- **Guaranteeing rollback** — this skill does not claim rollback is always possible.46 Some migrations include steps that are irreversible; the method requires47 identifying those steps explicitly and planning acceptance, communication, and48 contingency rather than implying a false safety net.4950For service extraction, load [references/service-extraction-patterns.md](references/service-extraction-patterns.md)51when a boundary has been proposed and the transition pattern, coexistence shape,52or modular-monolith alternative needs assessment. Use53[templates/service-extraction-assessment.md](templates/service-extraction-assessment.md)54to capture the evidence before filling the general migration plan. This skill55sequences an approved extraction; it does not decide that a monolith should be56split or identify the target architecture.5758## Core workflow5960### 1. Classify and scope the migration6162Determine which migration type(s) apply — real-world migrations often combine63types (a service extraction includes both a data migration and an API64migration). Document the current state, target state, boundary being crossed,65type(s) with their compatibility requirements, and affected systems, teams,66and consumers. Load [references/migration-types.md](references/migration-types.md)67for the classification of schema, data, API, infrastructure/service, and68service-extraction migrations.6970### 2. Design the expand/contract sequence7172The **expand/contract pattern** is the foundational safe-migration primitive:73741. **Expand** — add the new interface, schema, or system while the old one75 continues to serve; both coexist, and existing consumers are unaffected.762. **Compatibility window** — a defined period during which both old and new77 are available, with an explicit end condition (date, metric threshold, or78 event such as all registered consumers confirmed).793. **Dual-running or parallel operation** — for data and service migrations,80 both systems operate concurrently (dual writes, dual reads with comparison),81 producing the evidence needed for the cutover decision.824. **Contract** — remove the old interface after the window closes and83 verification confirms correctness and completeness.8485Not every migration uses all four phases: an additive schema change may need86only the expand phase; a complex service extraction uses all four.8788### 3. Plan the backfill and reconciliation8990For data migrations, choose a backfill strategy — full, incremental, or91streaming (CDC/event log). Reconciliation verifies source and target match on92four dimensions — completeness, accuracy, timeliness, and consistency — runs93continuously during the compatibility window, and must pass before cutover;94a reconciliation failure is a **stop condition**.9596### 4. Design the cutover9798Define the exact procedure (automated where possible, with pre/post99conditions), the window and acceptable downtime, interruption points where the100cutover can be paused or reversed (a cutover with none is a risk to flag101explicitly), and the observability that confirms progress and triggers abort.102103### 5. Define recovery paths104105Every migration step has exactly one of four recovery classifications — never106conflate them: **rollback** (undo the change), **roll-forward** (fix forward in107the new state), **restore** (recover from backup/snapshot), and **irreversible**108(no reversal possible at any level). Irreversible steps require explicit109acknowledgment before execution; distinguish "we chose not to build a reversal110path" from "reversal is physically impossible." Both require acceptance,111communication, and contingency. Load112[references/recovery-classification.md](references/recovery-classification.md)113when classifying concrete steps.114115### 6. Plan deprecation and cleanup116117After verified cutover: define the deprecation window for the old system in118read-only/degraded mode, track which consumers still depend on the old119interface, remove old schemas/code paths/flags/configuration/credentials/120infrastructure, and communicate at each stage (window opens, cutover scheduled,121cutover complete, window closing, removal).122123### 7. Verify and close124125Before declaring completion, collect correctness evidence (reconciliation126reports, consumer verification, error-rate comparisons, SLO compliance),127confirm observability shows the expected steady state, verify recovery128procedures were tested and irreversible steps acknowledged, and obtain owner129sign-off per phase.130131## Loading guide132133Load references and templates on demand — do not load everything at once.134135| File | Load when |136|---|---|137| [references/discovery-brief.md](references/discovery-brief.md) | You need to understand how migration concepts map across sibling skills and where this skill's boundaries are |138| [references/migration-types.md](references/migration-types.md) | Classifying a migration (schema, data, API, infrastructure/service, service extraction) before selecting patterns |139| [references/compatibility-patterns.md](references/compatibility-patterns.md) | Designing forward/backward compatibility for a specific migration type |140| [references/recovery-classification.md](references/recovery-classification.md) | Classifying recovery paths (rollback, roll-forward, restore, irreversible) for a concrete migration step |141| [references/planning-fields.md](references/planning-fields.md) | Drafting or reviewing the structured planning fields (reconciliation, evidence, observability, customer impact, ownership) a plan must address |142| [references/service-extraction-patterns.md](references/service-extraction-patterns.md) | Assessing extraction seams and selecting strangler routing, branch by abstraction, anti-corruption, CDC, and parallel-run patterns; includes modular-monolith retention criteria |143| [templates/migration-plan.md](templates/migration-plan.md) | Producing a complete migration plan with all structured fields |144| [templates/compatibility-matrix.md](templates/compatibility-matrix.md) | Building a compatibility matrix for a multi-consumer migration |145| [templates/reconciliation-plan.md](templates/reconciliation-plan.md) | Designing a reconciliation strategy for a data migration |146| [templates/cutover-and-recovery-record.md](templates/cutover-and-recovery-record.md) | Recording cutover procedures, recovery paths, and irreversible-step acknowledgments |147| [templates/service-extraction-assessment.md](templates/service-extraction-assessment.md) | Capturing boundary evidence, coupling, ownership, coexistence, sequencing, operational risk, reversibility, and the decision to extract or retain a modular monolith |148149## Specialist routing150151Migration engineering composes domain specialists — it never duplicates their152methodology. Route implementation details to the skill that owns the subsystem.153154| Migration concern | Route to |155|---|---|156| Decomposition justification and target-boundary decision | [`software-architecture`](../software-architecture/SKILL.md); this skill sequences an authorized transition |157| API contract design, versioning policy, deprecation mechanics | [api-design-and-evolution](../api-design-and-evolution/SKILL.md) |158| Database schema evolution, ETL/ELT pipeline design, backfill operations | [data-engineering](../data-engineering/SKILL.md) |159| Infrastructure provisioning, service networking, secret management during migration | [platform-engineering](../platform-engineering/SKILL.md) |160| Release sequencing, progressive delivery, canary rollout, artifact promotion | [release-engineering](../release-engineering/SKILL.md) |161| SLO definition, error budgets, operational readiness, incident response during migration | [site-reliability-engineering](../site-reliability-engineering/SKILL.md) |162| Work breakdown, dependency mapping, critical path, ownership assignment | [implementation-planning](../implementation-planning/SKILL.md) |163| Threat modeling, security review of migration surface, auth boundary changes | [secure-software-engineering](../secure-software-engineering/SKILL.md) |164| Test strategy, regression coverage, verification gates during migration | [qa-methodology](../qa-methodology/SKILL.md) |165| Verification verdicts, evidence standards, boundary testing | [verification-methodology](../verification-methodology/SKILL.md) |166167### Routing to same-wave and future skills168169Migration evidence — reconciliation reports, cutover records, recovery-path170classifications, and deprecation tracking — feeds **production-readiness**171assessments. The production-readiness skill consumes migration plans as evidence172that a service is ready for production operation.173174The **production-excellence** bundle composes migration-engineering alongside175production-readiness, resilience-and-recovery, capacity-and-cost-engineering,176incident-learning, and privacy-engineering. Migration-engineering contributes177the safe-change dimension to the production-excellence lifecycle.178179### Routing to product-lifecycle skills180181When a migration is triggered by a feature retirement or product sunset,182coordinate with **product-lifecycle-learning** for the retirement decision183record, deprecation timeline, and customer-treatment plan.