{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "title": "HK Settings Registry",
  "description": "Simplified schema for settings.toml (internal registry)",
  "type": "object",
  "additionalProperties": false,
  "patternProperties": {
    "^[a-z][a-z0-9_]*$": {
      "type": "object",
      "additionalProperties": false,
      "required": ["type", "docs"],
      "properties": {
        "type": { "type": "string" },
        "default": {},
        "merge": { "type": "string", "enum": ["union", "replace"] },
        "sources": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "cli": { "type": "array", "items": { "type": "string" } },
            "env": { "type": "array", "items": { "type": "string" } },
            "git": { "type": "array", "items": { "type": "string" } },
            "pkl": { "type": "array", "items": { "type": "string" } }
          }
        },
        "validate": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enum": { "type": "array", "items": { "type": "string" } }
          }
        },
        "docs": { "type": "string" },
        "examples": { "type": "array", "items": { "type": "string" } },
        "deprecated": { "type": "string" },
        "since": { "type": "string" },
        "env_only": { "type": "boolean" }
      }
    }
  }
}
