/verify-claims — Stage 4: Extract → Verify → Refine → Finalize
Arguments: $ARGUMENTS
Current state: !python3 .claude/scripts/ledger.py status
Preconditions: resolve the run (--run or ACTIVE_RUN); paper/draft.md must
exist — otherwise stop and point to /write-paper.
Extract:
python3 .claude/scripts/extract_claims.py <run>→paper/claims.jsonl.Verify: launch the
claim-verifiersubagent (run dir). It runsverify_claims.py, judges the PENDING_LLM claims (citation entailment vsliterature/notes; method-code alignment vsbest/solution.py) with a verbatim supporting quote per PASS/PARTIAL, and writespaper/verification-report.md. A stop-gate hook prevents it from finishing with unresolved or quote-ungrounded claims.Best-of-N votes (if
run-config.json#verifier_votesis N ≥ 2): the LLM judgments are sampled N times and disagreements resolved conservatively. SEQUENTIALLY, for k = 1..N-1: launch aclaim-verifier, thenpython3 .claude/scripts/verdict_votes.py snapshot <run> <k>(this archives vote k underpaper/votes/and resets the LLM-judged claims so the next verifier judges blind — votes must NOT run in parallel, they sharepaper/claims.jsonl). Launch the final claim-verifier, thenpython3 .claude/scripts/verdict_votes.py merge <run>— on any disagreement the weakest verdict wins (FAIL < PARTIAL < PASS). Append the merge summary topaper/verification-report.mdunder a## Vote reconciliationheader, and re-runpython3 .claude/scripts/verify_claims.py <run>for the post-merge tally.Refine loop (max 2 rounds): if any claim is FAIL, launch
refiner(run dir + the failure list), then re-runpython3 .claude/scripts/verify_claims.py <run>. Remaining FAILs after round 2 are reported honestly, not hidden.Finalize: copy
paper/draft.md→final/paper.md.Chain-of-Evidence audit:
python3 .claude/scripts/chain_of_evidence.py <run>— Score Verification, Reference Verification, Specification Violation, Method-Code Alignment.Ledger:
python3 .claude/scripts/ledger.py append '{"event":"stage_verify","detail":"<tally>"}'
Report: claim tally (pass/partial/fail), the chain-of-evidence table, and the
final paper path. Offer /paper-to-latex.