{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://brainfile.md/v2/epic.json",
  "title": "Brainfile Epic Schema",
  "description": "Schema for epic documents. An epic groups related tasks and tracks their collective progress. Extends the task schema with children and status fields.",
  "allOf": [
    {
      "$ref": "https://brainfile.md/v2/task.json"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "const": "epic"
        },
        "children": {
          "type": "array",
          "description": "Item IDs that this epic groups together (e.g., 'task-1', 'task-5').",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true,
          "examples": [
            ["task-1", "task-2", "task-5"]
          ]
        },
        "status": {
          "type": "string",
          "description": "Current status of the epic.",
          "minLength": 1,
          "examples": ["draft", "active", "completed", "cancelled"]
        }
      }
    }
  ]
}
