refactor-safety-net

Installation
SKILL.md

Safety Net — record a GREEN behavior baseline — refactor-chain · baseline

Bundle: refactor-chain (self-diagnosing, self-healing fix-it pipeline). Phase: baseline · Prerequisite: plan · Next: the first lane step (then refactor-verify gates every step against this baseline). Adaptivity / conditional: repo-agnostic — behaves differently only on the single signal "does a runnable test suite already exist?".

Purpose

Before a single line is refactored, this skill establishes proof of what the code does today and confirms that proof is GREEN. That green run is the baseline — the fixed point the rest of the chain compares against. If tests already exist, their passing run is the baseline. If they don't, this skill first derives the smallest set of behavior-pinning (characterization) tests that lock in the current observable behavior — bugs and all — then runs them green. The chain is not allowed to start on a red repo, because a red repo has no truth to preserve.

When to use

  • The orchestrator has finished plan and moved to the baseline phase.
  • The person says: "set up a baseline", "pin the current behavior first", "we have no tests and I want to refactor safely", "how will we know if this breaks something?", "lock in what it does now".
  • Any time a behavior-preserving change is about to begin and the green fixed point has not yet been recorded.
  • NOT for adding new features, fixing bugs, or improving coverage for its own sake — this is only the minimal net under a refactor.
Installs
8
GitHub Stars
3
First Seen
Jul 2, 2026
refactor-safety-net — ahmedbenaw/refactor-chain