{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ResourceHeader",
  "type": "object",
  "required": ["id", "kind", "schema_version", "revision", "content_hash", "dependencies"],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9_]+(?:\\.[a-z0-9_]+)+$"
    },
    "kind": {
      "enum": ["character", "world_book", "persona", "plot_module", "item_spec"]
    },
    "schema_version": {
      "const": 1
    },
    "revision": {
      "type": "string",
      "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
    },
    "content_hash": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "dependencies": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  },
  "additionalProperties": false
}
