Claude Cycles: iterative refactoring with metrics gates
One technique I keep returning to is improving a small, well-tested piece of code over a metric, in many small autonomous passes, with the worst attempts thrown away. The unit of work is one cycle: an isolated git worktree, an open-ended prompt, automatic tests, an automatic merge or discard. No single cycle is dramatic. The whole point is that they compound. It works when two things are true: the code under improvement is well tested, and the metric you care about is honestly definable. It does not work otherwise — the gate becomes either meaningless (no tests) or gameable (the wrong metric). ...