{
  "$id": "spec-kitty-events/mission_created_payload",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Typed payload for MissionCreated catalog events.\n\n``actor`` (8.0.0) carries the opaque identifier of whoever created the\nmission so the broadcast moment can say WHO (E2E-MVP \u00a71.1 renders\n\"<actor> created mission <slug>\"). Optional \u2014 not required \u2014 because the\nlive producer built these payloads without it before 8.0.0; requiring it\nwould fail every in-flight emission at upgrade instead of enriching the\nmoment once producers catch up.",
  "properties": {
    "actor": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Opaque actor identifier of who created the mission (broadcast under the moment's ``actor`` key)",
      "title": "Actor"
    },
    "created_at": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Mission creation timestamp",
      "title": "Created At"
    },
    "friendly_name": {
      "description": "Human-friendly mission title",
      "minLength": 1,
      "title": "Friendly Name",
      "type": "string"
    },
    "mission_id": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Canonical machine-facing mission identity (ULID); optional, rides alongside mission_slug so a consumer can join this moment against PhaseEntered (whose frame ref is mission_id) for the same mission aggregate (spec-kitty-events#69)",
      "title": "Mission Id"
    },
    "mission_number": {
      "anyOf": [
        {
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Canonical mission number",
      "title": "Mission Number"
    },
    "mission_slug": {
      "description": "Canonical mission slug",
      "minLength": 1,
      "title": "Mission Slug",
      "type": "string"
    },
    "mission_type": {
      "description": "Canonical mission workflow/template type",
      "minLength": 1,
      "title": "Mission Type",
      "type": "string"
    },
    "purpose_context": {
      "description": "Short stakeholder-facing context paragraph",
      "minLength": 1,
      "title": "Purpose Context",
      "type": "string"
    },
    "purpose_tldr": {
      "description": "One-line stakeholder-facing mission summary",
      "minLength": 1,
      "title": "Purpose Tldr",
      "type": "string"
    },
    "target_branch": {
      "description": "Target branch for the mission planning artifacts",
      "minLength": 1,
      "title": "Target Branch",
      "type": "string"
    },
    "wp_count": {
      "description": "Work-package count at mission creation time",
      "minimum": 0,
      "title": "Wp Count",
      "type": "integer"
    }
  },
  "required": [
    "mission_slug",
    "mission_number",
    "mission_type",
    "target_branch",
    "wp_count",
    "friendly_name",
    "purpose_tldr",
    "purpose_context"
  ],
  "title": "MissionCreatedPayload",
  "type": "object"
}
