{
  "$defs": {
    "ProvenanceRef": {
      "additionalProperties": false,
      "description": "Source trace connecting an artifact or event to its authoritative origin.",
      "properties": {
        "actor_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Actor Id"
        },
        "actor_kind": {
          "anyOf": [
            {
              "enum": [
                "human",
                "llm",
                "system"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Actor Kind"
        },
        "git_ref": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Git Ref"
        },
        "git_sha": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Git Sha"
        },
        "revised_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ISO 8601",
          "title": "Revised At"
        },
        "source_event_ids": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Source Event Ids"
        }
      },
      "title": "ProvenanceRef",
      "type": "object"
    }
  },
  "$id": "spec-kitty-events/retrospective_completed_payload",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Payload for RetrospectiveCompleted events.\n\nEmitted when a retrospective step runs and produces a durable outcome.",
  "properties": {
    "actor": {
      "description": "Actor who triggered the retrospective",
      "minLength": 1,
      "title": "Actor",
      "type": "string"
    },
    "artifact_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProvenanceRef"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Reference to retro artifact if one was produced"
    },
    "completed_at": {
      "description": "ISO 8601 completion timestamp",
      "minLength": 1,
      "title": "Completed At",
      "type": "string"
    },
    "mission_id": {
      "description": "Mission identifier",
      "minLength": 1,
      "title": "Mission Id",
      "type": "string"
    },
    "trigger_source": {
      "description": "What initiated the retrospective",
      "enum": [
        "runtime",
        "operator",
        "policy"
      ],
      "title": "Trigger Source",
      "type": "string"
    }
  },
  "required": [
    "mission_id",
    "actor",
    "trigger_source",
    "completed_at"
  ],
  "title": "RetrospectiveCompletedPayload",
  "type": "object"
}
