/wicked-garden:wicked-garden-engineering-migration-engineerfrom wicked-garden
Guides safe schema migrations, data backfills, deprecation paths, and rollback plans using the expand-contract pattern for live production systems.
Ships in wicked-garden. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You move live production systems from one shape to another without breaking them. You specialize in the expand-contract pattern, dual-write/backfill pipelines, versioned deprecation, and verifiable rollback plans. You are the role that answers "how do we ship this breaking change safely?"
For mechanical codebase migrations (cross-cutting refactors, dialect/framework
ports, bulk transforms — no production data in flight), the sibling knowledge
module wicked-garden-engineering-large-scale-migration
covers the map→transform→gate pattern.
wicked-garden-search skill to inventory call sites, consumers, and referencesmetadata={event_type, chain_id, source_agent, phase}Every non-additive change follows the same five-phase pattern:
┌─────────┐ ┌──────────┐ ┌──────────┐ ┌───────────┐ ┌─────────┐
│ EXPAND │ → │ BACKFILL │ → │ MIGRATE │ → │ CUTOVER │ → │ CONTRACT│
│ (add) │ │ (fill) │ │ (switch) │ │ (enforce) │ │ (drop) │
└─────────┘ └──────────┘ └──────────┘ └───────────┘ └─────────┘
both new writers readers old
live shape on new on new dies
Never combine phases. Every phase is independently deployable and rollback-able.
Add the new shape alongside the old shape. Both coexist.
Rollback: drop the new shape; writes keep working on old.
Populate the new shape with historical data.
Backfill script shape:
def backfill_batch(start_id: int, batch_size: int = 1000) -> int:
rows = db.query("SELECT id FROM old WHERE id >= ? AND id < ? AND new_col IS NULL",
start_id, start_id + batch_size)
for row in rows:
new_value = transform(row)
db.execute("UPDATE old SET new_col = ? WHERE id = ? AND new_col IS NULL",
new_value, row.id) # idempotent via IS NULL guard
return len(rows)
Rollback: stop the backfill; nothing is broken.
Move writers to use the new shape exclusively. Readers still use old.
Rollback: flip writers back to dual-write. Requires feature flag.
Move readers to the new shape. Verify everything.
Rollback: flip readers back to old shape. Writers still writing new.
Drop the old shape. Only after cutover has held for a stability window.
Rollback: restore from backup / re-migrate in reverse (expensive — hence the stability window).
# Find call sites
wicked-garden-search blast-radius {symbol}
# Find clients of an API version
# the wicked-garden-search skill: blast-radius of the /v1/users handler (its http consumers)
Enumerate every consumer. Tag each: internal/external, owner, traffic share.
Coordinate with data-architect on OLTP/OLAP target. Document what changes and why.
Each phase flip needs a flag:
dual_write_enabledread_from_new_shape_percent (0 → 100)old_shape_deprecated (boolean — enforces 4xx on old API)Flags allow instant rollback without deploy.
## Migration Runbook: {name}
### Target State
- Before: {current shape}
- After: {target shape}
- Breaking changes: {list}
### Timeline
- Expand: week 1 (deploy + verify dual-write)
- Backfill: weeks 2-3 (batched; {N} rows/sec; total {M} rows)
- Migrate: week 4 (flip write flag; verify for 7 days)
- Cutover: week 5 (canary readers: 1/10/50/100)
- Contract: week 7 (after 2-week stability window)
### Phase Gates
Each phase requires verification before advancing:
- [ ] Expand: dual-write error rate < 0.01%
- [ ] Backfill: row-count parity; checksum parity on 1% sample
- [ ] Migrate: zero drift in side-by-side read comparison for 7 days
- [ ] Cutover: canary at 10% shows p95 regression < 5%
- [ ] Contract: no traffic on old shape for 14 days
### Rollback per Phase
- Expand: disable dual-write flag; drop new shape
- Backfill: stop job; data is idempotent
- Migrate: re-enable dual-write flag
- Cutover: set read_percent = 0
- Contract: restore from backup (avoid via stability window)
### Communication Plan
- External consumers: {notification dates + channels}
- Internal owners: {kickoff + weekly status + launch}
- Support: {runbook for customer questions}
### Success Criteria
- Zero data loss
- p95 latency change < 5%
- Error-rate change < 0.01%
- All consumers verified on new shape
Standard timeline:
Deprecation: true and Sunset: <date>Rule: sunset only when remaining traffic is below a threshold AND all known consumers have been contacted.
## Migration Plan: {name}
### Scope
- Source: {current shape}
- Target: {target shape}
- Breaking for: {list of consumers}
### Consumer Inventory
| Consumer | Owner | Traffic | Contacted? | Cutover Date |
|----------|-------|---------|------------|--------------|
### Phases
| Phase | Duration | Flag | Success Criteria | Rollback |
|-------|----------|------|------------------|----------|
| Expand | 1w | dual_write_enabled | err < 0.01% | drop new shape |
| Backfill | 2w | — | row count parity | stop job |
| Migrate | 1w | write_target=new | zero drift | flip flag |
| Cutover | 1w | read_percent | latency δ < 5% | percent=0 |
| Contract | — | — | 14d no old traffic | backup restore |
### Data Reshape Details
{transformation logic, null handling, default values}
### Risks
| Risk | Probability | Impact | Mitigation |
|------|-------------|--------|------------|
### Verification Plan
- Shadow reads comparing old vs new
- Row-count + checksum parity
- Error-rate dashboard
- Customer-impact dashboard
### Communication Timeline
- T-30d: announce
- T-14d: reminder
- T-7d: final warning
- T-0: cutover
- T+14d: contract
Read from both shapes; log discrepancies; alert on mismatch rate > threshold.
-- Sample-based parity check
SELECT COUNT(*) AS drift
FROM (
SELECT id FROM old_table
EXCEPT
SELECT id FROM new_table
WHERE created_at < ?
);
SELECT
(SELECT COUNT(*) FROM old_table) AS old_count,
(SELECT COUNT(*) FROM new_table) AS new_count;
Worker skill, reached by its name — wicked-garden-engineering-migration-engineer — through a
Hand-off from the wicked-garden-engineering router or any caller. The pre-v12.25
subagent-delegation form is retired with the fork frontmatter.
What SKILL.md sets; muted values are Claude Code's defaults
91 skills in this plugin
/wicked-garden-agenticAgentic-systems domain skill: review, design, audit, and framework selection
for AI agent systems. Routes to one of four actions (review | design | audit |
frameworks) backed by the rubrics in refs/.
Use when: "agentic review", "review this agent system", "full agentic codebase
review", "trust and safety audit", "audit my agents for GDPR/HIPAA/SOC2/NIST
compliance", "design an agentic system", "design a multi-agent architecture",
"which agentic framework should I use", "compare LangChain vs CrewAI vs
AutoGen", or any former /wicked-garden:agentic:{review|design|audit|frameworks}
invocation.
Disambiguation: this domain reviews and designs **AI agent systems**. For
ordinary source code use the engineering review; for a binding go/no-go
verdict use the archetype review (see docs/domains.md → "review appears in
three domains").
/wicked-garden-agentic-architectFive-layer architecture validation, agent topology analysis, orchestration
pattern assessment, and framework detection for agentic systems.
Use when: architecture review of an AI agent system, agent topology analysis,
validating the five-layer model (cognition/context/interaction/runtime/
governance), assessing orchestration patterns, or as a parallel worker in a
heavyweight wicked-garden-agentic review.
npx claudepluginhub mikeparcewski/wicked-garden --plugin wicked-gardenOther plugins' skills for the same job