{# The Judgement tab: the judge's answers beside the recorded evidence, never in its place. Outcome questions as cards (the answer, a pill saying how it reads, the judge's own confidence or Nullius's decisiveness for a yes/no), then the behaviour flags as a table (a human name, a result pill, the likelihood as a bar, a row that opens on the question's own wording and the hygiene reading of its state). "Not judged" until asked; Judge asks. Every count is Nullius's; the judge is never asked how many. #} {% macro pill(r) -%} {% if r.undecided %}—{% elif r.flag and r.raised %}⚑{% elif r.flag %}✓{% endif %} {{ r.pill }} {%- endmacro %} {% macro judgement_panel(j, job, trial, csrf) %} {%- set llm = j.lane == 'llm' %}

{{ 'LLM judge' if llm else 'System One judge' }} experimental

{% if llm %}The same questions, asked of {{ j.judge.label if j.keyed else 'the LLM judge Settings names' }}. Its numbers are what the model states, not calibrated: a choice or a score carries no confidence.{% else %}Task outcome, answer quality, and behaviour — as TypeSafe's System One reads the transcript.{% endif %} Experimental: the recorded outcome and reward stand.

{% if j.keyed %}
{% else %}{{ 'LLM judge' if llm else 'System One' }} not configured{% if j.judge is not none and j.judge.missing %}: needs {{ j.judge.missing }}{% endif %} — set it in Settings{% endif %}
{% if j.record %}

{{ j.record.judge.model }}{% if j.record.judge.provider not in ('typesafe.ai', 'typesafe') %} via {{ {'openrouter': 'OpenRouter', 'openai': 'OpenAI', 'local': 'a local endpoint'}.get(j.record.judge.provider, j.record.judge.provider) }}{% endif %} · {{ j.record.questions }}{% if j.earlier %} earlier vocabulary{% endif %} · asked {{ j.record.asked_at[:16]|replace('T', ' ') }}Z{% if j.record.truncated %} · state truncated{% if j.record.states %} ({% for kind, k in j.record.states.items() if k.truncated %}{{ kind }}{{ ', ' if not loop.last }}{% endfor %}){% endif %}{% endif %}{% if j.record.usage and j.record.usage.input_tokens %} · {{ j.record.usage.input_tokens }} input tokens{% endif %}

{% endif %} {% if j.hygiene and j.hygiene.kinds %}

{% if j.hygiene.flagged %}⚠ state hygiene {% for kind, raised in j.hygiene.flagged.items() %}`{{ kind }}` state: {% for id, label, p, decided in raised %}{{ label }} {{ '%.0f'|format(p * 100) }}%{% if not decided %} (undecided){% endif %}{{ '; ' if not loop.last }}{% endfor %}{{ ' · ' if not loop.last }}{% endfor %} — the answers from that state are marked ⚠; none is changed {% else %}state hygiene nothing read as addressing the judge or showing a credential on {{ j.hygiene.kinds|join(', ') }}{% endif %}

{% endif %}
{% for r in j.cards %}
{{ r.label }}{% if r.warnings %} ⚠{% endif %}
{% if r.answer %}
{{ r.headline }}{{ r.unit }} {{ pill(r) }}
{% if r.type == 'score' %}{{ r.pill }}{% else %}{{ r.blurb }}{% endif %}
{% if r.measure is not none %}{{ r.measure_label }}{{ '%.0f'|format(r.measure * 100) }}%{% endif %}
{% else %}
not judged
{{ r.blurb }}
asked on Judge
{% endif %}
{% endfor %}

Behaviour flags — yes/no, each one thing

{% if j.flags_judged %}{{ j.raised|length }} raised · {{ j.undecided|length }} undecided · {{ j.cleared|length }} clear{% endif %}
{% for r in j.flags %} {% endfor %}
CheckResultLikelihood of flag
{{ r.label }}{% if r.warnings %} ⚠{% endif %} {% if r.answer %}{{ pill(r) }}{% else %}not judged{% endif %} {% if r.answer %}{{ r.headline }}% {% if r.floor is not none %}{% endif %}{% if r.floor is not none %} ±{{ '%.0f'|format(r.floor * 100) }}{% else %}±?{% endif %}{% endif %}
{% endmacro %}