con un clic
autoreview
// Auto Review closeout. Codex review is the default when no engine is set and is the recommended reviewer.
// Auto Review closeout. Codex review is the default when no engine is set and is the recommended reviewer.
AGH runtime and contribution guide. Use for sessions, agents, native tools, skills, memory, network, tasks, capabilities, bundles, QA, docs, and repo work. Do not use for unrelated projects.
Drives end-to-end execution of a Compozy techspec across many agent restarts by detecting the current phase from state.yaml plus .compozy/tasks/<slug>/, then activating the correct cy-* skill chain or the Compozy -> Claude Opus delegation lane for one iteration before stopping. Each Phase B iteration ends with an atomic checkpoint commit so every completed task or slice becomes a restorable git snapshot. Use when running a Compozy techspec under the codex-loop-plugin in goal mode, or when manually iterating through tasks, qa-report, and qa-execution with persistent memory and state. Do not use for one-off tasks without a .compozy/tasks/<slug>/ directory, for techspec authoring (use cy-create-techspec), or for any work that does not require iteration tracking across agent restarts.
Runs an optional cross-LLM peer review of an implemented change via compozy exec --ide claude --model opus --reasoning-effort xhigh and requires the reviewer to write a scoped Markdown findings artifact for user-directed remediation. Use after any implementation pass (feature, bug fix, refactor) when the user explicitly asks for an external Opus review of the diff before commit or PR. Do not use for TechSpec review (use cy-spec-peer-review), automatic remediation, batched provider review fetching (use cy-fix-reviews), manual self-review without an external LLM (use cy-review-round), or auto-looped review cycles.
Runs an optional cross-LLM peer review of a TechSpec via compozy exec --ide claude --model opus --reasoning-effort xhigh and requires the reviewer to write a scoped Markdown findings artifact for user-directed incorporation. Use when a TechSpec draft has already been approved by the user and they want an external review round, especially for autonomy/network/memory-impacting designs. Do not use for PRDs, automatic approval gates, code review batches, or auto-looped review cycles.
Executes real-user QA sessions through public interfaces using personas, journeys, exploratory charters, test tours, edge-case probes, CFR checks, and browser evidence. Reads qa-report artifacts from <qa-output-path>/qa/ when present, captures issues/screenshots/reports under the same output tree, and classifies bugs by user impact. Use when validating a release candidate, migration, refactor, or user-facing change against production-like behavior. Do not use for AI implementation audits, task-status reconciliation, CI gate runs, integration/security/performance templates, or flaky-test triage; use agent-output-audit for those.
Audits Go functions with multi-step setup or teardown for cleanup discipline on every error return: cancel any context created or extended, close every opened resource, release every claim or lease, stop every spawned subprocess, drain every HTTP body. Forbids http.DefaultClient in production code paths. Use when editing functions in internal/acp, internal/session, internal/scheduler, internal/coordinator, internal/extension, internal/automation, internal/store, internal/memory, internal/api, or any subprocess or registry handler. Do not use for read-only helpers, pure data structures, or tests.
| name | autoreview |
| description | Auto Review closeout. Codex review is the default when no engine is set and is the recommended reviewer. |
Run the bundled structured review helper as a closeout check. This is code review, not Guardian auto_review approval routing.
Codex review is the default when no engine is set. It usually delivers the best review results and should remain the normal final closeout engine.
Use when:
review still running: ... elapsed=... pid=... as healthy progress, not a hang. Let the helper continue while heartbeats are advancing. Pass --stream-engine-output when live engine text is useful; Codex and Claude filter tool/file chatter, other engines pass raw output through.clawsweeper[bot] or another automation, identify the human trigger when practical. Check timeline/comments first; if rate-limited, use gitcrawl/cache or public PR HTML. Look for maintainer commands such as @clawsweeper automerge, /landpr, or labels/status comments that armed automerge. Report automerge triggered by @login; if not found, say trigger unknown.codex review, nested reviewers, or reviewer panels from inside the review. The helper builds one bundle, calls one selected engine, validates one structured result, and stops.gh/Gitcrawl reports database disk image is malformed, run gitcrawl doctor --json once to let the portable cache repair before retrying review; do not bypass the shim unless repair fails and freshness requires live GitHub.gitcrawl doctor --json and inspect source_db_health, runtime_db_health, and portable_store_status before falling back to live GitHub.Dirty local work:
<autoreview-helper> --mode local
Use this only when the patch is actually unstaged/staged/untracked in the
current checkout. For committed, pushed, or PR work, point the helper at the commit
or branch diff instead; do not force --mode local / --uncommitted just
because the helper docs mention dirty work first. A clean local review
only proves there is no local patch.
Branch/PR work:
<autoreview-helper> --mode branch --base origin/main
Optional review context is first-class:
<autoreview-helper> --mode branch --base origin/main --prompt-file /tmp/review-notes.md --dataset /tmp/evidence.json
If an open PR exists, use its actual base:
base=$(gh pr view --json baseRefName --jq .baseRefName)
<autoreview-helper> --mode branch --base "origin/$base"
Committed single change:
<autoreview-helper> --mode commit --commit HEAD
or with the helper:
/Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --mode commit --commit HEAD
Use commit review for already-landed or already-pushed work on main. Reviewing
clean main against origin/main is usually an empty diff after push. For a
small stack, review each commit explicitly or review the branch before merging
with --base.
Format first if formatting can change line locations. Then it is OK to run tests and review in parallel:
scripts/autoreview --parallel-tests "<focused test command>"
Tradeoff: tests may force code changes that stale the review. If tests or review lead to code edits, rerun the affected tests and rerun review until no accepted/actionable findings remain. Once that rerun exits cleanly, stop; do not spend another long review cycle on redundant confirmation.
Run multiple reviewers against one frozen bundle:
<autoreview-helper> --reviewers codex,claude
--panel is shorthand for Codex plus Claude unless --engine changes the first reviewer:
<autoreview-helper> --panel
Set reviewer models and thinking/effort explicitly:
<autoreview-helper> --reviewers codex,claude --model codex=gpt-5.1 --thinking codex=high --model claude=sonnet --thinking claude=max
Inline syntax is also supported:
<autoreview-helper> --reviewers codex:gpt-5.1:high,claude:sonnet:max
Codex maps thinking to model_reasoning_effort and accepts low, medium,
high, or xhigh. Claude maps thinking to --effort and also accepts max.
Engines without a real thinking knob reject --thinking.
Run the helper directly so target selection, engine choice, structured validation, and exit status all stay in one path. If output is noisy, summarize the completed helper output after it returns; do not ask another agent or reviewer to rerun the review.
OpenClaw repo-local helper:
.agents/skills/autoreview/scripts/autoreview --help
agent-scripts checkout helper:
skills/autoreview/scripts/autoreview --help
Global helper from agent-scripts:
~/.codex/skills/agent-scripts/autoreview/scripts/autoreview --help
If installed from agent-scripts, path is:
/Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --help
The helper:
gh pr view worksorigin/main for non-main branches--engine codex, claude, droid, and copilot; default is AUTOREVIEW_ENGINE or codex; Codex should remain the default when nothing is set--mode commit --commit <ref> for already-committed work, especially clean main after landing--mode auto or forced to --mode branch for PR/branch work; do not force --mode local after committing--output, --json-output, or live streamed engine stderr is set--dry-run, --parallel-tests, --prompt, --prompt-file, --dataset, --no-tools, --no-web-search, and commit refs--stream-engine-output or AUTOREVIEW_STREAM_ENGINE_OUTPUT=1 for live engine text while preserving structured validation; Codex and Claude hide tool/file event details, emit compact activity summaries, and report usage at turn completion--panel / --reviewers, plus per-engine --model and --thinkingcodex exec with read-only sandbox and structured outputreview still running: <engine> elapsed=<seconds>s pid=<pid> to stderr at long-running intervals while waiting for the selected review engine, unless streamed output or compact Codex activity has been visible recentlyautoreview clean: no accepted/actionable findings reported when the selected review command exits 0Include:
Do not run another review solely to improve the final report wording. If the final helper run exited 0 and produced no accepted/actionable findings, report that exact run as clean.