{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/pilot-offer-review-record.schema.json",
  "title": "Pilot Offer Review Record",
  "type": "object",
  "required": [
    "schema_version",
    "review_id",
    "intake_id",
    "requested_tool",
    "review_state",
    "launch_decision"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "review_id": {
      "type": "string"
    },
    "intake_id": {
      "type": "string"
    },
    "requester_type": {
      "type": "string",
      "enum": [
        "client",
        "agent",
        "operator"
      ]
    },
    "requested_tool": {
      "type": "string",
      "enum": [
        "tokenops",
        "financeops",
        "energyops",
        "packetops",
        "distributionops",
        "wever_labs_os"
      ]
    },
    "work_order_candidate": {
      "type": "object"
    },
    "evidence_state": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "score": {
          "type": "number"
        },
        "missing_items": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "credential_scope": {
      "type": "object"
    },
    "provider_state": {
      "type": "object"
    },
    "callback_state": {
      "type": "object"
    },
    "proof_requirements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "review_state": {
      "type": "string",
      "enum": [
        "received",
        "in_review",
        "needs_evidence",
        "ready_for_launch",
        "approved",
        "paused",
        "declined"
      ]
    },
    "launch_decision": {
      "type": "string",
      "enum": [
        "approve_controlled_pilot",
        "request_more_evidence",
        "pause_for_operator_review",
        "decline"
      ]
    },
    "operator_notes": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
