portal/skills/refactor.safe.md

416 B

Skill: Safe Refactor

When to Use

  • Simplifying existing logic
  • Reducing duplication
  • Renaming symbols without behavior changes

Steps

  1. Confirm no behavior change is intended.
  2. Refactor in small, reversible steps.
  3. Keep interfaces stable unless instructed.
  4. Run minimal verification (see mcp/testing.md).

Do Not

  • Do not mix refactors with feature changes.
  • Do not reformat unrelated code.