Skip to content
Machine Learning
Skill

/jev-style-adopt

Find LLM API calls in a codebase that only return a decision (a category, yes/no, or a 1-5 rating) and move them to the local Jev-Style decision model safely - scan, pick candidates with the user, rewrite each as a typed noul/choice/score question with a confidence cascade back

From plugin
jev-style
1366 skills

Claude Code

$ npx -y skills add lawrence3699/jev-style --skill jev-style-adopt --agent claude-code

SKILL.md

jev-style-adopt.SKILL.md
name: jev-style-adopt
description: Find LLM API calls in a codebase that only return a decision (a category, yes/no, or a 1-5 rating) and move them to the local Jev-Style decision model safely - scan, pick candidates with the user, rewrite each as a typed noul/choice/score question with a confidence cascade back to the LLM, run in shadow mode, measure agreement with jev-style eval, then switch. Use when the user wants to cut LLM cost or latency for classification, routing, moderation, gating or scoring calls, or asks which LLM calls a small local model could replace.

Replace decision-only LLM calls with Jev-Style

Many codebases send a hosted LLM a prompt and then parse one word, a boolean or a number out of the reply. Those calls pay for text generation to get a label. Jev-Style answers the same question locally, in one forward pass, with a probability per option. This skill moves them over without changing behaviour blindly: **scan -> choose -> rewrite with a cascade -> shadow -> measure -> switch**.

Never delete the LLM path in the first change. Every step below is reversible.

1. Scan

python3 <this-skill-dir>/scripts/find_decisions.py path/to/src --json /tmp/decision_calls.json

It lists LLM call sites whose prompt or parsing looks decision-shaped (classify / "yes or no" / "respond with only" / rate 1-5 / enum or bool schemas / tiny `max_tokens` / `.strip().lower() == "yes"`) with a guessed type. It is a heuristic: read every hit. Drop calls that need generated text, world knowledge not in the input, multi-step math, or tool use.

2. Choose with the user

Show a short table: file:line, what it decides, guessed type, how often it runs (ask, or look for loops/queues), and what a wrong answer costs. Recommend starting with one high-volume, low-risk call. Confirm the server is running (`curl -s http://127.0.0.1:8765/healthz`; else the `jev-style-serve` skill).

3. Translate the prompt into a typed question

| LLM prompt pattern | Jev-Style question | |---|---| | "Classify into one of A, B, C. Respond with only the name." | `choice`, criteria `{A: desc, B: desc, C: desc}` (add `other` if the prompt allowed none) | | "Answer yes or no: does X ...?" / returns bool | `noul`, instructions = X as a **statement** ("The ticket asks for a refund."), optional `criteria.true/false` | | "Rate 1 to 5" / "low, medium, high" | `score`, criteria = the levels, **lowest first**, with short descriptions | | JSON with several such fields | one request, several questions about the same state |

Move instructions about *what to judge* into `instructions`/`criteria`; move the *input* into `state` (text or a JSON object with named fields). Put facts the prompt made the LLM compute (totals, dates, counts) into the state, computed in code.

4. Rewrite with a cascade and shadow logging

Keep the old function as `*_llm`. The new one asks Jev-Style first and falls back to the LLM when the model is unsure or unreachable. While shadowing, it also calls the LLM and logs both answers in the `jev-style eval` format. Python sketch (adapt to the codebase's language and HTTP client):

import json, os, time, httpx

JEV_URL = os.environ.get("JEV_STYLE_URL", "http://127.0.0.1:8765")
SHADOW = os.environ.get("JEV_SHADOW_LOG")          # e.g. logs/route_shadow.jsonl while measuring
THRESHOLD = 0.60                                  # replace with the value jev-style eval recommends
TEAMS = {"billing": "charges, refunds, invoices", "shipping": "delivery, delays, lost parcels",
         "returns": "exchanges, wrong item", "account": "login, password, privacy"}

def route(ticket: str) -> str:
    q = {"type": "choice", "instructions": "Which team should handle this support ticket?", "criteria": TEAMS}
    try:
        a = httpx.post(f"{JEV_URL}/v1/systemone", json={"state": ticket, "questions": {"team": q}},
                       timeout=5).raise_for_status().json()["answers"]["team"]
    except Exception:
        return route_llm(ticket)                   # server down: old behaviour
    confident = max(a["probabilities"].values()) >= THRESHOLD
    if SHADOW:
        llm = route_llm(ticket)
        with open(SHADOW, "a") as f:
            f.write(json.dumps({"state": ticket, "questions": {"team": {**q, "label": llm}},
                                "jev": a, "ts": time.time()}) + "\n")
        return llm                                 # shadow mode: production keeps the LLM answer
    return a["choice"] if confident else route_llm(ticket)

Make sure the LLM label is one of the option names (normalise case/whitespace; map unknown replies to `other` or skip the row; `jev-style eval` skips unreadable labels with a warning). Add a test that the new function returns the LLM result when the server is unreachable.

5. Shadow, then measure

Turn shadow mode on (`JEV_SHADOW_LOG=...`) in staging or production for enough traffic: at least a few hundred decisions per question. Then:

jev-style eval logs/route_shadow.jsonl --url http://127.0.0.1:8765

(`eval` ignores the extra `jev`/`ts` keys and re-asks the model, so the numbers reflect the current server.) Read **agreement with the LLM** (`acc`) and `automate @1% / 5% / 10%`: the share of calls the model can answer alone at that disagreement budget, and the confidence threshold for it. Agreement with the LLM is not accuracy: if the user can label a sample by hand, evaluate on that too.

6. Switch, gradually

Set `THRESHOLD` to the threshold for the error budget the user accepts, turn shadow mode off, and ship. Only calls above the threshold skip the LLM; the rest still use it. Report the expected share of LLM calls saved (= the automation coverage) and keep the shadow log option for re-checking after prompt or model changes. Never tune the threshold on the same rows you report as the final number.

Read more
@lawrence3699
Ships withjev-style

JevStyle: local decision models for AI agents. Classify, route and score with a probability per option. systemone-compatible local server, MCP tools, Claude Code guard. Open weights, Apache-2.0.

Stars on GitHub

Momentum

stars in total
136
Star history of lawrence3699/jev-style on GitHub, a chart by star-history.com

Other skills on jev-style.

jev-style-eval

jev-style-eval

Measure the Jev-Style local decision model on the user's own labelled examples before relying on it - accuracy, Brier, ECE, how…

jev-style-guard

jev-style-guard

Install the Jev-Style guard, a Claude Code PreToolUse hook that has a local decision model check every Bash, Write, Edit, Read,…

jev-style-mcp

jev-style-mcp

Connect the Jev-Style local decision model to an AI coding agent as an MCP server (tools decide, noul, choice, score, model_info)…

jev-style-serve

jev-style-serve

Install and start the Jev-Style local decision server (systemone-compatible API + Playground at http://127.0.0.1:8765) on macOS,…

jev-style

jev-style

Call the local Jev-Style decision model (systemone-compatible API, default http://127.0.0.1:8765) to answer typed questions about…

More skills from other plugins.

analyze-ci

analyze-ci

Analyze failed GitHub Action jobs. Takes one or more GitHub URLs (job, workflow-run, or PR) and summarizes each failure with root…

mlflow4d29k
@mlflow@mlflowInstall Skill
hf-cli

hf-cli

Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and…

skills2w11k
@huggingface@huggingfaceInstall Skill
feast-architecture

feast-architecture

Internals of the Feast codebase — how each component works, where the key abstractions live, and the data flow through the…

feast8d7.4k
@feast-dev@feast-devInstall Skill
add-ecosystem

add-ecosystem

Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model family from providers like Baidu,…

civitai5d7.3k
@civitai@civitaiInstall Skill

Questions about jev-style-adopt.

Which coding agents can use jev-style-adopt?
jev-style-adopt installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.