{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://neon-sprawl.local/schemas/recipe-def.json",
  "title": "RecipeDef",
  "description": "Single recipe row for catalogs (e.g. content/recipes/*_recipes.json). IDs are stable forever—rename display in displayName only. See docs/decomposition/modules/E3_M2_RefinementAndRecipeExecution.md.",
  "type": "object",
  "additionalProperties": false,
  "required": ["id", "displayName", "recipeKind", "requiredSkillId", "inputs", "outputs"],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]*$",
      "description": "Immutable recipe key for craft HTTP, quests, telemetry, and catalog lookup."
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "description": "Player-facing label; safe to change without migrating character data."
    },
    "recipeKind": {
      "type": "string",
      "description": "process = refine/intermediate; make = finished good.",
      "enum": ["process", "make"]
    },
    "requiredSkillId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]*$",
      "description": "SkillDef id gating craft execution (prototype Slice 3: refine on all rows)."
    },
    "inputs": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "https://neon-sprawl.local/schemas/recipe-io-row.json"
      }
    },
    "outputs": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "https://neon-sprawl.local/schemas/recipe-io-row.json"
      }
    },
    "requiredSkillLevel": {
      "type": "integer",
      "minimum": 0,
      "description": "Optional level gate stub (unused in prototype Slice 3 rows)."
    },
    "stationTag": {
      "type": "string",
      "minLength": 1,
      "description": "Optional station/bench requirement stub (unused in prototype Slice 3)."
    }
  }
}
