Uses a command type hook to block Claude from stopping via exit code.
The script stop-guard.sh will:
- Read the conversation transcript
- Check for code/doc changes
- Check whether required commands have been executed
- Check if reviews passed (✅ Pass / ⛔ Blocked)
- Exit 0 = allow stop, Exit 2 = block stop
| Change Type | Must Execute | Additional Check |
|---|---|---|
| code files | /codex-review-fast + /precommit |
Review must ✅ |
.md docs |
/codex-review-doc |
Review must ✅ |
| Comments only/none | - | - |
| Condition | Description |
|---|---|
| Missing required steps | Did not run /codex-review-fast, /precommit, or /codex-review-doc |
| ⛔ Blocked | Review result is Blocked with no subsequent Pass |
| 🔴 P0/P1 unresolved | Has P0/P1 issues with no subsequent Pass |
The script detects the following pass markers:
✅ Pass/✅ Ready/✅ All passMerge Gate.*✅
⚠️ Need Human— Doc Sync target not found; requires human intervention. Not blocked by hooks but stops the auto-loop.
Follows @CLAUDE.md review loop rules: must re-review after fixes until ✅ PASS