{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aivideosignal.com/assets/production-change-manifest-schema-v23.json",
  "title": "AI Video Signal V23 Production Change Manifest",
  "type": "object",
  "required": ["manifest_version", "experiment_id", "description", "operations"],
  "properties": {
    "manifest_version": {"const": "V23"},
    "experiment_id": {"type": "string", "pattern": "^EXP-V2[12]-[A-Za-z0-9-]+$"},
    "change_id": {"type": "string"},
    "description": {"type": "string", "minLength": 1, "maxLength": 1000},
    "deployment_label": {"type": "string", "maxLength": 120},
    "created_at": {"type": "string", "format": "date-time"},
    "operations": {
      "type": "array", "minItems": 1, "maxItems": 20,
      "items": {
        "type": "object",
        "required": ["target_file", "operation", "before_exact", "after_exact", "expected_occurrences"],
        "properties": {
          "target_file": {"type": "string", "minLength": 1, "maxLength": 240},
          "operation": {"const": "replace_exact"},
          "before_exact": {"type": "string", "minLength": 1, "maxLength": 20000},
          "after_exact": {"type": "string", "minLength": 1, "maxLength": 20000},
          "expected_occurrences": {"type": "integer", "minimum": 1, "maximum": 5},
          "note": {"type": "string", "maxLength": 500}
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}
