[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BYTQ7XTYJRYVV9JA069N0X":3,"skill-same:01M7BYTQ7XTYJRYVV9JA069N0X":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7BYTQ7XTYJRYVV9JA069N0X","autoreview",null,"Pre-commit\u002Fship code review: Codex default; optional Claude or Pi.","secure-workflows\u002Fgaia","secure-workflows","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F311422533?v=4","01M7BYM925H8FAXM1DRD7F5DQD","01M7BYM92V01EZBAV87C93HNKX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fopenclaw_skills\u002Fclawhub-autoreview\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: autoreview\ndescription: \"Pre-commit\u002Fship code review: Codex default; optional Claude or Pi.\"\n---\n\n# Auto Review\n\nRun the bundled structured review helper as a closeout check. This is code review, not Guardian `auto_review` approval routing.\n\nCodex review is the default when no engine is set. It uses `gpt-5.6-sol` with `high` reasoning by default, then retries once with `gpt-5.6-terra` only when the account cannot access Sol. Claude review is optional and uses `claude-fable-5` by default.\n\nFor user-visible behavior, pair autoreview with `behavior-validator`. Autoreview is source-aware and judges the change bundle; behavior validation is source-blind and judges the running product or tool against a behavior contract. A clean autoreview is not proof that a UI, CLI, API, or generated artifact works from the user's perspective.\n\nUse when:\n\n- user asks for Codex review \u002F Claude review \u002F Pi review \u002F autoreview \u002F second-model review\n- after non-trivial code edits, before final\u002Fcommit\u002Fship\n- reviewing a local branch or PR branch after fixes\n\nDo not require autoreview for a change whose entire diff is prose-only internal notes or `SKILL.md` documentation. Still inspect the diff directly and run the repository's lightweight documentation validation, if any. This exception does not cover user-facing documentation, executable examples, configuration, scripts, generated files, or behavior changes.\n\n## Contract\n\n- Treat review output as advisory. Never blindly apply it.\n- Verify every finding by reading the real code path and adjacent files.\n- Read dependency docs\u002Fsource\u002Ftypes when the finding depends on external behavior.\n- Reject unrealistic edge cases, speculative risks, broad rewrites, and fixes that over-complicate the codebase.\n- Prefer small fixes at the right ownership boundary; no refactor unless it clearly improves the bug class.\n- When an accepted finding shows a bug class or repeated pattern, inspect the current PR scope for sibling instances before fixing.\n- Fix the scoped bug class at once when practical; stop at touched surfaces, owner boundaries, and clear follow-up territory.\n- Keep going until structured review returns no accepted\u002Factionable findings only while the work remains inside the original task scope.\n- If a review-triggered fix changes code, rerun focused tests and rerun the structured review helper.\n- For security-audit suppression changes, verify accepted findings remain auditable: suppressed findings stay in structured output, active output keeps an unsuppressible suppression notice, and aggregate findings cannot hide unrelated active risk.\n- Never switch or override the requested review engine\u002Fmodel except for the documented Codex Sol-to-Terra account-access fallback. Capacity, rate-limit, and unrelated failures keep the same engine\u002Fmodel.\n- Be patient with large bundles. Structured review can take up to 30 minutes while the model call is active, especially with Codex tools or web search.\n- Treat heartbeat lines like `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\u002Ffile chatter, other runnable engines pass raw output through.\n- Do not kill a review just because it has been quiet for 2-5 minutes, or because it is still running under the 30-minute window. Inspect the process only after missing multiple expected heartbeats, after 30 minutes, or after an obviously failed subprocess; prefer letting the same helper command finish.\n- Tools are useful in review mode. Codex receives the validated bundle in an empty workspace so ignored files and linked-worktree metadata remain unreadable; web search stays available for dependency contracts and upstream docs.\n- Security perspective is always included, but it should not cripple legitimate functionality. Report security findings only when the change creates a concrete, actionable risk or removes an important safety check.\n- Reviewer subprocesses preserve engine authentication and non-credentialed proxy variables needed by headless or restricted-network environments while stripping process-injection, Git override, and credentialed proxy values.\n- Before engine invocation, autoreview runs TruffleHog over temporary snapshots of the exact added or modified content under review. It intentionally matches TruffleHog's low-false-positive pre-commit policy (`verified,unknown`); it does not classify arbitrary password-like strings or rescan unchanged history. Install TruffleHog using its official platform-neutral instructions; autoreview fails with that link when the binary is unavailable and never auto-installs it. Repositories should also run TruffleHog in pull-request CI as a backup outside autoreview; repository-local Git hooks are optional. Review bundles still omit security-sensitive paths or files, and explicit prompt and dataset inputs remain checked before engine invocation. Safe large diffs are sent as one pass while they fit the aggregate prompt limit, then partitioned into complete bounded passes without truncation.\n- For regression provenance, keep roles separate: blamed code author, blamed PR author, PR merger\u002Fcommitter, current PR author, and PR\u002Fdate. If no blamed PR is traceable, use the blamed commit as the provenance: commit SHA, date, and author username. Do not guess a merger or frame missing PR metadata as a separate finding.\n- If the blamed PR was merged by `clawsweeper[bot]` or another automation, identify the human trigger when practical. Check timeline\u002Fcomments first; if rate-limited, use gitcrawl\u002Fcache or public PR HTML. Look for maintainer commands such as `@clawsweeper automerge`, `\u002Flandpr`, or labels\u002Fstatus comments that armed automerge. Report `automerge triggered by @login`; if not found, say trigger unknown.\n- Do not invoke built-in `codex review`, nested reviewers, or reviewer panels from inside the review. The helper builds one validated bundle, calls the selected engine once for normal inputs or once per complete bounded chunk for oversized inputs, validates the structured results, and stops.\n- Stop as soon as the helper exits 0 with no accepted\u002Factionable findings. Do not run an extra review just to get a nicer \"clean\" line, a second opinion, or clearer closeout wording.\n- Treat the helper's successful exit plus absence of actionable findings as the clean review result, even if the underlying Codex CLI output is terse.\n- Multi-reviewer panels are opt-in only. Use them when explicitly requested or when risk justifies the extra spend; the main agent still verifies every accepted finding before fixing.\n- If rejecting a finding as intentional\u002Fnot worth fixing, add a brief inline code comment only when it explains a real invariant or ownership decision that future reviewers should know.\n- If `gh`\u002FGitcrawl 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.\n- If Gitcrawl reports a portable manifest mismatch, source\u002Fruntime DB health error, or stale portable-store checkout, run `gitcrawl doctor --json` and inspect `source_db_health`, `runtime_db_health`, and `portable_store_status` before falling back to live GitHub.\n- Do not push just to review. Push only when the user requested push\u002Fship\u002FPR update.\n\n## Scope Governor\n\nAutoreview is a closeout gate, not permission to rewrite the task.\n\nBefore the first review, freeze a scope baseline: original request or issue, target branch, intended behavior, owner boundary, changed files, and non-test LOC. For inherited or already-bloated branches, use the intended PR diff as the baseline rather than accepting all existing branch drift.\n\nBefore patching a finding, classify it:\n\n- **In-scope blocker**: the finding is introduced by the current diff, affects the same owner boundary, and can be fixed without changing the task's contract.\n- **Follow-up**: the finding is real but belongs to an adjacent bug class, sibling surface, cleanup, or broader hardening track.\n- **Stop-and-escalate**: the finding requires a new protocol\u002Fconfig\u002Fstorage\u002Fpublic API contract, a different owner boundary, a release-process change, or a design choice outside the original request.\n\nStop patching and report the scope break instead of continuing when:\n\n- a narrow PR turns into an architecture change, protocol change, migration, or release-process change;\n- the diff grows past 2x the original files or non-test LOC without explicit approval to expand scope;\n- two review-triggered patch cycles have not converged; pause and reclassify every remaining finding before another edit;\n- the best fix is \"define the canonical contract first\" rather than another local inference layer;\n- fixing the accepted finding would make the PR no longer describe the same behavior, issue, or owner boundary.\n\nAfter the two-cycle pause, continue only when every remaining accepted finding is still an in-scope blocker. Otherwise preserve the useful analysis, identify the smallest safe landed subset if one exists, and open or request a follow-up for the larger fix. Do not keep committing speculative fixes just to satisfy the reviewer.\n\nDo not stack or push review-triggered fix commits while scope classification or focused proof is unresolved. Keep exploratory edits local until the cycle is proven in scope; if scope breaks, remove them from the landing lane instead of preserving them as branch history.\n\nCritical exceptions must be explicit: active data loss, crash, broken install\u002Fupgrade, release blocker, or concrete security exposure. If the exception is not one of those, it is not critical enough to blow up scope.\n\n## Release Branches And Release Process\n\nOn release, beta, stable, hotfix, signing, notarization, appcast, package-publish, or release-check work, use freeze discipline even when the branch name is not release-like:\n\n- Fix only release blockers, failed release infrastructure, exact backports, install\u002Fupgrade breakage, data loss, crashes, or concrete security exposure.\n- Treat non-blocking autoreview findings as follow-ups for `main`, not reasons to broaden the release branch.\n- Do not introduce new product behavior, config surface, protocol shape, migration, plugin ownership, docs narrative, or process policy unless it directly unblocks the release.\n- Keep proof tied to the release target: exact branch\u002Fref, failing check or shipped-risk reason, smallest command\u002Fproof, and whether the fix must also forward-port to `main`.\n- If review discovers a real but non-critical design problem during release closeout, stop with a follow-up issue\u002FPR plan; do not use the release branch as the refactor lane.\n\n## Skill Path (set once)\n\nSet the skill script paths once, then use `\"$AUTOREVIEW\"` and `\"$AUTOREVIEW_HARNESS\"` in the examples below.\n\nChoose one:\n\n```bash\n# Project-local skill in the current repo for Codex and other agents:\nexport AUTOREVIEW=\".agents\u002Fskills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\".agents\u002Fskills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\n```bash\n# Claude Code project-local skill in the current repo:\nexport AUTOREVIEW=\".claude\u002Fskills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\".claude\u002Fskills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\n```bash\n# Source checkout of openclaw\u002Fagent-skills:\nexport AUTOREVIEW=\"skills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\"skills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\n```bash\n# Global skill:\nexport AGENTS_HOME=\"${AGENTS_HOME:-$HOME\u002F.agents}\"\nexport AUTOREVIEW=\"$AGENTS_HOME\u002Fskills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\"$AGENTS_HOME\u002Fskills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\nWhen using Claude Code, set `AGENTS_HOME=\"$HOME\u002F.claude\"` for global skills.\n\nOn native Windows, choose the matching pair:\n\n```powershell\n# Project-local skill in the current repo for Codex and other agents:\n$AUTOREVIEW = \".agents\\skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = \".agents\\skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n```powershell\n# Claude Code project-local skill in the current repo:\n$AUTOREVIEW = \".claude\\skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = \".claude\\skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n```powershell\n# Source checkout of openclaw\u002Fagent-skills:\n$AUTOREVIEW = \"skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = \"skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n```powershell\n# Global skill:\n$AgentsHome = if ($env:AGENTS_HOME) { $env:AGENTS_HOME } else { Join-Path $HOME \".agents\" }\n$AUTOREVIEW = Join-Path $AgentsHome \"skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = Join-Path $AgentsHome \"skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n## Pick Target\n\nDirty local work:\n\n```bash\n\"$AUTOREVIEW\" --mode local\n```\n\nUse this only when the patch is actually unstaged\u002Fstaged\u002Funtracked in the\ncurrent checkout. `--mode uncommitted` is accepted as an alias for `--mode local`.\nFor committed, pushed, or PR work, point the helper at the commit\nor branch diff instead; do not force dirty modes just\nbecause the helper docs mention dirty work first. A clean local review\nonly proves there is no local patch.\n\nBranch\u002FPR work:\n\n```bash\n\"$AUTOREVIEW\" --mode branch --base origin\u002Fmain\n```\n\nOptional review context is first-class. Prompt files and datasets must be repo-relative so review bundles cannot pull arbitrary host files:\n\n```bash\n\"$AUTOREVIEW\" --mode branch --base origin\u002Fmain --prompt-file review-notes.md --dataset evidence.json\n```\n\nIf an open PR exists, use its actual base:\n\n```bash\nbase=$(gh pr view --json baseRefName --jq .baseRefName)\n\"$AUTOREVIEW\" --mode branch --base \"origin\u002F$base\"\n```\n\nCommitted single change:\n\n```bash\n\"$AUTOREVIEW\" --mode commit --commit HEAD\n```\n\nUse commit review for already-landed or already-pushed work on `main`. Reviewing\nclean `main` against `origin\u002Fmain` is usually an empty diff after push. For a\nsmall stack, review each commit explicitly or review the branch before merging\nwith `--base`.\n\n## Oversized Bundles\n\nThe helper scans the full patch before partitioning it. A safe bundle that fits\nthe aggregate prompt limit remains one integrated review pass. Larger bundles\nare split at bundle sections and file boundaries where possible; an oversized\nsingle-file block is split at line boundaries with repeated file\u002Fhunk context\nand an absolute new- or old-file line offset. Untracked snapshots use\ninjection-safe source-line records so continuation passes retain reportable\nlocations. A single physical diff line split across passes also retains its\noriginal addition, deletion, or context marker.\nEvery original bundle byte appears exactly once across the pass sequence, and\nall validated reports are merged before required-finding and exit-status checks.\nThe helper caps one run at eight bounded passes so an unexpectedly huge branch\ncannot create unbounded model calls; split still-larger work into coherent review\ntargets.\n\nChunking makes large-diff review usable, but it cannot give one model call every\ncross-file implementation detail. For architecture-heavy changes, still prefer\na coherent branch or PR shape whose semantic decision surface fits one pass.\nRemoving verified non-authoritative generated noise remains useful, but never\ndrop lockfiles, generated clients, policies, manifests, schemas, or other\nindependently semantic artifacts merely to shrink the review.\n\n## Parallel Closeout\n\nFormat first if formatting can change line locations. Then it is OK to run tests and review in parallel:\n\n```bash\n\"$AUTOREVIEW\" --parallel-tests \"\u003Cfocused test command>\"\n```\n\nOn Windows, the default `--parallel-tests` shell preserves the platform `cmd.exe`\nsemantics used by Python `shell=True`. Use `--parallel-tests-shell powershell`\nor `--parallel-tests-shell pwsh` when the focused test command is PowerShell-specific.\nParallel tests inherit only a small allowlist of ordinary OS, CI, and toolchain\nvariables. Put additional non-secret project controls directly in the test command.\nHome and standard config directories point to a temporary isolated root that is\nremoved after the command exits. Do not put secrets in the command because it is\nprinted before execution. Set `OPENCLAW_TESTBOX=1` on the autoreview process, not\ninside the test command, because the environment snapshot and credential staging\nhappen before the test shell starts:\n\n```bash\nOPENCLAW_TESTBOX=1 \"$AUTOREVIEW\" --parallel-tests \"pnpm check:changed\"\n```\n\nOn POSIX, the helper puts this isolated Testbox home under the short, sticky\nsystem `\u002Ftmp`; Blacksmith creates an SSH control socket below that home, and a\nlong macOS `TMPDIR` can exceed the Unix-socket path limit. With an older helper,\nprefix the outer autoreview process with `TMPDIR=\u002Ftmp`. Setting `TMPDIR` inside\nthe quoted test command is too late because the isolated home already exists.\n\nThis is the narrow trusted-maintainer-code exception: it stages only the Blacksmith\ncredential file into the temporary home so the command can delegate remotely. Never\nuse this credential-hydrated path for untrusted contributor or fork code. Run other\nsecret-bearing or credentialed tests separately in an appropriately isolated remote\nrunner.\n\nTradeoff: 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\u002Factionable findings remain. Once that rerun exits cleanly, stop; do not spend another long review cycle on redundant confirmation.\n\n## Review Panels\n\nRun multiple reviewers against one frozen bundle:\n\n```bash\n\"$AUTOREVIEW\" --reviewers codex,claude,pi\n```\n\n`--panel` is shorthand for Codex plus Claude unless `--engine` changes the first reviewer:\n\n```bash\n\"$AUTOREVIEW\" --panel\n```\n\nSet reviewer models and thinking\u002Feffort explicitly:\n\n```bash\n\"$AUTOREVIEW\" --reviewers codex,claude --model codex=gpt-5.6-sol --thinking codex=high --model claude=claude-fable-5 --thinking claude=max\n```\n\nInline syntax is also supported for simple model IDs:\n\n```bash\n\"$AUTOREVIEW\" --reviewers codex:gpt-5.6-sol:high,claude:claude-fable-5:max\n```\n\nFor models with slashes or extra colons, prefer keyed form:\n\n```bash\n\"$AUTOREVIEW\" --engine pi --model anthropic\u002Fclaude-sonnet-4 --thinking high\n\"$AUTOREVIEW\" --reviewers codex,pi --model codex=gpt-5.6-sol --model pi=anthropic\u002Fclaude-sonnet-4\n```\n\n`--reviewers all` covers Codex, Claude, and Pi. Droid, Copilot, Cursor, and OpenCode selections fail closed because their current CLI contracts cannot confine project instructions, filesystem reads, or network fetches to the review boundary.\n\n## Models and thinking\n\nThe helper accepts `--model` globally or per engine (`engine=model`) and `--thinking` globally or per engine (`engine=level`). Repeat either flag for multiple reviewers.\n\nRecommended model defaults:\n\n| Engine              | Default model                                      | Source note                                           |\n| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |\n| **codex** (default) | `gpt-5.6-sol` -> `gpt-5.6-terra` on access failure | OpenClaw org review default                           |\n| **claude**          | `claude-fable-5`                                   | Anthropic's most capable widely released Claude model |\n\nCLI flags and environment variables override these defaults. Pi does not get a built-in model default because its provider catalog may vary by installation. Droid, Copilot, Cursor, and OpenCode are currently refused.\n\n| Engine              | Model flag                 | Example model IDs                                                            | Thinking flag                 | Accepted levels                                            |\n| ------------------- | -------------------------- | ---------------------------------------------------------------------------- | ----------------------------- | ---------------------------------------------------------- |\n| **codex** (default) | `codex --model X exec ...` | `gpt-5.6-sol`, then `gpt-5.6-terra` on Sol access failure                    | `-c model_reasoning_effort=Y` | `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |\n| **claude**          | `claude --model X`         | `claude-fable-5`, `claude-opus-4-8`, `claude-sonnet-4-6`, `claude-haiku-4-5` | `--effort Y`                  | `low`, `medium`, `high`, `xhigh`, `max`                    |\n| **droid**           | currently refused          | Factory model IDs                                                            | `-r, --reasoning-effort Y`    | `off`, `none`, `low`, `medium`, `high`, `xhigh`, `max`     |\n| **copilot**         | currently refused          | Copilot model aliases                                                        | not supported                 | n\u002Fa                                                        |\n| **pi**              | `pi --model X`             | `anthropic\u002Fclaude-sonnet-4`, `openai\u002Fgpt-4o`                                 | `--thinking Y`                | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`         |\n| **cursor**          | currently refused          | Cursor model aliases                                                         | not supported                 | n\u002Fa                                                        |\n| **opencode**        | currently refused          | OpenCode provider\u002Fmodel IDs                                                  | not supported                 | n\u002Fa                                                        |\n\nClaude also supports `--fallback-model a,b` for availability-based fallback chains ([model-config](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmodel-config)). Current Claude docs note that auth, billing, rate-limit, request-size, and transport errors do not trigger fallback, and the changelog documents interactive-session support in `v2.1.166`.\n\n[OpenAI's model guidance](https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fguides\u002Flatest-model) identifies Sol as the GPT-5.6 frontier-capability route and documents `max` support. Autoreview keeps `high` as its default; use `max` only for the hardest quality-first reviews after comparing its latency and cost with `xhigh` on representative changes.\n\nExamples matching current `main` behavior:\n\n```bash\n# Codex with explicit model and reasoning\n\"$AUTOREVIEW\" --engine codex --model gpt-5.6-sol --thinking high\n\n# Codex fast mode (priority service tier); needs a model whose catalog lists the tier, silently standard otherwise\n\"$AUTOREVIEW\" --engine codex --codex-speed fast\n\n# Safe Codex model\u002Fresponse tuning overrides (--codex-speed wins over a service_tier here)\n\"$AUTOREVIEW\" --engine codex --codex-config 'service_tier=\"fast\"'\n\n# Claude Code aliases or full model names, with optional availability fallback\n\"$AUTOREVIEW\" --engine claude --model claude-fable-5 --thinking max\n\"$AUTOREVIEW\" --engine claude --model claude-fable-5 --fallback-model claude-opus-4-8,claude-sonnet-4-6\n\n# Pi with explicit model and thinking level\n\"$AUTOREVIEW\" --engine pi --model anthropic\u002Fclaude-sonnet-4 --thinking high --pi-bin pi\n\n```\n\n`--cursor-agent-bin` and `CURSOR_AGENT_BIN` remain compatibility aliases for\n`--cursor-bin` and `CURSOR_BIN`.\n\n### Environment defaults\n\nCLI flags take precedence over environment variables.\n\nStore persistent personal defaults in your shell startup file or launcher\nenvironment. For repository-local defaults, use an existing local environment\nloader such as an untracked `.envrc`; the helper does not write a config file.\n\n| Variable                           | Purpose                                                                                                                          |\n| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| `AUTOREVIEW_MODEL`                 | Override the built-in default `--model` for all engines                                                                          |\n| `AUTOREVIEW_THINKING`              | Default `--thinking` for all engines                                                                                             |\n| `AUTOREVIEW_FALLBACK_MODEL`        | Default Claude `--fallback-model` chain                                                                                          |\n| `AUTOREVIEW_\u003CENGINE>_MODEL`        | Per-engine model override, for example `AUTOREVIEW_CODEX_MODEL=gpt-5.6-sol`                                                      |\n| `AUTOREVIEW_\u003CENGINE>_THINKING`     | Per-engine thinking override                                                                                                     |\n| `AUTOREVIEW_CODEX_CONFIG`          | Safe Codex model\u002Fresponse tuning overrides, semicolon-separated, e.g. `service_tier=\"fast\"`; capability-bearing keys fail closed |\n| `AUTOREVIEW_CODEX_SPEED`           | Codex service tier override: `fast` (priority), `flex`, or `default`; silently standard when the model does not list the tier    |\n| `AUTOREVIEW_CLAUDE_FALLBACK_MODEL` | Claude-only fallback chain                                                                                                       |\n| `AUTOREVIEW_PROVIDER_ENV_ALLOW`    | Comma-separated custom Pi\u002FOpenCode credential variable names; names must end in a recognized credential suffix                   |\n\nCodex maps thinking to `model_reasoning_effort`. Claude maps thinking to `--effort`. Pi maps thinking to `--thinking`. Only Claude accepts `--fallback-model`; global CLI\u002Fenv fallback requires at least one Claude reviewer, and engine-specific fallback overrides require that reviewer to be selected. Non-Claude fallback overrides, including `AUTOREVIEW_\u003CNONCLAUDE>_FALLBACK_MODEL`, fail closed instead of being silently ignored.\n\n## Review engine isolation\n\nWhen autoreview runs inside the repository under review, external reviewer CLIs must not load project-local trust or configuration that the branch controls.\n\n| Engine       | Isolation flags                                                                                                                                                                                  | Reference                                                                   |\n| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |\n| **codex**    | Auth-only config overrides, isolated workspace, `exec --ignore-user-config --ignore-rules --skip-git-repo-check`, plus read-only sandbox                                                         | Codex CLI `exec --help`                                                     |\n| **claude**   | `--safe-mode --setting-sources user --strict-mcp-config --disallowedTools mcp__*`; auto-memory and filesystem\u002Fshell tools disabled; empty external workspace; WebSearch by default (`v2.1.169+`) | Claude Code [CLI reference](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcli-reference)  |\n| **droid**    | Fails closed: current CLI cannot disable both project instructions and all tools                                                                                                                 | Droid CLI `exec --help` and `--list-tools`                                  |\n| **copilot**  | Fails closed: repository read tools also expose ignored files outside the reviewed bundle                                                                                                        | GitHub Copilot CLI command reference                                        |\n| **pi**       | `--no-approve --no-session --no-context-files --no-extensions --no-skills --no-prompt-templates --no-themes --no-tools`                                                                          | Pi CLI `--help`; requires Pi `v0.79.0+`                                     |\n| **opencode** | Fails closed: project\u002Fglobal config isolation and private-network fetch denial are not both proven                                                                                               | OpenCode CLI contract                                                       |\n| **cursor**   | Fails closed: documented read permissions can target absolute host paths and no proven repository-only filesystem sandbox is exposed                                                             | Cursor CLI [permissions](https:\u002F\u002Fcursor.com\u002Fdocs\u002Fcli\u002Freference\u002Fpermissions) |\n\nCodex `--ignore-user-config` skips config loading for the exec run. Autoreview reconstructs only the documented `cli_auth_credentials_store`, `forced_login_method`, and `forced_chatgpt_workspace_id` settings from `CODEX_HOME\u002Fconfig.toml`, keeping authentication usable without forwarding unrelated user configuration. Codex runs in an empty temporary workspace: the validated bundle is its sole repository input, ignored files and linked-worktree metadata remain unreadable, and the zero project-doc budget keeps workspace instructions out of the prompt. `--ignore-rules` skips user\u002Fproject execpolicy rules. Claude `--safe-mode` disables project hooks, skills, plugins, MCP servers, and CLAUDE.md; autoreview supplies WebSearch by default, permits only explicitly domain-constrained WebFetch rules, and exposes no filesystem or shell tools. Pi runs from a neutral temporary directory with project resources disabled and `--no-tools`. Droid, Copilot, Cursor, and OpenCode fail closed because their current CLI contracts cannot isolate untrusted review input from host, project, or private-network trust surfaces.\n\nCodex uses a named permission profile that grants read access only to an empty temporary workspace. This is narrower than repository-root access, which would expose ignored credentials, and narrower than the legacy `read-only` sandbox, which permits reads across the host filesystem.\n\n## Context Efficiency\n\nRun 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.\n\n## Helper\n\nAfter setting `AUTOREVIEW` and `AUTOREVIEW_HARNESS` above:\n\n```bash\n\"$AUTOREVIEW\" --help\n```\n\nThe smoke harness has thin shell wrappers over a shared Python implementation:\n\n```bash\n\"$AUTOREVIEW_HARNESS\" --fixture benign --engine codex\n```\n\nOn native Windows, invoke the extensionless Python helper through Python:\n\n```powershell\npython $AUTOREVIEW --help\n```\n\nand the smoke harness:\n\n```powershell\n& $AUTOREVIEW_HARNESS -Fixture benign -Engine codex\n```\n\nThe helper:\n\n- chooses dirty local changes first\n- accepts `--mode uncommitted` as an alias for `--mode local`\n- otherwise uses current PR base if `gh pr view` works\n- otherwise uses `origin\u002Fmain` for non-main branches\n- does not fetch automatically during branch review; the selected base ref must already resolve locally\n- recognizes `--engine droid`, `copilot`, `cursor`, and `opencode` only to fail closed with isolation errors; runnable engines are `codex`, `claude`, and `pi`; default is `AUTOREVIEW_ENGINE` or `codex`\n- resolves bare `git`, `gh`, reviewer, and PowerShell shell commands from absolute `PATH` entries only, never from the reviewed checkout; explicit `--*-bin` paths are interpreted from the reviewed repository root when relative and accepted only when both the supplied path and resolved target stay outside the reviewed repository\n- use `--mode commit --commit \u003Cref>` for already-committed work, especially clean `main` after landing\n- scans safe Git patches in full, recognizes synthetic fixture values tied to their credential field, reviews them in one pass up to the aggregate prompt limit, and automatically uses complete bounded passes above it\n- should be left in `--mode auto` or forced to `--mode branch` for PR\u002Fbranch work; do not force `--mode local` after committing\n- writes only to stdout unless `--output`, `--json-output`, or live streamed engine stderr is set\n- supports `--dry-run`, `--parallel-tests`, `--parallel-tests-shell`, `--prompt`, repo-relative `--prompt-file`, repo-relative `--dataset`, `--no-tools`, `--no-web-search`, repeatable Codex-only safe model\u002Fresponse tuning with `--codex-config key=value`, Codex-only `--codex-speed fast|flex|default`, and commit refs\n- supports `--stream-engine-output` or `AUTOREVIEW_STREAM_ENGINE_OUTPUT=1` for live engine text while preserving structured validation; Codex and Claude hide tool\u002Ffile event details, emit compact activity summaries, and report usage at turn completion\n- supports opt-in review panels with `--panel` \u002F `--reviewers`, plus per-engine `--model`, `--thinking`, and Claude `--fallback-model`\n- uses built-in defaults `codex=gpt-5.6-sol` with `high` reasoning and an access-only `gpt-5.6-terra` retry, plus `claude=claude-fable-5`; honors `AUTOREVIEW_MODEL`, `AUTOREVIEW_THINKING`, `AUTOREVIEW_FALLBACK_MODEL`, and per-engine `AUTOREVIEW_\u003CENGINE>_MODEL` \u002F `AUTOREVIEW_\u003CENGINE>_THINKING` environment overrides when CLI flags are omitted\n- gives Codex the bundle in an empty workspace with web search available; Claude receives the bundle plus WebSearch by default and optional domain-constrained WebFetch, and Pi receives the bundle with no tools\n- runs Claude with `--safe-mode` (`v2.1.169+`), `--setting-sources user`, MCP and auto-memory disabled, no filesystem\u002Fshell tools, an empty external workspace, and `--fallback-model` when set\n- refuses Droid, Copilot, Cursor, and OpenCode reviews until their CLIs expose the required project, filesystem, and network isolation\n- runs Pi `v0.79.0+` from neutral temporary directories with `--no-approve`, `--no-session`, disabled Pi context\u002Fresource loading, and `--no-tools` because its built-in read tools are not repository-confined\n- prints `review still running: \u003Cengine> elapsed=\u003Cseconds>s pid=\u003Cpid>` to stderr at long-running intervals while waiting for the selected review engine, unless streamed output or compact Codex activity has been visible recently\n- prints `autoreview clean: no accepted\u002Factionable findings reported` when the selected review command exits 0\n- exits nonzero when accepted\u002Factionable findings are present\n\n## Final Report\n\nInclude:\n\n- review command used\n- tests\u002Fproof run\n- findings accepted\u002Frejected, briefly why\n- the clean review result from the final helper\u002Freview run, or why a remaining finding was consciously rejected\n\nDo not run another review solely to improve the final report wording. If the final helper run exited 0 and produced no accepted\u002Factionable findings, report that exact run as clean.\n","# Auto Review\n\nRun the bundled structured review helper as a closeout check. This is code review, not Guardian `auto_review` approval routing.\n\nCodex review is the default when no engine is set. It uses `gpt-5.6-sol` with `high` reasoning by default, then retries once with `gpt-5.6-terra` only when the account cannot access Sol. Claude review is optional and uses `claude-fable-5` by default.\n\nFor user-visible behavior, pair autoreview with `behavior-validator`. Autoreview is source-aware and judges the change bundle; behavior validation is source-blind and judges the running product or tool against a behavior contract. A clean autoreview is not proof that a UI, CLI, API, or generated artifact works from the user's perspective.\n\nUse when:\n\n- user asks for Codex review \u002F Claude review \u002F Pi review \u002F autoreview \u002F second-model review\n- after non-trivial code edits, before final\u002Fcommit\u002Fship\n- reviewing a local branch or PR branch after fixes\n\nDo not require autoreview for a change whose entire diff is prose-only internal notes or `SKILL.md` documentation. Still inspect the diff directly and run the repository's lightweight documentation validation, if any. This exception does not cover user-facing documentation, executable examples, configuration, scripts, generated files, or behavior changes.\n\n## Contract\n\n- Treat review output as advisory. Never blindly apply it.\n- Verify every finding by reading the real code path and adjacent files.\n- Read dependency docs\u002Fsource\u002Ftypes when the finding depends on external behavior.\n- Reject unrealistic edge cases, speculative risks, broad rewrites, and fixes that over-complicate the codebase.\n- Prefer small fixes at the right ownership boundary; no refactor unless it clearly improves the bug class.\n- When an accepted finding shows a bug class or repeated pattern, inspect the current PR scope for sibling instances before fixing.\n- Fix the scoped bug class at once when practical; stop at touched surfaces, owner boundaries, and clear follow-up territory.\n- Keep going until structured review returns no accepted\u002Factionable findings only while the work remains inside the original task scope.\n- If a review-triggered fix changes code, rerun focused tests and rerun the structured review helper.\n- For security-audit suppression changes, verify accepted findings remain auditable: suppressed findings stay in structured output, active output keeps an unsuppressible suppression notice, and aggregate findings cannot hide unrelated active risk.\n- Never switch or override the requested review engine\u002Fmodel except for the documented Codex Sol-to-Terra account-access fallback. Capacity, rate-limit, and unrelated failures keep the same engine\u002Fmodel.\n- Be patient with large bundles. Structured review can take up to 30 minutes while the model call is active, especially with Codex tools or web search.\n- Treat heartbeat lines like `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\u002Ffile chatter, other runnable engines pass raw output through.\n- Do not kill a review just because it has been quiet for 2-5 minutes, or because it is still running under the 30-minute window. Inspect the process only after missing multiple expected heartbeats, after 30 minutes, or after an obviously failed subprocess; prefer letting the same helper command finish.\n- Tools are useful in review mode. Codex receives the validated bundle in an empty workspace so ignored files and linked-worktree metadata remain unreadable; web search stays available for dependency contracts and upstream docs.\n- Security perspective is always included, but it should not cripple legitimate functionality. Report security findings only when the change creates a concrete, actionable risk or removes an important safety check.\n- Reviewer subprocesses preserve engine authentication and non-credentialed proxy variables needed by headless or restricted-network environments while stripping process-injection, Git override, and credentialed proxy values.\n- Before engine invocation, autoreview runs TruffleHog over temporary snapshots of the exact added or modified content under review. It intentionally matches TruffleHog's low-false-positive pre-commit policy (`verified,unknown`); it does not classify arbitrary password-like strings or rescan unchanged history. Install TruffleHog using its official platform-neutral instructions; autoreview fails with that link when the binary is unavailable and never auto-installs it. Repositories should also run TruffleHog in pull-request CI as a backup outside autoreview; repository-local Git hooks are optional. Review bundles still omit security-sensitive paths or files, and explicit prompt and dataset inputs remain checked before engine invocation. Safe large diffs are sent as one pass while they fit the aggregate prompt limit, then partitioned into complete bounded passes without truncation.\n- For regression provenance, keep roles separate: blamed code author, blamed PR author, PR merger\u002Fcommitter, current PR author, and PR\u002Fdate. If no blamed PR is traceable, use the blamed commit as the provenance: commit SHA, date, and author username. Do not guess a merger or frame missing PR metadata as a separate finding.\n- If the blamed PR was merged by `clawsweeper[bot]` or another automation, identify the human trigger when practical. Check timeline\u002Fcomments first; if rate-limited, use gitcrawl\u002Fcache or public PR HTML. Look for maintainer commands such as `@clawsweeper automerge`, `\u002Flandpr`, or labels\u002Fstatus comments that armed automerge. Report `automerge triggered by @login`; if not found, say trigger unknown.\n- Do not invoke built-in `codex review`, nested reviewers, or reviewer panels from inside the review. The helper builds one validated bundle, calls the selected engine once for normal inputs or once per complete bounded chunk for oversized inputs, validates the structured results, and stops.\n- Stop as soon as the helper exits 0 with no accepted\u002Factionable findings. Do not run an extra review just to get a nicer \"clean\" line, a second opinion, or clearer closeout wording.\n- Treat the helper's successful exit plus absence of actionable findings as the clean review result, even if the underlying Codex CLI output is terse.\n- Multi-reviewer panels are opt-in only. Use them when explicitly requested or when risk justifies the extra spend; the main agent still verifies every accepted finding before fixing.\n- If rejecting a finding as intentional\u002Fnot worth fixing, add a brief inline code comment only when it explains a real invariant or ownership decision that future reviewers should know.\n- If `gh`\u002FGitcrawl 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.\n- If Gitcrawl reports a portable manifest mismatch, source\u002Fruntime DB health error, or stale portable-store checkout, run `gitcrawl doctor --json` and inspect `source_db_health`, `runtime_db_health`, and `portable_store_status` before falling back to live GitHub.\n- Do not push just to review. Push only when the user requested push\u002Fship\u002FPR update.\n\n## Scope Governor\n\nAutoreview is a closeout gate, not permission to rewrite the task.\n\nBefore the first review, freeze a scope baseline: original request or issue, target branch, intended behavior, owner boundary, changed files, and non-test LOC. For inherited or already-bloated branches, use the intended PR diff as the baseline rather than accepting all existing branch drift.\n\nBefore patching a finding, classify it:\n\n- **In-scope blocker**: the finding is introduced by the current diff, affects the same owner boundary, and can be fixed without changing the task's contract.\n- **Follow-up**: the finding is real but belongs to an adjacent bug class, sibling surface, cleanup, or broader hardening track.\n- **Stop-and-escalate**: the finding requires a new protocol\u002Fconfig\u002Fstorage\u002Fpublic API contract, a different owner boundary, a release-process change, or a design choice outside the original request.\n\nStop patching and report the scope break instead of continuing when:\n\n- a narrow PR turns into an architecture change, protocol change, migration, or release-process change;\n- the diff grows past 2x the original files or non-test LOC without explicit approval to expand scope;\n- two review-triggered patch cycles have not converged; pause and reclassify every remaining finding before another edit;\n- the best fix is \"define the canonical contract first\" rather than another local inference layer;\n- fixing the accepted finding would make the PR no longer describe the same behavior, issue, or owner boundary.\n\nAfter the two-cycle pause, continue only when every remaining accepted finding is still an in-scope blocker. Otherwise preserve the useful analysis, identify the smallest safe landed subset if one exists, and open or request a follow-up for the larger fix. Do not keep committing speculative fixes just to satisfy the reviewer.\n\nDo not stack or push review-triggered fix commits while scope classification or focused proof is unresolved. Keep exploratory edits local until the cycle is proven in scope; if scope breaks, remove them from the landing lane instead of preserving them as branch history.\n\nCritical exceptions must be explicit: active data loss, crash, broken install\u002Fupgrade, release blocker, or concrete security exposure. If the exception is not one of those, it is not critical enough to blow up scope.\n\n## Release Branches And Release Process\n\nOn release, beta, stable, hotfix, signing, notarization, appcast, package-publish, or release-check work, use freeze discipline even when the branch name is not release-like:\n\n- Fix only release blockers, failed release infrastructure, exact backports, install\u002Fupgrade breakage, data loss, crashes, or concrete security exposure.\n- Treat non-blocking autoreview findings as follow-ups for `main`, not reasons to broaden the release branch.\n- Do not introduce new product behavior, config surface, protocol shape, migration, plugin ownership, docs narrative, or process policy unless it directly unblocks the release.\n- Keep proof tied to the release target: exact branch\u002Fref, failing check or shipped-risk reason, smallest command\u002Fproof, and whether the fix must also forward-port to `main`.\n- If review discovers a real but non-critical design problem during release closeout, stop with a follow-up issue\u002FPR plan; do not use the release branch as the refactor lane.\n\n## Skill Path (set once)\n\nSet the skill script paths once, then use `\"$AUTOREVIEW\"` and `\"$AUTOREVIEW_HARNESS\"` in the examples below.\n\nChoose one:\n\n```bash\n# Project-local skill in the current repo for Codex and other agents:\nexport AUTOREVIEW=\".agents\u002Fskills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\".agents\u002Fskills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\n```bash\n# Claude Code project-local skill in the current repo:\nexport AUTOREVIEW=\".claude\u002Fskills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\".claude\u002Fskills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\n```bash\n# Source checkout of openclaw\u002Fagent-skills:\nexport AUTOREVIEW=\"skills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\"skills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\n```bash\n# Global skill:\nexport AGENTS_HOME=\"${AGENTS_HOME:-$HOME\u002F.agents}\"\nexport AUTOREVIEW=\"$AGENTS_HOME\u002Fskills\u002Fautoreview\u002Fscripts\u002Fautoreview\"\nexport AUTOREVIEW_HARNESS=\"$AGENTS_HOME\u002Fskills\u002Fautoreview\u002Fscripts\u002Ftest-review-harness\"\n```\n\nWhen using Claude Code, set `AGENTS_HOME=\"$HOME\u002F.claude\"` for global skills.\n\nOn native Windows, choose the matching pair:\n\n```powershell\n# Project-local skill in the current repo for Codex and other agents:\n$AUTOREVIEW = \".agents\\skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = \".agents\\skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n```powershell\n# Claude Code project-local skill in the current repo:\n$AUTOREVIEW = \".claude\\skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = \".claude\\skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n```powershell\n# Source checkout of openclaw\u002Fagent-skills:\n$AUTOREVIEW = \"skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = \"skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n```powershell\n# Global skill:\n$AgentsHome = if ($env:AGENTS_HOME) { $env:AGENTS_HOME } else { Join-Path $HOME \".agents\" }\n$AUTOREVIEW = Join-Path $AgentsHome \"skills\\autoreview\\scripts\\autoreview\"\n$AUTOREVIEW_HARNESS = Join-Path $AgentsHome \"skills\\autoreview\\scripts\\test-review-harness.ps1\"\n```\n\n## Pick Target\n\nDirty local work:\n\n```bash\n\"$AUTOREVIEW\" --mode local\n```\n\nUse this only when the patch is actually unstaged\u002Fstaged\u002Funtracked in the\ncurrent checkout. `--mode uncommitted` is accepted as an alias for `--mode local`.\nFor committed, pushed, or PR work, point the helper at the commit\nor branch diff instead; do not force dirty modes just\nbecause the helper docs mention dirty work first. A clean local review\nonly proves there is no local patch.\n\nBranch\u002FPR work:\n\n```bash\n\"$AUTOREVIEW\" --mode branch --base origin\u002Fmain\n```\n\nOptional review context is first-class. Prompt files and datasets must be repo-relative so review bundles cannot pull arbitrary host files:\n\n```bash\n\"$AUTOREVIEW\" --mode branch --base origin\u002Fmain --prompt-file review-notes.md --dataset evidence.json\n```\n\nIf an open PR exists, use its actual base:\n\n```bash\nbase=$(gh pr view --json baseRefName --jq .baseRefName)\n\"$AUTOREVIEW\" --mode branch --base \"origin\u002F$base\"\n```\n\nCommitted single change:\n\n```bash\n\"$AUTOREVIEW\" --mode commit --commit HEAD\n```\n\nUse commit review for already-landed or already-pushed work on `main`. Reviewing\nclean `main` against `origin\u002Fmain` is usually an empty diff after push. For a\nsmall stack, review each commit explicitly or review the branch before merging\nwith `--base`.\n\n## Oversized Bundles\n\nThe helper scans the full patch before partitioning it. A safe bundle that fits\nthe aggregate prompt limit remains one integrated review pass. Larger bundles\nare split at bundle sections and file boundaries where possible; an oversized\nsingle-file block is split at line boundaries with repeated file\u002Fhunk context\nand an absolute new- or old-file line offset. Untracked snapshots use\ninjection-safe source-line records so continuation passes retain reportable\nlocations. A single physical diff line split across passes also retains its\noriginal addition, deletion, or context marker.\nEvery original bundle byte appears exactly once across the pass sequence, and\nall validated reports are merged before required-finding and exit-status checks.\nThe helper caps one run at eight bounded passes so an unexpectedly huge branch\ncannot create unbounded model calls; split still-larger work into coherent review\ntargets.\n\nChunking makes large-diff review usable, but it cannot give one model call every\ncross-file implementation detail. For architecture-heavy changes, still prefer\na coherent branch or PR shape whose semantic decision surface fits one pass.\nRemoving verified non-authoritative generated noise remains useful, but never\ndrop lockfiles, generated clients, policies, manifests, schemas, or other\nindependently semantic artifacts merely to shrink the review.\n\n## Parallel Closeout\n\nFormat first if formatting can change line locations. Then it is OK to run tests and review in parallel:\n\n```bash\n\"$AUTOREVIEW\" --parallel-tests \"\u003Cfocused test command>\"\n```\n\nOn Windows, the default `--parallel-tests` shell preserves the platform `cmd.exe`\nsemantics used by Python `shell=True`. Use `--parallel-tests-shell powershell`\nor `--parallel-tests-shell pwsh` when the focused test command is PowerShell-specific.\nParallel tests inherit only a small allowlist of ordinary OS, CI, and toolchain\nvariables. Put additional non-secret project controls directly in the test command.\nHome and standard config directories point to a temporary isolated root that is\nremoved after the command exits. Do not put secrets in the command because it is\nprinted before execution. Set `OPENCLAW_TESTBOX=1` on the autoreview process, not\ninside the test command, because the environment snapshot and credential staging\nhappen before the test shell starts:\n\n```bash\nOPENCLAW_TESTBOX=1 \"$AUTOREVIEW\" --parallel-tests \"pnpm check:changed\"\n```\n\nOn POSIX, the helper puts this isolated Testbox home under the short, sticky\nsystem `\u002Ftmp`; Blacksmith creates an SSH control socket below that home, and a\nlong macOS `TMPDIR` can exceed the Unix-socket path limit. With an older helper,\nprefix the outer autoreview process with `TMPDIR=\u002Ftmp`. Setting `TMPDIR` inside\nthe quoted test command is too late because the isolated home already exists.\n\nThis is the narrow trusted-maintainer-code exception: it stages only the Blacksmith\ncredential file into the temporary home so the command can delegate remotely. Never\nuse this credential-hydrated path for untrusted contributor or fork code. Run other\nsecret-bearing or credentialed tests separately in an appropriately isolated remote\nrunner.\n\nTradeoff: 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\u002Factionable findings remain. Once that rerun exits cleanly, stop; do not spend another long review cycle on redundant confirmation.\n\n## Review Panels\n\nRun multiple reviewers against one frozen bundle:\n\n```bash\n\"$AUTOREVIEW\" --reviewers codex,claude,pi\n```\n\n`--panel` is shorthand for Codex plus Claude unless `--engine` changes the first reviewer:\n\n```bash\n\"$AUTOREVIEW\" --panel\n```\n\nSet reviewer models and thinking\u002Feffort explicitly:\n\n```bash\n\"$AUTOREVIEW\" --reviewers codex,claude --model codex=gpt-5.6-sol --thinking codex=high --model claude=claude-fable-5 --thinking claude=max\n```\n\nInline syntax is also supported for simple model IDs:\n\n```bash\n\"$AUTOREVIEW\" --reviewers codex:gpt-5.6-sol:high,claude:claude-fable-5:max\n```\n\nFor models with slashes or extra colons, prefer keyed form:\n\n```bash\n\"$AUTOREVIEW\" --engine pi --model anthropic\u002Fclaude-sonnet-4 --thinking high\n\"$AUTOREVIEW\" --reviewers codex,pi --model codex=gpt-5.6-sol --model pi=anthropic\u002Fclaude-sonnet-4\n```\n\n`--reviewers all` covers Codex, Claude, and Pi. Droid, Copilot, Cursor, and OpenCode selections fail closed because their current CLI contracts cannot confine project instructions, filesystem reads, or network fetches to the review boundary.\n\n## Models and thinking\n\nThe helper accepts `--model` globally or per engine (`engine=model`) and `--thinking` globally or per engine (`engine=level`). Repeat either flag for multiple reviewers.\n\nRecommended model defaults:\n\n| Engine              | Default model                                      | Source note                                           |\n| ------------------- | -------------------------------------------------- | ----------------------------------------------------- |\n| **codex** (default) | `gpt-5.6-sol` -> `gpt-5.6-terra` on access failure | OpenClaw org review default                           |\n| **claude**          | `claude-fable-5`                                   | Anthropic's most capable widely released Claude model |\n\nCLI flags and environment variables override these defaults. Pi does not get a built-in model default because its provider catalog may vary by installation. Droid, Copilot, Cursor, and OpenCode are currently refused.\n\n| Engine              | Model flag                 | Example model IDs                                                            | Thinking flag                 | Accepted levels                                            |\n| ------------------- | -------------------------- | ---------------------------------------------------------------------------- | ----------------------------- | ---------------------------------------------------------- |\n| **codex** (default) | `codex --model X exec ...` | `gpt-5.6-sol`, then `gpt-5.6-terra` on Sol access failure                    | `-c model_reasoning_effort=Y` | `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |\n| **claude**          | `claude --model X`         | `claude-fable-5`, `claude-opus-4-8`, `claude-sonnet-4-6`, `claude-haiku-4-5` | `--effort Y`                  | `low`, `medium`, `high`, `xhigh`, `max`                    |\n| **droid**           | currently refused          | Factory model IDs                                                            | `-r, --reasoning-effort Y`    | `off`, `none`, `low`, `medium`, `high`, `xhigh`, `max`     |\n| **copilot**         | currently refused          | Copilot model aliases                                                        | not supported                 | n\u002Fa                                                        |\n| **pi**              | `pi --model X`             | `anthropic\u002Fclaude-sonnet-4`, `openai\u002Fgpt-4o`                                 | `--thinking Y`                | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`         |\n| **cursor**          | currently refused          | Cursor model aliases                                                         | not supported                 | n\u002Fa                                                        |\n| **opencode**        | currently refused          | OpenCode provider\u002Fmodel IDs                                                  | not supported                 | n\u002Fa                                                        |\n\nClaude also supports `--fallback-model a,b` for availability-based fallback chains ([model-config](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmodel-config)). Current Claude docs note that auth, billing, rate-limit, request-size, and transport errors do not trigger fallback, and the changelog documents interactive-session support in `v2.1.166`.\n\n[OpenAI's model guidance](https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fguides\u002Flatest-model) identifies Sol as the GPT-5.6 frontier-capability route and documents `max` support. Autoreview keeps `high` as its default; use `max` only for the hardest quality-first reviews after comparing its latency and cost with `xhigh` on representative changes.\n\nExamples matching current `main` behavior:\n\n```bash\n# Codex with explicit model and reasoning\n\"$AUTOREVIEW\" --engine codex --model gpt-5.6-sol --thinking high\n\n# Codex fast mode (priority service tier); needs a model whose catalog lists the tier, silently standard otherwise\n\"$AUTOREVIEW\" --engine codex --codex-speed fast\n\n# Safe Codex model\u002Fresponse tuning overrides (--codex-speed wins over a service_tier here)\n\"$AUTOREVIEW\" --engine codex --codex-config 'service_tier=\"fast\"'\n\n# Claude Code aliases or full model names, with optional availability fallback\n\"$AUTOREVIEW\" --engine claude --model claude-fable-5 --thinking max\n\"$AUTOREVIEW\" --engine claude --model claude-fable-5 --fallback-model claude-opus-4-8,claude-sonnet-4-6\n\n# Pi with explicit model and thinking level\n\"$AUTOREVIEW\" --engine pi --model anthropic\u002Fclaude-sonnet-4 --thinking high --pi-bin pi\n\n```\n\n`--cursor-agent-bin` and `CURSOR_AGENT_BIN` remain compatibility aliases for\n`--cursor-bin` and `CURSOR_BIN`.\n\n### Environment defaults\n\nCLI flags take precedence over environment variables.\n\nStore persistent personal defaults in your shell startup file or launcher\nenvironment. For repository-local defaults, use an existing local environment\nloader such as an untracked `.envrc`; the helper does not write a config file.\n\n| Variable                           | Purpose                                                                                                                          |\n| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| `AUTOREVIEW_MODEL`                 | Override the built-in default `--model` for all engines                                                                          |\n| `AUTOREVIEW_THINKING`              | Default `--thinking` for all engines                                                                                             |\n| `AUTOREVIEW_FALLBACK_MODEL`        | Default Claude `--fallback-model` chain                                                                                          |\n| `AUTOREVIEW_\u003CENGINE>_MODEL`        | Per-engine model override, for example `AUTOREVIEW_CODEX_MODEL=gpt-5.6-sol`                                                      |\n| `AUTOREVIEW_\u003CENGINE>_THINKING`     | Per-engine thinking override                                                                                                     |\n| `AUTOREVIEW_CODEX_CONFIG`          | Safe Codex model\u002Fresponse tuning overrides, semicolon-separated, e.g. `service_tier=\"fast\"`; capability-bearing keys fail closed |\n| `AUTOREVIEW_CODEX_SPEED`           | Codex service tier override: `fast` (priority), `flex`, or `default`; silently standard when the model does not list the tier    |\n| `AUTOREVIEW_CLAUDE_FALLBACK_MODEL` | Claude-only fallback chain                                                                                                       |\n| `AUTOREVIEW_PROVIDER_ENV_ALLOW`    | Comma-separated custom Pi\u002FOpenCode credential variable names; names must end in a recognized credential suffix                   |\n\nCodex maps thinking to `model_reasoning_effort`. Claude maps thinking to `--effort`. Pi maps thinking to `--thinking`. Only Claude accepts `--fallback-model`; global CLI\u002Fenv fallback requires at least one Claude reviewer, and engine-specific fallback overrides require that reviewer to be selected. Non-Claude fallback overrides, including `AUTOREVIEW_\u003CNONCLAUDE>_FALLBACK_MODEL`, fail closed instead of being silently ignored.\n\n## Review engine isolation\n\nWhen autoreview runs inside the repository under review, external reviewer CLIs must not load project-local trust or configuration that the branch controls.\n\n| Engine       | Isolation flags                                                                                                                                                                                  | Reference                                                                   |\n| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |\n| **codex**    | Auth-only config overrides, isolated workspace, `exec --ignore-user-config --ignore-rules --skip-git-repo-check`, plus read-only sandbox                                                         | Codex CLI `exec --help`                                                     |\n| **claude**   | `--safe-mode --setting-sources user --strict-mcp-config --disallowedTools mcp__*`; auto-memory and filesystem\u002Fshell tools disabled; empty external workspace; WebSearch by default (`v2.1.169+`) | Claude Code [CLI reference](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcli-reference)  |\n| **droid**    | Fails closed: current CLI cannot disable both project instructions and all tools                                                                                                                 | Droid CLI `exec --help` and `--list-tools`                                  |\n| **copilot**  | Fails closed: repository read tools also expose ignored files outside the reviewed bundle                                                                                                        | GitHub Copilot CLI command reference                                        |\n| **pi**       | `--no-approve --no-session --no-context-files --no-extensions --no-skills --no-prompt-templates --no-themes --no-tools`                                                                          | Pi CLI `--help`; requires Pi `v0.79.0+`                                     |\n| **opencode** | Fails closed: project\u002Fglobal config isolation and private-network fetch denial are not both proven                                                                                               | OpenCode CLI contract                                                       |\n| **cursor**   | Fails closed: documented read permissions can target absolute host paths and no proven repository-only filesystem sandbox is exposed                                                             | Cursor CLI [permissions](https:\u002F\u002Fcursor.com\u002Fdocs\u002Fcli\u002Freference\u002Fpermissions) |\n\nCodex `--ignore-user-config` skips config loading for the exec run. Autoreview reconstructs only the documented `cli_auth_credentials_store`, `forced_login_method`, and `forced_chatgpt_workspace_id` settings from `CODEX_HOME\u002Fconfig.toml`, keeping authentication usable without forwarding unrelated user configuration. Codex runs in an empty temporary workspace: the validated bundle is its sole repository input, ignored files and linked-worktree metadata remain unreadable, and the zero project-doc budget keeps workspace instructions out of the prompt. `--ignore-rules` skips user\u002Fproject execpolicy rules. Claude `--safe-mode` disables project hooks, skills, plugins, MCP servers, and CLAUDE.md; autoreview supplies WebSearch by default, permits only explicitly domain-constrained WebFetch rules, and exposes no filesystem or shell tools. Pi runs from a neutral temporary directory with project resources disabled and `--no-tools`. Droid, Copilot, Cursor, and OpenCode fail closed because their current CLI contracts cannot isolate untrusted review input from host, project, or private-network trust surfaces.\n\nCodex uses a named permission profile that grants read access only to an empty temporary workspace. This is narrower than repository-root access, which would expose ignored credentials, and narrower than the legacy `read-only` sandbox, which permits reads across the host filesystem.\n\n## Context Efficiency\n\nRun 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.\n\n## Helper\n\nAfter setting `AUTOREVIEW` and `AUTOREVIEW_HARNESS` above:\n\n```bash\n\"$AUTOREVIEW\" --help\n```\n\nThe smoke harness has thin shell wrappers over a shared Python implementation:\n\n```bash\n\"$AUTOREVIEW_HARNESS\" --fixture benign --engine codex\n```\n\nOn native Windows, invoke the extensionless Python helper through Python:\n\n```powershell\npython $AUTOREVIEW --help\n```\n\nand the smoke harness:\n\n```powershell\n& $AUTOREVIEW_HARNESS -Fixture benign -Engine codex\n```\n\nThe helper:\n\n- chooses dirty local changes first\n- accepts `--mode uncommitted` as an alias for `--mode local`\n- otherwise uses current PR base if `gh pr view` works\n- otherwise uses `origin\u002Fmain` for non-main branches\n- does not fetch automatically during branch review; the selected base ref must already resolve locally\n- recognizes `--engine droid`, `copilot`, `cursor`, and `opencode` only to fail closed with isolation errors; runnable engines are `codex`, `claude`, and `pi`; default is `AUTOREVIEW_ENGINE` or `codex`\n- resolves bare `git`, `gh`, reviewer, and PowerShell shell commands from absolute `PATH` entries only, never from the reviewed checkout; explicit `--*-bin` paths are interpreted from the reviewed repository root when relative and accepted only when both the supplied path and resolved target stay outside the reviewed repository\n- use `--mode commit --commit \u003Cref>` for already-committed work, especially clean `main` after landing\n- scans safe Git patches in full, recognizes synthetic fixture values tied to their credential field, reviews them in one pass up to the aggregate prompt limit, and automatically uses complete bounded passes above it\n- should be left in `--mode auto` or forced to `--mode branch` for PR\u002Fbranch work; do not force `--mode local` after committing\n- writes only to stdout unless `--output`, `--json-output`, or live streamed engine stderr is set\n- supports `--dry-run`, `--parallel-tests`, `--parallel-tests-shell`, `--prompt`, repo-relative `--prompt-file`, repo-relative `--dataset`, `--no-tools`, `--no-web-search`, repeatable Codex-only safe model\u002Fresponse tuning with `--codex-config key=value`, Codex-only `--codex-speed fast|flex|default`, and commit refs\n- supports `--stream-engine-output` or `AUTOREVIEW_STREAM_ENGINE_OUTPUT=1` for live engine text while preserving structured validation; Codex and Claude hide tool\u002Ffile event details, emit compact activity summaries, and report usage at turn completion\n- supports opt-in review panels with `--panel` \u002F `--reviewers`, plus per-engine `--model`, `--thinking`, and Claude `--fallback-model`\n- uses built-in defaults `codex=gpt-5.6-sol` with `high` reasoning and an access-only `gpt-5.6-terra` retry, plus `claude=claude-fable-5`; honors `AUTOREVIEW_MODEL`, `AUTOREVIEW_THINKING`, `AUTOREVIEW_FALLBACK_MODEL`, and per-engine `AUTOREVIEW_\u003CENGINE>_MODEL` \u002F `AUTOREVIEW_\u003CENGINE>_THINKING` environment overrides when CLI flags are omitted\n- gives Codex the bundle in an empty workspace with web search available; Claude receives the bundle plus WebSearch by default and optional domain-constrained WebFetch, and Pi receives the bundle with no tools\n- runs Claude with `--safe-mode` (`v2.1.169+`), `--setting-sources user`, MCP and auto-memory disabled, no filesystem\u002Fshell tools, an empty external workspace, and `--fallback-model` when set\n- refuses Droid, Copilot, Cursor, and OpenCode reviews until their CLIs expose the required project, filesystem, and network isolation\n- runs Pi `v0.79.0+` from neutral temporary directories with `--no-approve`, `--no-session`, disabled Pi context\u002Fresource loading, and `--no-tools` because its built-in read tools are not repository-confined\n- prints `review still running: \u003Cengine> elapsed=\u003Cseconds>s pid=\u003Cpid>` to stderr at long-running intervals while waiting for the selected review engine, unless streamed output or compact Codex activity has been visible recently\n- prints `autoreview clean: no accepted\u002Factionable findings reported` when the selected review command exits 0\n- exits nonzero when accepted\u002Factionable findings are present\n\n## Final Report\n\nInclude:\n\n- review command used\n- tests\u002Fproof run\n- findings accepted\u002Frejected, briefly why\n- the clean review result from the final helper\u002Freview run, or why a remaining finding was consciously rejected\n\nDo not run another review solely to improve the final report wording. If the final helper run exited 0 and produced no accepted\u002Factionable findings, report that exact run as clean.\n",{"name":5,"description":7},"main","11039b64e036dca33313350b4cd1d6c2a791eb15","tests\u002Ffixtures\u002Fopenclaw_skills\u002Fclawhub-autoreview","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia","https:\u002F\u002Fgithub.com\u002Fsecure-workflows","2026-10-26 10:48:34",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add secure-workflows\u002Fgaia --skill autoreview",{"tool":35,"command":36},"bunx","bunx skills add secure-workflows\u002Fgaia --skill autoreview",{"tool":38,"command":39},"pnpm","pnpm dlx skills add secure-workflows\u002Fgaia --skill autoreview","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fopenclaw_skills\u002Fclawhub-autoreview\u002FSKILL.md",true,[],[44,51,58,65,72,79],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7BYXGPPQJGVVD0DPS2WK3FS","web-search","Search the web via the Brave Search API. Use when the user asks about current events or external facts.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fweb-search\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7BYXDF2TM5JPMEQKMMHW0VJ","triage-support-ticket","Triage an inbound support ticket end to end. Use when the user pastes a support ticket or asks to triage one.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftriage-support-ticket\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7BYXAHWNBMJ8Y1Q51EZ53K7","tool-mismatch","Declares a tool its tools.py never registers. Used to prove validation fails loudly with no partial load.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftool-mismatch\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7BYX6CZ63AM6HB90PPNXKF7","report-archive","Archive a generated report to the user's reports folder and register it with the team's report index. Use when the user asks to file, archive, or publish a finished report.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Freport-archive\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7BYX4PM4HGNZ0QBZ54BTG1N","local-capability","Writes files on the local workspace. Used to prove Phase 1 refuses local-capability permissions.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Flocal-capability\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7BYX1KVPKHHZ5Z3R3BB0QQA","incident-review","Run an incident postmortem. Stands in for a Claude Code skill library imported read-only from .claude\u002Fskills\u002F.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fincident-review\u002FSKILL.md",[],[]]