{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hsimc.tech/reality-compute/schemas/opportunity-candidate.schema.json",
  "title": "HSIMC Opportunity Candidate",
  "type": "object",
  "required": [
    "opportunity_id",
    "opportunity_type",
    "state",
    "source_reality_ids",
    "hypothesis",
    "evidence_refs",
    "unknowns",
    "risk_flags",
    "candidate_task_roles",
    "readiness_vector_ref",
    "missing_conditions",
    "next_bounded_action",
    "continue_payload"
  ],
  "properties": {
    "opportunity_id": {
      "type": "string",
      "minLength": 1
    },
    "opportunity_type": {
      "enum": [
        "MARKET",
        "PROCUREMENT",
        "INVESTMENT_JV",
        "WORK"
      ]
    },
    "state": {
      "const": "COMPUTED_CANDIDATE_NO_AUTHORITY"
    },
    "source_reality_ids": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "hypothesis": {
      "type": "string",
      "minLength": 1
    },
    "why_this_may_matter": {
      "type": "string"
    },
    "evidence_refs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "unknowns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "risk_flags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "candidate_task_roles": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "readiness_vector_ref": {
      "type": "string"
    },
    "missing_conditions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "economic_value_state": {
      "enum": [
        "UNKNOWN",
        "HYPOTHESIS",
        "EVIDENCED",
        "ACCEPTED"
      ]
    },
    "next_bounded_action": {
      "type": "string",
      "minLength": 1
    },
    "continue_payload": {
      "type": "object",
      "required": [
        "intent",
        "acceptance_intent"
      ],
      "properties": {
        "intent": {
          "type": "string"
        },
        "acceptance_intent": {
          "type": "string"
        },
        "context": {
          "type": "object"
        }
      }
    }
  },
  "additionalProperties": true
}
