Architecture Refactoring Loop for Coding Agents | Loop Library
Thursday, June 18, 2026 AI
Scraped Article
[Skip to content](https://signals.forwardfuture.ai/loop-library/loops/architecture-satisfaction-loop/#main)
Ready-to-use prompt
## Copy the loop
Copy
Refactor until you are happy with the architecture. After each significant step, live-test the system, run autoreview, and commit. Track progress in /tmp/refactor-{projectname}.md.
Verify / stop
## The architecture is satisfactory and checks pass.
Live-test, autoreview, and commit each significant step.
Context and guidanceWhen to use it, steps, safety notes, and related loops
PublishedJun 12, 2026
UpdatedJun 17, 2026
## Use this when
Use this for a deliberate architectural refactor where the destination can be stated in concrete terms and the current system can be tested after each meaningful change.
## How to run it
1. Write down the architectural target, constraints, and current risks before editing code.
2. Make one significant, reviewable change at a time.
3. Live-test the affected behavior and run an independent review after each significant step.
4. Commit each verified checkpoint and update the temporary progress file with decisions, blockers, and the next action.
## Why it works
Small verified checkpoints reduce refactor risk and preserve rollback points. The progress file keeps the goal and decisions available across long sessions or handoffs.
## Implementation note
Define what satisfactory means before starting, such as module boundaries, dependency direction, passing tests, and acceptable performance. A subjective stop condition can otherwise run indefinitely.