/caddis:cross-review git range e.g. origin/main..HEADfrom caddis
Cross-vendor code review of the current diff — a second-vendor model (agy Carbon by default; DeepSeek, GLM or any OpenAI-compatible endpoint) reviews your changes to catch bugs a same-vendor reviewer misses
Ships in caddis. Installing the plugin adds it to Claude Code.
Run a cross-vendor review of the current changes with a DIFFERENT model family than the one that wrote them
(default agy Carbon since 2026-10-21 — it needs no key; DeepSeek and GLM are fallbacks). Use after a phase
is green and before you commit, or for a second opinion on a risky diff. This is the cross-vendor
complement to /caddis:code-review, not a replacement.
python "$TOOL" --check-config # resolve $TOOL first, see "Run it" below
Exit 0 means ready; it prints which providers are available (agy-carbon needs no key, only agy on PATH and caddis_spend.py). Exit 3 means nothing is configured — STOP and ask the user now. Do not proceed to the review, and do not silently skip it.
Ask with AskUserQuestion: which provider to set up (DeepSeek, GLM, or another OpenAI-compatible
endpoint), then write the key they give you to ~/.caddis/keys.env as DEEPSEEK_API_KEY=<key> (or
the matching variable) and re-run the check. The keys file lives outside every git repo, so it
cannot be committed by accident. Never put a key in the repo, in a command, or in your reply.
Why asking is the fix, and why the script does not do it. This used to fail at the point of use
— mid-task, with a commit pending, which is the worst moment to go hunting for a credential. A
command that fails once at an inconvenient moment does not get retried, so the safety check is
quietly lost and nothing records that it was lost. But oss_review.py also runs headless, from CI
and from claude -p sessions, where a prompt on stdin does not ask a question — it hangs forever.
So the script answers "is it configured?" and you do the asking.
If a key exists for a different provider than the one requested, the error names it and gives you
the exact flag (--provider glm). Read the message before concluding anything is missing.
Key precedence: REVIEW_API_KEY > the provider's own env var (DEEPSEEK_API_KEY /
GLM_API_KEY) > OSS_API_KEY > the keys file (~/.caddis/keys.env, overridable via
CADDIS_KEYS_FILE). Details: the coding/cross-review skill and the Providers & keys guide.
Resolve the tool path deterministically — check only these two exact locations, in order, and never search the filesystem for it (see Rules below):
# THE PLUGIN COPY WINS. It is the one `caddis update` refreshes; a vendored copy is a snapshot
# of whatever caddis shipped the day someone copied it, and it never updates again.
if [ -f "${CLAUDE_PLUGIN_ROOT}/scripts/oss_review.py" ]; then
TOOL="${CLAUDE_PLUGIN_ROOT}/scripts/oss_review.py"
# A vendored copy that DIFFERS is a live hazard, not a curiosity — say so, do not stay silent.
if [ -f ".github/tools/oss_review.py" ] && ! diff -q ".github/tools/oss_review.py" "$TOOL" >/dev/null 2>&1; then
echo "[cross-review] WARNING: .github/tools/oss_review.py differs from the caddis copy and is"
echo " being IGNORED. Delete it, or keep the local change deliberately."
fi
elif [ -f ".github/tools/oss_review.py" ]; then
TOOL=".github/tools/oss_review.py" # no plugin present — the vendored copy is all there is
else
echo "oss_review.py not found at either known location — report this and stop. Do NOT search for it."
exit 3
fi
Why the plugin copy is first. It used to be second. On 2026-08-10 a repo ran a stale vendored
oss_review.pyand gotREVIEW: CLEANon a database write path that was never reviewed. The bug had been fixed on 2026-08-01 — the fix just never reached the caller, because a file someone copied weeks earlier silently won.caddis_gate.py vendor-driftnow fails on the same condition.
python "$TOOL" $ARGUMENTS # pass the user's flags THROUGH, raw
python "$TOOL" # no arguments: agy Carbon eyes on the working tree
$ARGUMENTS goes through raw, and must not be re-prefixed. Callers are told to type the flag
themselves — feature-plan.md emits /caddis:cross-review --range main..HEAD into every plan it
writes. This line used to prefix the flag itself, which turned that into a doubled
--range --range main..HEAD and made every plan-emitted call fail. Whatever the user typed is already a complete flag list:
/caddis:cross-review -> the working tree, agy Neon high
/caddis:cross-review --range main..HEAD -> that range
/caddis:cross-review --provider glm -> GLM eyes
/caddis:cross-review --author agy --tier 2 -> Claude Opus reviews agy-written code
/caddis:cross-review --author claude -> agy Neon high reviews Claude-written code
Optional: --base-url <url>, --model <id> (env always overrides the preset).
A large diff is batched, not refused. Over REVIEW_MAX_DIFF_CHARS (default 60,000) the tool splits
on whole-file boundaries and reviews each batch, and the verdict is CLEAN only if every batch is. agy gets
the prompt on stdin (stream-json), not on the command line, so agy batches follow only
REVIEW_MAX_DIFF_CHARS, the same as every other provider. Exit 4 means a single file over the
60,000 ceiling, or more batches than the cap. When you see it, review that one file separately, not a
narrower --range; don't raise --max-diff-chars blind.
The verdict is the last line. Only the last non-empty line of the reply counts, and it must be
exactly REVIEW: CLEAN or REVIEW: BLOCKING. A reply that quotes the marker earlier and ends some other
way has no verdict (exit 4). An explicit --range with no changes is exit 3 (a review of nothing is not
CLEAN); the working tree with no changes is still CLEAN. When the secret filter drops some files, the
output ends with REVIEW-SCOPE: PARTIAL (<n> file(s) excluded by the secret filter: <names>) and then the
overall REVIEW: line. The exit code does not change, but the excluded files were not reviewed: say so,
and never report the result as a full CLEAN.
Do not alternate providers on a schedule. The order is the owner policy (21 Oct 2026): agy Carbon,
then DeepSeek, then GLM (REVIEW_ORDER in oss_review.py). A named --provider goes first; on a provider failure
(HTTP 429, any 5xx, a timeout, a connection error, an empty reply) the tool moves to the next one in
that order and prints which provider gave the verdict. A provider with no key is skipped. agy runs
through caddis_spend.py run (usage log, time limit, depth guard; no spend cap); if it refuses (exit 75), agy is skipped. On a 429 the tool
waits for Retry-After once (at most 60 s); it never splits the diff because of a 429 or an empty
reply. A custom endpoint (--base-url/--model) never falls back. Name a provider only when you have
a reason.
Change the default. The first provider comes from --provider, then the process env REVIEW_PROVIDER, then
REVIEW_PROVIDER in ~/.caddis/keys.env, then agy (agy-carbon). The others follow in REVIEW_ORDER. To make DeepSeek the default again, add REVIEW_PROVIDER=deepseek to ~/.caddis/keys.env.
Pick the agy model. --agy-model <id> (or REVIEW_AGY_MODEL, in the env or in ~/.caddis/keys.env) sets the first agy model. The flag wins over the env, and the env wins over the keys file. The default is gemini-4-neon-high. A bad id exits 4.
REVIEW_AGY_FALLBACK is a comma list of agy models tried after the first one. The default is gemini-4-carbon-medium (owner decision, 20 Nov 2026). Neon high scored 1.5625 against Carbon medium 1.533, a tie. Neon high finished 20 of 20 runs; Carbon medium did not run in 4 of 20 and hit 429s. Neon high took 432 s against 782 s and costs USD 3/15 per 1M tokens against Carbon USD 4/20 from 1 Dec 2026. Report: .caddis/reviews/2026-11-19-neon-high-benchmark.md. An empty value (REVIEW_AGY_FALLBACK=) means none and beats the keys file. The tool moves to the next agy model on ANY failure of the current one: a quota error, an error status, a stall or a timeout. On a quota error (RESOURCE_EXHAUSTED, code 429, TPM quota) it prints agy <model> rate-limited (429); trying <next>. On any other failure it prints agy <model> failed (<reason>); trying <next>. A model that failed and has a next model is not called again in the same run. The last agy model is skipped for the rest of the run only after a quota error; after any other failure, the next batch tries it again.
A caddis_spend refusal or a missing agy skips agy and moves to the next provider. After the last agy model, the order goes on to DeepSeek and GLM. The "reviewed by" line names the agy model that gave the verdict. agy has a 5-minute stream idle timeout, and the tool has no way to lengthen it. Carbon high stalled on it; Neon high did not in 20 runs.
--range has
no changes, a same-vendor review refused (--author and the chosen provider share a vendor), or every provider
failed (429, 5xx, timeout, empty reply). Read stderr. A provider failure is not a verdict: re-run later.python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" review-tier --range <base>...HEAD (add --plan <plan> --phase <N> inside a plan; no TIER: line means tier 2).
Tier 0: gates only. Tier 1-small: your self-check only. Tier 1: one review by another vendor; stop at
the first CLEAN. Tier 2: one review by another vendor (two only when the owner asks). Fix blocking findings only;
park the rest. Re-review only the fix diff, and only when the fix changed logic. After 3 rounds, ask the owner.Area reviewers. review-tier also prints an AREA: line. For each name on it, dispatch that subagent once, at the end of the phase, after the tier review.
security-analyst: review git diff <base>...HEAD.sql-expert (or the reviewer set in [db_review] reviewer): it comes from the DB: line and runs in the DB DIFF step; its blocking findings are blocking. An ETL reviewer (data-engineer) runs only when the repo sets [db_review] etl_reviewer.
For the DB reviewer, run python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_gate.py" db-review --stage diff --print-brief and paste its output into the reviewer's prompt: it holds the SQL Server load checklist.ui-design-reviewer: give it the app URL from the phase exit gate, or the run command in .caddis/PROJECT-FACTS.md. If no app is running, write UI review skipped: no running app in the review file.critical or high severity are blocking. UI findings that break use or WCAG AA are blocking. Fix them under the same 3-round limit. Park all other findings in the parking lot.AREA: none: run nothing extra.A diff over the batch ceiling is split into batches. Each batch prompt lists every file in the change, so a batch does not report the others as missing.
.caddis/reviews/, never in .caddis/parking-lot/: that folder holds only items to do later, one item per file, type: parking-lot (/caddis:park).find, Get-ChildItem -Recurse, or any other filesystem-wide search to locate
oss_review.py. Check only the two paths above. On Git Bash under Windows, find / (or any
search rooted at /) walks every mounted drive, not just the repo — it can hang or take minutes.
If neither path exists, stop and report it; don't go hunting for the file.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
44 commands in this plugin
/add-rules/add-rules — add canonical rules to a folderCreate canonical rules for ANY folder — write <folder>/AGENTS.md (from the folder template) + a <folder>/CLAUDE.md @import shim. For folders the stack-map generator doesn't cover./catchup/catchup — where are we?Where were we? A quick list of what this session was doing and what is still open/cloud-phases/caddis:cloud-phases — run plan phases in the cloud, then take them backRun plan phases in Claude Code cloud sessions — write one prompt per phase, push, hand out paste lines, then take the PRs back/coordinate/coordinate — the coordinator session for one repoRun this session as the repo's coordinator — one merge queue for all sessions, one merge at a time, a deploy check after each merge, routine approvals in the ledger./data-lineage/data-lineage (deprecated): use /lldDeprecated: use /lld. Redirects to /lld, which publishes through caddis_confluence.py/decide/caddis:decide — record a decision, once, before it gets re-litigatedRecord a decision in one step — .caddis/decisions/<date>-<slug>.mdnpx claudepluginhub saajunaid/caddis-plugin --plugin caddis