SlashForge
Commands

/slashforge-refactor

Refactor with a zero-functional-change guarantee — gated by your existing test suite passing with identical results before and after. Structure only, no behaviour, API, or feature changes.


On this page
/slashforge-refactor <file|glob>
Note

Using Cursor or Codex? Pick your agent in the header and every command on this page changes with it. See Hosts for what else differs.

Reshape existing code while proving its behaviour does not move. It inherits the ten-phase workflow of /slashforge-code but adds a zero-functional-change rule, enforced by a test-suite baseline gate: the suite must pass with identical results before and after.

Structure only. No behaviour, public-API, or feature changes. For a change that should alter behaviour, use /slashforge-code.

The baseline gate

Before touching anything, /slashforge-refactor establishes a green baseline over the target:

What it changes about the standard flow

Gates

The same four user gates as /slashforge-code: plan confirmation, branch decision, PR target + reviewers, and branch cleanup.

Argument

/slashforge-refactor takes the file(s)/glob to refactor, optionally with a description of the structural goal. With no argument, it asks what to refactor and why.