{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://graphchinese.com/data/conversation-skills.schema.json",
  "title": "GraphChinese Conversation Skill Graph",
  "type": "object",
  "required": ["dataset", "version", "license", "attribution", "moves", "counts", "skills", "dependencies"],
  "properties": {
    "$schema": { "type": "string" },
    "dataset": { "type": "string" },
    "version": { "type": "string" },
    "license": { "type": "string" },
    "attribution": { "type": "string" },
    "source": { "type": "string" },
    "hskNote": { "type": "string" },
    "moves": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "name", "description"],
        "properties": {
          "id": { "type": "string", "pattern": "^[a-z]+$" },
          "name": { "type": "string" },
          "description": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "counts": {
      "type": "object",
      "required": ["skills", "dependencies", "skillsByMove"],
      "properties": {
        "skills": { "type": "integer", "minimum": 0 },
        "dependencies": { "type": "integer", "minimum": 0 },
        "skillsByMove": { "type": "object", "additionalProperties": { "type": "integer" } }
      },
      "additionalProperties": false
    },
    "skills": {
      "type": "array",
      "minItems": 60,
      "maxItems": 100,
      "items": {
        "type": "object",
        "required": ["id", "move", "name", "description", "hsk", "evidence", "assessmentPrompt", "lines", "topic"],
        "properties": {
          "id": { "type": "string", "pattern": "^cs_[a-z0-9_]+$" },
          "move": { "enum": ["open", "point", "name", "life", "receipt", "repair", "chase", "meta"] },
          "name": { "type": "string", "minLength": 3 },
          "description": { "type": "string", "minLength": 20 },
          "hsk": { "type": "integer", "minimum": 0, "maximum": 6 },
          "evidence": { "type": "array", "minItems": 2, "maxItems": 3, "items": { "type": "string", "minLength": 10 } },
          "assessmentPrompt": { "type": "string", "minLength": 20 },
          "lines": { "type": "array", "items": { "type": "string", "pattern": "^[a-z0-9_]+$" }, "uniqueItems": true },
          "topic": { "type": ["string", "null"], "pattern": "_qf_" }
        },
        "additionalProperties": false
      }
    },
    "dependencies": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["skill", "requires", "strength", "reason"],
        "properties": {
          "skill": { "type": "string", "pattern": "^cs_" },
          "requires": { "type": "string", "pattern": "^cs_" },
          "strength": { "enum": ["hard", "soft"] },
          "reason": { "type": "string", "minLength": 8 }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
