{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Structured Media Builder: plan", "type": "object", "properties": { "schema_version": { "const": "1.0" }, "media_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "chunks": { "type": "array", "items": { "type": "object", "properties": { "chunk_id": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$" }, "knowledge_id": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$" }, "version": { "type": "integer", "minimum": 1 }, "supersedes": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$" }, "minItems": 0 }, "title": { "type": "string", "minLength": 1 }, "heading_path": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1 }, "summary": { "type": "string", "minLength": 1 }, "tags": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 0 }, "cue_ids": { "type": "array", "items": { "type": "string", "pattern": "^cue-[0-9]{6}$" }, "minItems": 1, "uniqueItems": true } }, "required": [ "chunk_id", "knowledge_id", "version", "supersedes", "title", "heading_path", "summary", "tags", "cue_ids" ], "additionalProperties": false }, "minItems": 1 }, "qa": { "type": "array", "items": { "type": "object", "properties": { "qa_id": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$" }, "question": { "type": "string", "minLength": 1 }, "answer": { "type": "string", "minLength": 1 }, "answer_type": { "enum": [ "extractive", "synthesis" ] }, "evidence": { "type": "array", "items": { "type": "object", "properties": { "chunk_id": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$" }, "cue_id": { "type": "string", "pattern": "^cue-[0-9]{6}$" }, "quote": { "type": "string", "minLength": 1 } }, "required": [ "chunk_id", "cue_id", "quote" ], "additionalProperties": false }, "minItems": 1 } }, "required": [ "qa_id", "question", "answer", "answer_type", "evidence" ], "additionalProperties": false }, "minItems": 0 }, "chapters": { "type": "array", "items": { "type": "object", "properties": { "chapter_id": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$" }, "title": { "type": "string", "minLength": 1 }, "start_cue_id": { "type": "string", "pattern": "^cue-[0-9]{6}$" }, "end_cue_id": { "type": "string", "pattern": "^cue-[0-9]{6}$" } }, "required": [ "chapter_id", "title", "start_cue_id", "end_cue_id" ], "additionalProperties": false }, "minItems": 0 }, "review": { "type": "object", "properties": { "status": { "enum": [ "draft", "approved" ] }, "reviewer": { "type": "string" }, "reviewed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "input_sha256": { "anyOf": [ { "type": "string", "pattern": "^[a-f0-9]{64}$" }, { "type": "null" } ] } }, "required": [ "status", "reviewer", "reviewed_at", "input_sha256" ], "additionalProperties": false } }, "required": [ "schema_version", "media_id", "chunks", "qa", "chapters", "review" ], "additionalProperties": false }