You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 1.0.3. A complete, installable skill for implementing a scoped
software task in sequential batches with CRBuddy
review, bounded repairs, durable progress records, and final review and validation.
The primary agent owns implementation and decisions; your existing CRBuddy panel
supplies the independent reviews. Local checkpoint commits happen only when authorized.
Give this to Codex
Copy this into a local Codex session with shell and network access:
Install the reviewed-batches skill for Codex from https://gist.github.com/cozuya/4e63fc3071f3126a41009d1d3cbd8a20.
Read 00-README.md, download the complete gist, inspect install.py, and use it to
install every file in skill-manifest.json with its original directory structure.
Verify the installed files and tell me how to invoke it. Install only; do not
start a reviewed-batches run, launch reviews, change hooks/settings, or install
CRBuddy and reviewer CLIs as part of this request. If an existing copy differs,
preserve it and show me the differences before replacing it.
The gist is the complete package. Do not install only SKILL.md: the references,
templates, and any runtime metadata are part of the skill. The skill's instructions
are for a future run, not instructions to execute while installing it.
Install from a terminal
Requirements for this installer: Git and Python 3.8 or newer. No Python packages,
GitHub CLI, or GitHub login are needed for this public gist. These commands use a
POSIX shell (macOS, Linux, or WSL):
Read install.py and the bundled skill, then install:
python3 "$bundle_dir/bundle/install.py"
The installer reads only this downloaded bundle, checks all skill files against
the manifest's SHA-256 hashes, restores the directories, and verifies the result.
It does not make network calls, run CRBuddy, or change hooks or repositories.
An identical install is a no-op. A different existing directory is left untouched;
there is no automatic overwrite. The hashes detect missing or changed bundle files;
they are not a publisher signature.
The default is the current documented personal skill location,
~/.agents/skills/reviewed-batches. See the official OpenAI documentation.
For an installation that uses $CODEX_HOME/skills or ~/.codex/skills, pass its
actual destination explicitly instead of creating a second copy:
The included agents/openai.yaml keeps invocation explicit and grants no Git
permissions. Verify the skill appears in the next turn's skill list; if it does
not, start a fresh Codex session. Use one installed copy of this skill per runtime.
Before your first run
Install the skill first; missing review tooling does not prevent installing these
files. To use the workflow, you need a Git repository, its normal development
and test tools, and an installed/configured CRBuddy panel with working reviewer CLIs
and authentication. The runtime-specific capture guidance was checked against
CRBuddy 0.4.1; verify your installed version's behavior during preflight.
If CRBuddy is not already set up, follow the CRBuddy setup instructions.
Its setup commands are npm i -g crbuddy and crb init; configuration is interactive
and should reflect your chosen reviewers. Keep existing panel settings when present.
crb --version, crb view, and crb doctor inspect the installed setup.
Review runs use the configured providers' accounts and usage allowances.
Use it
Start with an issue, specification, or other concrete target:
$reviewed-batches implement TARGET in REPOSITORY_PATH.
Continue through eligible batches within the scope and authority I specify.
If you want checkpoint commits and disposable review/test checkouts, explicitly
add this to your assignment:
Local staging, a checkpoint commit for each accepted batch, and disposable
review/qualification checkouts are authorized for this run. No push or merge.
Follow your repository's actual authority rules. Installing or invoking this skill
does not by itself authorize commits, pushes, merges, or external issue updates.
The agent records the run directory at the start. Resume with:
$reviewed-batches resume RUN_DIRECTORY
The workflow keeps a finding ledger and review/retry limits across resumes. It
stops for completion, your stop request, an actual blocker, or a convergence limit.
It installs no scheduler or Stop hook and does not use crb-stop or crb-final.
Files and manual installation
Gist filenames are flat. Install the following mapping relative to
~/.agents/skills/reviewed-batches; install.py does this automatically:
Gist file
Installed path
SKILL.md
SKILL.md
agents__openai.yaml
agents/openai.yaml
assets__HANDOFF.md
assets/HANDOFF.md
assets__PROGRESS.md
assets/PROGRESS.md
assets__REVIEW.md
assets/REVIEW.md
assets__RUNBOOK.md
assets/RUNBOOK.md
references__final-qualification.md
references/final-qualification.md
references__review-policy.md
references/review-policy.md
00-README.md, install.py, and skill-manifest.json are distribution files and
are not copied into the installed skill. If downloading through the GitHub API,
fetch the complete raw file when a response marks its content as truncated.
Keep every file from the same gist revision; the manifest binds their bytes.
For manual installation, recreate this tree using the mapping and verify all
hashes in skill-manifest.json. Preserve an existing different installation until
replacement is explicitly requested. Keep active runs on their already-snapshotted
policy unless the user explicitly amends that run.
To update later, download a fresh copy, compare it with the installed version, and
back up the existing skill outside skill-discovery directories before an authorized
replacement. Do not alter existing run records or policy snapshots.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current readiness / superseded claim / reopened gates and triggering change: {{readiness_disposition}}
Exact stop reason: {{reason}}
Next concrete authorized action, or missing prerequisite/decision: {{next_action}}
Completed and remaining
Accepted batches/commits and outcome evidence: {{ledger_reference}}
Current batch and exact remaining work: {{remaining}}
Uncommitted/index changes, attribution, and whether reviewed: {{changes}}
Full-panel/retry/no-progress counters (do not reset): {{counts}}
Outstanding findings across the task and any single-P2 exception: {{ledger}}
Validation/review/qualification paths and exact covered sources: {{evidence}}
Failed approaches to avoid repeating: {{notes}}
Pending issue postings and integration-dependent work: {{remaining}}
Owned processes still running (tool handle/PID if available, launch time, cwd, exact command, log/exit-status paths, last output): {{processes_or_none}}
Recovery deadlines and basis / incomplete attempts and process reconciliation: {{recovery_or_none}}
Resume by reconciling these records with actual Git, issue/specification state,
ownership and process status. A lost tool handle does not prove its process stopped;
without durable completion evidence, the result is unknown. Collect existing results
or reconcile surviving processes under the recorded deadlines before retrying. Inspect
history before retrying commits and re-verify candidate/configuration identity before
using recovered evidence. Preserve the original base, evidence and useful work. Do
not restart accepted batches or relaunch through another harness to evade a stop or
exhausted limit.
Current readiness / superseded claim / reopened gates and triggering change: {{readiness_disposition}}
Last accepted commit (verified in Git): {{commit_or_none}}
Current batch / starting commit / intended outcome: {{batch}}
Next concrete action: {{next_action}}
Current blocker or stop reason: {{reason_or_none}}
Owned processes (tool handle/PID if available, launch time, cwd, exact command, log/exit-status paths, status): {{processes_or_none}}
Recovery deadlines and basis / incomplete attempts and process reconciliation: {{recovery_or_none}}
Accepted outcomes
Batch
Verified commit
Outcome
Validation / review / adjudication evidence
Rounds / exception
{{id}}
{{sha}}
{{outcome}}
{{paths}}
{{counts}}
Do not add an accepted commit before verifying it exists and contains the accepted
candidate. Preserve historical counters after acceptance and on repair/resume.
Current batch
Exact remaining work and completion boundary: {{remaining}}
Changed/new/deleted paths and unreviewed changes: {{candidate}}
Candidate identity and validation commands/results/paths: {{evidence}}
Full-panel launches / limit 8: {{count}}
Transient failure and retries / limit 2: {{failure_and_count}}
Consecutive repair attempts without progress on same blocker / limit 3: {{count_and_reason}}
Review report(s), per-reviewer completion and adjudication records: {{paths}}
Starting HEAD / complete candidate identity: {{source}}
Candidate path inventory and bytes/modes/deletions evidence: {{paths}}
Effective panel/config/target evidence: {{path}}
Exact command, cwd, tool handle/PID if available, launch time and recovery deadline/basis: {{command_and_recovery}}
CRBuddy version / capture method / PTY fallback and supported menu exit if needed: {{method}}
Reviewer scratch paths/settings, capacity and child inheritance evidence: {{evidence}}
Full raw report, process log and durable exit-status paths/value: {{paths_and_status}}
Hooks that ran / post-panel or recovered source/config identity verification: {{evidence}}
Validation of this candidate: {{commands_results_paths}}
Panel accounting
List every configured reviewer. Exit 0 alone is insufficient.
Reviewer / model / effort
Completion / failure
Finding IDs
Report location
{{reviewer}}
{{status}}
{{findings}}
{{path}}
Independent adjudication
Finding ID
Severity / root cause / code
Validity and concrete evidence
Disposition / duplicate root
{{id}}
{{finding}}
{{evidence}}
{{disposition}}
Current plus carried unique valid unresolved P0/P1/P2: {{counts}}
Pre-existing unrelated findings and evidence: {{references_or_none}}
Carried P2 description, affected code, rationale and follow-up: {{entry_or_none}}
P3 ledger updates: {{references_or_none}}
Repairs and decision
Repairs since this panel and directly related files: {{repairs_or_none}}
Single-P2 exception eligibility at panel completion: {{facts_or_not_applicable}}
Exception use (explicit), finding, pre/post source identities: {{evidence_or_unused}}
Affected validation and complete final-diff inspection: {{evidence}}
Fresh full panel required/completed: {{reason_or_report}}
Batch outcome and evidence satisfied: {{evidence_or_missing}}
Acceptance/rejection with precise reason: {{decision}}
Review/retry/no-progress counters after this round: {{counts}}
Accepted staged candidate and actual commit verification (when reached): {{evidence}}
Keep this record and raw reports outside the product/review checkout. Link the
decision and carried findings from PROGRESS; never substitute this summary for the
full panel report.
Replace template fields with actual facts or explicit pending states. This record
does not grant authority; quote/reference the user's actual instruction below.
Supported focused and final qualification path: {{evidence}}
Genuine blockers and remaining eligible work: {{disposition}}
Sequential batches
Batch
Outcome / completion boundary
Dependencies
Validation / evidence
{{id}}
{{outcome}}
{{dependencies}}
{{checks}}
Only one batch may be in progress. Assessment/planning batches need their specified
evidence and decision. Do not invent refactors or absorb new dependency scope.
Adopted operating policy
Read policy/SKILL.md, policy/references/review-policy.md and the final-qualification
reference when applicable. Snapshot the complete skill directory under policy/
at adoption, preserving relative paths. The user amendments above override that
snapshot. Record policy changes explicitly.
Per-batch review is the full existing panel against the whole uncommitted candidate.
Carry findings and counters across commits/resumes; record use of the single-P2 exception.
Reread this file, PROGRESS, and policy/SKILL.md at each batch and compaction/resume; reconcile with Git/specification.
Keep full reports/logs externally; maintain tracked concise evidence only where required.
Keep review updates until the complete panel returns.
Full maintained qualification command/coverage/allowed skips: {{contract}}
Final typecheck/format commands where applicable: {{commands}}
Accumulated review representation against ORIGINAL base: {{supported_method}}
Tracked closeout documentation to finish before final qualification: {{paths}}
Required final evidence and integration-dependent conditions: {{requirements}}
Intended merge target ref, observed commit/time, or unknown/not applicable: {{target_identity}}
Stop / recovery
Record status, exact blocker/stop reason and next action in PROGRESS/HANDOFF. Retain
useful uncommitted work, process handles, launch times, deadlines, and durable log/exit
paths. Resume with $reviewed-batches resume RUN_DIRECTORY. Limits and deadlines do
not reset on resume; inspect history before retrying a commit. A missing completion
record is an unknown result; reconcile any surviving process before retrying. Never
infer successful review, validation or commit solely from the last progress entry.
Later integration changes reopen the relevant final gates under the final-qualification
reference. Keep current, reviewed and qualified source identities separate in PROGRESS;
supersede stale readiness claims while preserving accepted batches and historical evidence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('Already installed and verified: {} at {}'.format(label, destination))
return0
raiseValueError('Destination already exists and differs: {}. Preserve it; compare or back it up before an authorized replacement, or choose --dest.'.format(destination))
Accumulated review and exact-revision qualification
Part of reviewed-batches 1.0.3. Read during preflight to confirm the supported path,
then before closeout. Project-specific acceptance requirements remain authoritative.
Final accumulated review
Per-batch reviews do not replace independent review of the whole task. Preserve the
original task-start base and review its full delta to the final candidate,
including accepted dependency checkpoints, tests and tracked closeout documentation.
Never reset the base to a later convenient commit or call an empty diff full review.
Finish intended tracked closeout documentation before the final review/qualification.
Use the same effective CRBuddy panel and normal crb go. When authorized, a
disposable review checkout outside the active repository may represent the final
source as the entire uncommitted delta against the original base. Verify source
paths/bytes/modes/deletions against the real candidate and inspect its effective
configuration before review. Gitignored configuration such as .crbuddy/config.json
may be absent from a fresh checkout. Verify with crb view that the disposable
checkout has the same effective panel, instructions, target and output behavior.
If needed, reproduce the existing review configuration only inside the authorized
disposable checkout and keep it outside the candidate delta; do not silently accept
fallback settings or change live/global configuration. Use detached worktrees
(for example, git worktree add --detach) when branch creation is not authorized.
Record disposable checkout paths and their cleanup. Include new files; do not depend
on ignore rules to represent them accurately. Keep earlier raw review reports
outside this checkout.
Use supported tooling; a disposable checkout does not authorize changes to the
active branch/history or live/global review configuration. Do not bypass a size
refusal, truncate coverage, substitute per-batch reports, or invent review flags.
If an authorized method cannot represent the full change with the required panel,
preserve the evidence and surface that concrete blocker.
Apply the review policy and finding ledger to the complete result. Repairs require
appropriate fresh accumulated review, except for a qualifying single-P2 repair
under the recorded exception. Verify any accepted checkpoint commit actually exists
and has the accepted contents before qualifying that exact revision.
Exact-source checks
Use the repository's supported typecheck, formatting check, and full maintained
suite/qualification mechanism, where applicable. Establish command syntax, suite
identity, required environment, and acceptance criteria from the repository; do not
invent a new qualification system. A focused selection is never full qualification.
Run on the exact intended final clean revision, in a clean, unactivated disposable
checkout when authorized and required for isolation. Verify no campaign/production
activation or unintended credentials/configuration enter the test environment.
Use conservative explicit workers where supported. Record:
Commit and tree identities, original review base, full-range review report and any exception.
Exact commands, suite/manifest identity, toolchain, host/backend and isolation context.
Registered/selected/started/passed/failed/skipped/timed-out/cancelled/unrun coverage
where supported, declared skip reasons, cleanup warnings, exit status and duration.
Complete logs, qualification artifacts and their durable paths/hashes.
Apply the project's actual skip policy honestly. Do not describe a skipped platform
or mocked provider as live qualification. Environmental failures remain failed
attempts until an eligible new run passes; previous baselines are diagnostic evidence,
not qualification of the new source. Poll the existing process rather than relaunching
because the test is slow. Preserve failed attempts and failed approaches worth remembering.
Any final source repair must receive appropriate review and new qualification for
the resulting revision. If a hook changes source at commit time, reconcile and
refresh evidence. Finish tracked documentation first; write subsequent qualification
results externally and to authorized issue comments so evidence-only commit churn
does not change the revision after qualification.
Verify the final revision, remaining working-tree state, finding ledger, and owned
processes. Report the locally accepted/qualified candidate separately from remote
integration. Push/merge/issue closure require their own task authority and actual
completion evidence. Finish the run's progress/handoff with remaining merge-dependent
requirements and any pending issue postings.
Reopen final gates after integration changes
At closeout and each later resume or integration-readiness assessment, record separately:
Actual HEAD/tree and any uncommitted candidate changes.
Last accumulated-reviewed source identity, original base, report and any repair exception.
Exact qualified commit/tree and artifact.
Intended merge target ref and observed commit, observation time, or explicit unknown/not applicable.
A subsequent merge, source edit, hook mutation, or history change requires reconciliation
before reusing a readiness claim. Mark readiness for the changed candidate pending and
supersede the old claim in PROGRESS/HANDOFF; retain the earlier evidence for its original
source. Changed candidate content requires fresh accumulated review from the original
task-start base, including incoming integration changes, subject to the existing single-P2
exception. Qualify the resulting exact revision under the repository's identity rules;
an unchanged tree does not transfer an artifact bound to a different commit.
A merge target advancing alone does not invalidate evidence for an unchanged local
candidate, but its integration readiness must be reassessed against the new target.
Do not pull, merge, rewrite history, or expand repair scope without task authority.
Continue the reopened final gates within standing authority. Preserve accepted batches,
the original base, findings and review/retry counters; do not restart completed batches
or reset limits. Reconcile the identities with actual Git again before declaring the
current candidate ready, and report any remaining integration-dependent requirement.
Part of reviewed-batches 1.0.3. Read before the first batch and when resolving an
acceptance question. Snapshot with the run; explicit user amendments take precedence.
Complete panel, fixed candidate
Run normal crb go from the repository root with the existing full configured panel
and uncommitted target. Verify CLI syntax using supported help; preserve configured
output, reviewer models/instructions, and hooks. Consume and retain the actual
complete report yourself; never ask the user to relay it. Do not invoke the crb-stop
skill, its hook or wrapper, or crb-final as part of this workflow.
Prefer direct capture without a PTY when supported by the installed version and
configuration. With terminal output, CRBuddy 0.4.1 writes the report to stdout and
progress to stderr and skips its clipboard menu when redirected; verify that behavior
for the installed version. Use a fresh directory for every launch, including retries,
so old results cannot be mistaken for completion. For terminal output, a Bash example
that preserves the workload status is:
Record the launch command, handle and recovery deadline in PROGRESS as described in
the skill. This wrapper records a nonzero command exit even with shell errexit
enabled. An interrupted wrapper may leave no exit file; use the recovery rules,
never infer success.
With file output, collect the report from the configured path; redirected stdout
alone is not the report. Archive all run-owned output files into the round directory
after completion, verify the archive, and remove only those originals so
refuseIfOutputExists does not block the next round. Never move unrelated existing
files or stage review output. Verify the complete capture before accepting it.
Non-terminal mode can refuse confirmations required by project-local external
output paths or existing output files. If a supported interaction is needed and
already authorized, use a PTY, retaining input and capturing the report externally.
After completion, select the supported normal Exit action if a menu appears. Do not
use an interrupt or close stdin as the normal menu exit. A PTY does not grant new
authority to overwrite files or write elsewhere. Do not add --force or
--whole-checkout to bypass a size refusal or the required uncommitted-diff target.
Read the persisted exit status, entire report (in chunks if needed), and progress
log. Record capture method, reviewer completion, and coordinator exit separately;
a post-report UI failure alone does not establish a failed or incomplete review.
Apply the preflight scratch-directory choices to reviewer subprocesses where supported,
not only to primary validation, without changing review settings or sandbox permissions.
Before launch record base HEAD, complete candidate identity, intended changed/new/
deleted paths, effective panel/target, validation evidence, and round count. A diff
hash alone omits untracked contents; account for new files, modes and deletions when
establishing source identity. Keep product source, tests, tracked evidence and
review configuration unchanged until all reviewers return, including across any
interruption or hook execution. Verify identity again afterward and on resume. A
concurrent edit or formatter mutation leaves the changed candidate unreviewed;
reconcile ownership, revalidate affected behavior, and obtain fresh full-panel review.
Do not send interim panel updates. Keep collecting the running process, then report
and adjudicate the full result. Every configured reviewer must complete successfully.
Inspect per-reviewer completion, errors, timeouts, and actual findings: exit 0 can
still mean a partial panel. Never accept missing/incomplete reviewers or substitute
a different panel. Preserve full reports externally, not just summaries. Do not pass
earlier reviewers' conclusions to later reviewers in instructions or raw report files.
Adjudicate independently
For every material finding, record severity, root cause, affected code, evidence,
validity and disposition. Deduplicate shared root causes, not distinct bugs in the
same file. Reject false positives with concrete code/test evidence, not reviewer
votes. Separate demonstrably pre-existing unrelated defects from regressions and
task obligations; a pre-existing defect in scope still needs the promised outcome.
After rejecting a finding based on concrete evidence, consider adding a concise nearby code
comment when explaining the non-obvious invariant, intentional behavior, or
constraint would help prevent future reviewers from repeating the false positive.
Do this on the first occurrence when useful; do not wait for repeated findings.
Keep the comment about the code's reasoning and record the finding, supporting
evidence, and comment location in the external adjudication. Do not write comments
that suppress legitimate scrutiny. Such comments are candidate changes and follow
the same validation/review rules as other edits.
Maintain one finding ledger across the whole task. Committing a finding's code does
not resolve it or restore a fresh P2 allowance. Reconsider a carried finding when
its affected code changes. Record nonblocking P3 findings and follow-ups without
turning unrelated cleanup into a prerequisite.
Acceptance gate
All of these must hold:
The batch outcome and required evidence are satisfied; required validation passes.
Every configured reviewer completed successfully on the recorded candidate.
Zero unresolved valid P0/P1 findings across current and carried task findings.
At most one unique unresolved valid P2 across current and carried task findings.
The mandatory single-P2 repair below applies: this ceiling does not independently
authorize acceptance with that P2 unresolved. Only an explicit user amendment can
permit such a carry; record its description, affected code, rationale and follow-up.
Candidate identity is verified; every change since the panel is covered by a new
full panel or the exact exception below. P3 findings alone do not block.
The numerical P2 threshold is not permission to skip the repair mandated below.
Repairable in-scope P0/P1 or multiple P2 findings call for repairs, affected
validation, and fresh full-panel review, not automatic human escalation. Any code,
test, comment, or substantive tracked-evidence changes normally require a new full
panel covering the entire uncommitted batch. External adjudication/progress notes
alone do not change the product candidate. Cosmetic batch renaming or splitting
must not hide findings, evade counters, or bypass a review-size refusal.
Single-P2 repair exception
After a successful full panel, if adjudication leaves zero unresolved valid P0/P1
and exactly one unique unresolved valid P2 across current and carried findings:
Fix that P2. Limit edits strictly to that finding and directly related tests/evidence.
Rerun affected validation and inspect the full final diff, including new files.
Record the finding, pre/post-repair source identities, exact repair, validation,
diff inspection, and explicit use of this exception.
If all other acceptance requirements hold, accept, commit when authorized, and
continue without another crb go.
Assess eligibility against the completed panel's adjudicated findings. A panel
with multiple valid P2 findings or an unresolved valid P0/P1 does not become eligible
by repairing other findings first. Broader changes, independent P3 repairs/comments,
additional valid P2 findings, or repairs that do not resolve the single P2 require
the normal repair/validation/full-review path. A failed affected check cannot count
as acceptance. The exception does not waive final exact-revision qualification or
the required accumulated review; it can be used after a qualifying accumulated
panel under the same narrow conditions.
Convergence limits
At most 8 full-panel launches per batch, including incomplete-panel launches
and retries. Keep final accumulated-review rounds with the final checkpoint.
Retry an appropriate transient tool/reviewer failure at most twice; record
the failure and retries. A full-panel retry also consumes a review round.
Stop sooner after 3 consecutive repair attempts with no substantive progress
on the same blocker. Record what was tried and what evidence failed to improve.
Limits persist across compaction, interruption, resumes, and checkpoint repairs.
Reaching a limit is not acceptance. Do not bypass permission denials, diff-size
refusals, or reviewer failures by changing settings, weakening acceptance criteria,
or silently narrowing review coverage. Preserve the candidate and evidence, write
the exact blocker and next action, and stop honestly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement a scoped development target through sequential batches with full CRBuddy review, bounded repairs, verified local checkpoints, durable continuation records, and final accumulated review and qualification. Use when explicitly asked to run this sustained implementation workflow.
metadata
version
1.0.3
Reviewed Batches
Run the authorized implementation to completion, one batch at a time. The primary
agent owns implementation, validation, adjudication, checkpoint verification, and
continuation. The existing CRBuddy panel supplies independent reviewers. A progress
message, completed batch, long command, or context compaction is not a stopping point.
This skill installs no hooks or scheduler and uses no recursive agent launcher.
Do not arm, invoke, modify, or depend on crb-stop or crb-final. Run CRBuddy directly
as described in the review policy.
Adopt the assignment
Read the complete target specification, comments/updates, linked prerequisites,
hazards, completion checklist, and applicable repository instructions. Read the
review policy before starting. Inspect final qualification
early enough to establish that its required tools, hosts, and permissions exist.
Use the user's batch plan when present. Otherwise derive small cohesive batches
with dependencies and observable acceptance criteria from the authorized target,
record them, and begin without requesting ceremonial plan approval. Planning-only
or assessment batches need evidence and a decision, not invented production changes.
Record the user's actual authority: scope, continuation, local staging/commits,
disposable checkouts, external issue updates, and any integration actions. Skill
invocation requests this workflow; it does not independently grant every Git or
external write. An example or template is not consent. Preserve standing authority
within the assignment and do not ask again at every batch. If a required action
really lacks authority, complete the independently authorized preparation and
surface the concrete boundary once. Explain the applicable instruction.
Record applicable repository instructions and user preferences. Resolve apparent
conflicts using instruction precedence and the user's actual authorization before
asking for clarification. An explicit current user instruction takes precedence
over skill guidance or older local preferences, subject to higher-priority
instructions. Ask only about genuinely unresolved scope or authority, and continue
independently authorized work while waiting.
Default to the current intended branch and local development. Push, merge, history
rewrites, branch/tag changes, campaign/production operation, credential/billing
changes, and unrelated prerequisite implementations require task-specific authority.
Resolve ordinary implementation choices yourself. A newly discovered dependency
is not permission to expand scope; complete any eligible bounded work first.
An example assignment with explicit checkpoint authority:
$reviewed-batches implement ISSUE_URL in REPOSITORY_PATH.
Continue through eligible batches. Local checkpoint commits and disposable
review/qualification checkouts are authorized. No push or merge.
Follow the issue's scope and the repository's supported validation commands.
Resume with $reviewed-batches resume RUN_DIRECTORY. For a resume request without
a directory, use the sole unfinished run matching the repository and assignment
under the default run root and state which one. If the match is ambiguous, ask
which run to resume. Verify its identity and adopted Codex policy; do not silently
switch to another harness's run or policy.
Preflight and durable records
Verify root, repository identity/remotes, branch, HEAD, index/worktree changes,
toolchain, prerequisites, and baseline evidence. An announcement or running test
is not completion evidence. Require a clean product/index baseline or clearly
attributable continuation of this exact task. Never absorb unrelated changes.
Check for another writer, active automation, or an existing owned process before
editing, including other Codex or Claude Code sessions. Where present, inspect
~/.claude/state/crb-stop/ read-only for a pending arm targeting this worktree.
An active writer or pending review arm on this checkout must be settled within
existing authority before editing; do not disarm someone else's automation.
Identify applicable hooks that can change source or start a review. Run configured
source formatters before recording candidate identity and verify a further run
leaves it unchanged; continued mutation is a tooling blocker. Do not invoke
review-starting hooks as a preflight check. Record the hooks and their handling.
Do not interfere or run concurrently in the same checkout. On recovery, collect
the existing command's result instead of starting a duplicate.
Verify tooling, authentication, permissions, supported test selections, and final
qualification requirements. Inspect CRBuddy with supported read-only commands
(crb --help, crb --version, crb view, crb doctor where available). init
and config are setup commands, not inspection commands. Verify the full effective
panel, supported capture behavior for the installed version, and uncommitted
changes target; branch-vs-base or an empty diff does not substitute. Surface a
concrete configuration blocker; do not silently alter the panel, settings, hooks,
or target, or invent CLI flags.
Create a stable run directory outside the product checkout and installed skill
directory. Default to
${XDG_STATE_HOME:-$HOME/.local/state}/reviewed-batches/runs/<repository>-<YYYYMMDD>-<slug>/;
honor an established run location. Avoid session scratchpads that disappear on
restart. Verify write access and print its absolute path once. Use the templates
below, replacing fields with facts or explicit pending states. On resume reuse
the existing directory.
Check write access and free space on the actual scratch volumes used by tests,
qualification, and reviewer subprocesses before launching them. Where supported,
use an adequately sized run-owned directory consistently through process-scoped
temporary-directory settings. Record the paths/settings and verify relevant child
processes honor them. Preserve sandbox permissions and global/reviewer configuration;
do not free space by deleting other runs' files.
Snapshot the complete skill directory beneath the run's policy/, with SKILL.md,
references/, assets/, and agents/ directly inside it so relative links remain
usable after resume. Record version and file hashes, plus a dated
snapshot/reference of the adopted target plan. Subsequent installed-skill changes
must not silently change an active run's policy. Record explicit user amendments
with their precedence; copied records never override current user instructions or
actual repository state. Keep raw logs and full prior review reports outside the
checkout and out of subsequent reviewers' context.
At each new batch and after compaction/resume, reread RUNBOOK, PROGRESS, and the
snapshot's policy/SKILL.md; compaction can drop the adopted instructions. Consult
its references as needed and reconcile Git, the current issue/specification, and
owned processes. Preserve the original task-start base, finding ledger, and review
counters. Carry the run path and next action into continuation summaries. Keep run
state here, not in newly created or modified AGENTS/CLAUDE files, memory, settings,
or hooks.
Long-running commands and recovery
Keep continuation in this Codex session. Launch long commands through the available
execution tool and collect retained process handles with its supported wait/poll
mechanism. Do not end the turn assuming a background completion will re-invoke you.
Use bounded waits that leave room for user updates without interrupting the command.
For each long-running launch, use a fresh step directory and persist its start time, exact
command, cwd, full logs, and exit status. Record the tool handle and recovery deadline
in PROGRESS; derive the deadline from the command's supported timeout or observed
duration with a documented margin, or a reasoned estimate when neither is available.
Do not reset it on resume. Preserve the command's
exit code even when it fails; a successful logging command is not the workload's
status. See the review policy for a capture example.
After interruption, a lost handle does not prove the process stopped. Collect its
durable result if available. Without a completion record, the outcome is unknown;
partial output cannot establish success. Reconcile ownership and, while still within
the recorded deadline, wait for the existing result. If the deadline passes, record
an incomplete attempt and settle any still-running owned process before retrying.
When termination or ownership cannot be established, stop with that concrete tooling
blocker; do not launch a possible duplicate or clear another process's lock. A panel
retry consumes the existing launch/retry limits. Verify candidate and configuration
identity again before using any recovered result.
Execute each batch
Read its complete definition, dependencies, hazards, and completion boundary.
Record the starting commit, intended outcome, validation plan, and batch counters.
Implement only this batch in bounded increments. Preserve behavior contracts and
scope exclusions. Keep the entire candidate uncommitted through review and repairs;
never commit to clear the review diff or start another batch before acceptance.
Validate the actual candidate using supported repository commands. Use focused
maintained selections during development and appropriate broader checks when
stable. Use explicit conservative workers, normally 2, or 1 to diagnose contention,
where the runner supports them. Respect exclusive lanes, host/backend needs,
isolation, timeouts, cancellation, and cleanup. Record exact commands, selections,
outcomes and skips. Never relabel a subset as the full suite or mocks as live
evidence, weaken coverage to get green, or rerun full qualification after every edit.
Inspect the stable candidate and run the full panel under the review policy.
Adjudicate every material finding, repair in scope, and refresh validation/review
as required. Keep user-facing review updates until the whole panel returns; do
not interrupt reviewers merely for a status update. Otherwise communicate useful
outcomes and decisions without treating updates as task completion.
Accept only under that policy and the batch's outcome/evidence requirements.
Stage precise accepted paths, including identified new files and deletions.
Inspect the staged diff and verify it matches the accepted source, accounting for
untracked contents and file modes. Exclude raw review logs, CRBuddy output files,
and temporary artifacts.
If authorized, create a descriptive ordinary local checkpoint commit. Respect
hooks. Verify the actual new commit, its source, and remaining index/worktree.
A failed commit or hook mutation requires reconciliation, not a claimed checkpoint
or bypass. After interruption inspect history before retrying. Changed content
requires affected validation and review under the policy before acceptance.
Immediately update PROGRESS with verified commit, evidence, carried findings,
counters and next action, then begin the next eligible batch. Never ask whether
to continue when continuation is already authorized.
Update progress before long commands and at meaningful boundaries. Collect retained
process handles to completion under the recovery rules above. If issue
updates are authorized, report concise outcomes, local-only commit identities,
review/validation evidence and remaining scope. Check boxes only when criteria are
met; local implementation is not remote integration. Save failed postings locally
and continue otherwise eligible work rather than blocking on transient publication.
Finish or stop truthfully
Complete the accumulated review and exact-source checks in the final-qualification
reference before declaring the authorized local deliverable complete. Do not push,
merge, close merge-dependent issues, or broaden the deliverable without authority.
On a later integration change or readiness assessment, reconcile current HEAD/tree,
reviewed source, qualified source, and merge target separately. Follow the reference's
reopening rules; a previous closeout is evidence for its recorded candidate, not a
standing readiness claim for a changed one.
Stop for completion, an explicit user stop, a genuine unresolved dependency/decision,
ownership or unrecoverable tooling/permission failure, or a policy convergence limit.
Do not evade stops through another harness or automatic relaunch. Settle owned
processes where possible without disturbing others; preserve useful uncommitted
work. Write the handoff with exact remaining work, review status, outstanding
findings, evidence, precise stop reason, next action, and every still-running owned
process. Before ending, check whether a concrete authorized next action remains;
if it does and no stop condition applies, perform it.