{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://confighub.com/helm-expt/schemas/lifecycle-route-action.schema.json",
  "title": "Lifecycle Route Action Packet",
  "description": "A machine-readable plan for one hook or hook-like lifecycle behavior: phase, action kind, required facts, evidence required, and an explicit automatic flag. UNOFFICIAL/EXPERIMENTAL. Generated by scripts/generate-lifecycle-route-actions.mjs.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "chart",
    "version",
    "quirk_class",
    "route_name",
    "disposition",
    "lifecycle_phase",
    "action_kind",
    "execution_mode",
    "automatic",
    "evidence_required"
  ],
  "properties": {
    "chart": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "base": {
      "type": "string"
    },
    "quirk_class": {
      "type": "string"
    },
    "route_name": {
      "type": "string"
    },
    "disposition": {
      "enum": [
        "observed",
        "routed",
        "per-target",
        "not-run",
        "blocked",
        "refused"
      ]
    },
    "source_disposition": {
      "type": "string",
      "description": "Raw disposition from data/lifecycle-routes (observed/routed/per-target/refused/todo)."
    },
    "source_live_status": {
      "type": "string"
    },
    "lifecycle_phase": {
      "enum": [
        "pre-render",
        "preflight",
        "pre-apply",
        "post-apply",
        "observe",
        "refuse"
      ]
    },
    "action_kind": {
      "enum": [
        "verify-render",
        "run-preflight",
        "stage-target-facts",
        "install-crd",
        "preserve-ordering",
        "run-job",
        "gitops-sync-hook",
        "run-check",
        "run-test",
        "observe-webhook",
        "accept-target-policy",
        "stage-secret",
        "configure-ingress",
        "wait-for-apiservice"
      ]
    },
    "execution_mode": {
      "enum": [
        "product-executes",
        "user-executes",
        "target-owned",
        "not-yet-executable"
      ]
    },
    "automatic": {
      "type": "boolean",
      "description": "true only when the product itself executes the route AND committed evidence proves it. Otherwise false."
    },
    "required_target_facts": {
      "type": "string"
    },
    "human_command": {
      "type": "string",
      "description": "Placeholder command, not a verified command. May be empty."
    },
    "alternatives": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Off-ramp route names."
    },
    "agent_inputs": {
      "type": "object",
      "description": "Stable machine-readable inputs for selecting and planning this route."
    },
    "evidence_required": {
      "type": "string",
      "description": "What must exist before the row can advance to observed/supported."
    },
    "source_drift": {
      "type": "string",
      "description": "Named drift between the route source version and the catalog version. Empty when none."
    },
    "evidence_or_next_action": {
      "type": "string"
    }
  }
}
