{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openfutureforum.github.io/executive-intelligence-index/schema/stance.schema.json",
  "title": "Stance",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "stance_id",
    "proposition_id",
    "statement_id",
    "relationship_type",
    "scope_match",
    "confidence",
    "rationale",
    "review_status",
    "provenance"
  ],
  "properties": {
    "stance_id": {
      "type": "string",
      "minLength": 1
    },
    "proposition_id": {
      "type": "string",
      "minLength": 1
    },
    "statement_id": {
      "type": "string",
      "minLength": 1
    },
    "relationship_type": {
      "$ref": "common.schema.json#/$defs/stanceType"
    },
    "scope_match": {
      "type": "string",
      "minLength": 1
    },
    "confidence": {
      "type": [
        "number",
        "null"
      ]
    },
    "rationale": {
      "type": "string",
      "minLength": 1
    },
    "review_status": {
      "type": "string",
      "minLength": 1
    },
    "workflow_status": {
      "$ref": "common.schema.json#/$defs/workflowStatus"
    },
    "machine_review_status": {
      "$ref": "common.schema.json#/$defs/machineReviewStatus"
    },
    "human_review_status": {
      "$ref": "common.schema.json#/$defs/humanReviewStatus"
    },
    "reviewed_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "reviewed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "provenance": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "common.schema.json#/$defs/provenance"
      }
    },
    "revision_history": {
      "type": "array",
      "items": {
        "$ref": "common.schema.json#/$defs/revision"
      }
    }
  }
}
