{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://spec-first.dev/contracts/dual-host-governance/skills-governance.schema.json",
  "title": "spec-first supported-host skills governance",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "skills"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "schemaVersion": {
      "const": 1
    },
    "skills": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/skillGovernanceRecord"
      }
    }
  },
  "$defs": {
    "host": {
      "enum": [
        "claude",
        "codex",
        "cursor",
        "kiro",
        "qoder"
      ]
    },
    "entrySurface": {
      "enum": [
        "workflow_command",
        "standalone_skill",
        "internal_only"
      ]
    },
    "hostScope": {
      "enum": [
        "dual_host",
        "host_exclusive",
        "target_host_maintenance"
      ]
    },
    "hostDelivery": {
      "enum": [
        "command",
        "skill",
        "internal",
        "none"
      ]
    },
    "skillGovernanceRecord": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "skill_name",
        "entry_surface",
        "command_name",
        "host_scope",
        "owner_host",
        "host_delivery"
      ],
      "properties": {
        "skill_name": {
          "type": "string",
          "minLength": 1
        },
        "entry_surface": {
          "$ref": "#/$defs/entrySurface"
        },
        "command_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "host_scope": {
          "$ref": "#/$defs/hostScope"
        },
        "owner_host": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "claude",
            "codex",
            "cursor",
            "kiro",
            "qoder",
            null
          ]
        },
        "host_delivery": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "claude",
            "codex",
            "cursor",
            "kiro",
            "qoder"
          ],
          "properties": {
            "claude": {
              "$ref": "#/$defs/hostDelivery"
            },
            "codex": {
              "$ref": "#/$defs/hostDelivery"
            },
            "cursor": {
              "$ref": "#/$defs/hostDelivery"
            },
            "kiro": {
              "$ref": "#/$defs/hostDelivery"
            },
            "qoder": {
              "$ref": "#/$defs/hostDelivery"
            }
          }
        }
      }
    }
  }
}
