strangler-fig-planner
Skill2 starsChanged 39 days agoMITView on GitHub
Produces an incremental migration plan that runs a legacy and a new system side by side behind a routing seam, slicing and sequencing whole capabilities so the old system stays live until its last route is cut. Use when planning to replace or rebuild a large, business-critical system that must keep serving traffic throughout. Do NOT use when extracting a single service from a still-living monolith - use monolith-decomposer instead; for generic non-migration implementation planning, use the plan skill instead.
In this repository8 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Every slice is one vertical capability, shippable in weeks, with a named first slice chosen for low risk.
- Very specific: line 30
Every cutover has a shadow/canary/ramp path and a route-flip rollback with a comparison metric.
- Distinctive: line 34
Do not begin slicing before the seam can flip a route without a deploy.
- Distinctive: line 35
Do not slice horizontally by technical layer.
- Distinctive: line 36
Do not start with the highest-value or most-coupled capability.
- Distinctive: line 37
Do not define rollback as reverting code.
- Distinctive: line 38
Do not declare a slice done while legacy code remains dormant or legacy still serves traffic.
- Distinctive: line 39
Do not impose this ceremony on a system small enough to rewrite in under a few weeks, or one with no stable seam and no way to add one - a …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Strangler Fig Planner
Plan a route-by-route replacement of a live system: install a routing seam, migrate one vertical capability at a time, and delete the legacy trunk only after each slice has soaked at full traffic.
Workflow
- Install the routing seam first. Find or insert a place to redirect traffic per slice: a reverse proxy (NGINX, Envoy), an API gateway, a facade service, or a feature-flag check in the legacy entry point. The seam must route at the granularity you intend to migrate - per endpoint, per URL prefix, per message type. Verify you can flip one route to the new system and back without a deploy, in under a minute. If you cannot route incrementally, you cannot strangle incrementally; building the seam is step zero, before any slice.
- Slice by business capability, not by layer. Cut vertically - a whole capability (checkout, user profile, billing export) end to end, never 'the data layer' or 'all the controllers'. Pick the first slice for low risk and high learning: modest traffic (roughly 1-5% of total volume is a good first target), few upstream dependencies, clear ownership, observable behavior. Do not start with the crown-jewel transaction. Size each slice to ship in days to a few weeks; if an estimate exceeds 6 weeks, cut the slice smaller.
- Sequence by dependency and data gravity. Map which slices read and write shared data. Migrate leaf capabilities before the tables everyone touches. Where new and old share a database, decide per slice: dual-write with reconciliation, change-data-capture, or new-system-owns-the-table with a read replica for legacy. Order steps so each one leaves the system fully working - never a state that only resolves after three more PRs.
- De-risk every cutover. Per slice: shadow traffic (send to both, compare outputs, serve old) to validate - hold shadowing until the output mismatch rate is below ~0.1% or every mismatch is explained - then canary a small percent and ramp on a schedule like 1% → 5% → 25% → 100%, watching the comparison metric at each step. Define rollback as flipping the route, not reverting code. Add production metrics that compare old vs new outputs. Keep the kill switch until the slice has run at 100 percent through a full business cycle (month-end, peak) - typically 30 days minimum.
- Define done and delete the trunk. A slice is done only when the legacy path has served zero traffic for a defined soak period and the dead legacy code is deleted, not left dormant. Track remaining legacy surface explicitly so the project ends rather than stalling at 80 percent forever.
Worked example
Migrating a monolithic order-management system:
Bad slicing: "Phase 1: migrate the persistence layer to the new Postgres schema. Phase 2: port all API controllers. Phase 3: move the frontend." Every phase touches every capability, nothing is independently shippable, and the system is broken between phases - there is no route to flip and no rollback short of reverting months of work.
Good slicing: "Slice 1: order-status lookup (read-only, ~2% of traffic, no writes) - proves the seam, the deploy pipeline, and the comparison metrics. Slice 2: shipping-label generation (writes to its own table, one upstream consumer). Slice 3: order creation (dual-write with nightly reconciliation until slice 4). Slice 4: new system owns the orders table; legacy reads via replica. Each slice: shadow until mismatches < 0.1%, canary 1% → 5% → 25% → 100%, soak 30 days at full traffic, delete legacy path." Each step is a whole capability, independently rollback-able by flipping a route, and the plan names what gets deleted and when.
Quality bar
A plan is ready when:
- A concrete routing seam exists or is the first deliverable, and you can name the unit it routes on.
- Every slice is one vertical capability, shippable in weeks, with a named first slice chosen for low risk.
- Each step in the sequence leaves the system fully working on its own.
- Every cutover has a shadow/canary/ramp path and a route-flip rollback with a comparison metric.
- 'Done' includes deletion of dead legacy code and an explicit count of remaining legacy surface.
Do NOT
- Do not begin slicing before the seam can flip a route without a deploy.
- Do not slice horizontally by technical layer.
- Do not start with the highest-value or most-coupled capability.
- Do not define rollback as reverting code; define it as flipping the route.
- Do not declare a slice done while legacy code remains dormant or legacy still serves traffic.
- Do not impose this ceremony on a system small enough to rewrite in under a few weeks, or one with no stable seam and no way to add one - a careful in-place rewrite is cheaper there.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

