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.