{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/intentdocs-com/json-schema/intentdocs-com-story-schema.json",
  "title": "Story",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/intentdocs-com-openapi.json#/components/schemas/Story",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "activity": {
      "type": "string"
    },
    "user_story": {
      "type": [
        "string",
        "null"
      ]
    },
    "priority": {
      "enum": [
        "must",
        "should",
        "could"
      ]
    },
    "effort": {
      "enum": [
        "XS",
        "S",
        "M",
        "L",
        "XL"
      ]
    },
    "release": {
      "type": "number"
    },
    "build_sequence": {
      "type": [
        "number",
        "null"
      ]
    },
    "status": {
      "enum": [
        "todo",
        "in_progress",
        "needs_rework",
        "done",
        "approved"
      ]
    },
    "acceptance_criteria": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AcceptanceCriterion"
      }
    },
    "depends_on": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "implementation_plan": {
      "type": [
        "object",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancellation_reason": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "AcceptanceCriterion": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "done": {
          "type": "boolean"
        },
        "given": {
          "type": [
            "string",
            "null"
          ]
        },
        "when": {
          "type": [
            "string",
            "null"
          ]
        },
        "then": {
          "type": [
            "string",
            "null"
          ]
        },
        "priority": {
          "type": [
            "string",
            "null"
          ]
        },
        "verification": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_result": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}