{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://docforge.local/schema/project-v1.json", "title": "DocForge project descriptor", "type": "object", "required": ["schema_version", "project_id", "title", "adapter", "sources", "derived", "changesets", "graph"], "properties": { "schema_version": { "const": 1 }, "project_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" }, "title": { "type": "string", "minLength": 1 }, "adapter": { "type": "string", "minLength": 1 }, "sources": { "type": "object", "required": ["content_roots", "authority_files"], "properties": { "content_roots": { "$ref": "#/$defs/pathList" }, "authority_files": { "$ref": "#/$defs/pathList" } }, "additionalProperties": false }, "derived": { "type": "object", "required": ["cache_root", "index"], "properties": { "cache_root": { "$ref": "#/$defs/relativePath" }, "index": { "$ref": "#/$defs/relativePath" } }, "additionalProperties": false }, "changesets": { "type": "object", "required": ["root", "writers"], "properties": { "root": { "$ref": "#/$defs/relativePath" }, "writers": { "type": "array", "items": { "type": "object", "required": ["id", "families", "operations"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" }, "families": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "operations": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["create", "update", "move", "delete"] } } }, "additionalProperties": false } } }, "additionalProperties": false }, "graph": { "type": "object", "required": ["allowed_relations"], "properties": { "allowed_relations": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{1,127}$" } } }, "additionalProperties": false }, "limits": { "type": "object" }, "profiles": { "type": "array" } }, "$defs": { "relativePath": { "type": "string", "minLength": 1, "not": { "pattern": "(^/|(^|/)\\.\\.(/|$))" } }, "pathList": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/relativePath" } } }, "additionalProperties": false }