This loop does continuous, low-risk upkeep while you focus on the real work.
Every few minutes the cycle picks one small improvement (a flaky test, a stale comment, a missing type, a dead import), makes the change, runs the tests, and commits.
It is one change at a time, one commit at a time, always with a green suite.
If nothing safe is left to improve, it simply waits instead of inventing risky work.
When to use
- While you build something else and want continuous hygiene.
- To clear small debt without breaking your main focus.
- When you prefer many tiny, safe commits.
How to use
Run the loop asking for one small, verified improvement per tick, one commit each, never touching anything risky or architectural.