refactor
Installation
SKILL.md
Refactor — one structural experiment
Refactor changes structure while preserving observable behavior. It performs one caller-selected transformation and reports the result.
Prompt
Refactor billing-service/internal/retry/backoff.go: extract the exponential backoff calculation out of RetryRequest into its own function, no other behavior change. Record a baseline, run go test ./internal/retry/... before and after, and report the diff summary, commands, results, and anything not checked.
It's working if
- The report names the preserved behavior and cites
go test ./internal/retry/...run both before and after. git diff --stattouches onlyinternal/retry/backoff.go, never an unrelated file.- Golden-output hashes get captured and compared byte-for-byte whenever the changed surface produces output, e.g.
sha256sumbefore and after. - The report's
behavior not checkedlist is present in the output even when empty, naming any surface the gates skipped.