{
  "$id": "spec-kitty-events/plan_completed_payload",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Plan phase completed for a mission.",
  "properties": {
    "actor": {
      "description": "Actor driving the phase transition.",
      "minLength": 1,
      "title": "Actor",
      "type": "string"
    },
    "artifact_path": {
      "description": "Repo-relative path to the plan artifact (e.g. plan.md).",
      "minLength": 1,
      "title": "Artifact Path",
      "type": "string"
    },
    "at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Wall-clock timestamp for the phase transition.",
      "title": "At"
    },
    "mission_number": {
      "anyOf": [
        {
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Canonical mission number; ``None`` pre-merge.",
      "title": "Mission Number"
    },
    "mission_slug": {
      "description": "Canonical mission slug.",
      "minLength": 1,
      "title": "Mission Slug",
      "type": "string"
    },
    "summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional one-line summary of the completed plan.",
      "title": "Summary"
    }
  },
  "required": [
    "mission_slug",
    "actor",
    "artifact_path"
  ],
  "title": "PlanCompletedPayload",
  "type": "object"
}
