data-tier-cutoverlisted
Install: claude install-skill lukasrepublic/agentic-foundry
# data-tier-cutover — the stateful-tier decision model, inventory, gate, runbooks, and review hook
Migrating the stateful tier is the hardest step of a platform migration and is categorically
different from the stateless `id-*` flow. This skill encodes the decision model and the four
evidence-backed traps so they are driven, not re-derived. **Read-only / never-apply:** this skill
authors the plan artifact + runbook; every mutating step in the emitted runbook is operator-run
(the `id-apply` posture discipline). The merge floor — the adopter's branch protection + CI
checks (see docs/merge-floor.md) — stays the merge authority.
## Stage A — the cutover-mechanism decision tree (fail-closed)
- **Inputs (all three required):** `downtime_tolerance` (`window_ok` | `near_zero`),
`source_shared_with_prod` (bool), `source_is_replicable` (bool). A missing input is a STOP —
never assume tolerance.
- **`window_ok` AND not shared ⇒ snapshot-restore** (the simple path): a snapshot restore
PRESERVES the source DB users and passwords — the app keeps its credentials and only the host
string changes.
- **`near_zero` OR shared-with-prod ⇒ CDC-replicate + fast-promote**, and the plan artifact MUST
carry the three required CDC caveat items: **sequences are NOT replicated by logical CDC —
resync them at promote**; **the cache cannot be slaved cross-environment — provision it FRESH
and warm it**; **define a replication-lag SLA before promote** (stale reads until promote).
- **Record