{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sandbaseai.github.io/workbuddy-skill/packages-schema.json",
  "title": "WorkBuddy reviewed package index",
  "description": "Schema for the packages.json list of reviewed WorkBuddy ZIP packages.",
  "type": "array",
  "items": {
    "type": "object",
    "additionalProperties": false,
    "required": ["id", "name", "path", "repository", "source_url", "sha", "download_url", "asset", "checksum_url", "download_command", "category"],
    "properties": {
      "id": {"type": "string", "description": "Catalog ID of the reviewed source."},
      "name": {"type": "string", "description": "Package name."},
      "path": {"type": "string", "description": "Repository-relative reviewed Skill path."},
      "repository": {"type": "string", "description": "Source GitHub repository in owner/name form."},
      "source_url": {"type": "string", "format": "uri", "description": "Immutable source URL."},
      "sha": {"type": "string", "pattern": "^[0-9a-f]{40}$", "description": "Source blob SHA."},
      "download_url": {"type": "string", "format": "uri", "description": "Latest Release ZIP URL."},
      "asset": {"type": "string", "pattern": "^[^/]+-workbuddy-skill\\.zip$", "description": "Release asset filename used by GitHub CLI downloads."},
      "checksum_url": {"type": "string", "format": "uri", "description": "SHA256SUMS URL for the latest Release."},
      "download_command": {"type": "string", "description": "Ready-to-copy GitHub CLI command that downloads the ZIP and checksums."},
      "category": {"type": "string", "description": "Derived or reviewed category."}
    }
  }
}
