{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://usedeed.app/contracts/deed.design_rubric_99_target.v1.schema.json",
  "title": "DEED design rubric 99 target",
  "type": "object",
  "required": [
    "$schema",
    "$version",
    "target",
    "primitiveTarget",
    "dimensionTargets",
    "categoryTargets",
    "classCeilingPolicy",
    "classCeilingExemptions"
  ],
  "properties": {
    "$schema": {
      "const": "https://usedeed.app/contracts/deed.design_rubric_99_target.v1.schema.json"
    },
    "$version": { "type": "string", "minLength": 1 },
    "$description": { "type": "string", "minLength": 1 },
    "target": { "type": "number", "minimum": 0, "maximum": 100 },
    "primitiveTarget": { "type": "number", "minimum": 0, "maximum": 100 },
    "dimensionTargets": { "$ref": "#/$defs/scoreMap" },
    "categoryTargets": { "$ref": "#/$defs/scoreMap" },
    "highScoreEvidence": { "type": "object" },
    "highDimEvidence": { "type": "object" },
    "evidenceSystem": { "type": "object" },
    "classCeilingPolicy": { "type": "object" },
    "executionPath": {
      "type": "array",
      "items": { "type": "string" }
    },
    "classCeilingExemptions": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": ["ceiling", "tierModel", "reason", "upgradePath", "evidence"],
        "properties": {
          "ceiling": { "type": "number", "minimum": 0, "maximum": 100 },
          "tierModel": { "type": "string", "minLength": 1 },
          "reason": { "type": "string", "minLength": 40 },
          "upgradePath": { "type": "string", "minLength": 20 },
          "evidence": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          }
        },
        "additionalProperties": true
      }
    }
  },
  "$defs": {
    "scoreMap": {
      "type": "object",
      "minProperties": 1,
      "additionalProperties": { "type": "number", "minimum": 0, "maximum": 100 }
    }
  },
  "additionalProperties": true
}
