{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://baseline-harness.dev/spec/schemas/data-access-policy.schema.json", "title": "Data Access Policy", "description": "Политика доступа к данным проекта (D-024). Консервативный default: чтение репозитория или сессии не включает автоматически копирование, хранение и передачу. Каждое разрешение allow — со ссылкой на решение владельца.", "type": "object", "additionalProperties": false, "required": [ "id", "project", "default", "actions" ], "properties": { "id": { "type": "string", "pattern": "^dap-[a-z0-9-]+$" }, "project": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$", "description": "Идентификатор проекта из реестра sources/.md." }, "default": { "const": "deny", "description": "Консервативное значение по умолчанию: всё, что не разрешено явно, запрещено." }, "actions": { "type": "object", "additionalProperties": false, "minProperties": 1, "description": "Действия перечислены раздельно: разрешение одного не распространяется на другие.", "properties": { "read-original": { "$ref": "#/$defs/rule" }, "copy-to-lab": { "$ref": "#/$defs/rule" }, "retain-derived": { "$ref": "#/$defs/rule" }, "transmit-external-model": { "$ref": "#/$defs/rule" }, "publish": { "$ref": "#/$defs/rule" } } }, "notes": { "type": "string", "minLength": 3 } }, "$defs": { "rule": { "type": "object", "additionalProperties": false, "required": [ "effect" ], "properties": { "effect": { "enum": [ "allow", "deny" ] }, "reason": { "type": "string", "minLength": 3 }, "decision_ref": { "type": "string", "pattern": "^D-\\d{3}$", "description": "Ссылка на принятое решение владельца (Backlog.md Decisions)." } }, "allOf": [ { "if": { "properties": { "effect": { "const": "allow" } }, "required": [ "effect" ] }, "then": { "properties": { "decision_ref": true }, "required": [ "decision_ref" ] } } ] } } }