{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:awoooi:host-runaway-aiops-loop-readiness-v1",
  "title": "Host Runaway AIOps Loop Readiness",
  "type": "object",
  "required": [
    "schema_version",
    "generated_at",
    "program_status",
    "source_refs",
    "rollups",
    "loop_stages",
    "alert_lanes",
    "asset_writeback_contract",
    "live_readback",
    "remediation_gate",
    "activation_boundaries",
    "next_steps"
  ],
  "properties": {
    "schema_version": { "const": "host_runaway_aiops_loop_readiness_v1" },
    "generated_at": { "type": "string" },
    "program_status": {
      "type": "object",
      "required": [
        "overall_completion_percent",
        "current_priority",
        "current_task_id",
        "next_task_id",
        "read_only_mode",
        "runtime_authority",
        "status_note"
      ],
      "properties": {
        "overall_completion_percent": { "type": "integer", "const": 100 },
        "current_priority": { "type": "string", "const": "P3" },
        "current_task_id": { "type": "string", "const": "P3-009" },
        "next_task_id": { "type": "string", "const": "P3-010" },
        "read_only_mode": { "type": "boolean", "const": true },
        "runtime_authority": { "type": "string", "const": "host_runaway_aiops_loop_readiness_only_no_host_write" },
        "status_note": { "type": "string", "minLength": 1 }
      }
    },
    "source_refs": { "type": "array", "minItems": 7, "items": { "type": "string" } },
    "rollups": { "type": "object" },
    "loop_stages": { "type": "array", "minItems": 6 },
    "alert_lanes": { "type": "array", "minItems": 2 },
    "asset_writeback_contract": { "type": "array", "minItems": 5 },
    "live_readback": { "type": "object" },
    "remediation_gate": { "type": "object" },
    "activation_boundaries": { "type": "object" },
    "next_steps": { "type": "array", "minItems": 1 }
  },
  "additionalProperties": true
}
