Gate loops on real test passes
Run your goal loop until the actual command succeeds, not just the transcript claim, blocking exit with a deterministic stop hook.
Prompt
/goal (run-until-condition) with a DETERMINISTIC Stop-hook script that runs the real verification /goal's transcript-only Haiku checker cannot — exit-2-blocking the stop until the actual command (tests/build/typecheck) passes. Use when you want a loop to keep going until a condition is GENUINELY met (not just claimed in the transcript), when /goal alone would rubber-stamp a hallucinated "tests pass", or when adding a deterministic completion gate to any loop. Trigger phrases: /goal gate, deterministic stop gate, goal not really done, verify before stop, stop hook gate, run until tests actually pass
claude-code
Source: OpenxIntelligence ↗graded C · 65/100 — how grades work (Safety Score v2) →
Similar loops
All testing loops →C
/goalTestingmedium risk
Reach a coverage target
Add focused tests for the least-covered files and re-measure each turn until coverage hits 80 percent or the turn cap.
/goal test coverage is at least 80% with all tests passing — add focused tests for the least-covered files, re-run coverage each turn, stop at the threshold or after 12 turns
C
/goalTestingmedium risk
Fix the flaky checkout test
Run checkout tests repeatedly until 20 consecutive passes, logging failure modes and hypotheses after each iteration.
/goal Reproduce and fix the flaky checkout test so it passes 20 consecutive runs, verified by npm test -- checkout, while preserving checkout API behavior and existing correctness tests. Use the checkout test files, checkout service code, fixtures, and related logs. Between iterations, record the observed failure mode, hypothesis, change, and rerun result. If reproduction stays unavailable or valid paths are exhausted, stop with reproduction attempts, logs, most likely absent condition, blocker, and next input needed
B
/goalTestingmedium risknew
Get the SpSession tests green
Implement the full SpSession transition table in sp_session.cc until make test prints ALL TESTS PASS and exits 0.
/goal Running make -C AIVMT/firmware/test_host test prints "ALL TESTS PASS" and exits 0, with the full SpSession transition table implemented in AIVMT/firmware/components/aivmt_sp/sp_session.cc per AIVMT/firmware/ARCHITECTURE.md. Show the make output each turn. Constraints: only edit files under components/aivmt_sp/; do NOT modify test_host/test_fsm.cc or any public header API. Or stop after 20 turns