← Files CavemanARCHIVED FILE

skills/safe-refactor/SKILL.md

670 Bytes · Sep 30, 2026 · 23:17 UTC

↓ Download file

---
name: safe-refactor
description: Use when restructuring code while preserving observable behavior and proving the refactor with tests or other
  evidence.
---

# Safe refactor

Define behavior-preservation boundary and establish verification before structural edits.

- Keep feature changes outside refactor.
- Move one ownership boundary at a time.
- Preserve public interfaces, failure behavior, ordering, and compatibility unless explicitly scoped.
- Keep intermediate states buildable and testable.
- Avoid dependency or configuration growth without correctness need.

Run same proof after change. Stop when behavior matches and requested structure is achieved.

SHA-256: 16afe95e5183a90150254738ac3f2113d49563af1a6f9f4227b21348dcfe6c21