{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.local/schemas/execution-report.schema.json",
  "title": "ExecutionReport",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "status",
    "summary",
    "artifacts",
    "changes",
    "verification",
    "assumptions",
    "open_items",
    "approval_required"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "completed",
        "partial",
        "blocked",
        "refused"
      ]
    },
    "summary": {
      "type": "string",
      "minLength": 1
    },
    "artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "location"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{64}$"
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "changes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "verification": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "check",
          "result",
          "evidence"
        ],
        "properties": {
          "check": {
            "type": "string"
          },
          "result": {
            "type": "string",
            "enum": [
              "passed",
              "failed",
              "not_run"
            ]
          },
          "evidence": {
            "type": "string"
          }
        }
      },
      "minItems": 1
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "open_items": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "residual_risks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": []
    },
    "approval_required": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
