All commands

Command

/shipmates-refactor

pin behaviour → transform → prove equivalence

Pin today's behaviour, change the shape, prove callers still see the same thing.

See it run

Illustrative terminal recording of the stages /shipmates-refactor runs, in order.
Illustrative — the stages /shipmates-refactor runs, in order.

How to run it

Run it in your harness

/shipmates-refactor <what to refactor + why — e.g. "split the 900-line order service, it's untestable">

<angle brackets> = required · [square brackets] = optional

How it works

SDET pins current behaviour first. An engineer reshapes; architect sits when the shape is structural. Review always includes architect and a fresh SDET, plus PE+PO.

  1. Pin

    Tests that describe current behaviour — including behaviour you think is wrong — while it is still true.

    Crew

    sdet

  2. Reshape

    Change structure without changing what callers observe. Architect sits first when the target shape is a real structural change.

    Also sit when

    • architectthe change crosses module boundaries or moves a public surface
  3. Prove

    The pinned tests pass unmodified. No existing test is deleted, skipped, or loosened.

    Crew

    sdet

  4. Land

    Architect always asks whether the structure actually improved. A fresh SDET audits the test diff. PE+PO accept.

    Also sit when

When to use

  • The code is wrong-shaped; the product behaviour is not.
  • The behaviour is wrong? /shipmates-fix-bug. Find-and-replace an API? /shipmates-migrate.

The skill

The installer ships the full skill — stages, gates, config — from commands/shipmates-refactor.md.

Read the skill on GitHub