Skip to content
Rogerio Lima
ContactPortuguês

· AI · 3 min read

Claude Code + Jev: the agent writes, Jev decides

Jev can't run in place of Claude Code's model. What you can do is teach the agent to write correct Jev calls, and that's what this post shows.

Source: How to use Jev with Claude Code, Codex and Cursor (Flavio Copes)

turned on monitor displaying programming language
Photo: Pankaj Patel · Unsplash

Claude Code is where I spend my day: it reads the repository, writes code, runs the tests and opens the PR. Jev, from TypeSafe, does something else. It takes your application's state and a list of typed questions, and returns probabilities. It doesn't generate text, call tools or edit files.

A lot of people start by trying to swap Claude Code's model for Jev. That can't work: Claude Code speaks Anthropic's Messages API, and Jev has a single endpoint, POST /v1/systemone, with nothing chat-like about it. What works is Claude Code writing the code, and that code calling Jev when it needs a quick judgement.

Where Jev fits

Good candidates are the places where you have a fragile regex today, or a prompt asking an LLM to "reply in JSON": sorting a ticket into billing, bug or feature request, deciding whether a message is urgent, scoring a bug's severity.

Every call has the same shape, one state and several questions:

{
  "model": "jev-latest",
  "state": "Deploy failed twice; customers see 500s. Can someone look now?",
  "questions": {
    "is_urgent": {
      "type": "noul",
      "instructions": "The message conveys urgency or time-sensitivity"
    }
  }
}

The answer comes back as a number: {"is_urgent": {"type": "noul", "noul": 0.999}}. The question types are choice (pick from options you supply), score (a value on a scale) and noul (yes or no, with a probability).

Teaching Claude Code to write correct calls

Without context, the agent treats Jev like one more LLM API and gets the same things wrong every time. TypeSafe publishes a skill for that:

claude plugin marketplace add typesafe-ai/skills
claude plugin install typesafe@typesafe-ai

To force it, run /typesafe:typesafe-ai or say "use the TypeSafe skill" in the prompt. The skill sends the agent to the live docs, which are also available as an MCP server:

claude mcp add --transport http typesafe-docs https://docs.typesafe.ai/mcp

Once the SDK is installed, the types in node_modules/@typesafe-ai/sdk have the final word on field names.

The four mistakes I look for in review

When Claude Code writes a Jev integration, I check four things.

First, one question per call. Jev answers independent questions in parallel, so several questions about the same state go together. Looping over tickets is normal; looping over questions is waste.

Second, invented fields. The request has model, state and questions. If you see messages, temperature or max_tokens, the agent is writing chat code.

Third, asking Jev to generate content. It only picks from options you gave it. If the task is extraction, the code finds the candidates (with a regex, say) and Jev picks one.

And fourth, maths or dates inside a question. "Is this invoice overdue?" is arithmetic, and arithmetic stays in code.

Rules that go into CLAUDE.md

So I don't repeat this every session, the rules live in the project's instructions file:

## Jev (TypeSafe)
- Jev is a decision model: it doesn't generate text. Use the official SDK.
- Questions and thresholds live in one file (src/jev/questions.ts).
- Independent questions go in the same call.
- Every choice question has an exit option ("other").
- Maths and dates stay in code, never in a question.
- Irreversible actions only above a confidence threshold; below it, a person decides.
- The key stays on the server. Log the model version of every response.

About that last line: the confidence Jev returns measures how peaked the distribution is, not the chance that the answer is right. So the thresholds (0.6, 0.7, whatever they are) get tuned on real labelled cases, and the model version that answered (jev-1.13.0, for example) gets logged so you can pin it after calibrating.

Where to start

I'd pick a single spot in the system with fragile parsing, ask Claude Code to propose the swap using the skill, and review it against the list above before accepting.

Stuck on a step? Message me on WhatsApp

← All posts