Loading...
Loading...
Code improvement workflow with polish and overhaul tracks. Triggers: 'refactor', 'clean up', 'restructure', 'reorganize', or /refactor. Phases: explore, brief, implement, validate. Existing code only — Do NOT use for bug fixes (/debug) or new features (/ideate).
npx skill4agent add lvlup-sw/exarchos refactor/refactor/refactor/debug /refactor
|
+-----+-----+
| Explore |
+-----+-----+
|
+--------------+--------------+
| |
--polish (default)
| |
v v
+--------------+ +--------------+
| Polish | | Overhaul |
| Track | | Track |
+--------------+ +--------------+# Default: overhaul track
/refactor "Description of what needs refactoring"
# Fast path: polish track
/refactor --polish "Small contained refactor description"
# Explore first, then decide track
/refactor --explore "Unsure of scope, explore first"# Switch from polish to overhaul (during explore/brief)
/refactor --switch-overhaul
# Resume after context compaction
/rehydrate| Aspect | Polish | Overhaul |
|---|---|---|
| Scope | <=5 files, single concern | No limit |
| Worktree | No (direct) | Yes (isolated) |
| Delegation | No | Yes (full workflow) |
| Documentation | Mandatory update phase | Mandatory update phase |
| Human Checkpoints | 0 | 1 (merge) |
explorebriefpolish-implementpolish-validatepolish-update-docscompleted@skills/refactor/references/polish-track.mdexplorebriefoverhaul-planoverhaul-plan-reviewoverhaul-delegateoverhaul-reviewoverhaul-update-docssynthesizecompleted@skills/refactor/references/overhaul-track.mdaction: "init", featureId: "refactor-<slug>", workflowType: "refactor"describeexarchos_workflow({ action: "describe", actions: ["init"] })Sequential traversal required. Every phase MUST be traversed in order — you cannot skip phases, even if you have all the data for a later phase ready. For example,must transition toexplorebeforebrief— attemptingoverhaul-plan→exploredirectly will be rejected by the HSM. Fromoverhaul-planyou must go tobrieforpolish-implement, not directly tooverhaul-plan. Each transition requires its guard to be satisfied viacompletedsent alongside theupdatesparameter in a singlephasecall. Seesetor@skills/refactor/references/polish-track.mdfor the exact tool call at each step.@skills/refactor/references/overhaul-track.md
@skills/workflow-state/references/phase-transitions.mdupdatesphasesetexarchos_workflow({ action: "describe", actions: ["set", "init"] })exarchos_workflow({ action: "describe", playbook: "refactor" })exarchos_orchestrate({ action: "runbook", id: "scope-decision" })mcp__exarchos__exarchos_workflowaction: "set"trackexplore.scopeAssessment.recommendedTrackSkill()| Skill | Invocation | Usage |
|---|---|---|
| | Task extraction from brief |
| | Subagent dispatch for TDD |
| | Quality review |
| | PR creation |
| Don't | Do Instead |
|---|---|
| Skip exploration | Always assess scope first (see |
| Use polish for large changes | Switch to overhaul when scope expands |
| Skip doc updates | Documentation is mandatory (see |
| Add features during refactor | Scope creep - stick to brief goals |
| Skip tests because "just moving code" | Refactors need test verification |
| Create design document for polish | Use brief in state file instead |
| Work in main for overhaul | Use worktree isolation |
mcp__exarchos__exarchos_eventaction: "append"workflow.startedexarchos_workflowsetphaseworkflow.transitionexarchos_workflowsetphaseworkflow.transition/delegategit commitgit pushgit commit -m "refactor: <description>"git pushexarchos_workflowsetworkflow.transition