$npx -y skills add AdamBien/airails --skill simplifierReplatform mode ("lift, tinker, and shift") — simplify a 1:1-lifted legacy system in place: modernize code and remove external dependencies, one pass at a time, each bracketed by characterization-tests replays, structure preserved. Owns the stack-neutral pass discipline; the tran
| 1 | # Simplifier |
| 2 | |
| 3 | The middle mode between rehost and rearchitect: the system keeps its structure, loses its noise. Every pass is semantics-preserving — and proven so, not assumed: the characterization suite is the green bar every pass must hold. This skill owns the pass discipline; what to transform and what replaces a dependency comes from the composed stack ecosystem. |
| 4 | |
| 5 | ## Preconditions |
| 6 | |
| 7 | - The system runs on the target platform (1:1 lift completed). |
| 8 | - Characterization recordings exist and replay green. No green bar, no simplification — run `/characterization-tests` first. |
| 9 | |
| 10 | ## Pass Loop |
| 11 | |
| 12 | 1. Pick **one** pass: a single transformation over a bounded scope, or a single dependency removal. Never batch. |
| 13 | 2. Apply it. |
| 14 | 3. Verify with the stack's own build/check loop, then replay the characterization suite. |
| 15 | 4. **Green** → commit the pass. **Diff** → reconcile (an accepted behavior change is a human decision, per characterization-tests) or revert the pass entirely. |
| 16 | 5. Log the pass in `migration/SIMPLIFICATION.md` — one line: date, pass, result. |
| 17 | 6. Repeat until the catalog finds no high-impact transformation and the dependency list is settled. |
| 18 | |
| 19 | ## Code Passes |
| 20 | |
| 21 | The transformation catalog and its impact-to-risk ordering come from the composed stack ecosystem: |
| 22 | |
| 23 | - **Java** — java-distiller: modern syntax, API upgrades, pattern adoption, dead-code removal. |
| 24 | - **Web frontend** — web-conventions + web-components: semantic HTML, modern CSS over framework classes, custom elements over framework widgets, standards-based routing and state. |
| 25 | |
| 26 | Constraint on top, any stack: preserve the public surface and the structure — packages, components, routes stay where they are. Internals may simplify, dead code may go; moves, splits, and merges are carving, and carving is `/bc-carver` + `/sbce` territory. |
| 27 | |
| 28 | ## Dependency Passes |
| 29 | |
| 30 | One dependency per pass. The ladder shape is stack-neutral — platform first, then copied source, then keep with justification; the rungs are the stack's: |
| 31 | |
| 32 | | Stack | Ladder | Manifest | |
| 33 | |---|---|---| |
| 34 | | Java | Java SE → MicroProfile/Jakarta EE → copied source (zjson pattern) | `pom.xml` | |
| 35 | | Web frontend | Web platform, Baseline (`fetch`, `querySelector`, custom elements, modern CSS) → vendored source | `package.json`, script tags | |
| 36 | |
| 37 | - Stop at the first rung that fits; keep only with a one-line justification in `migration/SIMPLIFICATION.md` under `## Kept Dependencies`. |
| 38 | - Remove the dependency from the manifest in the same pass — replaced but still declared is an unfinished pass. |
| 39 | |
| 40 | ## Rules |
| 41 | |
| 42 | - The green bar is law: no pass survives a red replay unreconciled. |
| 43 | - Semantics shift in disguise — `java.time` timezone handling, stream ordering, third-party null handling; jQuery event semantics vs `addEventListener`, framework lifecycle vs custom-element callbacks, CSS cascade changes. That is why the bracket exists; trust the replay, not the reviewer's confidence. |
| 44 | - Stopping here is legitimate: a distilled, dependency-free system on a modern platform is a valid migration outcome. |
| 45 | - Continuing is better prepared: simplified code is cleaner input for `/concept-extractor` — half the naming noise the extractor fights is what these passes remove. |