Plugin · jev · Opt-in

Typed judgments

Your agent asks a fast classifier before it reasons.

Opt-in

jev is opt-in: no workspace loads it until you add it. It needs no other plugin.

Once it is loaded, Claude Code uses it when the task calls for it, so you do not have to call it by name. To load it for one launch, or to leave it out of one launch once a manifest names it:

sc <project> <agent> --with jev
sc <project> <agent> --without jev

To keep it, add "$SC_PLUGINS/jev" to the plugins list in the agent's manifest (.claude/superclaude.toml), and delete that line to remove it. Or let the agent that edits manifests (--sc-agent) do it:

sc <project> <agent> --sc-agent "add jev to this agent"
Without it and with it
Without itWith it
You spend a reasoning-model turn on a question a person answers in a second.The agent asks jev first and reads how close the runner-up was.
A classifier hands back a bare label you can only branch on.Every answer carries its full probability distribution.
You cannot say later why a call came out the way it did.Every call is appended to a local spool before the answer prints.

jev puts the jev command on the session’s PATH and adds a prompt section that tells the agent it exists. jev sends a piece of text and typed questions to the Jev service and prints each answer with its probability distribution; the /jev:jev skill covers question design and thresholds.

Using it#

Write the config file once, then put your API key in its api_key line:

jev init

jev init writes ~/.config/jev/config.toml with a placeholder api_key and the defaults for every other setting, each section explained in comments, and never overwrites an existing file. Ask one question:

jev judge --state "Help! My payouts have been failing for 3 days." --question '{"type":"noul","instructions":"Does this convey urgency?"}'

jev prints one JSON object: an answer for each question, with the probabilities behind it. A noul question answers with a probability from 0 to 1.

With the prompt section loaded, the agent reaches for jev on its own. To design questions and thresholds with it, load the skill and say what you need: /jev:jev route these support tickets to billing, technical or account, and escalate anything the model is unsure about.

Do not use jev for reasoning, generation, exact lookup or arithmetic.

Which question type do I use?

Jev is not a chat model. You send a state and typed questions; it returns one answer per question with the distribution behind it.

Question typeUse it forThe answer
choiceone of a defined setthe option, a confidence, and probabilities over every option
noulwhether something is truea probability from 0 to 1, with no separate confidence
scorehow far along a scale of 2 to 10 levelsa probability-weighted position, which can fall between levels

A noul near 0.5 means both outcomes are equally likely. It does not mean “somewhat yes”. billing at 0.55 is a different finding from billing at 0.98, and only the distribution shows it.

When should the agent reach for jev?

The rule, published as when-to-use, is that a Jev call is the cheap check that decides whether the expensive one is needed. A call typically takes tens to a few hundred milliseconds. Before a reasoning model spends a turn on a question a knowledgeable person could answer in a second, the agent asks jev and reads how close the runner-up was. Use it to decide whether to call a reasoning model, and to check that model’s result; never for justification.

Every call is recorded so a judgment can be explained later. The jev-latest alias moves when the service ships a new model, so the record keeps both the model you asked for and the model that answered.

Set thresholds in a judgment file

--state takes text, @<file> or - for stdin, and --question is repeatable. Put anything with a policy in a file:

{
  "state": "Help! My payouts have been failing for 3 days.",
  "questions": {
    "category": {
      "type": "choice",
      "instructions": "Which team should handle this?",
      "criteria": { "billing": "Payments, refunds", "technical": "Bugs", "other": "None of the above" }
    },
    "frustration": {
      "type": "score",
      "instructions": "How frustrated is the customer?",
      "criteria": ["calm", "frustrated", "very angry"]
    },
    "urgent": { "type": "noul", "instructions": "Does this convey urgency?" }
  },
  "policy": {
    "floor": 0.6,
    "gate": {
      "category": [
        { "outcome": "billing", "confirm_at": 0.6, "act_at": 0.85 },
        { "outcome": "technical", "act_at": 0.6 }
      ]
    },
    "weights": [{ "id": "frustration", "weight": 1.0 }]
  }
}

Validate it first. --check sends nothing, and prints the question types and which questions the policy gated and weighted:

jev judge --check --file judgment.json
jev judge --file judgment.json

A judgment file has five top-level fields: _ (one comment), state, model, questions and policy. Any other key is a parse error. Each part of policy is optional:

  • No policy is a fan-out. You get the answers and read them yourself.
  • gate is confidence-gated routing. Each choice question gets rungs, one per outcome, with an act_at and an optional confirm_at.
  • weights is composite scoring. Each score is divided by its own levels - 1 before weighting, so a ten-level scale does not outweigh a three-level one. The output keeps every contribution.
  • One choice question with a gate is intent routing. The dispatch itself stays in your code.

A gate turns a confidence into one of three dispositions:

ConfidenceDisposition
below floorescalate
at or above act_atact
at or above confirm_at, below act_atconfirm
anything else, or an outcome with no rungescalate

act_at is required on every rung. To never act automatically on an outcome, leave it without a rung. The plugin’s examples/ folder holds a worked judgment file for each pattern, including 01-fan-out.json, 02-intent-routing.json, 03-confidence-gating.json and 04-composite-scoring.json.

Judge a whole dataset

Run a dataset with the same verb. Each line of rows.jsonl is one state, and the file supplies the questions and policy:

jev judge --file questions.json --states rows.jsonl --concurrency 8 > out.jsonl

Output is one JSON line per input line, in completion order, each with i, the 0-based index of the non-blank input lines. The output does not echo the row, so join on i: it is the row’s position among the non-blank lines of rows.jsonl, counting from 0. Keep the ids in the same order. A malformed row carries its own error and the run continues. Concurrency defaults to 1 and caps at 32. The service’s rate limit is per account, so an unbounded fan-out throttles everyone sharing the key.

--states takes a file, not a directory. Turn a folder of documents into rows first:

for f in drafts/*.md; do jq -cn --arg id "$f" --rawfile text "$f" '{id:$id, text:$text}'; done > rows.jsonl

Group a run’s records by exporting scope variables once. Every descendant process inherits them:

export JEV_SCOPE_COMPONENT=<caller>
export JEV_SCOPE_RUN=<run-id>

At the end of a pipeline, run jev flush to upload without waiting for the interval.

Read the output and the exit codes

Every command except help prints one JSON object on stdout, and a dataset run prints one per line. Diagnostics go to stderr, so a shell, Python or Go caller can pipe the output without filtering it. A gated call, abridged:

{
  "ok": true,
  "data": {
    "model": "jev-1.13.0",
    "answers": {
      "severity": {
        "type": "choice",
        "choice": "critical",
        "confidence": 0.9,
        "probabilities": { "critical": 0.92, "high": 0.08, "low": 0.0, "medium": 0.0 }
      }
    },
    "decision": {
      "gates": { "severity": { "outcome": "critical", "confidence": 0.9, "disposition": "act" } },
      "composite": null
    },
    "policy_error": null,
    "usage": { "input_tokens": 551, "output_tokens": 24 }
  },
  "metadata": { "recorded": true, "scope": { "session": "…" }, "questions": 1 }
}

answers is what the model said, keyed by your question ids. decision is what your policy made of it. metadata.recorded says whether the record reached the spool.

CodeMeaning
0ok
1the call failed on its first attempt, such as a rejected key or request; or every row of a dataset run failed
2bad arguments or a bad judgment file
3configuration, usually a missing API key
4the retries or the 30-second call budget ran out
6the answer came back but the record did not reach the spool

Wire up exit 6: it is the only signal that an answer has no record. A dataset run uses each line’s recorded field instead.

Check the setup and clean up

The service has one operation: one state and N questions in, one answer each out. So the CLI has one verb for it, jev judge. Fan-out, routing, gating and scoring are sections of a judgment file, not separate commands. The other verbs set up and inspect the tool:

CommandWhat it does
jev initwrites ~/.config/jev/config.toml with a placeholder api_key and the defaults for every other setting, explained in comments; never overwrites an existing file
jev statusprints the resolved configuration and the spool’s state; secrets appear only as set (<n> chars)
jev modelslists the models your key may name
jev flushseals the open spool segment and uploads now
jev gcdeletes the oldest uploaded batches beyond the keep count
jev daemon --onceruns one seal-and-upload pass and exits
How it works

jev judge sends one HTTPS request and prints one JSON object. A judgment file can add a policy that turns confidences into act, confirm or escalate. Every call is first appended to a local spool, which a background daemon can mirror to S3-compatible storage.

A failed attempt is retried with jittered backoff, up to 3 attempts by default, inside a 30-second budget for the whole call. A Retry-After from the service is honoured up to 120 seconds, and a clamp is recorded rather than applied silently. A 422 is never retried, because the request body is wrong and stays wrong.

Before jev prints an answer, it appends the record to the spool and fsyncs it. If the process dies between the two, the record survives and the answer is lost, which is the recoverable direction. The record holds the state, the questions, every probability vector exactly as returned, the requested and served model, token usage, the request id, and every attempt with its status and duration. A state over 64 KiB is stored as its SHA-256 with state_stored: "hashed". The API key is never written to a record.

The first call that finds no daemon starts one, detached from the caller’s terminal. The daemon seals the open segment into an immutable batch every 30 minutes, or sooner at 8 MiB. Beside each batch it writes a manifest with the batch’s SHA-256, record counts by component, run, session, outcome and served model, summed tokens, and how many records needed a retry. It uploads the batch when storage is configured. A failed upload stays sealed and is retried on the next pass. The daemon exits after four idle intervals, two hours at the default. If it cannot start, the call still succeeds and the record waits on disk.

What it needs
NeedsRequiredWhat for
A Jev API keyyesevery judge and models call; set api_key in the config file
Network access to the Jev APIyeseach judgment is one HTTPS request
bin/jevyesthe CLI; the release bundle ships it prebuilt for your platform
An S3-compatible bucket and credentialsnomirrors sealed batches; without one, records stay in the local spool
Rust toolchain (cargo, 1.85 or later)nobuilding from source, or installing jev outside the plugin

jev is on the session’s PATH while the plugin is loaded. To call it from your own scripts outside a session, use ~/.superclaude/plugins/jev/bin/jev, or build it and install a global copy into ~/.cargo/bin:

make -C ~/.superclaude/docs/judgments

make builds bin/jev and runs cargo install for the global copy. make install builds only the plugin copy.

Configuration

The system workspace loads jev when the plugin is installed; every other workspace needs it added. Use --with jev for one launch, or name it in the manifest to keep it. The API key is the only thing it needs.

Load jev per workspace in the manifest (.claude/superclaude.toml), and name its prompt section:

plugins = ["$SC_PLUGINS/jev"]
system_prompt = ["identity", "jev:when-to-use"]

The system workspace and --with render jev:when-to-use without being asked. jev is opt-in, so sc doctor does not expect every workspace to name it.

The tool reads $XDG_CONFIG_HOME/jev/config.toml, else ~/.config/jev/config.toml. jev init creates it with mode 0600. The environment overrides the file. The template’s comments say where to create a key, and jev status reads UNSET until one is set.

The file has four tables. The first holds the service settings: api_key, base_url, model (default jev-latest), timeout_secs (30) and max_attempts (3). Each has an environment override, listed by jev help. Pin a versioned model id such as jev-1.13.0 once you have tuned a threshold against it. The other three:

[spool]
dir = ""                  # empty means $XDG_STATE_HOME/jev, else ~/.local/state/jev
keep_uploaded = 200       # uploaded batches kept on disk

[upload]
enabled = false           # true, plus bucket and both keys, turns mirroring on
endpoint = "https://<s3-endpoint>"
bucket = "<bucket>"
region = "auto"
prefix = "judgments"      # objects land at <prefix>/<batch-id>.jsonl
access_key_id = "<access-key-id>"
secret_access_key = "<secret-access-key>"
interval_secs = 1800
max_bytes = 8388608

[scope]
component = ""
run = ""
job = ""
parent = ""

A half-filled [upload] does not fail a call. Mirroring stays off and jev status reports upload as DISABLED. It also lists keys it does not recognise, and warns when the file holds a credential and its mode grants group or other users any access.

VariableWhat it overrides
JEV_SPOOL_DIR[spool] dir
JEV_SPOOL_KEEP_UPLOADED[spool] keep_uploaded
JEV_UPLOAD_INTERVAL_SECS, JEV_UPLOAD_MAX_BYTES, JEV_PREFIXthe matching [upload] keys
AWS_ENDPOINT_URL_S3, AWS_REGION, BUCKET_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEYthe storage keys; enabled = true must still be in the file
JEV_SCOPE_COMPONENT, JEV_SCOPE_RUN, JEV_SCOPE_JOB, JEV_SCOPE_PARENTthe [scope] keys
JEV_SCOPE_SESSIONthe group id; minted per process when unset
JEV_SCOPE_LABEL_<KEY>adds a free-form label
JEV_DAEMON=offnever start the daemon automatically
JEV_RECORD=offwrite no records; a single call then exits 6

The daemon reads its environment when it starts, from the call that started it. Storage credentials that exist only in one shell’s environment reach it only if that shell started it. Credentials in the file always apply.

View as Markdown