{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {
    "title": "Rubric Rumble: validate, preview and explicitly execute",
    "quality_profile": "showcase",
    "animation": "none",
    "column_fit": "spread",
    "viewBox": [
      1000,
      538
    ]
  },
  "participants": [
    {
      "id": "rr-setup-editor",
      "type": "frontend",
      "label": "Desktop / CLI"
    },
    {
      "id": "rr-setup-contract",
      "type": "security",
      "label": "Task contract"
    },
    {
      "id": "rr-setup-plan",
      "type": "backend",
      "label": "Call plan"
    },
    {
      "id": "rr-setup-folder",
      "type": "database",
      "label": "Output folder"
    },
    {
      "id": "rr-setup-run",
      "type": "backend",
      "label": "run_task"
    },
    {
      "id": "rr-setup-state",
      "type": "database",
      "label": "Run evidence"
    },
    {
      "id": "rr-setup-keys",
      "type": "security",
      "label": "Environment"
    }
  ],
  "messages": [
    {
      "id": "rr-01-setup-1",
      "from": "rr-setup-editor",
      "to": "rr-setup-contract",
      "label": "Selected task and execution mode",
      "y": 160
    },
    {
      "id": "rr-01-setup-3",
      "from": "rr-setup-contract",
      "to": "rr-setup-plan",
      "label": "Validated configuration",
      "y": 189
    },
    {
      "id": "rr-01-setup-4",
      "from": "rr-setup-plan",
      "to": "rr-setup-editor",
      "label": "Fingerprint + maximum candidate / judge calls",
      "y": 218,
      "variant": "return"
    },
    {
      "id": "rr-01-setup-5",
      "from": "rr-setup-editor",
      "to": "rr-setup-contract",
      "label": "Desktop Run: require unchanged preview",
      "y": 247,
      "variant": "security"
    },
    {
      "id": "rr-01-setup-6",
      "from": "rr-setup-editor",
      "to": "rr-setup-folder",
      "label": "Execution: reserve a new directory",
      "y": 276
    },
    {
      "id": "rr-01-setup-7",
      "from": "rr-setup-editor",
      "to": "rr-setup-run",
      "label": "Run selected mode with explicit network flag",
      "y": 305
    },
    {
      "id": "rr-01-setup-8",
      "from": "rr-setup-run",
      "to": "rr-setup-contract",
      "label": "Revalidate; require network permission",
      "y": 334,
      "variant": "security"
    },
    {
      "id": "rr-01-setup-10",
      "from": "rr-setup-run",
      "to": "rr-setup-keys",
      "label": "Check every required model key before calls",
      "y": 363
    },
    {
      "id": "rr-01-setup-11",
      "from": "rr-setup-keys",
      "to": "rr-setup-run",
      "label": "Missing key stops before report initialization",
      "y": 392,
      "variant": "return"
    },
    {
      "id": "rr-01-setup-12",
      "from": "rr-setup-run",
      "to": "rr-setup-state",
      "label": "Initialize evidence, then execute this mode",
      "y": 421
    },
    {
      "id": "rr-01-setup-13",
      "from": "rr-setup-run",
      "to": "rr-setup-editor",
      "label": "Return finalized result after execution",
      "y": 450,
      "variant": "return"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Two entry points, the same contract",
      "items": [
        "Invalid input stops before a call. Desktop Run requires its unchanged preview. CLI run prints a plan until --execute; network execution requires permission."
      ]
    },
    {
      "dot": "amber",
      "title": "A plan is a ceiling, not a bill",
      "items": [
        "Maximum calls count configured provider candidates and possible pairwise judgments. The shared call limit is enforced during execution."
      ]
    }
  ]
}
