{"data":{"slug":"discovered-364a22ceec76022d30fee213d6702ce71f4c0a2cd5e0b6cf","title":"Rjv Gated Build","summary":"Run an adversarial multi-agent gated build where an independent reviewer approves each slice. Use automatically for financial, production-safety, security, destructive, high-blast-radius, zero-debt, multi-agent, or phase-reviewed builds. Composes with rjv-work-plan, rjv-spec-driven, and rjv-delegate.","url":"https:\/\/skillshunter.net\/skills\/discovered-364a22ceec76022d30fee213d6702ce71f4c0a2cd5e0b6cf","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-364a22ceec76022d30fee213d6702ce71f4c0a2cd5e0b6cf","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-364a22ceec76022d30fee213d6702ce71f4c0a2cd5e0b6cf.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-364a22ceec76022d30fee213d6702ce71f4c0a2cd5e0b6cf\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before starting, ensure the orchestrator is cast by the human at launch. Reviewer must be independent and \u2265 author strength. Record the cast in the anchor plan's `## Cast` section. The human is also a reviewer and must surface designs at phase boundaries. Read `CASTING.md` for orchestrator-choice tables, author\u00d7reviewer pairings, and execution bindings.","instructions":"---\nname: rjv-gated-build\ndescription: \"How-to: run an adversarial multi-agent gated build where an independent reviewer approves each slice. Use automatically for financial\/money, production-safety, security, destructive, high-blast-radius, zero-debt, multi-agent, or phase-reviewed builds\u2014even when the user never says 'gated build'. Composes with rjv-work-plan, rjv-spec-driven and rjv-delegate. Triggers: gated build, grill each step, adversarial review, overnight run, high-stakes build, human QA gate, repeated review rejections.\"\n---\n\n# Gated build: adversarial multi-agent construction\n\nFor work where being *plausibly wrong* is expensive. One agent cannot reliably\ncatch its own errors, because the blind spot that produced the bug also reviews\nit. Quality comes from **independence**: a second agent whose job is NO-AGREE,\ngrilling every step to an explicit APPROVED.\n\nEconomics: compress everything agents read (specs, notes, grill prompts) so you\ncan afford a second agent to disagree. Efficiency funds redundancy.\n\n## 1. Casting the roles \u2192 `CASTING.md`\n\nThree roles: **Orchestrator** (holds anchor doc, casts, integrates), **Author**\n(drafts), **Reviewer** (grills to APPROVED). Cast each role for the task in hand.\n\n- **The human casts the orchestrator at launch. ASK them.**\n- **Reviewer \u2265 author strength, and independent.** Above mechanical work,\n  self-review does not count as review. Prefer cross-vendor for the grill.\n- **Record the cast once** in the anchor plan's `## Cast` (`rjv-work-plan`), models\n  named. Every resume obeys it; recasting is a logged Decision with a why.\n- **The human is also a reviewer.** Surface designs at phase boundaries.\n\nRead [`CASTING.md`](.\/CASTING.md) at build start or when recasting: the\norchestrator-choice table (Opus \/ Sonnet \/ Codex and the reviewer each requires),\nthe author\u00d7reviewer pairings, execution bindings for each cast, and the evidence\nbehind the two hard rules.\n\n## 2. Grill the durable SPEC before any code\n\nThe highest-leverage grill is pre-implementation. Source build: the reviewer's\nround-1 verdict on the *design* was \"not buildable as written\", with 10 ranked\nattack scenarios, 8 valid. Fixing pre-code cost a doc rewrite; post-code it would\nhave cost the build.\n\n- A gated build runs as `Build mode: gated + spec-driven` (`rjv-work-plan`), so\n  `rjv-spec-driven` is always loaded. Acceptance criteria live in\n  `_docs\/features\/<area>\/spec.md`. The plan links the spec and carries only the\n  active criterion IDs plus the compressed grill trail.\n- Prompt: \"ATTACK this design and criteria. Ranked failure scenarios. Verdict: AGREE \/\n  NO-AGREE with blockers.\"\n- Iterate spec \u2192 attack \u2192 amend until AGREE. Record each round in the anchor doc\n  (v1 \u2192 v2 \u2192 v2.1\u2026), noting objections accepted *on merit* and those rejected,\n  with reasons.\n- A reviewer that never says NO-AGREE is not reviewing. Instant approvals every\n  round \u2192 sharpen the prompt (\u00a74) or recast.\n- Issue `WORK` only after the human agrees with the criteria and the independent\n  reviewer returns AGREE. Every active criterion has a permanent ID.\n\n## 3. The gated loop (per implementation step)\n\n```\nagreed spec IDs \u2192 red proof \u2192 implement \u2192 self-review + smoke \u2192 REVIEWER GRILL by IDs \u2192 fix \u2192 re-grill \u2026 \u2192 APPROVED \u2192 commit \u2192 next IDs\n```\n\nStop rules are part of the spec. Write them explicitly per step with this\ntemplate:\n\n```\nloop step: reach [verifiable end state], only touching [scope],\nstop after [success cond] OR [N iters] OR [$\/token budget], verifier = [test\/build\/screenshot].\n```\n\n- **Spec first.** Durable criteria live in `spec.md`; the anchor plan names the\n  active IDs before coding. Grading against criteria invented mid-code blesses bugs.\n- **ID-bound commands.** `WORK`, handoff, and `REVIEW` name the same criterion IDs\n  (command table in `rjv-spec-driven`). Behaviour discovered mid-flight pauses the\n  slice until its criterion is agreed.\n- **Self-review + throwaway smoke** before handoff. It catches the dumb bugs\n  cheaply, so the reviewer's rounds go to subtle ones.\n- **Author-side stop.** A check still failing after three fix attempts stops the\n  author and goes to the human (`rjv-verify` phase 3). The ~6-round cap below is\n  for reviewer rounds.\n- **Grill to an explicit APPROVED.** One round-trip is not review.\n- **Park instead of rubber-stamping.** Cap rounds per step (~6). Still blocked \u2192\n  write the open blockers to the anchor doc and STOP that step. \"Parked, here's\n  why\" beats a faked approval. This is non-negotiable when money or safety is at\n  stake.\n- **Living plan \/ reach-backs.** A grill that invalidates an EARLIER approved step\n  \u2192 reopen, fix, re-test, re-grill, LOG the reach-back. A locked-in wrong step is\n  worse than a reopened one.\n\nDone when: the step has an explicit APPROVED and is committed, or it is parked\nwith its blockers written to the anchor doc.\n\n## 4. Driving the reviewer: prompt rules\n\nThe reviewer posture and verdicts (`APPROVED` \/ `REJECTED` \/ `SPEC-GAP`) are\ndefined in `rjv-spec-driven`. Put these rules into every grill prompt:\n\n- **REVIEW ONLY.** First line: \"REVIEW ONLY \u2014 do not modify files, do not\n  implement.\" The reviewer reads, reasons and votes.\n- **Review the invariant.** Start by writing the rule the slice claims to\n  establish. Then attempt to violate that rule without reverting the author's\n  exact edit. A proof that only recognizes the syntax just fixed is not a gate.\n- **Audit every load-bearing hop.** Trace producer \u2192 contract\/type \u2192 adapter\/wrapper \u2192\n  consumer \u2192 failure UI. Inspect every declared return type and failure semantic. If\n  the change makes an adjacent file load-bearing, that file is inside review scope\n  even when the author did not edit it.\n- **Invent bypasses before approval.** For every new architecture\/static gate, try at\n  least: alternate initialization, object\/wrapper state, indirection\/helper, and a\n  different but valid syntax. Record the attempted bypasses and their red result.\n  A fixture copied from the original bug is necessary but insufficient.\n- **Prove the negative path.** Success screenshots do not prove rejection, rollback,\n  cancellation, retry, hidden\/conditional fields, or duplicate input. Exercise the\n  failure that the contract exists to carry, plus one nearby non-regression.\n- **Missing test infrastructure is a blocker.** A regex scan may enforce file\n  ownership or forbidden dependencies; it cannot prove async settlement, React\n  state, or rendering behavior. If no runner can execute the invariant, return\n  `REJECTED`\/`SPEC-GAP` and propose the smallest harness. **Do not add a\n  dependency without human approval.**\n- **Every discovered defect counts, pre-existing or not.** It is registered and\n  keeps the verdict red until fixed, disproved, deduplicated, or explicitly\n  accepted by the human. \u201cUnchanged,\u201d \u201cnon-blocking,\u201d and \u201clater\u201d are not\n  dispositions.\n- **You run the tests; the reviewer reads.** Reviewer sandboxes hang on\n  execution. Run the suite yourself and paste results (\"suite already run: N\n  passed, review by reading the code\"). The reviewer may read files and never\n  executes.\n- **Name the failure modes.** Exact files, spec section, numbered hunt-list. Money\n  code: double-exposure, oversell, lost\/duplicated intent across restart, ordering\n  races, idempotency, fees\/precision, the risky path just written. Vague prompts\n  give vague reviews.\n- **Self-started Codex CLI reviewers** (only when the Cast names one):\n  follow `rjv-session-link` (15-minute cap, cancel-first on timeout,\n  orphan cleanup, sandbox limits).\n\nReviewer handoff must include this compact evidence table:\n\n```text\ncriterion | invariant | boundary hops inspected | bypasses attempted | negative proof | verdict\n```\n\nIf any cell is empty, the criterion is not ready for `APPROVED`.\n\n## 5. The anchor document \u2192 `ANCHOR-DOC.md`\n\nOne compressed working-memory doc **per build**, living inside `rjv-work-plan`'s\n`.plans\/<branch>.md`. Conversation is disposable; the anchor doc is not. It obeys\nthe plan's ~400-line ceiling (owned by `rjv-work-plan`); over it, compress BEFORE\nacting.\n\nRead [`ANCHOR-DOC.md`](.\/ANCHOR-DOC.md) when setting up the plan's sections, when\ndeciding where a fact belongs, or when the plan is nearing the ceiling: the owned-\nsections table (GOAL, EVIDENCE LEDGER, INVARIANTS, DESIGN vN, TOMBSTONES, \u2026), the\ncaveman register rule for agent-read text, the no-later rule, and the promotion\nmandate that says what collapses to where.\n\n## 6. Staying alive \u2192 `RUNTIME.md`\n\n**Keep all state on disk; the live conversation can drop at any time.** Rewrite\n`>>> RESUME HERE <<<` at the END of every step; commit each approved step\nimmediately; hand the grill to a background command or a watcher subagent\n(`rjv-delegate` \u00a78); the host wakes you when it exits. Never sleep or\npoll for it. Keep steps idempotent so a mid-step re-entry is replay-safe.\n\nRead [`RUNTIME.md`](.\/RUNTIME.md) after a drop, compaction or wake, or\nbefore a long or overnight run. Driving an OpenAI Codex CLI reviewer\nlives in `rjv-session-link`.\n\n## 7. Model economy \u2192 `rjv-delegate`\n\nLoad `rjv-delegate` (and your host mechanism, `rjv-subagents-claude` or\n`rjv-subagents-codex`) before delegating anything: who does the work,\nwhich model, the brief and the time budget. Self-started Codex CLI\nreviewer caps live in `rjv-session-link`. Who may author and who must\nreview is in [`CASTING.md`](.\/CASTING.md).\n\n## 8. Scope honesty, especially for financial systems\n\nState in one line what \"done\" covers. \"Reviewer-APPROVED through step N\" \u2260\n\"validated against reality\" if the run only exercised a simulator\/paper path.\nKeep dangerous gates (live trading, prod deploys, destructive ops) **physically\noff** until a separate explicit validation phase with its own gate (paper-parity,\nfill-ratio bands, fail-closed thresholds). Never let \"approved\" read as\n\"safe to ship.\"\n\n---\n\n**One-line invariant:** independent reviewer + compressed on-disk state + scheduled\nself-wakes = a run that converges to correct and survives every hang, drop, and\ncompaction.\n\n*Provenance: distilled from a live high-stakes build (options trading bot, 2026-07:\n6+ grill rounds, real NO-AGREEs, a human-caught design hole, losses studied at tick\nlevel) + a verified local-model delegation spike. Register + spec-section ideas\ncredited to the caveman\/cavekit family (github.com\/juliusbrussee).*\n","use_cases":["Financial or money-related builds","Production-safety critical implementations","Security-sensitive development","Destructive or high-blast-radius operations","Zero-debt or phase-reviewed builds","Overnight or high-stakes execution scenarios"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/rjvim\/ai-skills\/blob\/9a942086adef21dbd0c061d9d9e8fd5f43328bf6\/skills\/rjv-gated-build\/SKILL.md","source_commit":"9a942086adef21dbd0c061d9d9e8fd5f43328bf6","license":null,"version":null,"listing_approved_at":"2026-12-03","created_at":"2026-12-02T09:09:45.000000Z","updated_at":"2026-12-03T16:19:55.000000Z","seo_title":"Rjv Gated Build: Adversarial Multi-Agent Construction for High-Stakes,","seo_description":"Run adversarial multi-agent gated builds with independent reviewer approval for high-stakes tasks like financial, security, and production-safety. Composes with rjv-work,","seo_keywords":["adversarial multi-agent build","gated build process","independent reviewer approval","high-stakes development","spec-driven construction","rjv-gated-build","secure build workflow"]}}