{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/SprintCloseResult",
  "definitions": {
    "SprintCloseResult": {
      "type": "object",
      "properties": {
        "record": {
          "$ref": "#/definitions/SprintRecord"
        },
        "lessons": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VelocityLesson"
          }
        },
        "file": {
          "type": "string"
        },
        "cwd": {
          "type": "string"
        }
      },
      "required": ["record", "lessons", "file", "cwd"],
      "additionalProperties": false
    },
    "SprintRecord": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "sprintId": {
          "type": "string"
        },
        "event": {
          "type": "string",
          "enum": ["start", "close"]
        },
        "startDate": {
          "type": "string"
        },
        "endDate": {
          "type": "string"
        },
        "capacityDays": {
          "type": "number"
        },
        "committedPoints": {
          "type": "number"
        },
        "actualPoints": {
          "type": "number"
        },
        "velocityPct": {
          "type": "number"
        },
        "avgVsSoloPct": {
          "type": ["number", "null"]
        },
        "avgVsAiUnguidedPct": {
          "type": ["number", "null"]
        },
        "createdAt": {
          "type": "string"
        }
      },
      "required": ["id", "sprintId", "event", "createdAt"],
      "additionalProperties": false
    },
    "VelocityLesson": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "sprintId": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "biasDirection": {
          "type": "string",
          "enum": ["over", "under"]
        },
        "biasAvgPct": {
          "type": "number"
        },
        "storySample": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "createdAt": {
          "type": "string"
        }
      },
      "required": ["id", "sprintId", "role", "biasDirection", "biasAvgPct", "storySample", "createdAt"],
      "additionalProperties": false
    }
  }
}
