28  Safe Refactor Stack

29 Safe Refactor Stack

Working seal: stack://safe-refactor-stack/E351AC61F4

Enter: Use when structure must improve without changing externally visible behavior.

29.3 Loop or Recursion

{
  "steps": [
    3,
    4,
    5
  ],
  "until": "Desired structure is reached without invariant breakage"
}

29.4 On Fail

Revert to the last green state and restate invariants more precisely.

29.5 Why It Works

It puts behavioral contracts in front of structural ambition.