cyberneticlibrary

Refactor code without behavior change

refactorworkflowsetup L30
matt-metivier/zk-flow-oss
What it does

Apply refactoring to codebase under green

Best for

Improving code quality when tests are passing and you want to safely restructure without behavior change.

Inputs
  • · target files/functions
  • · refactoring rules (rename, extract, consolidate, etc.)
Outputs
  • · refactored code; test suite still green
Requires
  • · code analyzer
  • · refactoring agents
  • · test runner
Preconditions

Tests must be passing; must have read-only access to source.

Failure modes

Refactoring breaks tests; unexpected behavior change; no safe way to structure differently.