← ClaudeAtlas

change-strategylisted

Change-mode discipline for existing code — classify every change as Patch, Extend, Refactor, Rewrite, or Replacement before the first edit, and never mix modes in one diff. Use when modifying existing code with no mode declared, when a request says rewrite, refactor, modernize, migrate, replace, or port, and when a fix starts drifting into restructuring.
voklab/layline · ★ 0 · AI & Automation · score 72
Install: claude install-skill voklab/layline
# Change strategy Every change to existing code runs in exactly one declared mode. The mode is chosen before the first edit, named with the work, and never mixed with another in the same diff or commit. Mode drift — a patch that grows into a refactor, a refactor that turns into a rewrite — is stopped and re-declared, not ridden. ## The modes | Mode | Meaning | Rule | |---|---|---| | Patch | Small behavior fix | Minimal diff. No architecture changes. | | Extend | New behavior on an existing responsibility | Additive. Existing paths keep their behavior. No restructuring — that is a Refactor first, declared. | | Refactor | Structure change, same observable behavior | Behavior-preserving (Fowler). Tests green before/after. One transform per commit. | | Rewrite | New design for an existing responsibility | Do not translate old code. Re-derive the spec. Requires rewrite brief. | | Replacement | Gradual migration old → new | Strangler slices, anti-corruption layer at boundary, deletion plan mandatory. | ## Hard rules - The mode is declared before the first edit — in the task shape or the plan. - One diff, one commit, one mode. A refactor commit contains zero behavior change; a patch commit contains zero restructuring. Behavior-preserving discipline: `references/refactor.md`. - Rewrite and Replacement are blocked without a completed brief — `references/rewrite-brief.md`, filled in and carried with the work: in the plan, the commit or PR description, or a file where the task asks