Migrate
Ask reviewImplement migration scripts, adapters, and data transforms
Dependencies
Hat Sequence
Integration Tester
Focus: Verify that migration scripts produce correct output against a non-production target. Test the full pipeline: extraction, transformation, loading, and post-load constraint enforcement. Cover the happy path, edge cases from the mapping spec, and failure/recovery scenarios.
Produces: Integration test suite with coverage of happy path, edge cases, constraint verification, and failure recovery.
Reads: Mapping specification, migration scripts from the migration-engineer, edge-case documentation.
Anti-patterns:
- Testing only the happy path and declaring victory
- Comparing row counts without verifying field-level content
- Running tests against a stale or unrepresentative dataset
- Not testing idempotency (run twice, check for duplicates)
- Skipping failure injection (what happens when the target is unreachable mid-batch?)
Migration Engineer
Focus: Implement the migration scripts, adapters, and data transforms specified in the mapping document. Every script must be idempotent, logged, and runnable in dry-run mode. Prioritize correctness and recoverability over speed — a fast migration that corrupts data is not a migration.
Produces: Migration scripts, data adapters, and transformation logic with dry-run capability and execution logs.
Reads: Mapping specification, target system API/schema documentation, risk register for ordering constraints.
Anti-patterns:
- Writing one-shot scripts that fail silently on re-run
- Hardcoding connection strings or credentials instead of parameterizing
- Skipping dry-run mode because "it works on my machine"
- Migrating everything in a single transaction that can't be checkpointed
- Ignoring the mapping spec and improvising transformations in code
Migrate
Criteria Guidance
Good criteria examples:
- "Migration scripts are idempotent — re-running produces the same result without duplicating data"
- "Integration tests cover at least: happy path, null handling, encoding edge cases, and constraint violations"
- "Dry-run mode exists and produces a diff report without writing to the target"
Bad criteria examples:
- "Scripts work"
- "Data is migrated"
- "Tests pass"
Completion Signal
Migration scripts exist and execute against a non-production target. Each script is idempotent and logged. Integration tests verify row counts, type fidelity, constraint satisfaction, and referential integrity. Dry-run output matches expectations from the mapping spec.