optimize refactor-system: d4 — no-tests STOP gate (agent) + user arbitration loop (dispatcher) + mid-run test-failure revert; code-cleaner inline carve-out

This commit is contained in:
Bastien Chanot
2026-08-26 19:05:29 +02:00
parent 4d72d4aa12
commit c0a2a8069d
2 changed files with 18 additions and 2 deletions
+6
View File
@@ -18,3 +18,9 @@ $ARGUMENTS"
If the refactorer agent is unavailable, emit `Refactorer agent missing.` and
STOP — never improvise, silent behavior change is unsafe.
🔴 **No-tests gate**: when the agent returns `TESTS PRESENT: no` and stopped
(its contract on a test-less target), do NOT re-dispatch on your own. Surface
its PRE-REPORT and ask the user: add tests first / proceed anyway / abort.
Only an explicit "proceed" re-dispatches with the `GO-WITHOUT-TESTS` token —
behavior preservation is unverifiable on that path and the user owns that risk.