Try three refactoring approaches in parallel, keep the best
Cuándo usarlo: You have 3 different ideas for a refactor and want to see all of them run/pass tests before picking one.
Requisitos previos
- Server/skill installed and authenticated — See repo README
Flujo
-
Spin up three isolated envsCreate three container-use environments named refactor-a/b/c, all on this repo at HEAD.✓ Copiado→ Three env_ids printed
-
Apply each approach in its own envIn refactor-a do the strategy-pattern version; in -b inline everything; in -c extract a service object. Run the full test suite in each. Report pass/fail and diff size.✓ Copiado→ Per-env test summary and diff stats
-
Pick the winner and mergeApply the diff from refactor-b to my working copy. Discard the other two environments.✓ Copiado→ Patch applied locally
Resultado: Three real experiments evaluated side-by-side without ever breaking your host repo.
Errores comunes
- Forgetting to discard old envs leaks disk — Forgetting to discard old envs leaks disk —
cu environment listthencu environment discard <id>periodically.