redesign
Installation
SKILL.md
Redesign Code
Redesign code to reduce complexity while preserving externally visible behavior. Treat working code as the starting point, not the finish line.
Workflow
- Establish the behavioral contract: tests, public APIs, data formats, side effects, error semantics, and caller expectations.
- Identify the main complexity symptom: change amplification, cognitive load, or unknown unknowns. Prefer redesigns that directly reduce that symptom.
- Sketch at least two viable designs for non-trivial changes. Compare interface simplicity, generality, consistency with the codebase, implementation effort, and migration risk.
- Implement the smallest redesign that materially improves the design. Keep unrelated cleanup out of scope.
- Verify behavior with the narrowest reliable tests, then broaden verification when public contracts or shared modules changed.