0623: Overnight Project Refactor As PR-Sized Slices
June 27, 2026 ยท View on GitHub
Summary
This case captures a long unattended refactor that stayed reviewable because LoopX kept splitting the work into bounded PR-sized slices. The reusable lesson is that autonomous refactoring should not land as one huge diff. It should keep todo follow-up, supersede decisions, validation, and review boundaries visible.
The source note described an overnight refactor wave. This repository records the public-safe control-plane pattern rather than private screenshots or local project state.
Before
Large refactors are a bad fit for naive autonomous loops. Without a control plane, an agent can keep editing after the original plan is stale, mix cleanup with behavior changes, or produce a broad diff that is hard to review.
The desired behavior is:
- keep the goal and current slice explicit;
- finish one reviewable unit at a time;
- create follow-up todos for remaining work;
- supersede stale todos when the refactor discovers a better route;
- validate each slice before merge or handoff.
LoopX Behavior
LoopX makes that refactor loop durable:
todo follow-upturns discoveries into the next concrete slice;supersedeprevents stale tasks from staying runnable;- quota and status keep the current slice separate from adjacent cleanup;
- review packets and focused smokes keep each PR independently checkable;
- public/private boundary scans prevent local planning material from leaking into public docs.
User-Facing Value
The operator can let a refactor continue overnight while still waking up to reviewable units. The project moves faster, but the review surface remains human-sized.
Evidence Boundary
This case excludes private screenshots, raw chats, internal planning notes, local paths, credentials, raw logs, and unpublished project artifacts. Public evidence should come from the resulting PR-sized diffs, validation commands, and follow-up/supersede state, not from raw agent traces.
Public Evidence Sequence
- A broad refactor starts as a long-running goal.
- LoopX keeps the current slice explicit.
- Follow-up and supersede convert discoveries into reviewable next steps.
- Each slice gets validation and a review packet.
- The operator reviews bounded PRs instead of a giant autonomous diff.