{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Collection Manifest",
  "description": "Schema for hve-core Copilot CLI plugin collection manifests",
  "type": "object",
  "required": [
    "id",
    "name",
    "description",
    "items"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$",
      "description": "Unique identifier for the collection. Lowercase, hyphens only."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Human-readable display name."
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "description": "Brief description of the collection purpose."
    },
    "maturity": {
      "type": "string",
      "enum": [
        "stable",
        "preview",
        "experimental",
        "deprecated"
      ],
      "description": "Optional release channel eligibility. Defaults to stable when omitted. Experimental collections are excluded from Stable (Release) channel."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Discovery tags for filtering and search."
    },
    "items": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "path",
          "kind"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Relative path from repo root to the source file."
          },
          "kind": {
            "type": "string",
            "enum": [
              "prompt",
              "agent",
              "instruction",
              "skill",
              "hook"
            ],
            "description": "Artifact type."
          },
          "usage": {
            "type": "string",
            "description": "Optional usage guidance for the item."
          },
          "maturity": {
            "type": "string",
            "enum": [
              "stable",
              "preview",
              "experimental",
              "deprecated"
            ],
            "description": "Optional release maturity for this item. Defaults to stable when omitted."
          }
        },
        "additionalProperties": false
      }
    },
    "display": {
      "type": "object",
      "properties": {
        "ordering": {
          "type": "string",
          "enum": [
            "alpha",
            "manual"
          ],
          "default": "alpha"
        },
        "featured": {
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}