← All Semantic Contracts

Refactoring

How we identify and execute refactorings safely

A semantic contract: vocabulary your project supplies itself — ready to drop into your CLAUDE.md / AGENTS.md.

    Refactoring targets are named code smells, not a vague urge to "clean up".

    For any refactoring that does not complete in one step, use the Mikado Method: attempt the change, note what breaks, revert, and do the prerequisites first — never leave the build broken while you dig.

    Refactoring commits change structure only. Behaviour changes go in separate commits, and the test suite stays green at every commit.

Related Anchors