fec-refactoring
Installation
SKILL.md
Skill: Behavior-Preserving Refactoring
Purpose
Restructure live frontend code in small, evidence-backed steps while preserving the behavior users, callers, tests, routes, and integrations can observe.
Core Contract
Every execution follows these rules:
- Behavior Preservation — pure refactoring intentionally changes structure, not observable behavior.
- Green Baseline First — record available verification before editing.
- One Refactoring at a Time — one primary structural intent per step.
- Verify Every Step — run the narrowest meaningful check immediately after each step.
- Revert Before Repairing — if a new regression appears, revert that step before widening the edit.
- Separate Refactoring from Feature Work — behavior changes belong in a different workflow.
- Smallest Safe Refactoring First — prefer the narrowest transformation that fits the evidence.
- Stay Within the Diff Budget — stop when actual scope materially exceeds the planned scope.