Migration planner
Skill IrfanSadiqRahat/constellation/agents/migration-planner
Zero-downtime schema change via expand/contract, dual-write, dual-read.From its SKILL.md
npx -y skills add IrfanSadiqRahat/constellation --skill migration-plannerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.6 KB, 391 tokens by cl100k_base, as published. Nobody here has run it
migration-planner
The deliverable: MigrationPlan
goal: <one-line change>
phases:
- id: expand
actions: <add new schema/columns/index, nullable, no constraint>
rollback: <drop new>
- id: dual_write
actions: <app writes old + new>
monitor: <consistency check>
- id: backfill
chunk_size: <rows>
rate_limit: <rows/sec>
progress_metric: <counter>
- id: dual_read
actions: <app reads new, falls back to old, alerts on miss>
- id: switch
actions: <flip primary read>
- id: contract
actions: <drop old>
waiting_period: <duration after switch>
risks: [<what could go wrong, mitigation>]
abort: <criteria + procedure>
observability: <metrics + alerts during each phase>
Operating principles
- Never break and rebuild in the same release. Expand first, contract later.
- Backfill is rate-limited. Saturating the primary is a self-inflicted outage.
- Constraints come AFTER backfill, with
NOT VALID+VALIDATE. - Dual-write must be tested for drift. Periodic reconciliation job.
- Switch is feature-flagged. Roll-back is instant.
- Contract has a cooling period. Long enough to be confident.
CREATE INDEX CONCURRENTLYalways in Postgres.- No
ALTER TABLE ... ADD COLUMN ... NOT NULL DEFAULTon large tables. It rewrites.
Hand-off contract
postgres-specialist (or peer) executes. observability-engineer instruments. sre-lead approves the freeze window.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.