Use when writing Agent Relay or Ricky workflows that must loop review, fix, and validation with fresh agent context until independent signoff agents, typically Claude and Codex, both agree the work is comprehensively complete. Covers fresh-context iterations, repairable gates, dual reviewer verdict contracts, iteration-count reporting, PR signoff comments, and blocked-state handling.
SkillScore82Maintained
Automatic
◆AI Engineer pack
Last verified 8/14/2026
What it changes
Passed 15 of 18 test cases with the skill, and 4 of 18 without it.
Without skill23%
With skill82%
Checks it passed that the model alone missed
The response includes iteration count in the final report.
The response checks installed workspace versions using npm ls.
The response consumes START_FROM for only the resumed iteration.
and 17 more in the full report
13 fixed5 passed either way4 still failing0 broke
Pass-rate lift
+59 pp
Tokens
+66%
Agent turns
0%
Response time
-18%
Model gemini-3.6-flashMeasured 8/14/2026v218 of 22 cases passed with skill · 18 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 11 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 11
Prompt
I need an Agent Relay workflow script in TypeScript for a high-stakes multi-package feature. The workflow needs an outer loop that handles preflight environment validation, assigns code changes to worker agents, reconciles package versions across workspaces, and continuously fixes failing validation checks. It must run two independent reviewer agents in fresh contexts for every iteration until both give an unanimous pass, after which it should compile a final signoff report artifact and post it as a GitHub PR comment. Please provide the full workflow code.
What was checked, without and with the skill
Checked
Without skill
With skill
The response requires unanimous pass decisions from both reviewer instances before proceeding to post the PR comment.
Missed
Passed
The response executes a Codex CLI probe using codex exec with --ephemeral and --json flags during preflight.
Missed
Passed
case-01 · gemini-3.6-flash · 8/14/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md197 linessingle file
Review Fix Signoff Loop
Purpose
Use this pattern for high-stakes implementation workflows where a normal "implement, test, review once" flow is not enough. The workflow must keep repairing and re-reviewing until independent signoff agents agree the spec is fully wired end to end.
Pair this with writing-agent-relay-workflows for SDK syntax and relay-80-100-workflow for deterministic validation gates.
Required Shape
Run deterministic preflight before agents start.
Confirm repository root, required specs, declared write scope, credentials needed for PR comments, and whether commit/push/PR creation is in scope.
For cross-repo or package-release work, write a scope matrix before implementation: repositories, branches, PRs, packages, providers/features touched, published versions, consuming package manifests, lockfiles, and expected downstream bumps.
Probe the CLIs used by later agent steps. For Codex, codex login status is not enough; run a tiny codex exec --ephemeral --json --sandbox read-only -m <supported-model> prompt and fail early with a clear re-login instruction if it cannot return the expected token.
Write preflight evidence to .workflow-artifacts/<workflow>/iteration-N/preflight.md.
Implement with scoped owners.
Use Codex workers for code changes unless the codebase has a reason to prefer another CLI.
Split backend, frontend, desktop, tests, docs, or infrastructure into explicit non-overlapping ownership areas.
Each worker writes a durable summary artifact with changed files and commands run.
Reconcile before validation.
Add a deterministic implementation-reconcile gate that checks required files, expected API/UI/runtime surfaces, migrations, generated artifacts, and untracked files with git status --short -- <paths>.
For multi-provider changes, reconcile against the scope matrix: every touched provider/package must be classified as implemented, dependency-only, intentionally-deferred, or not-applicable, with proof. Do not let "we only bumped the package I remembered" pass this gate.
For package-release flows, reconcile producer and consumer state: npm view <pkg> version, package manifests, lockfile resolved tarballs/integrities, and npm ls <pkg> from every consuming workspace.
For CI failures, map each failing job to its exact local command or documented non-local equivalent. Distinguish similarly named gates (for example handler coverage vs acceptance route coverage) and replay the one that actually failed.
Use failOnError: false, then route the captured output to a repair owner.
Run repairable validation.
Use capture -> fix -> rerun for typecheck, targeted tests, integration or E2E tests, and regression checks.
Include exact failing CI commands when available before broader "nearby" checks. A nearby green gate is supporting evidence, not proof that the reported CI failure is fixed.
Red validation output is input for a repair agent, not an immediate workflow failure.
Write BLOCKED_NO_COMMIT.md only for true external blockers.
Run fresh-context signoff reviews.
Start a new workflow run, new agent names, or otherwise new agent contexts for each loop iteration.
Run Claude and Codex signoff reviews independently over the same post-validation repo state.
Reviewers must read specs, diff, validation logs, artifacts, and actual files.