{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://spec.super-arc.com/0.1.0/audience.json",
  "title": "Audience",
  "description": "A Audience in the Narrative Spec. Required core is deliberately tiny: a stub is valid, and depth is scored rather than demanded. Depth groups are the optional top-level objects below; a group is started when its key is present and its value is a non-null object, including {}.",
  "type": "object",
  "required": [
    "id",
    "specType",
    "specVersion",
    "name"
  ],
  "properties": {
    "id": {
      "$ref": "common.json#/$defs/id"
    },
    "specType": {
      "const": "audience"
    },
    "specVersion": {
      "$ref": "common.json#/$defs/specVersion"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Display name. May change; the slug in id may not."
    },
    "status": {
      "$ref": "common.json#/$defs/status"
    },
    "extensions": {
      "$ref": "common.json#/$defs/extensions"
    },
    "reader": {
      "type": [
        "object",
        "null"
      ],
      "description": "Who is picking this up.",
      "properties": {
        "targetReader": {
          "type": "string"
        },
        "ageRange": {
          "type": "string"
        }
      }
    },
    "level": {
      "type": [
        "object",
        "null"
      ],
      "description": "How demanding it is, and how far it goes.",
      "properties": {
        "readingLevel": {
          "type": "string",
          "description": "Accessible / Commercial / Literary / Complex"
        },
        "contentRating": {
          "type": "string",
          "description": "All ages / Teen / Mature / Explicit"
        }
      }
    },
    "positioning": {
      "type": [
        "object",
        "null"
      ],
      "description": "Where it sits on a shelf.",
      "properties": {
        "tone": {
          "type": "string"
        },
        "positioning": {
          "type": "string"
        },
        "compTitles": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Comparable titles."
        }
      }
    },
    "goals": {
      "type": [
        "object",
        "null"
      ],
      "description": "What the audience should feel, and what adaptation is aiming at.",
      "properties": {
        "text": {
          "type": "string"
        }
      }
    }
  },
  "x-depthOrder": [
    "reader",
    "level",
    "positioning",
    "goals"
  ]
}
