{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {
    "title": "Rubric Rumble: resolve one candidate answer",
    "quality_profile": "showcase",
    "animation": "none",
    "column_fit": "spread",
    "viewBox": [
      1000,
      567
    ]
  },
  "participants": [
    {
      "id": "rr-candidates-driver",
      "type": "backend",
      "label": "Mode driver"
    },
    {
      "id": "rr-candidates-evaluate",
      "type": "backend",
      "label": "evaluate"
    },
    {
      "id": "rr-candidates-call",
      "type": "backend",
      "label": "execute"
    },
    {
      "id": "rr-candidates-ledger",
      "type": "database",
      "label": "Call ledger"
    },
    {
      "id": "rr-candidates-provider",
      "type": "cloud",
      "label": "Provider"
    },
    {
      "id": "rr-candidates-assess",
      "type": "security",
      "label": "Rules check"
    },
    {
      "id": "rr-candidates-owner",
      "type": "backend",
      "label": "Driver / core"
    }
  ],
  "messages": [
    {
      "id": "rr-02-candidates-1",
      "from": "rr-candidates-driver",
      "to": "rr-candidates-evaluate",
      "label": "Candidate + one source artifact",
      "y": 160
    },
    {
      "id": "rr-02-candidates-2",
      "from": "rr-candidates-evaluate",
      "to": "rr-candidates-call",
      "label": "Instructions + source; append started record",
      "y": 189
    },
    {
      "id": "rr-02-candidates-3",
      "from": "rr-candidates-call",
      "to": "rr-candidates-ledger",
      "label": "Fixture route OR permitted provider attempt",
      "y": 218
    },
    {
      "id": "rr-02-candidates-4",
      "from": "rr-candidates-call",
      "to": "rr-candidates-provider",
      "label": "Configured endpoint: one generation request",
      "y": 247
    },
    {
      "id": "rr-02-candidates-5",
      "from": "rr-candidates-provider",
      "to": "rr-candidates-call",
      "label": "Text + normalized usage + completion state",
      "y": 276,
      "variant": "return"
    },
    {
      "id": "rr-02-candidates-6",
      "from": "rr-candidates-call",
      "to": "rr-candidates-ledger",
      "label": "Retain response first; then estimated cost",
      "y": 305
    },
    {
      "id": "rr-02-candidates-7",
      "from": "rr-candidates-call",
      "to": "rr-candidates-ledger",
      "label": "Incomplete / empty text becomes failed call",
      "y": 334,
      "variant": "security"
    },
    {
      "id": "rr-02-candidates-8",
      "from": "rr-candidates-call",
      "to": "rr-candidates-evaluate",
      "label": "Return complete nonempty text, or raise",
      "y": 363,
      "variant": "return"
    },
    {
      "id": "rr-02-candidates-9",
      "from": "rr-candidates-evaluate",
      "to": "rr-candidates-assess",
      "label": "Judged rules mode: compare expected fields",
      "y": 392
    },
    {
      "id": "rr-02-candidates-10",
      "from": "rr-candidates-assess",
      "to": "rr-candidates-evaluate",
      "label": "Assessment; invalid JSON object disqualifies",
      "y": 421,
      "variant": "return"
    },
    {
      "id": "rr-02-candidates-11",
      "from": "rr-candidates-evaluate",
      "to": "rr-candidates-ledger",
      "label": "Append captured output and assessment",
      "y": 450
    },
    {
      "id": "rr-02-candidates-12",
      "from": "rr-candidates-evaluate",
      "to": "rr-candidates-owner",
      "label": "Return answer text; core constructs its view",
      "y": 479,
      "variant": "return"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Same inputs, different drivers",
      "items": [
        "Single/Batch request every selected candidate/artifact. Battle/Tournament ask the core to evaluate candidates before any insertion comparisons."
      ]
    },
    {
      "dot": "rose",
      "title": "Failure scope matters",
      "items": [
        "In judged modes a candidate evaluation failure skips its remaining artifacts. Capture modes continue to the next requested artifact; assessment is null."
      ]
    }
  ]
}
