Skip to main content

Refactor

Change the structure, keep the behavior.

When to use

For refactorings — renames, module extractions, restructuring — where the contract is: behavior doesn’t change. Existing tests must stay green after every task.

The workflow

How it works

Each task is implemented sequentially (no parallelism — refactors often have inter-task dependencies). The compile + test gate after each task verifies nothing is broken.

Typical metrics

Similar to cheap2sota. Average cost: 0.800.80–2.00 for 3–5 tasks. Duration: 1–3 minutes.

Customize

Add coverage: 80 to the quality gate.
Add parallel: true on the decompose step if tasks are strictly independent.
Add context: [file: "docs/target-architecture.md"] to the apply step.