{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cis2042.github.io/ux3-product-design-harness/schemas/claim.schema.json",
  "title": "Product Design Harness Claim",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "type",
    "claim",
    "status",
    "support",
    "counter_signal",
    "confidence_level",
    "depends_on",
    "breaks_if_false",
    "proof_step",
    "stop_condition"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "type": {
      "type": "string",
      "enum": [
        "user",
        "evidence",
        "business",
        "risk",
        "taste"
      ]
    },
    "claim": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "type": "string",
      "enum": [
        "assumption",
        "verified"
      ],
      "description": "Whether this claim is still an assumption or verified by evidence."
    },
    "support": {
      "type": "string"
    },
    "evidence_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "description": "Evidence receipt ids that support this claim."
    },
    "counter_signal": {
      "type": "string"
    },
    "confidence_level": {
      "type": "string",
      "enum": [
        "very_low",
        "low",
        "medium",
        "high",
        "very_high"
      ]
    },
    "depends_on": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "breaks_if_false": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1
    },
    "proof_step": {
      "type": "string"
    },
    "stop_condition": {
      "type": "string"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "status": {
            "const": "verified"
          }
        },
        "required": [
          "status"
        ]
      },
      "then": {
        "required": [
          "evidence_ids"
        ],
        "properties": {
          "evidence_ids": {
            "minItems": 1
          }
        }
      }
    }
  ]
}
