Rig Challenge
Read Evidence rules and Convergence. Follow Role dispatch for native-agent fallback and stop on reported scope violations.
Input
- Bounded task, exact source paths, and acceptance criteria.
- Optional: a prior ledger and its run ID.
Workflow
- Freeze the baseline. Detect gates using
rig_gatewithaction: "detect". If there is no configured gate, passgate_exemptionnaming the reason and manual substitute at start. Start a run withrig_evidence(action: "start",skill: "rig-challenge", andpathsnaming the exact target source files) and record the exact source and acceptance criteria. - Round 1 — independent challenge. Dispatch
rig-challengerwith the complete source and criteria. The challenger returns structured findings: invariant, counterexample, severity, and file reference. The parent does not challenge its own work. Ensure correctness is covered (the challenger must examine logic/control flow). - Validate. Check each finding against the source. Record a stable signature: file plus normalized invariant. Use
rig_loopwithaction: "start"andreviewernaming the independent challenger; the baseline round's weighted total isW0. IfW0is zero, print the returned progress table and proceed directly to step 8. - Fix. Address validated findings only. One writer per path. Refresh the run scope with
rig_evidence(action: "refresh",messagegiving the reason) after the last fix, then run configured gates. - Re-assess. A fresh challenger receives the prior findings, the complete required source, and the changed paths. It marks resolved signatures
fixedorrejected, retains unresolved signatures asopen, and may report new signatures. - Score and decide. Append the round with
rig_loop(action: "append",reviewer, and every prior signature assessed). Score per Convergence, using the tool's decision.- Strictly decreasing total: continue or stop as converged.
- Equal total: plateau; stop.
- Increasing total: non-converging; stop.
- Print progress. After each validated round, print the cumulative table returned by
rig_loopper Convergence. - Run configured gates. Use
rig_gate(action: "detect"), then run all configured gates withaction: "run", even when the baseline has no findings and no fixes were made. When no gate is configured, perform the recorded manual substitute. If there is neither a configured gate nor a recorded exemption, report the missing gate and stop; do not claim completion. If any gate fails, do not finalize the loop; treat the failure as a finding, fix it, refresh the scope withrig_evidence(action: "refresh",messagegiving the reason), and return to step 5 for an independent reassessment before rerunning gates. - Finalize. Record the terminal stop reason with
rig_loop(action: "finalize",reviewer,stop_reason, and anotefor authority, drift, or unavailable-reviewer stops);reviewermay be omitted for an unavailable-reviewer stop when no independent reviewer was available. Recording a stop does not complete the run. Callrig_evidencewithaction: "finalize"only for convergence backed by the required review and gates. Security or critical residue blocks completion; any stop other than convergence leaves the run blocked and requires a replacement run rather than refresh to resume work.
Rules
- For every challenger dispatch, use a native subagent when installed, otherwise
rig_dispatchwithrole: "rig-challenger", the source paths, task, andread_only: true. - Use only configured
maxLoopRoundsfor round-limit stops per Convergence. - A new finding never resets prior signatures or history.
- Do not reclassify a finding as fixed without independent assessment.
- Scope changes retain the parent stop and mark unassessed prior findings as unassessed.
Output
Report the run ID, weighted series, stop reason, unresolved signatures, gate receipts, and remaining risks.
