100%

05 — execution-finder-executor-loop

Goal

Execute confirmed collapses via the thin executor loop (user-approved): walk the frozen confirmed list one at a time — apply the collapse, run /commit-push (which runs test-all + hygiene), land it as a refactor: commit (Two Hats), then the next. One collapse = one test-all = one commit, so a broken collapse is localized and revertible. The finding stays the novel work; execution is trivial reuse of the existing green gate.

Implementation Sketch

dispatch.py executor loop: for each collapse verdict, the runtime hands the LLM the bounded collapse (author the shared abstraction + repoint callers), then runs /commit-push for that single collapse. On test-all/hygiene failure: revert that collapse, record, continue (fail one, not the batch). latent-bug items were already routed to /add-bug at §04. No batching multiple collapses into one commit.

Spec References

.claude/skills/commit-push (test-all + hygiene gate); CLAUDE.md §Two Hats (refactor: commits); CLAUDE.md §Fix Completeness (refactor under green)

Work Items

  • dispatch.py: per-collapse executor loop (apply -> /commit-push -> refactor commit)
  • One collapse = one test-all = one commit (Two Hats); never batch collapses
  • Failure path: revert that collapse, record, continue (localized, not batch-fatal)
  • Test: a collapse that breaks test-all is reverted + recorded; a clean one commits