Verify Phase Skill
Verify that a phase was executed correctly using goal-backward verification. Automatically retries on failure.
Usage
code
/verify-phase Verify the current executed phase /verify-phase 2 Verify a specific phase by number
Behavior
- •Read
.planning/PHASES.mdto identify the target phase - •Verify the phase has been executed (status
executedorretrying) - •Spawn
phase-verifieragent with:- •Phase goal from PHASES.md
- •PLAN.md task definitions
- •Current codebase state
- •Receive verification result:
VERIFICATION PASSEDorGAPS FOUND
On PASS
- •Write results to
phases/NN-name/VERIFY.md - •Update PHASES.md phase status to
completed - •Update STATE.md with verification results
- •Emit
phase_verifiedevent (result: pass):bashcurl -s -X POST http://localhost:4011/event \ -H "Content-Type: application/json" \ -d '{"type":"phase_verified","questId":"<id>","phaseId":"<id>","result":"pass","retryCount":0}' - •If all phases complete, emit
quest_completedevent - •Otherwise, advance STATE.md to next phase
On FAIL
- •Write diagnosis to
phases/NN-name/VERIFY.md - •Read
config.jsonfor maxRetries (default 3) - •If retryCount < maxRetries:
a. Update PHASES.md status to
retryingb. Increment retryCount in STATE.md c. Emitphase_retryingevent:d. Re-runbashcurl -s -X POST http://localhost:4011/event \ -H "Content-Type: application/json" \ -d '{"type":"phase_retrying","questId":"<id>","phaseId":"<id>","retryCount":<n>,"diagnosis":"<summary>"}'/execute-phasewith diagnosis as additional context e. Re-run/verify-phaseafter execution completes - •If retryCount >= maxRetries:
a. Emit
phase_verifiedevent (result: fail) b. Present full diagnosis to user c. Wait for human intervention
Loop-Until-Complete
code
execute → verify → [PASS] → next phase
→ [FAIL] → re-execute with diagnosis → verify again
→ [FAIL x3] → checkpoint to human
Prerequisites
- •Active quest with executed phase
- •Phase status must be
executedorretrying
Quick Reference
- •Runbook:
runbook/quest-workflow.md - •Verifier agent:
claude-config/agents/phase-verifier.md