Try three refactoring approaches in parallel, keep the best
언제 쓸까: You have 3 different ideas for a refactor and want to see all of them run/pass tests before picking one.
사전 조건
- Server/skill installed and authenticated — See repo README
흐름
-
Spin up three isolated envsCreate three container-use environments named refactor-a/b/c, all on this repo at HEAD.✓ 복사됨→ 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.✓ 복사됨→ 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.✓ 복사됨→ Patch applied locally
결과: Three real experiments evaluated side-by-side without ever breaking your host repo.
함정
- Forgetting to discard old envs leaks disk — Forgetting to discard old envs leaks disk —
cu environment listthencu environment discard <id>periodically.