Agent tooling

pi-jev

@TheoOliveira18TypeScriptMITupdated 2026-09-18runnable

Semantic tool routing and typed System One decisions for the Pi coding agent using TypeSafe Jev

TheoOliveira/pi-jev

Where it calls Jev

import { TypeSafeClient, choice, noul, score } from "@typesafe-ai/sdk";

src/jev.ts:1

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from src/commands.ts:93

  1. is_billingtrue/false

    Is this message related to a billing issue?

  2. categorychoice

    Which category does this issue fall into?

    • billingBilling, invoices, card issues
    • bugSoftware bug or crash
    • otherGeneral questions

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_billing: { type: 'boolean', instructions: 'Is this message related to a billing issue?' },
    category: { type: 'choice', instructions: 'Which category does this issue fall into?',
      criteria: { billing: 'Billing, invoices, card issues', bug: 'Software bug or crash', other: 'General questions' } },
  },
});

from src/gate.ts:149

  1. gate_passedtrue/false

    Does the provided code/output satisfy this acceptance criteria: "${options.criteria}"?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    gate_passed: { type: 'boolean', instructions: 'Does the provided code/output satisfy this acceptance criteria: "${options.criteria}"?' },
  },
});

from src/orchestrator.ts:41

  1. topologychoice

    What type of workflow is best suited for this task?

    • implementationCode change, bugfix, refactoring, feature implementation, or file modifications
    • researchInvestigating codebase, external research, architectural analysis, or exploration
    • reviewCode review, security audit, checking compliance or reviewing a pull request
    • generalGeneral question or task not requiring multi-stage implementation

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    topology: { type: 'choice', instructions: 'What type of workflow is best suited for this task?',
      criteria: { implementation: 'Code change, bugfix, refactoring, feature implementation, or file modifications', research: 'Investigating codebase, external research, architectural analysis, or exploration', review: 'Code review, security audit, checking compliance or reviewing a pull request', general: 'General question or task not requiring multi-stage implementation' } },
  },
});

from test/commands.test.ts:86

  1. is_riskytrue/false

    Is this risky?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_risky: { type: 'boolean', instructions: 'Is this risky?' },
  },
});

Other projects in this category