/decision-first:decision-firstfrom decision-first
Decision-first reflex: spot any step where code or an agent must make a bounded judgment about text or records, and try TypeSafe's Jev (System One model: typed Choice/Score/Noul answers with calibrated probabilities, fast, cheap) before an LLM prompt, a regex heuristic, or a manual pass. Use whenever work involves classifying, tagging, labelling, triaging, prioritising, sizing, scoring, rating, ranking, routing, filtering, deduplicating, matching, verifying, flagging, moderating, reviewing, or detecting anything about tickets, issues, beads, emails, documents, logs, records, tool calls, or PRs; whenever a loop over items needs a judgment per item; whenever an LLM is asked for JSON, a label, a yes/no, or to act as a judge; whenever an if/else depends on meaning; whenever the user says go through, sort into, which of these, is this a, should this, how bad, flag the, or needs a human; and whenever Jev, TypeSafe, or System One is mentioned. Every trigger and use is logged in ~/Workspace/decision-lab.
Ships in decision-first. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Jev is named after Jevons' paradox: make a resource cheap and people use far more of it. A typed decision from Jev is cheap and fast enough that the right instinct is to put one everywhere a program needs to judge rather than compute. The person you work for wants to learn where that instinct pays off, fast, across all of their projects. That only works if two things happen every time: the candidate step gets spotted while the work is happening, and the attempt gets written down in a form the next project can pick up and run. This skill exists to make both automatic.
Paths below are relative to this skill's directory. The lab (where logs and case write-ups
go) defaults to ~/Workspace/decision-lab; set DECISION_LAB to put it elsewhere.
The moment you notice a judgment step, say so to the user in one line before doing anything else, for example:
Jev candidate: tagging each ticket as waiting-on-a-person or not. Shape: detection (Noul) plus a Choice over the people it could be waiting on.
Do this even when you go on to decline it. Naming the candidate is what builds the habit, and the decline reasons are as valuable a record as the adoptions.
Look at each step in the task and ask: does code need to decide something about text or a record here, where the answer is not a lookup, not arithmetic, and not a regex? If yes, it is a Jev candidate. The shapes that fit, with the primitive to reach for:
| Shape | Reach for it when | Primitive |
|---|---|---|
| Classify | one known category should win | Choice, with an other option |
| Detect | you need the probability that a property is present | Noul |
| Score | the answer sits on an ordered rubric you can describe in situations | Score, 2-10 levels |
| Route | a category picks the next code path, model, handler, or person | Choice + confidence gate |
| Rank / rerank | items need ordering by relevance or quality | one Score or Noul per item, sort in code |
| Filter | keep or drop each item against a natural-language criterion | Noul per item |
| Verify | an artifact must be checked for named failure modes | one Noul per failure mode |
| Match / dedupe | do two records describe the same thing | Score with levels merge / unsure / distinct |
| Select / extract | pick the right span or value from candidates code found | Choice over candidates |
| Gate | is this action safe, done, on-task, or does it need a human | Noul + threshold in code |
Smells that mean you are already looking at one:
if "refund" in text, keyword lists, hand-tuned regexes that keep growing.The full trigger vocabulary and per-shape question templates are in
references/shapes.md. Read it when designing questions for a shape you have not done
before.
Jev 1.13 is literal, cannot count or do arithmetic, does not compare dates, weakens on
multi-hop indirection, degrades on large states full of irrelevant detail, and cannot
generate anything. It also does measurably worse than purpose-built classifiers on wide,
technical option sets (one team reported this on a 28-way log-type Choice). Send those
parts to code or to a generative model, keep the judgment part for Jev, and log the
trigger either way with the reason. Details and workarounds are in
references/jaggedness.md.
Work through these in order. Each one is short.
Announce the candidate in one line (above).
Design the questions. Rules that matter most, all learned the hard way by the first week of builders:
other, none, unspecified) and, when the
boundary is subtle, give options what / not_for / examples fields.`ticket.description`. Send only the fields the question needs.Try it on 5-20 real items before writing any integration. Use the runner:
python3 scripts/ask.py --questions questions.json --items items.jsonl --wrap item --out results.jsonl
It is stdlib-only, reads TYPESAFE_API_KEY, runs items concurrently, retries on 429,
and prints a per-question table plus tokens, cost, and latency. --dry-run shows the
request without sending it. Read references/api.md for the request shape if you are
writing the call yourself.
Measure. If any labels exist (an existing tag, a closed-reason, a human's earlier
pass), run python3 scripts/compare.py results.jsonl --labels labels.json and report
agreement per question. With no labels, eyeball the low-confidence tail: it is where
the question wording is wrong or the state is missing something.
Decide: adopt, decline, or park. Say which and why in one sentence.
Document. This is not optional, and it is the whole point of the exercise:
# every trigger, adopted or not
python3 scripts/lab.py log --project <repo> --shape <shape> \
--verdict adopted|declined|parked --task "<one line>" --why "<one line>"
# every adoption or real experiment: scaffolds a reusable case directory
python3 scripts/lab.py new <slug> --project <repo> --title "<title>" \
--shape <shape> --questions questions.json
new creates <lab>/cases/<date>-<slug>/ with a README from the template, the
questions file, a sample state, run.sh, and vendored copies of the runner so the
case runs standalone. Fill the README sections in: problem, why Jev, state shape, the
questions verbatim, how code composes the answers, results with numbers, verdict, and
how to re-adapt this for another project. That last section is what the next agent
reads first.
Report to the user: the verdict, the numbers, and the case path.
The lab is a corpus for learning, so write the README for a reader who has a different project and ten minutes. Lead with the reuse recipe. Keep the questions verbatim as JSON, because the option wording is the work. Record the versioned model id the API returned, the item count, agreement against any labels, tokens, cost, and p50 latency. If you tried two wordings, keep both and say which won and why. If Jev lost to something else, say what beat it. Put every threshold you chose in one place with the reason.
python3 scripts/lab.py index rebuilds <lab>/INDEX.md from the case READMEs, and
<lab>/LOG.md holds the one-line trigger log. Commit the lab after each case.
references/shapes.md: trigger vocabulary, ten shapes, question templates per shape.references/field-notes.md: what people shipped in the first 72 hours, and what did
not work. Read for ideas and for calibration on what to expect.references/jaggedness.md: the documented failure modes of jev-1.13 and workarounds.references/api.md: request and response shapes, limits, pricing, SDK snippet, curl..md to a docs URL for Markdown. TypeSafe's own agent skill
(claude plugin install typesafe@typesafe-ai) is worth loading for integration code.assets/case-README.md (opens in a new tab)references/api.md (opens in a new tab)references/field-notes.md (opens in a new tab)references/jaggedness.md (opens in a new tab)references/shapes.md (opens in a new tab)scripts/ask.py (opens in a new tab)scripts/compare.py (opens in a new tab)scripts/lab.py (opens in a new tab)scripts/prompt_hook.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub harrymunro/decision-first --plugin decision-first