build strategy · Jev

Typed answers, one key, one build.

Every mega-prompt collapses into the same shape: one TanStack server function that sends content plus a few typed questions to Jev, and a UI that turns the answers into action.

Why Jev?

Most creative tools don't need an essay — they need a decision: which team, is it true, how good is it. Jev returns those as numbers and options, so there's nothing to parse.

Rules live in code

Jev gives probabilities and confidence. Your app decides the thresholds — act, flag for review, or reject — so behaviour stays predictable and easy to tune.

src/lib/jev.functions.ts
// src/lib/jev.functions.ts
import { createServerFn } from "@tanstack/react-start";
import { z } from "zod";

export const decide = createServerFn({ method: "POST" })
  .inputValidator((d: unknown) => z.object({ text: z.string().min(1) }).parse(d))
  .handler(async ({ data }) => {
    const res = await fetch("https://api.typesafe.ai/v1/systemone", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.TYPESAFE_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        model: "jev-latest",
        state: { text: data.text },
        questions: {
          fit: { type: "score", instructions: "How well does `text` fit a festival opening?",
                 criteria: ["Poor", "Okay", "Strong", "Perfect"] },
        },
      }),
    });
    if (!res.ok) return { ok: false, status: res.status, message: await res.text() };
    const json = await res.json();
    return { ok: true, score: json.answers.fit.score, confidence: json.answers.fit.confidence };
  });

One-shot checklist

  • · ONE route, ONE server function, no database, no login.
  • · Ask all independent questions in a single request.
  • · Add a "needs review" state for low confidence — never fake certainty.
  • · Use a text model only when you truly need written words.