{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://lc-json.org/1.1-rc.1/exercise-item.schema.json",
  "title": "ExerciseItem Schema",
  "description": "Item with questions, distinct from `quiz` to allow for different UI rendering and a separate points bucket. Grading is an independent policy via `isGraded`.",
  "type": "object",
  "allOf": [
    {
      "$ref": "item-base.schema.json"
    },
    {
      "properties": {
        "type": {
          "const": "exercise"
        },
        "questions": {
          "type": "array",
          "description": "Array of Question objects (polymorphic)",
          "items": {
            "$ref": "question-base.schema.json"
          },
          "default": []
        },
        "isGraded": {
          "type": "boolean",
          "description": "Whether this exercise contributes to the gradebook. Defaults to false; set to true for graded homework, problem sets, or any exercise whose score should count toward the learner's grade.",
          "default": false
        },
        "points": {
          "type": "number",
          "description": "Total points available for this exercise. Authoring tools may auto-sum from child Question.points or accept an explicit weighted total; the value here is the resolved total either way.",
          "minimum": 0,
          "default": 0
        },
        "passMarkPercent": {
          "type": "number",
          "description": "Threshold percentage (0-100) at which a score counts as passing. Consumer policy varies: some use this for grading display only, others gate forward navigation, others route to remediation/enrichment paths. Authors compose intent by combining this with `isGraded` and `isOptional`. See ITEM_PATTERNS.md for common combinations.",
          "minimum": 0,
          "maximum": 100,
          "default": 70.0
        }
      },
      "required": [
        "questions"
      ]
    }
  ]
}
