judgment Card

Judgment Cards

A judgment card is a prompt for Jev, a small, cheap judging model. bbx judge <card> sends the card plus one state from stdin and prints an answer per question. The card holds no state: the state arrives at run time. By convention judgment cards live in _config/judgments/.

Fields

Writing a judgment

Example: one gate question over everything new (noul)

# _config/judgments/field-trip.judgment.card
questions:
  trip:
    type: noul
    criteria:
      true: "At least one of these emails is from the school about the spring field trip: dates, permission form, or payment."
      false: "None is; a newsletter that mentions the school, or a receipt, does not count."
---
You are looking at the email cards that arrived in a family inbox since
the last check, concatenated. Judge only what the emails say.

Run from a procedure precheck with pass-output: true, so an agent writes the notification only when the judge says yes:

bbx changes --match '_content/inbox/**/*.email-message.card' --cat --or-skip \
  | bbx judge _config/judgments/field-trip.judgment.card --min trip=0.8 --or-skip --echo

Example: a Choice with a counter-category, per item

# _config/judgments/needs-reply.judgment.card
questions:
  reply:
    type: choice
    instructions: Decide from the whole email, including who sent it and to whom.
    criteria:
      expects: "The sender asks the recipient a question or for an action, and is waiting on an answer."
      none: "Nothing is asked of the recipient: a notice, a receipt, a newsletter, or the recipient's own message."
      unclear: "Cannot tell from what is here; the text is cut off or too short."
---
The state is one email card: its `email:` headers (from, to, subject, received) and body.
bbx changes --match '_content/inbox/**/*.email-message.card' --or-skip \
  | bbx judge _config/judgments/needs-reply.judgment.card --per-line --cards --min reply.expects=0.8 --select --or-skip

bbx judge

Testing a judgment