npx juror-ai review --pr 1234
N frontier models review your PR in parallel, each through its own native agent harness. Reports about the same defect collapse into one. Every review prints its own receipt.
Three steps, about two minutes. No app to install, no account to create, no repository index to build — it runs on your own GitHub Actions runner, and your code never leaves it beyond the model API call itself.
1 — Drop in the workflow. Save this as .github/workflows/juror.yml
:
name: Juror
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 } # full history: review policy is read from the base revision
- uses: juror-ai/juror@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
JUROR_OPENAI_API_KEY: ${{ secrets.JUROR_OPENAI_API_KEY }}
JUROR_ANTHROPIC_API_KEY: ${{ secrets.JUROR_ANTHROPIC_API_KEY }}
JUROR_XAI_API_KEY: ${{ secrets.JUROR_XAI_API_KEY }}
JUROR_FIREWORKS_API_KEY: ${{ secrets.JUROR_FIREWORKS_API_KEY }}
2 — Add at least one provider key. Settings → Secrets and variables → Actions, or from your terminal:
gh secret set JUROR_OPENAI_API_KEY # one key is enough to start
gh secret set JUROR_ANTHROPIC_API_KEY # every extra key adds another juror
Issue Juror its own provider key rather than reusing an existing one. Review spend then
appears as its own line in provider billing, and you can rotate or cap it without touching
anything else you run. The unprefixed names (OPENAI_API_KEY
, …) still work as a fallback, so an existing install keeps running; a prefixed key wins when both are set.
Any key you leave out is skipped with a note in the receipt. One key gets you a working single-model review; four gets you the full jury. Degrade, never fail.
3 — Open a pull request. Juror posts a sticky Juror is reviewing… comment right away, then replaces it in place with the findings, the merge score, and the bill.
That's the whole setup — .juror.yml
is optional, and every default is listed under Configuration.
Want to try it on a real PR before committing a workflow file?
Same binary, same code path, nothing posted unless you ask:
export JUROR_OPENAI_API_KEY=…
npx juror-ai review --pr 1234 --repo owner/name # prints to your terminal
npx juror-ai review --pr 1234 --repo owner/name --post # ...and posts it
Single-model PR bots have three problems, in order of how much they cost you:
Blind spots. Every model misses different bugs.Duplication. Multiple reviewers often describe the same defect in different words.Opacity. You pay per seat or per PR and never see what the inference actually cost.
Juror runs several models, uses code-aware similarity plus a conservative referee to
deduplicate reports about the same defect, and defaults to high recall: every unique
eligible finding is shown. Teams that
prefer fewer, higher-confidence findings can switch review.publish_mode
to consensus
and use model agreement as a precision filter.
And there is no index and no SaaS. A coding agent doesn't need a prebuilt semantic index: the supported agent harnesses all ship repository read/search tools and will go inspect the callers of the function you changed. You get repo-wide context for the price of a few tool calls, with zero indexing infrastructure, zero staleness, and no code leaving the runner beyond the model API call itself.
Non-goals. Not an autofix bot. Not a linter (yours is better and free). Not a chat interface. It reviews a diff and posts findings.
Each model gets the diff, its own private scratch directory, and read-only access to a clean detached checkout. Their findings then go through five lossless merge stages — cheapest first, with a model call only for possible semantic duplicates:
Anchor*(free)— snap every finding to a line the diff actually adds or modifies. Findings landing outside the diff are reported separately, never silently dropped.Block(free)— group by file, then by overlapping line window.Exact collapse(free)— normalized identical reports, or identical structured trigger/mechanism/consequence/fix claims, collapse without inference.Similarity + referee(cheap)— weighted prose/symbol similarity nominates possible duplicates. A small call per block merges them only when the faulty mechanism and fix match and their affected behavior substantially overlaps; extra entry points or effects in one report do not make the same bug new. A malformed partition is retried once, then fails open to separate findings so deduplication can never hide a report.Coverage audit(free)*— prove every raw atomic finding belongs to exactly one final published or explicitly suppressed result. Any accounting failure discards the merge decisions and falls back to lossless singletons.
In consensus
mode an additional verify stage runs: eligible P0/P1 and eligible single-model findings get an adversarial refutation pass. The verifier is asked to refute, and defaults to refuted when the evidence isn't clear.
One sticky summary comment, and inline comments delivered as a single batched review — one notification, not twelve. Roughly:
Adds SSE
event: error
detection to the reasoning stream so mid-stream provider failures retry instead of ending the turn as a silent success.
Model votes: GPT-5.6 Terra4
· Grok 4.55
· Kimi K34
→ median4, capped at4.5by 1 confirmed P2.
Severity Location Finding Agreement 1 P1 src/stream/parse.ts:212
Error branch leaves the reader unlocked ●●●
3/32 P2 src/stream/parse.ts:424
Same swallow pattern not ported to the sibling class ●○○
1/3## 2 findings suppressed — below severity floor
Location Finding Raised by Why suppressed src/stream/parse.ts:387
chunks_emitted
hardcoded on error eventsGPT-5.6 Terra, Kimi K3 below severity floor
💸 This review cost $0.91· 3 models · 2m14s
Model Harness Input Cached Output Cost Source GPT-5.6 Terra
Codex 39.8k 12.1k 8.9k $0.34 estimated Grok 4.5
Grok Build 40.1k 0 5.2k $0.38 reported Kimi K3
Kimi Code 42.0k 10.0k 4.2k $0.19 estimated referee (1 call)
opencode — — — $0.0011 reported Total122k22.1k18.3k$0.91
Plus a file-by-file overview and an optional sequence diagram of the changed flow.
With --post
, Juror immediately creates one sticky Juror is reviewing… comment with an animated working indicator and a short progress checklist. The finished summary replaces that same comment in place; failed runs replace it with a terminal error state instead of leaving a spinner behind forever.
The workflow file is in Add it to your repo above. Beyond
github-token
, every Action input is optional: preset
, models
, config
,
cost-target-usd
, post
(set false
for a dry run), and pr-number
. They are documented with their defaults in action.yml.
The same binary, the same code path, no CI-only surprises:
npm i -g juror-ai
juror review --base main # review your working branch
juror review --pr 1234 --repo owner/name # review a PR, print to the terminal
juror review --pr 1234 --repo owner/name --post # ...and post it
Put your keys in a .env
beside the repo (it is loaded automatically and never committed). Juror copies only committed/staged/tracked working changes into a detached model checkout, so this untracked file is not inside any reviewer read root:
JUROR_ANTHROPIC_API_KEY=…
JUROR_OPENAI_API_KEY=…
JUROR_FIREWORKS_API_KEY=…
JUROR_XAI_API_KEY=…
Juror drives each model through its native agent harness, so each one greps your repo the way its vendor intended.
| Harness | CLI | Models | Reports cost | Sandbox |
|---|---|---|---|---|
claude-code |
||||
claude -p |
||||
| any Anthropic model | ✅ total_cost_usd |
|||
| tool removal | ||||
codex |
||||
codex exec |
||||
| any OpenAI model | ❌ → estimated | split filesystem profile (kernel) | ||
opencode |
||||
opencode run |
||||
| anything on | ||||
cost
grok-build
grok -p
total_cost_usd
kimi-code
kimi -p
generic-openai
*(in-process)*The opencode
harness is the reason adding a model is a config edit rather than a PR. To add DeepSeek V4 Flash to your jury:
models:
- id: deepseek-v4-flash-0731
harness: opencode
harness_model: fireworks-ai/accounts/fireworks/models/deepseek-v4-flash-0731
pricing_key: accounts/fireworks/models/deepseek-v4-flash-0731
secret: JUROR_FIREWORKS_API_KEY
args: { variant: high }
Juror ships four jury presets. Models whose provider key is unavailable are skipped, so
ultra
means every built-in model that can actually authenticate on that runner.
| Preset | Jury | Intended use |
|---|---|---|
fast (default) |
||
GPT-5.6 Luna via Codex/OpenAI (high ) · DeepSeek V4 Flash via opencode/Fireworks (high ) |
||
| Smallest, cheapest jury | ||
balanced |
||
GPT-5.6 Terra via Codex/OpenAI (max ) · Grok 4.5 via Grok Build/xAI (high ) · Kimi K3 via Kimi Code/Fireworks (max ) |
||
| Strong provider diversity without the full burn | ||
high |
||
GPT-5.6 Sol via Codex/OpenAI (high ) · Opus 5 via Claude Code/Anthropic · Grok 4.5 via Grok Build/xAI (high ) |
||
| Higher-confidence frontier jury | ||
ultra |
||
| Every model from the other presets (seven total), using their higher reasoning settings | Maximum coverage; highest token and cost use |
Select one in config, on the CLI, or in the Action:
juror review --preset fast --base main
juror review --mode ultra --pr 1234 --repo owner/name
- uses: juror-ai/juror@v1
with:
preset: high
.juror.yml
lives at the repo root. Every key is optional; the defaults are what you see below.
version: 1
preset: fast
consensus:
min_agreement: all # all (literal unanimity) | majority | <number>
verify_solo_findings: true # adversarially refute eligible solo findings
review:
publish_mode: all # all (higher recall) | consensus (higher precision)
severity_floor: P3 # include every severity by default
max_inline_comments: 15
paths_ignore: ["**/*.lock", "dist/**", "**/*.generated.*"]
budget:
target_cost_usd_per_pr: 5.00 # planning target; actual spend remains in the receipt
on_exceed: partial # affordable subset | skip
output:
sequence_diagram: true
cost_receipt: true
suppressed_findings: collapsed # collapsed | hidden | inline
An explicit models:
list replaces the preset completely and creates a custom jury; it is
never merged with built-ins. --models a,b
is different: it only narrows the selected preset
or custom jury for one run. --preset
and its --mode
alias override the config selection.
Publication is controlled independently from deduplication.
publish_mode: all
*(default, higher recall)*publishes every unique cluster at or aboveseverity_floor
(also P3 by default). Agreement is still shown, but it does not hide a finding.publish_mode: consensus
*(higher precision)*applies the configured agreement and verification rules. The defaultconsensus.min_agreement: all
means every model must raise the finding.
With min_agreement: all
, publication requires literal unanimity. If users deliberately
choose majority
or a numeric threshold, serious findings retain the safety exceptions:
publish if agreement >= configured min_agreement
or (agreement >= 2 and severity in {P0,P1})
or (agreement == 1 and severity in {P0,P1} and survived refutation)
Anything filtered out lands in the collapsed suppressed block with the reason. Nothing is thrown away — that transparency is what makes the optional precision filter trustworthy.
Replacement decisions can be evaluated with a manually adjudicated corpus:
juror benchmark --file benchmarks/platform-10359.json
The report compares P0–P2 recall, overall recall, precision, duplicate rate, measured cost, and latency for every reviewer. See the benchmarking protocol; the bundled PR #10359 case is a seed, not a sufficient replacement benchmark by itself.
Not a model opinion — a deterministic function of published findings, with the votes shown so the arithmetic is auditable.
base = median(each model's self-reported merge confidence)
penalty = 2·P0 + 1·P1 + min(1, 0.5·P2) (confirmed, published findings only)
score = clamp(round(min(base, 5 - penalty)), 1, 5)
min(base, 5 - penalty)
is the load-bearing part: models cannot vote away a confirmed blocker, and a clean diff still can't reach 5 if the models were individually unsure.
The differentiator, and the thing that must never be wrong.
Never fabricate. Every figure is labeledreported
(provider-computed) orestimated
(tokens × list price). A harness that returns neither prints, and the total is marked as a lower bound. We do not guess.unknown
Long-context tiers are cliffs, not slopes. GPT-5.6 Sol reprices theentire requestat 2× input above 272k tokens; Grok 4.5 does the same above 200k. A flat per-token config silently underbills exactly the large-diff reviews that cost the most. When a harness only exposes aggregate multi-turn usage, Juror reports the standard-tier subtotal as a lower bound instead of guessing which individual requests crossed the cliff.Cache writes are not free. On GPT-5.6 and later they bill at 1.25× the uncached input rate. Anthropic bills them too. Juror models a review as write-once, read-many: the first model to see a diff pays the write premium, and re-reviews on later pushes get cheap.Codex Normalizing naively overbills a cache-heavy Codex run by up to an order of magnitude. There is a regression test pinned to a realinput_tokens
includes cached tokens; Claude's and opencode's do not.turn.completed
payload for exactly this. A Codex turn can contain several provider requests, so its aggregate is never treated as one request when deciding whether a long-context price cliff applies.Kimi K3 runs through Fireworks. Kimi Code exposes token usage but not provider USD, so Juror multiplies those measured tokens by the versioned Fireworks list price and labels the rowestimated
.
src/cost/pricing.json
is versioned, dated, and every entry carries a source URL.
budget.target_cost_usd_per_pr
is deliberately a planning target, not a promise that every
provider can enforce a hard cap. Juror estimates only models whose keys are present and, in
partial
mode, runs the subset estimated to fit. Claude also receives a native spend limit. Actual usage can still cross the target on providers without that facility; the receipt and review warnings report the overage instead of relabeling the estimate as a ceiling.
This is a bot that pipes attacker-controlled text into an agent and then writes to your PR. It is designed for that.
No model process ever sees Every child environment is rebuilt from an allowlist with exactly one provider credential. Publishing starts only after all jurors exit. Prompt injection can at worst produce a bad review comment — never a push or merge.GITHUB_TOKEN
.Default trigger is Fork PRs get no secrets and no review, by design.pull_request
, notpull_request_target
.The repository is read-only to every juror. Codex uses a kernel-enforced split filesystem profile that exposes only runtime files, the sealed checkout, and Juror scratch; its model-controlled shells inherit no process environment or shell snapshot, so the provider credential remains available to the Codex client but not to commands it runs. Claude, Grok Build, opencode, and Kimi receive read/search tools only. Generic OpenAI resolves symlinks and may write only one exact report path outside the repository. Claude, Codex, and Kimi start from private temporary directories so PR-controlled hooks, MCP, settings, andAGENTS.md
are not auto-loaded. Every run reads a detached checkout that excludes untracked operator files such as.env
; after trusted base policy is loaded, Juror also removes the worktree's pointer back to credential-bearing git metadata. A workspace guard remains as defense in depth for direct library callers.Keys are passed per harness, never to all of them. Each model process gets an environment containing only its own provider key.** Injection is a finding.**Each model is told the diff is untrusted data and to report embedded instructions as a P0. Several independent models make a uniform injection substantially harder.Repository rules come from the base revision. Juror places the rootAGENTS.md
and every applicable nestedAGENTS.md
directly in reviewer and verifier prompts. A PR can update those files for future work, but cannot rewrite the policy used to review itself. If the base object is unavailable locally, Juror warns and refuses to treat any workspace copy as policy; use a full checkout (fetch-depth: 0
) so the trusted rules can be loaded. The GitHub PR title and description are also included as explicitly untrusted intent context, so reviewers can recognize documented staged migrations without treating author claims as proof or executable instructions.Execution configuration also comes from the base revision. A pull request cannot redirect a provider endpoint, selectGITHUB_TOKEN
as a model secret, or enable a new harness while it is being reviewed. If the base object is unavailable, secure defaults win.Everything posted is redacted for secret-shaped strings first.
- Cost for Codex is
estimated, not reported — the CLI exposes tokens but no dollar figure. - Cost for Kimi Code is
estimated from its private session usage records and the versioned Fireworks rate. If those records are unavailable, it falls back to
unknown
. - Grok Build's headless JSON shape is parsed defensively and marked
unknown
when the fields aren't there, rather than guessed at. - Agreement filtering needs ≥2 models to mean anything. With one key configured, the default all-findings mode still gives you a complete single-model review and an honest receipt, but there is no cross-model precision signal.
- Findings anchored outside the diff are surfaced in the summary but not posted inline, because GitHub can't attach them.
- The spend target is estimate-based for providers without native budget enforcement. Actual spend is always shown and can be slightly higher than the target.
- The 30-day rolling receipt is shown only when Juror has persistent local/self-hosted state; GitHub-hosted runners omit it instead of presenting a one-run ledger as a monthly total.
npm ci
npm run typecheck
npm test
npm run build
node dist/cli.js review --base main
Layout follows the pipeline: src/diff
→ src/harness
→ src/merge
→ src/cost
→
src/render
→ src/github
. src/types.ts
is the only shared vocabulary.
Juror reviews its own pull requests. Every PR in this repo carries a public cost receipt.
MIT.