cursor-stop-truth-gate

Ask Cursor for one more pass when final code-change claims omit validation evidence.

hook Stop cursor mode: enforce

Ask Cursor for one more pass when final code-change claims omit validation evidence.

FieldValue
idcursor-stop-truth-gate
status_messageChecking final-answer evidence
modeenforce
logical_eventStop
commandpython3 {repo_root}/hooks/wagents-hook.py cursor-stop-truth-gate --harness {harness}
timeout5
harnesses["cursor"]
Full hook config + command reference
config/hook-registry.json (entry)
{
"id": "cursor-stop-truth-gate",
"description": "Ask Cursor for one more pass when final code-change claims omit validation evidence.",
"status_message": "Checking final-answer evidence",
"mode": "enforce",
"logical_event": "Stop",
"command": "python3 {repo_root}/hooks/wagents-hook.py cursor-stop-truth-gate --harness {harness}",
"timeout": 5,
"harnesses": [
"cursor"
]
}
hooks/wagents-hook.py (policy + guard)
def _policy_codex_stop_truth_gate(payload: NormalizedPayload) -> int:
if payload.stop_hook_active:
return 0
...
# checks last assistant message for claims without evidence
if has_claim and not has_evidence:
return _stop_retry(payload, "Add explicit validation evidence (tests, commands, diffs) before stopping.")
return 0

Command: python3 .../wagents-hook.py cursor-stop-truth-gate --harness cursor


View source on GitHub