Codex Judge
One model reviewing its own (or a same-family sibling's) work inherits the same blind
spots that produced the bug in the first place — shared training data, shared
architectural habits, shared things it systematically doesn't think to check. This
skill gets a verdict from a genuinely different model family, structured to prevent
that judge from just rubber-stamping the implementer's own framing.
This is the formalized, rubric-scored version of Rung 4 in
verify-before-done. Use
advisor instead for an ad hoc second opinion on a plan or open
question — this skill is specifically for gating a post-review completion decision.
When to use this
- After a code review, before marking a non-trivial change approved.
- A reviewer's verdict is uncertain, contested, or the change is high-stakes (auth,
payments, data migrations, security-sensitive code).
- Skip it for trivial changes (typos, single-line fixes with no real judgment call) —
the overhead isn't worth it.
Instructions
Confirm cross-provider access, or degrade honestly. Check whether a
different-provider CLI is available and authenticated (e.g. which codex,
which gemini). If the implementer/reviewer used Claude, the judge must be a
genuinely different model family — a second Claude instance is not cross-provider,
no matter how "fresh" its context is. If nothing is available: skip the judge step,
let the reviewer's verdict stand alone, and say explicitly "judge: unavailable" in
your report. Don't silently drop this step.
Build the judge's input — and withhold what would bias it. Give the judge:
- the task spec / acceptance criteria
- the diff itself
- the reviewer's structured verdict and findings
- automated check results (tests, lint, types) if available
Do not give it: the implementer's reasoning, self-assessment, or any narrative
explaining why the change was made a certain way. That narrative is exactly what
anchors a judge toward agreeing with the implementer instead of evaluating the
artifact on its own terms. See references/judge-prompt-template.md for a
ready-to-use prompt built around this constraint.
Invoke it headlessly, with a fully self-contained prompt. The judge call has
no access to this conversation — everything it needs must be in the prompt (rubric,
diff, verdict, requested output format). Run it via whatever CLI is available
(e.g. codex exec "$(cat judge-prompt.txt)") and capture the structured response.
Score against this rubric — four dimensions, 1–5 each:
| Dimension |
What it measures |
| Correctness |
Does the change actually do what the spec asked, including edge cases? |
| Security |
Any new vulnerabilities, unsafe patterns, or weakened guarantees? |
| Maintainability |
Is the result clear, structured, and sustainable — not just working? |
| Spec compliance |
Does it satisfy the acceptance criteria, not a narrower interpretation of them? |
Ask the judge for an overall_score (aggregate 1–5) and a list of any critical
violations (security holes, data loss risk, silently broken behavior) separate
from the numeric score — a violation can sink an otherwise-high score.
Apply the decision matrix:
| Score |
Critical violation? |
Verdict |
Action |
| ≥ 4 |
No |
PASS |
Auto-approve |
| ≤ 2 |
— |
REJECT |
Auto-revise (spawn a fixer) |
| any |
Yes |
REJECT |
Auto-revise, regardless of score |
| = 3 |
No |
NEEDS_REVISION |
Reviewer's verdict is the tiebreaker |
If the judge and reviewer flatly conflict outside this matrix, prefer the reviewer
when the disagreement is about code-context nuance the judge couldn't see (it only
got the diff, not the live codebase); prefer the judge when it's flagging something
the reviewer's own verdict didn't address at all.
Report the verdict with the evidence, not just the label. State the per-dimension
scores, any critical violations found, and which action follows — don't just say
"judge approved it."
Reference files
references/judge-prompt-template.md — the self-contained prompt to send the
second-provider CLI, including the requested structured output format.
1---2name: codex-judge3description: Gets an independent, cross-provider score on a code review verdict — a different model family than the one that implemented or reviewed the change, scoring correctness/security/maintainability/spec-compliance from the diff and the reviewer's verdict alone, never the implementer's reasoning, and gates auto-approve vs. auto-revise on the score. Degrades gracefully when no second provider is available. Use after a code review and before approving anything non-trivial, or when a review verdict feels uncertain or contested.4---56# Codex Judge78One model reviewing its own (or a same-family sibling's) work inherits the same blind9spots that produced the bug in the first place — shared training data, shared10architectural habits, shared things it systematically doesn't think to check. This11skill gets a verdict from a genuinely *different* model family, structured to prevent12that judge from just rubber-stamping the implementer's own framing.1314This is the formalized, rubric-scored version of Rung 4 in15[`verify-before-done`](../verify-before-done/references/evidence-ladder.md). Use16[`advisor`](../advisor) instead for an ad hoc second opinion on a plan or open17question — this skill is specifically for gating a post-review completion decision.1819## When to use this2021- After a code review, before marking a non-trivial change approved.22- A reviewer's verdict is uncertain, contested, or the change is high-stakes (auth,23 payments, data migrations, security-sensitive code).24- Skip it for trivial changes (typos, single-line fixes with no real judgment call) —25 the overhead isn't worth it.2627## Instructions28291. **Confirm cross-provider access, or degrade honestly.** Check whether a30 different-provider CLI is available and authenticated (e.g. `which codex`,31 `which gemini`). If the implementer/reviewer used Claude, the judge must be a32 genuinely different model family — a second Claude instance is not cross-provider,33 no matter how "fresh" its context is. If nothing is available: skip the judge step,34 let the reviewer's verdict stand alone, and say explicitly "judge: unavailable" in35 your report. Don't silently drop this step.36372. **Build the judge's input — and withhold what would bias it.** Give the judge:38 - the task spec / acceptance criteria39 - the diff itself40 - the reviewer's structured verdict and findings41 - automated check results (tests, lint, types) if available4243 Do **not** give it: the implementer's reasoning, self-assessment, or any narrative44 explaining *why* the change was made a certain way. That narrative is exactly what45 anchors a judge toward agreeing with the implementer instead of evaluating the46 artifact on its own terms. See `references/judge-prompt-template.md` for a47 ready-to-use prompt built around this constraint.48493. **Invoke it headlessly, with a fully self-contained prompt.** The judge call has50 no access to this conversation — everything it needs must be in the prompt (rubric,51 diff, verdict, requested output format). Run it via whatever CLI is available52 (e.g. `codex exec "$(cat judge-prompt.txt)"`) and capture the structured response.53544. **Score against this rubric — four dimensions, 1–5 each:**5556 | Dimension | What it measures |57 | --- | --- |58 | Correctness | Does the change actually do what the spec asked, including edge cases? |59 | Security | Any new vulnerabilities, unsafe patterns, or weakened guarantees? |60 | Maintainability | Is the result clear, structured, and sustainable — not just working? |61 | Spec compliance | Does it satisfy the acceptance criteria, not a narrower interpretation of them? |6263 Ask the judge for an `overall_score` (aggregate 1–5) and a list of any **critical64 violations** (security holes, data loss risk, silently broken behavior) separate65 from the numeric score — a violation can sink an otherwise-high score.66675. **Apply the decision matrix:**6869 | Score | Critical violation? | Verdict | Action |70 | --- | --- | --- | --- |71 | ≥ 4 | No | PASS | Auto-approve |72 | ≤ 2 | — | REJECT | Auto-revise (spawn a fixer) |73 | any | Yes | REJECT | Auto-revise, regardless of score |74 | = 3 | No | NEEDS_REVISION | Reviewer's verdict is the tiebreaker |7576 If the judge and reviewer flatly conflict outside this matrix, prefer the reviewer77 when the disagreement is about code-context nuance the judge couldn't see (it only78 got the diff, not the live codebase); prefer the judge when it's flagging something79 the reviewer's own verdict didn't address at all.80816. **Report the verdict with the evidence, not just the label.** State the per-dimension82 scores, any critical violations found, and which action follows — don't just say83 "judge approved it."8485## Reference files8687- `references/judge-prompt-template.md` — the self-contained prompt to send the88 second-provider CLI, including the requested structured output format.