Smart Mechanics: the Judge Uses
The smart mechanics are the places where the repository's own scripts used to get a judgment wrong with a regex or a fixed rule: matching a repeated finding class, scoping a review, spotting a duplicate section, matching a park to its answer and telling a loop from a wait. Each one is a deterministic script that asks the Conclave judge one narrow question and decides for itself. They were built in Smart mechanics: dispatcher gates and the judge uses from the operator's handover of 2026-11-28.
How does a use call the judge?
Through scripts/mechanics.py. ask(use, question, evidence, schema) runs the judge by path ([mechanics] judge in the untracked .conclave/local.toml, else CONCLAVE_JUDGE), with the request on standard input, in its own process group under a deadline. It returns the answer when the judge exits 0 or 3 and it matches the schema; anything else returns None and the caller keeps its behaviour without the judge. Exit 3 means the judge answered from the subscription fallback for the first time, and the caller posts one Heliograph note.
The judge itself is Conclave-SDK's global/mechanics/judge.py: Opus 5.5 at effort medium, a cache keyed by the request, a spend ledger and a subscription fallback at $180 (todo/answers.md Q67). Its key lives in ~/.conclave/secrets/anthropic-mechanics.env; nothing in this repository reads or passes a key, and ask() gives the judge only the environment it needs to run (mechanics.JUDGE_ENV: path, home, locale, temporary and XDG directories), so no credential the caller holds, such as the run's alert URL, reaches it.
The judge's output is drained through pipes while it runs, never written to disk: past OUTPUT_LIMIT (no answer is that long) or the deadline, its whole process group is killed at once. Callers bound their judge time: deadline= shares one budget across several calls, the dispatcher's gate subcommands each get review_gates.GATE_BUDGET_SECS (90 s, while it holds the section lock), the commit hook's duplicate check todo_judge.DUPLICATE_BUDGET_SECS (60 s for every section a commit adds, with one roadmap index built per commit), and the heartbeat's loop question loop_detect.JUDGE_SECS (150 s, inside its 300 s tick). A cached answer returns at once; a call cut off by its budget is a failed call, so the caller keeps its behaviour.
Every use also passes accept=, its check of the whole answer against what it asked (indices inside the request, one entry per item, names that are not blank); an answer it does not accept is a failure like any other, so no caller acts on part of an answer.
Evidence is excerpts only. excerpt() and lines_excerpt() cap what they carry, and check_request() refuses a request with an excerpt over 6,000 characters, more than 40 excerpts, or an excerpt that is a whole repository file.
When does a use act?
Only after its replay passes. .conclave/mechanics.json records, per use, {"replay": "passed", "evidence": "<path>", "at": "<date>"}; until a use is recorded there, it logs what it would have done (.claude/state/mechanics-report.jsonl, or the reviews directory for the dispatcher's gates) and changes nothing. Every decision a use reaches is logged with acted: true|false, and python3 scripts/mechanics.py --status reads the acting record and both logs and says, per use, whether it acts, how often it acted and how often it only reported. python3 scripts/overnight/replay/mechanics/replay.py <use> --record runs a replay on this repository's history and records a pass; each replay writes its evidence beside the script. Cadence's oliver_mechanics job reads the same record to roll the uses out to the other repositories.
| Use | Where | Judge | What it does once it acts |
|---|---|---|---|
one-pass |
scripts/codex-dispatch.sh |
no | refuses a pass while another pass of the section runs (a lock held for the pass), and a creditable same-kind pass on an identical candidate unless the prompt carries rejected: |
design-gate |
dispatcher and commit gate | no | refuses a round, and the stamp, while the section's newest design from the Conclave Antigravity design hook has no plan pass that ended below blocking |
spiral-detector |
dispatcher | yes | refuses the next round when a blocking finding sits in lines the previous fix added and repeats an earlier finding class, until a clean plan pass opening Redesign of: <trigger> |
review-scope |
dispatcher | yes | puts a threat model and the rejected-classes list after the marker line of each pass's prompt; never removes a lens or a file |
duplicate-section |
scripts/todo-staged-check.py |
yes | warns when a new ## N. section looks like an existing one, in any state or domain; never refuses |
park-matcher |
scripts/overnight/stale_parks.py --match-answers |
yes | proposes the awaiting-answer (Qn) stamp edit for a Deferred park the judge matches to a recorded decision; the session that owns todo/ applies it and the triage oracle's exact rule opens the park (the fixpoint refusal on closed parks points here). The script never writes a roadmap file |
loop-detect |
scripts/overnight/heartbeat.sh |
yes | nudges a busy run session that has itself run for 45 minutes with no commit, receipt or roadmap change and that the judge says is repeating, naming the loop; only the session and pane the judge looked at receive it, and tmux types it only if no writable client shows that pane and its input is on |
The worker diff pre-read for the Orchestrator (handover use 4b) waits for the Claude Orchestrator switch.
What does the dispatcher record?
Every pinned receipt now carries dirty_paths (a JSON array of what differed from HEAD at launch) and dirty_overflow. A plan pass may carry design_sha256 (the dispatcher hashes the hooked design itself and points the reviewer at a snapshot of those bytes), redesign_of and inherit_base. A redesign plan, and a hooked design plan after the section's first plan, keep the section's start (review_pin.plan_start), so a late plan never shrinks the range the next pass reviews. Receipts written before the checkout moved to ~/impossible/OS name their transcripts by the old path; review_pin.resolve_log finds them in this checkout's reviews directory.
How does the spiral detector decide?
Statelessly, at every round dispatch: it takes the newest reviewed head, the previous reviewed head that is its ancestor, and the blocking findings of the newest head's receipts in lines that fix added (git blame). The judge sees those findings in batches cut at finding boundaries and every earlier finding of the section (with a short excerpt of its description, in groups when there are many), and answers positionally: entry i of repeats and classes answers new finding i. A valid answer naming a repeat refuses the round with a trigger id <receipt jobId>#<version>, the version a digest of the matched findings (receipt and ordinal, never the judge's wording); a clean plan pass whose body opens Redesign of: <that id> clears it. Nothing is stored: the decision is made again from the receipts each time (the judge's cache makes a repeat free), and any failure (an unreadable input, a git error, a failed or invalid judge answer) admits the round, as before the gate existed.
It is report-only since 2026-11-29: on receipts that read commits, one repeat in last-fix lines fired in three of five converging chains, so its threshold is open work (the stateless spiral detector and section 76's missing passes). A stored-trigger design was built first and replaced on 2026-11-29: its state (triggers, re-judging on late receipts, migration, locking) drew eighteen plan passes of findings in its own machinery.
What happens near the pass cap?
From three passes before the section's cap (17 of 20, or 52 of 55 on the kernel and boot tier; review_gates.endgame_at) the new refusals step aside and the existing cap rules own the section (todo/answers.md Q70). A wave runs one pass at a time (the review loop, Q68).
What can these not do?
- The spiral detector blames committed lines only: a finding on a path that was dirty when its pass launched is not attributed.
- The spiral detector judges only the newest reviewed head: a clean pass on a newer head admits the round even if the head before it repeated a class (the serial wave runs the round first, so this needs a writer off the procedure).
- The judge never reviews: no use writes a receipt, counts toward a cap or stands in for an Astra pass, and none grades, sorts or drops a finding.