{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://neon-sprawl.local/schemas/skill-def.json",
  "title": "SkillDef",
  "description": "Single skill row for catalogs (e.g. content/skills/*.json). IDs are stable forever—rename display in displayName only. See docs/decomposition/modules/E2_M1_SkillDefinitionRegistry.md.",
  "type": "object",
  "additionalProperties": false,
  "required": ["id", "category", "displayName", "allowedXpSourceKinds"],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]*$",
      "description": "Immutable skill key for saves, recipes, quests, telemetry, and XpGrantEvent.skillId. Never change after content ships; add a new id if the skill splits."
    },
    "category": {
      "type": "string",
      "description": "Primary SkillCategory aligned with docs/game-design/skills.md (Gather / Process / Make / Tech).",
      "enum": ["gather", "process", "make", "tech"]
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "description": "Player-facing label; safe to change without migrating character data."
    },
    "allowedXpSourceKinds": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "description": "Which XpGrantEvent.sourceKind values may increase this skill. E2.M2 rejects grants outside this set. Combat encounters do not use skill XP—use gig progression instead.",
      "items": {
        "type": "string",
        "enum": [
          "activity",
          "mission_reward",
          "trainer",
          "book_or_item"
        ]
      }
    }
  }
}
