Skip to content

advocaat

Small TypeScript client with tagged-template helpers to ask Jev yes/no, choice and score questions about your data in one request.

Agent skillbetaMIT

Overview

Advocaat is a compact, type-safe TypeScript client for asking Jev several questions about the same piece of data at once. You pass an object (for example an issue) and a map of questions written with tagged templates: ask.if or ask.chance for yes/no, ask.choice or ask.switch for named options, and ask.score for ordered ratings. Answers come back under the same keys, with types inferred.

ask.if returns a boolean using a 0.5 threshold by default, which can be changed; chance returns the probability of yes and score returns a ratio from 0 to 1. It reads TYPESAFE_API_KEY and can also go through Vercel AI Gateway. An included agent skill teaches coding agents how to design questions and build with ask.

What the decision model decides

TypeQuestionAnswers
ChoiceWhat kind of issue is this?bug · other
Yes / noDoes this issue describe a security vulnerability?yes · no
ScoreHow severe is this issue?Cosmetic · Workaround exists · Blocks production

How it works

  1. Pass data and a question map to ask()
  2. Advocaat sends one request to Jev
  3. Read typed answers: boolean, probability, label or ratio
  4. Branch in code, adjusting thresholds as needed

Strengths

  • Several typed questions in one call
  • Inferred TypeScript result types
  • Works with TypeSafe directly or Vercel AI Gateway
  • Agent skill for question design

Caveats

  • Requires a TypeSafe key or AI Gateway credentials
  • Default boolean threshold of 0.5 may not suit every task

Getting started

npx nypm i advocaat, export TYPESAFE_API_KEY, then call ask(data, { ... }). Agent skill: npx skills add pithings/advocaat

At a glance

Type
Agent skill
Status
beta
Language
TypeScript
Runtime
Node / library
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

What question types are supported?

Yes/no (chance or boolean), named choice and ordered score, mixed in one ask call.

Can I change the yes/no threshold?

Yes, ask.if defaults to 0.5 and tag options let you set another threshold.

Which credentials does it use?

TYPESAFE_API_KEY, else AI_GATEWAY_API_KEY or a Vercel OIDC token.

Related projects

  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Unofficial hosted or local Jev MCP server giving agents a quick second opinion: it picks yes/no, scale or choice and returns probabilities.

    MCP serverbetaTypeScript
  • Rust CLI for Jev: ask yes/no, choice and rubric questions about text and branch on exit codes, JSON or MCP tools.

    MCP serverbetaRust
  • pip-installable Jev kit: a CLI for verify, screen, classify, extract, route and rerank, plus an MCP server for the primitives.

    MCP serverbetaPython
  • Agent Client Protocol agent that exposes Jev Choice, Score and Noul decisions in IDEs with guided input and probability displays.

    ProjectbetaTypeScript
  • Small dependency-free CLI and stdio MCP server for Jev's noul, choice and score judgments over text or JSON.

    MCP serverbetaPython