Schema Change Rollout
Use this skill when a data shape changes and more than one surface depends on it.
Typical triggers:
- adding a field
- renaming a field
- removing a field
- changing nullability or cardinality
- splitting one entity into several
- changing export or event payload shapes
- introducing backfills, migrations, or compatibility windows
Core Principle
Most schema failures are rollout failures, not syntax failures.
The dangerous question is not "does the new schema compile?" It is:
What happens while old readers, new writers, old data, new data, exports, and tests all coexist?
Prefer expand, migrate, contract:
- Expand
- Migrate
- Contract
Avoid single-shot flips unless the system is truly offline during the change.
Load References Only When Needed
- Read references/migration-patterns.md when you need detailed rollout sequences for additive, rename, removal, or semantic changes.
- Read references/verification-checklist.md when you need a broader mixed-version verification matrix, backfill checks, or contract-phase exit criteria.
First Pass: Build the Surface Inventory
Before editing anything, list every surface that touches the shape:
- storage schema
- application types
- serializers and deserializers
- API request and response contracts
- queue payloads and event messages
- caches and derived views
- imports and exports
- backfill or migration scripts
- validation rules
- UI or reporting surfaces
- tests and fixtures
- docs or operator runbooks
If you skip the inventory, the migration plan is incomplete.
Choose the Migration Shape
Pick one of these change types and then open the migration reference if the rollout is nontrivial:
- additive change
- rename
- removal
- semantic change disguised as compatibility
Compatibility Rules
- Readers should usually become tolerant before writers become strict.
- Writers should not emit values readers cannot parse.
- Backfills must be idempotent.
- Mixed old/new data must be a planned state, not an accident.
- Null, missing, empty, and default are different states. Treat them deliberately.
- Derived views, exports, and analytics are part of the schema surface.
Rollout Checklist
Expand
- add storage support
- add type definitions
- make parsers and readers tolerant
- add feature flags or guards if a staged rollout is needed
Migrate
- update write paths
- dual-read or dual-write when required
- add a backfill or recomputation plan
- update fixtures and seeded data
- verify exports, webhooks, and background jobs
Contract
- remove fallback reads only after backfill completion
- remove old writes only after all active writers are migrated
- tighten validators after the mixed-version window closes
- delete obsolete fields, indexes, views, and docs last
What to Verify
Test all of these if they exist:
- old data read by new code
- new data read by still-compatible code paths
- partial backfill state
- mixed records in the same list, export, or API response
- retries or replay of old queue payloads
- imports and exports
- UI rendering with field absent, field present, and field malformed
- analytics or reporting queries using old views
Common Smells
- migration plan only mentions one file or one table
- UI updated before storage or API compatibility exists
- new field required immediately with no compatibility window
- export or queue contracts forgotten
- fixtures still represent the old world
- backfill has no checkpointing or rerun safety
- removal happens in the same change as introduction
Review Questions
Ask these directly:
- What old data still exists after deploy?
- What old code can still read or emit this shape?
- Which async jobs or exports still consume the old shape?
- Is the backfill idempotent and observable?
- What tells us the contract phase is safe?
Deliverables This Skill Should Push Toward
- surface inventory
- expand/migrate/contract plan
- compatibility rules
- backfill strategy
- verification matrix
- explicit cleanup criteria for the contract phase
1---2name: schema-change-rollout3description: Roll out schema changes safely across storage, types, APIs, jobs, UI, exports, and tests. Use when adding, renaming, removing, or reinterpreting fields or entities that must stay compatible across mixed versions during a migration window.4---56# Schema Change Rollout78Use this skill when a data shape changes and more than one surface depends on it.910Typical triggers:11- adding a field12- renaming a field13- removing a field14- changing nullability or cardinality15- splitting one entity into several16- changing export or event payload shapes17- introducing backfills, migrations, or compatibility windows1819## Core Principle2021Most schema failures are rollout failures, not syntax failures.2223The dangerous question is not "does the new schema compile?" It is:2425`What happens while old readers, new writers, old data, new data, exports, and tests all coexist?`2627Prefer expand, migrate, contract:28291. Expand302. Migrate313. Contract3233Avoid single-shot flips unless the system is truly offline during the change.3435## Load References Only When Needed3637- Read [references/migration-patterns.md](references/migration-patterns.md) when you need detailed rollout sequences for additive, rename, removal, or semantic changes.38- Read [references/verification-checklist.md](references/verification-checklist.md) when you need a broader mixed-version verification matrix, backfill checks, or contract-phase exit criteria.3940## First Pass: Build the Surface Inventory4142Before editing anything, list every surface that touches the shape:43- storage schema44- application types45- serializers and deserializers46- API request and response contracts47- queue payloads and event messages48- caches and derived views49- imports and exports50- backfill or migration scripts51- validation rules52- UI or reporting surfaces53- tests and fixtures54- docs or operator runbooks5556If you skip the inventory, the migration plan is incomplete.5758## Choose the Migration Shape5960Pick one of these change types and then open the migration reference if the rollout is nontrivial:61- additive change62- rename63- removal64- semantic change disguised as compatibility6566## Compatibility Rules6768- Readers should usually become tolerant before writers become strict.69- Writers should not emit values readers cannot parse.70- Backfills must be idempotent.71- Mixed old/new data must be a planned state, not an accident.72- Null, missing, empty, and default are different states. Treat them deliberately.73- Derived views, exports, and analytics are part of the schema surface.7475## Rollout Checklist7677### Expand7879- add storage support80- add type definitions81- make parsers and readers tolerant82- add feature flags or guards if a staged rollout is needed8384### Migrate8586- update write paths87- dual-read or dual-write when required88- add a backfill or recomputation plan89- update fixtures and seeded data90- verify exports, webhooks, and background jobs9192### Contract9394- remove fallback reads only after backfill completion95- remove old writes only after all active writers are migrated96- tighten validators after the mixed-version window closes97- delete obsolete fields, indexes, views, and docs last9899## What to Verify100101Test all of these if they exist:102- old data read by new code103- new data read by still-compatible code paths104- partial backfill state105- mixed records in the same list, export, or API response106- retries or replay of old queue payloads107- imports and exports108- UI rendering with field absent, field present, and field malformed109- analytics or reporting queries using old views110111## Common Smells112113- migration plan only mentions one file or one table114- UI updated before storage or API compatibility exists115- new field required immediately with no compatibility window116- export or queue contracts forgotten117- fixtures still represent the old world118- backfill has no checkpointing or rerun safety119- removal happens in the same change as introduction120121## Review Questions122123Ask these directly:1241251. What old data still exists after deploy?1262. What old code can still read or emit this shape?1273. Which async jobs or exports still consume the old shape?1284. Is the backfill idempotent and observable?1295. What tells us the contract phase is safe?130131## Deliverables This Skill Should Push Toward132133- surface inventory134- expand/migrate/contract plan135- compatibility rules136- backfill strategy137- verification matrix138- explicit cleanup criteria for the contract phase