{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://yao.example/registry-package.schema.json",
  "title": "Yao Skill Registry Package",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "name",
    "version",
    "description",
    "targets",
    "maturity",
    "owner",
    "review_cadence",
    "trust_level",
    "license",
    "checksums",
    "compatibility",
    "source",
    "artifacts",
    "generated_at"
  ],
  "properties": {
    "schema_version": {"const": "2.0"},
    "name": {"type": "string", "minLength": 1},
    "version": {"type": "string", "minLength": 1},
    "description": {"type": "string", "minLength": 1},
    "targets": {"type": "array", "items": {"type": "string"}},
    "maturity": {"type": "string", "minLength": 1},
    "owner": {"type": "string", "minLength": 1},
    "review_cadence": {"type": "string", "minLength": 1},
    "trust_level": {"type": "string", "minLength": 1},
    "license": {"type": "string", "minLength": 1},
    "checksums": {
      "type": "object",
      "additionalProperties": false,
      "required": ["package_sha256"],
      "properties": {
        "package_sha256": {"type": "string", "minLength": 64, "maxLength": 64},
        "archive_sha256": {"type": "string", "minLength": 64, "maxLength": 64}
      }
    },
    "compatibility": {
      "type": "object",
      "additionalProperties": {"enum": ["pass", "warn", "fail", "missing", "unknown"]}
    },
    "source": {"type": "object"},
    "artifacts": {"type": "object"},
    "distribution": {"type": "object"},
    "generated_at": {"type": "string"}
  }
}
