Sweep is the last stage, after the unit has cleared review and integrated at its contracted terminal. Its job is the loose ends a single unit of work tends to leave behind: a reference that now points at something renamed, a doc whose map has quietly gone stale, an orphan created by the change itself. The change is not finished when the feature works in isolation; it is finished when nothing around it dangles.

Scan the loose ends, then filter surgically. Remove only the orphans this change made, flag the pre-existing dead code, and leave the site consistent.

The discipline that keeps the sweep from turning into a rewrite is the same surgical rule the whole pack runs on. It removes only the orphans this change created and flags pre-existing dead code rather than deleting it uninvited. A sweep that starts tidying adjacent code it was never asked to touch has stopped closing out the unit and started a new, unplanned one. The stage exists to return the site to a consistent state, not to improve everything within reach.