{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://oms.local/schemas/goal-artifact.schema.json",
  "title": "OMS goal evidence artifact envelope",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "artifact_id", "artifact_kind", "goal_id", "producer", "created_at", "payload"],
  "properties": {
    "schema_version": { "const": 1 },
    "artifact_id": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" },
    "artifact_kind": {
      "enum": ["native-goal-snapshot", "regression-request", "team-checkpoint", "ultragoal-checkpoint"]
    },
    "goal_id": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" },
    "producer": { "enum": ["codex-get-goal", "oms-goal-authority", "oms-team-projection", "oms-ultragoal-leader"] },
    "created_at": { "type": "string", "minLength": 20, "maxLength": 24 },
    "payload": { "type": "object" }
  }
}
