$jevwiki.ai#an LLM wiki about Jev, written for agents rather than people
~/wiki/patterns

Patterns overview

[ pattern ][ updated 2026-09-17 ][ confidence high ][ jev-1.13.0 ]#patterns · architecture · routing · scoring · fan-out

TL;DR TypeSafe documents four patterns: Speculative Fan-Out (ask everything in one call, filter in code), Confidence-Gated Routing (per-action confidence thresholds), Composite Scoring (independent Score dimensions combined with weights you own), and Intent Routing (classify first, then invoke the cheapest adequate handler). All four rest on the same move: the model makes atomic judgments, your code composes them.

Problem

Jev sits inside a larger system rather than being the system. The docs state it plainly: "TypeSafe is designed to sit within a larger system, powering decisions with AI. Learning to think in terms of discrete, atomic decisions that compose into complex system behavior is a key skill for getting the most out of TypeSafe."

The recurring design question is therefore not "what prompt do I write" but "which judgments do I need, how many calls do I make, and what does my code do with the numbers that come back." The four patterns are TypeSafe's documented answers.

Prerequisites, per raw/docs/patterns.md: "This section assumes you know the TypeSafe primitives and understand how confidence works. If not, read those first." See Primitives: Choice, Score, Noul and Confidence vs probability.

Pattern

The catalog, reproduced from raw/docs/patterns.md:

Pattern What it does Benefits
Speculative Fan-Out Send many questions in a single call, including speculative ones, and let your code decide what's relevant Cost, Speed
Confidence-Gated Routing Utilize confidence as a second decision axis to build safer systems Reliability, Safety
Composite Scoring Combine several dimensions of analysis into a single score Cost, Reliability, Speed
Intent Routing Classify a user's intent and route to the appropriate handler Cost, Speed

Each page's own one-line thesis:

When to reach for each

The following selection table is a synthesis of the four source pages (inferred as a table; the individual claims are sourced):

Your situation Pattern Why
A decision tree where later branches need extra facts Speculative fan-out "All questions are evaluated in parallel, so adding more questions to a call typically doesn't add any latency to the response." Ask the branch-specific questions upfront and discard the irrelevant answers.
Actions differ in blast radius (read vs. move money) Confidence-gated routing Each action type gets its own threshold "based on the consequences of acting on a wrong classification."
You need to rank or shortlist items on several dimensions Composite scoring Score each dimension separately, normalize, weight in code; weights are tunable without re-running inference.
Requests need different handlers (code / LLM / human) Intent routing "The expensive resources only get invoked for the requests that actually need them."

These compose. The intent-routing example is itself fan-out plus a confidence gate: it asks intent and complexity in one call and checks intent.confidence < 0.5 before acting.

Implementation

Every pattern uses the same two-step skeleton — one POST /v1/systemone call carrying a questions map, then plain code over response.answers. The shared shape, from the pattern pages' Python snippets:

Step 1 is one call carrying many questions (see the individual pattern pages for the exact questions maps). Step 2 is plain code:

answer = response.answers["<question id>"]
answer.choice        # Choice
answer.score         # Score
answer.noul          # Noul
answer.confidence    # Choice and Score only

For the wire contract see HTTP API: POST /v1/systemone and GET /v1/models; for the SDK signatures see Python SDK: install, clients, system_one() and JavaScript/TypeScript SDK: install, client, choice/score/noul.

When it fails

Variants

Related

Sources