Skip to content

Judge

A ? Judge node reads inbound text and emits it on exactly one labeled out-port: pass, fail, or unsure.

It is routing, not a fuse. A circuit breaker aborts, skips, or parks. A Judge chooses a branch.


Without a multi-out branch, recipes stay linear plus stop conditions. Judge completes a small closed language with merge, parallelism, and park/splice gates: route by match, not evaluate an expression language.


  1. Inbound texts are joined (same as other single-in transforms).
  2. Matchers run in order. first hit wins.
  3. Only the winning out-port carries the text. Losing ports stay empty, so unwired or losing arms starve downstream.
  4. If nothing matches:
  • unsure (default): emit on out:unsure
  • park: pause like an approval / breaker park. After approve, emit on out:unsure
KindMeaning
containsSubstring match (case-insensitive by default)
regexJavaScript RegExp (multiline, case-insensitive by default)

Invalid regex patterns are skipped (non-hit), so a bad pattern does not abort the run.

There is no expression language and no LLM rubric in v1. Agent-free graphs still run.

HandleRole
out:passMatcher routed to pass
out:failMatcher routed to fail
out:unsureNo matcher hit (or park resolved)

Port display labels are editable on the card. The handle ids stay stable in graph JSON (type: "judge").


fail → fix → back to Judge as a raw cycle is still refused. For stage retry, drop a ↻ Until after Judge fail: counted re-entry (default max 3, hard cap 8), then out:exhausted. Reenter edges are ignored by topo. Not a free cycle. Pair with a spend ceiling or circuit breaker (graph lint will hint if neither is present).

Terminal window
threadle run until-reenter

Agent nodes expose a lower red error connector (out:err). After retries are exhausted, failure text emits there instead of aborting the run (when the handle is wired). Composes with Judge / fallback arms. Unwired err keeps the old halt / continueOnError starve behavior. See Agents and Errors.

Terminal window
threadle run agent-err-fallback

Tests → review / fix / human. Agent or prompt emits a report. Judge routes PASS to review, FAIL/ERROR to fix, anything else to unsure (or park).

Quality gate vs branch. Prefer a ‡ circuit breaker when the answer is “stop or continue on this wire.” Prefer Judge when the answer is “which of these three paths?”

Stage retry. Judge fail → Until → reenter implement → review again → Until exhausted → human / abort.


▶ Judge branch. Agent-free. Change the prompt to FAIL or shrug to see the other arms. ▶ Until re-entry. Agent-free convert loop, then exhausted. ▶ Agent err fallback. Happy-path out vs out:err (needs agent CLI. Fail to see the err arm).

Terminal window
threadle run judge-branch
threadle run until-reenter
threadle run agent-err-fallback