{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://docforge.local/schema/manual-render-plan-v1.json", "title": "DocForge immutable manual render plan", "$comment": "plan_id is the SHA-256 of canonical JSON without plan_id and is verified by the runtime contract validator.", "$defs": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "project": { "type": "object", "required": [ "project_id", "project_root_fingerprint", "adapter", "revision", "source_hash" ], "properties": { "project_id": { "type": "string", "minLength": 1 }, "project_root_fingerprint": { "type": "string", "pattern": "^[0-9a-f]{16}$" }, "adapter": { "type": "string", "minLength": 1 }, "revision": { "type": "string", "minLength": 1 }, "source_hash": { "$ref": "#/$defs/sha256" } }, "additionalProperties": false }, "edge": { "type": "object", "required": ["source_id", "relation", "target_id"], "properties": { "source_id": { "type": "string", "minLength": 1 }, "relation": { "type": "string", "minLength": 1 }, "target_id": { "type": "string", "minLength": 1 } }, "additionalProperties": false }, "page": { "type": "object", "required": [ "node_id", "title", "family", "authority", "status", "tags", "summary", "content", "content_hash", "components", "breadcrumbs", "cross_references", "backlinks" ], "properties": { "node_id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "family": { "type": "string", "minLength": 1 }, "authority": { "type": "string", "minLength": 1 }, "status": { "type": "string", "minLength": 1 }, "tags": { "type": "array", "maxItems": 10000, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, "summary": { "type": "string" }, "content": { "type": "string" }, "content_hash": { "$ref": "#/$defs/sha256" }, "components": { "type": "array", "maxItems": 32, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, "breadcrumbs": { "type": "array", "maxItems": 10000, "items": { "type": "string", "minLength": 1 } }, "cross_references": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/edge" } }, "backlinks": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/edge" } } }, "additionalProperties": false }, "navigation_item": { "type": "object", "required": ["node_id", "title"], "properties": { "node_id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 } }, "additionalProperties": false }, "search_document": { "type": "object", "required": [ "node_id", "title", "summary", "family", "status", "tags" ], "properties": { "node_id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "summary": { "type": "string" }, "family": { "type": "string", "minLength": 1 }, "status": { "type": "string", "minLength": 1 }, "tags": { "type": "array", "maxItems": 10000, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true } }, "additionalProperties": false } }, "type": "object", "required": [ "schema_version", "contract", "plan_id", "project", "view", "changeset_hash", "pages", "navigation", "search_documents", "diagnostics" ], "properties": { "schema_version": { "const": 1 }, "contract": { "const": "docforge.manual-render-plan" }, "plan_id": { "$ref": "#/$defs/sha256" }, "project": { "$ref": "#/$defs/project" }, "view": { "type": "object", "required": ["view_id", "title", "families", "renderer"], "properties": { "view_id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "families": { "type": "array", "maxItems": 10000, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, "renderer": { "type": "string", "minLength": 1 } }, "additionalProperties": false }, "changeset_hash": { "oneOf": [ { "$ref": "#/$defs/sha256" }, { "type": "null" } ] }, "pages": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/page" } }, "navigation": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/navigation_item" } }, "search_documents": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/search_document" } }, "diagnostics": { "type": "object", "required": ["orphans", "cycles"], "properties": { "orphans": { "type": "array", "maxItems": 10000, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, "cycles": { "type": "array", "maxItems": 10000, "items": { "type": "array", "minItems": 1, "maxItems": 10000, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true } } }, "additionalProperties": false } }, "additionalProperties": false }