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.