14 · Shipping & Collaboration
Refactor
Restructure without changing behavior
Improving the shape of code—names, structure, duplication—while keeping external behavior the same. Distinct from adding features or fixing bugs.
Concrete example
Extracting a shared helper used by three routes is a refactor if the outputs stay identical.
Why it matters
How codebases stay editable after agents generate the first version.