agentleFS
dsaad68dsaad68/fuzzy-jev/skills/jev/SKILL.md

jev

Skill2 starsChanged 2 months agoMITView on GitHub

Ask Jev (TypeSafe's System One model, on OpenRouter's decisions endpoint) typed questions about a piece of text or an image and get probabilities back instead of prose — a Choice between named options, a Score on an ordered scale, or a Noul, the probability that something is true. Use when classifying, routing, triaging, labelling, rating, scoring or flagging text, especially many items against one set of criteria; when a judgment needs a confidence number to gate on rather than an opinion; when building a filter, moderation or triage step; or whenever the `jev` command, the `jev` crate or OpenRouter's decisions endpoint comes up — including when the user just says "sort these tickets", "score these reviews" or "which of these need a human?". Not for writing, summarizing or rewriting text — Jev only answers questions you define.

  • Reads credentials
  • Installs packages

36 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review and handoff.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    review

    Fixture review skill.

    Also in 5 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the decision is several answers combined ("raining and not hot → raincoat"), write it as rules rather than as jq arithmetic.

    line 123
  2. Very specific:

    Put the tie-break rule in the instructions ("route by what the sender is asking for, not by what happened to them"), and add an other …

    line 190
  3. Very specific:

    Read references/patterns.md when building a routing, triage or ranking step rather than asking a one-off question.

    line 195

“Common” is measured: kept by at least 6 in 10 of the 32 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Jev: typed questions, probabilities back

Jev doesn't write text. It reads a state and answers questions about it with probability distributions your code can act on. Every question sees the same state and is answered independently, so ask all of them in one call — an extra question costs a few tokens and almost no time.

TypeAsksAnswer
noulIs this true?noul: the probability of yes. No separate confidence — that is the answer.
choiceWhich one of these?choice, confidence, and probabilities for every option. 2–255 options.
scoreWhich level?score: the expected level, so it can fall between two; plus confidence and each level's probability. 2–10 levels, lowest first.

Ask

A question is ID=INSTRUCTIONS then |-separated criteria. Each flag repeats; answers print in the order written.

jev 'Our card was declined and the account is now suspended — nobody can get in. How do we pay the overdue invoice?' \
  --choice 'team=Which team should handle this? Route by what the sender is asking for, not by what happened to them.|billing:how the customer is charged or pays us|support:the product not working or not understood|security:who can get into the account' \
  --noul 'blocked=Is the sender blocked from working right now?' \
  --score 'urgency=How urgent is this?|No deadline|This week|Today'
team     billing  confidence 0.96  (billing 0.97, security 0.02, support 0.01)
blocked  0.89 yes
urgency  1.92 of 2, nearest "Today"  confidence 0.86
430 tokens in, 69 out, $0.000018, typesafe/jev-1.14-20261014
Flag
STATE / -f PATHThe state as an argument or from a file (- for stdin); stdin is read when it isn't a terminal.
--state-jsonParse the state as JSON, so questions can point at named parts.
-i PATHA PNG or JPEG in the state, after any text; repeatable. With one, stdin is read only for -f -. Not with --state-json.
--noul / --choice / --scoreA question, repeatable. Noul criteria: none, or |YES MEANS|NO MEANS. Choice: two or more NAME[:DESCRIPTION]. Score: two to ten levels, lowest first.
-q FILEQuestions from a JSON or TOML file (below) — the only way to use text containing |, or structured criteria.
-r FILEFuzzy rules over the answers (TOML, below): prints each outcome's score instead of the answers.
--graph / --svg PATHWith -r: draw the rules as a tree per rule in the terminal, or as an SVG rule-base diagram. Without a state, the structure alone and no call.
--json / --tableThe reply as JSON for jq (the fields jev knows, re-encoded); or a table. The default is one line per question.
-m IDAnother model. Default ~typesafe/jev-latest; jev model list prints every model OpenRouter offers now, with its context window, price, inputs and limits. respan/span-01, respan/span-01-lite and respan/span-01-lite:free are yes/no-only, and skip the middle of a state past about 3,000 tokens without saying so. nace-ai/drex-max takes at most 16 questions a call, parallel/decisions-fast:free 100 and morph/reflex 128. Quote a ~ id, or the shell may expand it.
--ollamaAsk a model Ollama runs on this machine instead, such as -m d1 or -m d1-omni (both read images). No key, no cost.
--dry-runPrint the request instead of sending it. Needs no key — check a question before paying for it.

Write a questions file

A -q file is JSON or TOML, and its questions are asked in the order written. A Choice's criteria maps option to description, a Score's is an array lowest first, a Noul's is optional {"true":…, "false":…}. In JSON it is an object of ids to questions:

{"team":    {"type": "choice", "instructions": "Which team?", "criteria": {"billing": "charges and invoices", "support": "the product misbehaving", "other": "neither"}},
 "urgency": {"type": "score",  "instructions": "How soon does this need an answer?", "criteria": ["No deadline", "This week", "Today"]}}

The same in TOML is a [[question]] table per question, with the id as name and the instructions as instruction (singular — instructions is an error there):

[[question]]
name = "team"
type = "choice"
instruction = "Which team?"
criteria = { billing = "charges and invoices", support = "the product misbehaving", other = "neither" }

[[question]]
name = "urgency"
type = "score"
instruction = "How soon does this need an answer?"
criteria = ["No deadline", "This week", "Today"]

A Noul's criteria are criteria = { true = "…", false = "…" }. TOML has no null, so a Choice's options without descriptions are a list of names: criteria = ["billing", "support"]. Quote dates ("2026-10-01"): a bare TOML date, nan or inf has no JSON form and is refused. A .json or .toml name says which format a file is; from stdin, text starting with { is JSON. Two questions with one name are refused.

Read

{"type": "noul",   "noul": 0.9}
{"type": "choice", "choice": "billing", "confidence": 0.79, "probabilities": {"billing": 0.86, "security": 0.12}}
{"type": "score",  "score": 1.98, "confidence": 0.97, "probabilities": {"0": 0, "1": 0.02, "2": 0.98},
                   "legend": {"0": "No deadline", "1": "This week", "2": "Today"}}

A Score's probabilities and legend are keyed by level number as strings; the reply also carries usage.cost in US dollars.

jev -f ticket.txt -q questions.json --json > reply.json
jq -r '.answers.team | select(.confidence > 0.6) | .choice'      reply.json
jq -r '.answers.urgency | .legend[(.score | round | tostring)]'  reply.json

Decide with rules

When the decision is several answers combined ("raining and not hot → raincoat"), write it as rules rather than as jq arithmetic. A rules file names answers as terms and combines them with fuzzy logic into a support score per outcome. It reads each probability as the degree its term holds, a modelling choice: a score is the policy's support, not a probability.

[terms]                       # lowercase names for answers
hot     = "temp.Hot"          # a Score level, by its exact text
humid   = "humidity.Humid"
raining = "raining"           # a Noul, by its id
# stormy  = "sky.storm"       # a Choice option

[[rule]]
if   = "raining AND NOT hot"  # AND OR NOT ( ), hedges VERY SOMEWHAT EXTREMELY INDEED — uppercase
then = "raincoat"

[[rule]]
if     = "VERY humid OR hot"
then   = "breathable fabric"
weight = 0.8                  # optional, 0–1
jev -f weather.txt -q weather.json -r wear.toml
raincoat           0.96  yes
breathable fabric  0.80  yes
threshold 0.50

AND is min, OR is max, NOT is 1 − x; rules with the same then are joined by OR. An item is a yes at or over [decide] threshold (0.5). --table adds the rules behind each score, and --json prints {"reply", "outcome"}. The file is checked against the questions before the call, so a term naming a level that doesn't exist fails for free, --dry-run included. Read references/patterns.md for [logic] (other ANDs and ORs), outputs, and how to design the rules.

For an amount rather than a yes/no ("how long to water"), declare an output and conclude in its sets. The value is the centroid of the clipped sets; it says where the support is, not how much, so check the sets' scores (printed beside it) before acting on it:

[output.irrigation]           # minutes of watering: the file has no units, so say it
range  = [0, 100]
short  = [0, 0, 20, 40]       # trapezoid a, b, c, d
medium = [30, 50, 70]         # triangle a, peak, c

[[rule]]
if   = "regular"
then = "irrigation IS medium"

To check the rules before trusting them, jev -q q.json -r rules.toml --graph shows every rule's tree with no call. With a state, it shows the number at every node, so you can see which rule decided.

Write criteria that decide something

Criteria exist for the cases that are nearly one thing and nearly another; the obvious ones answer themselves. Say what puts an item on each side of the line:

--score 'quality=How good is this review?|Bad|OK|Good'                       # the boundary is anyone's guess
--score 'quality=How useful is this to someone deciding whether to buy?|Says nothing specific — "great product"|Names one concrete thing|Names several, with the trade-offs between them'

Put the tie-break rule in the instructions ("route by what the sender is asking for, not by what happened to them"), and add an other option when the list may not cover every input.

Patterns

Read references/patterns.md when building a routing, triage or ranking step rather than asking a one-off question; it works each of these through with jev and jq.

  • Fan-out — ask every question you might need in one call, speculative ones included, and let your code pick what matters. They run in parallel, so extra questions barely cost anything.
  • Confidence routing — the answer says what, confidence says whether to act. Gate each action on a threshold matched to its stakes, and send the rest to a person.
  • Intent routing — classify cheaply first, then hand off to the right handler, instead of putting every request through an expensive model.
  • Composite scoring — score independent dimensions separately, normalize each to 0–1, weight them and sum. Adjustable, and the individual scores stay visible.
  • Fuzzy rules — -r: IF–THEN rules over the answers decide what to do, readable and editable by the person who owns the decision.

Many items

One call per invocation, so a batch is xargs:

ls emails/*.txt | xargs -P 8 -I{} sh -c '
  id=$(basename "$1" .txt)
  jev -f "$1" -q questions.json --json |
    jq -r --arg id "$id" "[\$id, .answers.team.choice, (.answers.team.confidence|tostring)] | @tsv"
' _ {}

Rows arrive as they finish, so sort if order matters.

Several images

Each image takes its own -i, in order, and every question sees all of them, so one call gives one answer across the set. For an answer per image, make one call per image, as above with jev -i "$1".

jev 'One parcel, from three sides.' -i front.jpg -i side.jpg -i back.jpg \
  --noul 'damaged=Is the parcel damaged in any of these photos?'

args=(); for photo in photos/*.jpg; do args+=(-i "$photo"); done   # a folder
jev "${args[@]}" --noul 'damaged=Is the parcel damaged in any of these photos?'

-i photos/*.jpg is wrong: -i takes one path, so a second file silently becomes the state's text and only one image is sent. Limits per request differ by model, and over one the whole request is refused: 4 for respan/span-02, nace-ai/drex-max and the cloudflare/clef models, 8 for Liquid's and Perplexity's, 16 for Baseten's, inception/mercury-decide and morph/reflex; Jev and openai/gpt-6-luna-decisions took 64, the most tried. Large photos hit the 32 MiB request limit sooner.

Gotchas

  • Jev sees only the state — not your files, not the conversation, not the question ids. Quote into the state everything it needs.
  • Images need a model that reads them. jev model list shows which: image among its inputs. One found to read text only is refused before any call. Jev itself refuses a side under 280 pixels or over 1568. Ask what is in an image rather than where it comes in the list: some models mix up which of two came second.
  • A Noul has no confidence field. Its probability is the answer.
  • A Score's score is an expectation, not an index. 1.98 of 2 is nearly the top level, but 1.2 of 2 may be a case between two levels or a split between distant ones ([0.4, 0, 0.6] also expects 1.2): read probabilities before rounding.
  • A Noul's probability is the answer. 0.01 is a confident no, and 0.5 is a real, uncertain answer, not a missing one.
  • Refused before anything is sent (so it costs nothing): a repeated question id, a Choice with under two options, a Score outside two to ten levels, an empty state, the state and -q both on stdin. Anything else is OpenRouter's own error.
  • Nothing else is validated. Jev will answer a badly-posed question with a confident-looking distribution. Garbage criteria, garbage answer.
  • Deciding one thing, once, with the context already in front of you? Just decide it. Jev earns its keep on many items against one set of criteria, not on a single judgment you are already making.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.