{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://axis.efeonce.org/agents/resources/docs/agent-composition/agent-deck-intent.schema.json",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "schema": {
      "const": "axis.agent-deck.v1"
    },
    "slides": {
      "type": "array",
      "minItems": 1,
      "maxItems": 12,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "question",
          "answer"
        ],
        "properties": {
          "question": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "answer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30,
            "pattern": "^\\S+(?:\\s+\\S+){0,2}$"
          },
          "kind": {
            "enum": [
              "cover",
              "section",
              "content",
              "close"
            ]
          },
          "eyebrow": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "stats": {
            "type": "array",
            "maxItems": 3,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "value",
                "label"
              ],
              "properties": {
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 12
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 50
                }
              }
            }
          }
        },
        "allOf": [
          {
            "if": {
              "required": [
                "stats"
              ]
            },
            "then": {
              "required": [
                "note"
              ],
              "properties": {
                "kind": {
                  "const": "content"
                }
              }
            }
          }
        ]
      }
    }
  },
  "required": [
    "schema",
    "slides"
  ]
}
