Rig Plan
Read Evidence rules before writing any factual claim. Follow Role dispatch for native-agent fallback and stop on reported scope violations.
Produce one plan that implementation can execute without re-deciding scope.
Input
- Goal or issue.
- Target paths, PR, or area, when known.
- Constraints: compatibility, deadlines, review requirements.
Workflow
- Classify scope.
TRIVIALunder 3 files and 50 changed lines;LOCALone subsystem;BROADcross-subsystem or 8+ files;HIGH_RISKwhen auth, credentials, data, release, CI, or migrations are touched. State the classification and why. - Start the run. Detect gates with
rig_gateandaction: "detect". Callrig_evidencewithaction: "start",skill: "rig-plan", and the target paths; if no configured gate exists, includegate_exemptiondescribing the manual check that replaces it. Keep the returnedrun_id. - Collect evidence. Read the actual source, tests, configuration, and consumers. Do not plan from filenames alone. Record each authoritative file with
rig_evidence,action: "record", the returnedrun_id, andinputs. - Decide every surface. Put each candidate surface in one verdict table with exactly one verdict:
in-scope,deferredwith its unblock condition, orout-of-scopewith its reason. No surface stays unclassified. - Reconcile owned paths. For each
in-scoperow, name its owned path, its consumer, and the check that proves it still works. The table and the owned-path list must reconcile both ways: every owned path has anin-scoperow, and everyin-scoperow names a path. - Derive the delegation brief. Never hand-write it. Disjoint
in-scoperows become parallel workstreams with one owner per path; rows that share a path are serialised as prerequisites. - Write the plan to
<run-dir>/plan.mdwith: arevisioncounter, the verdict table, a "Verdict changes since the previous revision" section, the derived workstreams, goal, scope classification, numbered steps, owned paths, gates, risks, rollback, acceptance criteria, and explicit non-goals. - Challenge the plan once. Compute the current plan file's SHA-256 and dispatch
rig-challenger(native subagent when installed, otherwiserig_dispatch) with those exact plan bytes and digest, verdict table, source digests, and acceptance criteria. Accept only findings that cite source. If the plan changes after the challenge, the revised bytes require an independent challenge before freezing. - Freeze it. Record the plan with
rig_evidence(action: "record",plan_path,plan_digestcontaining the exact digest assessed by the independent challenger, andreviewernaming that challenger) and finalize. Finalization rejects a digest mismatch between reviewed, bound, and current plan bytes; never replace the reviewed digest with one from unreviewed edits.
Rules
- A frozen plan is read-only once implementation starts. If source contradicts the plan, stop and report the contradiction; never rewrite the plan to match what was built.
- The verdict table defines scope, not the prose: a surface marked
deferredorout-of-scopeis not worked on, whatever the steps imply. - Every revision lists each changed verdict under "Verdict changes since the previous revision"; a surface moving to
deferredorout-of-scopemust appear there, never only inside rewritten prose. - Every step names its owned path. Two steps may not own the same path, and no path enters a workstream unless the table marks it
in-scope. - Gates come from
rig_gatedetection, never from invented commands. - If no configured gate exists, pass
gate_exemptionataction: "start"and say what manual check replaces it. - Plans stay in the run directory. Do not ship plan text or private evidence as product content.
Output
Report the plan path, revision, scope classification, digest, verdict counts, workstreams, step count, gates, top risks, and any unresolved decision. Do not claim the change is implemented.
