Small decisions. Interesting possibilities.Submit contentSubmit

How it uses Jev

A decision is a serializable state plus question values. choice takes an enum whose constants each carry a description, noul takes an instruction with optional yes and no criteria, and score takes a rubric ordered from the lowest level. One decide call sends them together and maps each answer back into the caller's own types: the chosen enum constant, the probability of yes, or the rubric level.

What Jev decides

Support ticket triage decision (illustrative)Example answers · not a recorded Jev response · Source ↗
Question 1 · intent
YOUR APP
INSTRUCTION

What does the customer want?

STATE

The state is a Ticket with subject, body, plan and prior contact count. The same request asks which team should handle it, whether the customer is angry, and how urgent the reply is.

JEV · CHOICE
  1. refund
  2. technical_support
  3. general_inquiry
Question 2 · is angry
YOUR APP
INSTRUCTION

Is the customer expressing anger?

STATE

The state is a Ticket with subject, body, plan and prior contact count. The same request asks which team should handle it, whether the customer is angry, and how urgent the reply is.

JEV · NOUL
YesNo
Question 3 · urgency
YOUR APP
INSTRUCTION

How urgently does this need a response, on a three-level rubric from later to now?

STATE

The state is a Ticket with subject, body, plan and prior contact count. The same request asks which team should handle it, whether the customer is angry, and how urgent the reply is.

JEV · SCORE
02

App workflow

  1. Declare the questions

    Question values are declared once as top-level properties, with enum constants that each describe themselves.

  2. Build the state

    The caller builds a small serializable structure for the decision instead of sending the whole record.

  3. Ask once

    decide sends the state and every asked question in a single request to the System One endpoint.

  4. Map back to types

    Each answer becomes a typed value, so a chosen option arrives as the caller's enum constant rather than a string.

  5. Handle failure

    The client keeps retry and error handling, and a response error carries the provider message to the caller.

Why it is interesting

The type system carries the question, since a constant without a description does not compile, so a misspelled option cannot reach the request and the same question value can be asked against any state.