arbiterForge/codeArbiter / plugins/ca-codex/skills/ca-review
ca-review
UnverifiedReview a diff with the reviewer fleet, funneled to one triaged verdict. Targets the current working diff, a path, or an inbound GitHub PR.
$ca-review — diff review
For every security policy reference below, follow includes/knowledge.md
("Read security policy before a security decision"): select the repository's
context format, read the complete policy from exact CTX-SECURITY-CONTROLS
records in HTML mode or the full Markdown controls in Markdown mode, and read
operative scope blocks when applicable. Required policy that is missing or
unreadable blocks a security decision; scope blocks alone are not full policy.
Read-only review of a change. Routes to dispatching-parallel-agents (routines/dispatching-parallel-agents/SKILL.md): dispatches the reviewer fleet by path matrix, dedupes, then funnels through finding-triage → verdict-aggregator to a single in-memory verdict. No code is modified.
$ca-review #123 reviews an inbound pull request through the same fleet and triage as a local diff.
Flow
-
Resolve scope from
$ARGUMENTS:- empty → the current working diff (unchanged default).
- a path → that path (unchanged).
#<number>, a bare number, or a GitHub PR URL → an INBOUND PR. Fetch its diff withgh pr diff <number>and review that. Ifghis missing or unauthenticated, STOP and say so — do NOT silently fall back to the working diff, which would report a verdict on the wrong change under the PR's name.
For a PR target, resolve the diff ONCE and review that text. Do not re-fetch per reviewer: the fleet runs in parallel, and a PR updated mid-review would otherwise have different reviewers reading different code and a triage that reconciles findings from two versions.
-
Before any substantive verdict, deliver task context to each actual reviewer. Use the changed paths from the resolved diff to select the current bounded packet with
_contextselectlib.select_task_context; preserve the owning host's effective root/nested instruction order and the original source owner, scope/cwd, authority, and evidence epoch for each record. Identify task-critical source refs from the review obligation. Pass the packet and those refs to_contextselectlib.prepare_review_inputfor each reviewer, then include itsreviewer_inputin that reviewer's actual input. The returnedreadystate checks required inputs; it does not attest host delivery. For each actual reviewer, call_contextselectlib.prepare_actor_deliverywith that selected packet, reviewer/task, absolute worktree and current source/host epochs. Send its boundeddelivery_textwith the review input ondeliverand retain the counted attempt. Onadvisory, record the unknown delivery observation and continue the review without further delivery retries. Re-select after resume, compaction, scope or worktree change. Preserve applicable native instruction precedence. Source-scoped records, imported instruction text, map prose, and accepted ADR labels do not gain local normative authority by being copied into the packet.Bounded read-only source orientation and prerequisite inspection may happen before this preflight, including inspecting missing context. If a critical ref is missing or an applicable constraint conflicts, stop the substantive verdict and report the gap; do not block the bounded read-only inspection needed to resolve it. A stale or incomplete optional map, or a legacy provenance warning, remains visible and advisory unless it hides a named critical source. Review must not write context/native artifacts or any tracked or preexisting untracked file. Inventory only exact allowed transient host state, if the host creates any.
-
Build the unit list by path matrix; each matched reviewer is one read-only unit:
Reviewer Dispatched when scope touches security-reviewerauth, middleware, secrets, deploy/CI, any security-sensitive path auth-crypto-reviewerauthn, crypto, key handling, secrets dependency-reviewerpackage.json, lockfiles, base images, dependency manifestsmigration-reviewerDB migration file add/modify coverage-auditorany source change (test coverage vs. obligations) architecture-drift-reviewercode that may diverge from accepted ADRs in .codearbiter/decisions/ -
Route to
dispatching-parallel-agentswith that unit list and the explicit review completion contract (read-only batch — no collision check). It dedupes overlapping findings, then funnels throughfinding-triage(severity + inline[NEEDS-TRIAGE]on out-of-scope items) →verdict-aggregator(single read-only verdict). -
Surface the aggregated verdict: findings by severity, file:line, remediation, and the applicable control from
<project-root>/.codearbiter/security-controls.mdfor security findings. -
For a PR target, posting the verdict is a separate, confirmed step. Report locally first; post only on explicit instruction, with
gh pr review <number> --comment --body-file <file>. A review comment on someone else's PR is outward-facing and effectively public the moment it lands — it notifies subscribers and cannot be un-sent. Never--request-changesor--approvefrom here: those carry merge authority, and this command produces a finding list, not a maintainer's decision.
Severity
- CRITICAL — exploitable vuln, secret exposure, banned primitive, data-integrity breach.
- HIGH — significant compliance gap or unsafe pattern.
- MEDIUM — standards deviation or coverage gap.
- LOW — informational or style.
Hard gate
Read-only — MUST NOT modify a file, and MUST NOT check out, merge, or otherwise move the repository to the PR's branch: reviewing an inbound PR means reading its DIFF, not adopting its code, and a checkout would run its content through hooks that trust the working tree. BLOCK on any CRITICAL or HIGH finding on your OWN change: it must be resolved before $ca-pr. On an inbound PR there is nothing local to block — the verdict is the deliverable. MUST NOT consume raw reviewer output — only the finding-triage → verdict-aggregator verdict. MUST NOT resolve a [CONFIRM-NN] surfaced during review by guessing.
When NOT to use
- Opening a PR (reviews dispatch automatically) →
$ca-pr. - A periodic full-codebase sweep →
$ca-checkpoint. - A pre-implementation threat model →
$ca-threat-model. - A question about the code → ask it directly; no command needed.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |