## What problem does it solve?
cs-refactor provides a structured workflow for performing code refactors without changing external behavior, by dividing work into clear stages (scan, design, apply) and enforcing explicit gates and human approval.
## Core Features & Use Cases
- Three-stage workflow: scan to identify improvements, design to sequence and map changes to methods, and apply to execute changes incrementally with validation and rollback logging.
- Behavior equivalence as a discipline: changes touching observable behavior are avoided unless they are a feature or issue, ensuring safe refactors.
- Fastforward mode enables small, low-risk changes to skip full stages when safe.
- Artifact-driven process with per-skill outputs such as cs-refactor/scan.md, cs-refactor/refactor-design.md, and cs-refactor/apply-notes.md, plus a versioned refactor directory.
- Clear checkpointing and human-in-the-loop decisions to maintain traceability and control.
Quick Start
Initiate the cs-refactor workflow by scanning a scoped portion of code, review the scan results, approve a design plan, and apply changes step by step with validation.