autoreview
Closeout code review with a structured second-model pass. Use after non-trivial changes or when the user asks for autoreview, Codex review, or a review panel.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- autoreview
- description
- Closeout code review with a structured second-model pass. Use after non-trivial changes or when the user asks for autoreview, Codex review, or a review panel.
02 资源文件 3
- 脚本scripts/autoreview40.0 KB
- 脚本scripts/test-review-harness4.4 KB
- 脚本tests/test_autoreview.py3.8 KB
03 SKILL.md 正文
Auto Review
Run the repo's bundled structured review helper after the nearest owning proof.
Codex is the default reviewer; set AUTOREVIEW_ENGINE=claude (or pass
--engine claude) when Codex is unavailable. Review findings are advisory; the
task, owning code and contracts, and their nearest checks remain authoritative.
Closeout
-
Record the baseline: user request, violated invariant, owner boundary, intended behavior, and target ref. Completion means a finding can be classified without silently broadening the task.
-
Run the nearest focused checks with the repo's own scripts. Completion means the pre-review proof is current. Full proof for this repo:
pnpm validate- This repo is pnpm-only; never suggest
npmcommands here.pnpm validateispnpm lint(tsc --noEmit) +pnpm lint:eslint+pnpm format:check+pnpm test, which is exactly what the CItestjob runs. - Focused tests:
pnpm test test/<area>/<file>.test.ts. E2E lives behindpnpm test:e2e. - CLI surface changes also carry
pnpm preflight:cli(focused tests, build, format check, regenerated demo transcripts). - Packaging and install lanes are proved by
pnpm build && pnpm pack:check,pnpm build:sea:smoke,pnpm sea:check, andpnpm test:install:unix; run them only when the change touches build, packaging, or install. connect/andexamples/*are separate workspace packages that root CI path-ignores. Prove them from inside the package.- The commit hook runs commitlint and lint-staged, so a commit message must be a conventional commit.
- This repo is pnpm-only; never suggest
-
Select the review target:
# Dirty staged, unstaged, and untracked work .agents/skills/autoreview/scripts/autoreview --mode local # Feature/PR branch; PRs in this repo target main .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main # One committed change .agents/skills/autoreview/scripts/autoreview --mode commit --commit HEAD # Exact commit-to-commit diff (no merge-base expansion) .agents/skills/autoreview/scripts/autoreview --mode range --base <base> --head <head>For an open PR, use its actual base (the helper asks
gh pr viewwhen no--baseis given). Branch mode requires a clean worktree; local changes belong in local mode. Commit mode reviews merge commits against their first parent. A clean local review proves only that no local patch exists. -
Adjudicate every finding against the real code path, adjacent files, dependency contracts, and repo doctrine. Completion means each finding is accepted with evidence or rejected with a one-line reason.
-
Classify accepted findings before editing:
- In-scope blocker: same invariant and owner neighborhood; fix it.
- Follow-up: real, but a different owner or bug class; report it.
- Stop-and-escalate: changes protocol, on-disk state, exported API, CLI flags or exit codes, packaging, release process, or another owner's boundary; request direction.
-
After an in-scope fix, rerun affected focused proof and autoreview. After two review-triggered patch cycles without convergence, pause and reclassify all remaining findings. Continue only when every remaining item is still an in-scope blocker.
-
Stop on the first clean helper exit. Report the command, proof run, accepted/rejected findings, and clean result.
Finding Threshold
The helper defaults to P0: issues that block the current change because they materially break its normal flow, outcome, or safety boundary. Broaden only on explicit request:
.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --max-priority P1
P2/P3 polish and speculative hardening are not blockers by default. Security findings must name a concrete risk or removed safety check; security-adjacent functionality alone is not a defect.
Repo Boundaries
- The touched path and owning code select scope; the nearest real oracle proves behavior. A clean source review never replaces required runtime, integration, e2e, or generated-file proof.
- Fix the root cause across relevant siblings inside the same owner boundary. Keep unrelated cleanup out of the landing lane.
- PRs target
main; semantic-release publishes the npm package and the release assets frommain, and thesemantic-pull-requestcheck requires a conventional-commit PR title. Review never authorizes push, merge, release, or tag actions. - On release, hotfix, or publish work, apply freeze discipline: fix only the release blocker, exact backport, crash, data-loss, install/upgrade breakage, or concrete security exposure. Route other findings to follow-up work.
- The published surface is the CLI binary plus
@opendatalabs/connectentry points. Treat exported types, CLI flags, exit codes, and install scripts as public contract: a finding that changes them is stop-and-escalate, not an in-scope fix. - Prose-only skill/docs changes may skip the model review, but still run their nearest lightweight check (Prettier where it covers Markdown). Executable examples, scripts, configuration, generated files, and user-facing docs do not qualify.
Panels
Panels are opt-in. Use them only when requested or when the risk justifies the extra cost:
.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --panel
The main agent still adjudicates every merged finding. Never push merely to make a review possible.
Self-check
The helper's target-selection logic has unit tests; run them after editing the script:
python3 .agents/skills/autoreview/tests/test_autoreview.py
scripts/test-review-harness builds a throwaway repo with a deliberately unsafe
patch (or a safe security-adjacent one) and checks that a selected engine
reports, or correctly does not report, findings.
04 同仓库更多 Skills
verify-setup-resume
Verify BUI-936 setup/resume identities, funding readiness and overlapping resumes. Use when changing app request, test-credit transport or the request journal. Runs bounded TLA+ checks and offline real-code replays without live funding or paid reads.
verify-server-supervision
Verify the local Personal Server stop and restart boundary. Use when changing the supervisor's backoff, port probing, replacement launch or Stop handling.
verify-paid-read-recovery
Verify interrupted and overlapping CLI paid reads, receipt-file writers and dead-owner recovery. Use when changing src/cli/app/read.ts, src/core/receipts.ts or src/core/receipts-lock.ts. Runs TLA+ models and offline real-code replays without live paid reads.
verify-mainnet-registration
Verify mainnet app registration and Account association recovery. Use for the registration journal, gateway confirmation, retry, or ownership check.
verify-hosted-provisioning
Verify hosted Personal Server resource ownership across create and delete. Use for Connect's server API, provisioning-row updates, or deprovisioning admission.
verify-export-settlement
Verify queued export owner binding and generation settlement. Use for result publication, pending upload receipts, or retry and sync changes.