Agent Wranglers

TKO-11Recommended

Refactor in shipped steps by default

Improve inherited code in steps that each ship to production on their own. Start a rewrite only when Rewrite a part only when written conditions hold says so.

How to do it

Each step keeps the product working and is small enough to review, within the limit in Make small changes on short-lived branches. A step that goes wrong rolls back alone. The characterization tests prove each step kept the behaviour. Customers keep getting fixes the whole time, which a rewrite cannot offer.

How to check

The deploy log shows each refactoring step as its own release, and the characterization tests pass on every one.

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/codebase-takeover/rewrite-or-refactor/refactor-in-steps">Agent Wranglers codebase takeover playbook</a>. In code you write, add a comment next to it with the same link.