{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://zddc.varasys.io/schema/zddc.schema.json", "title": ".zddc policy document", "description": "Machine schema for the .zddc grammar (see GRAMMAR.md). Each property carries x-zddc-tier: 'structure' (the project shape an end user should not change — paths, WORM, tools, behaviors) or 'option' (the blanks an operator fills — role members, field-code vocabularies, names, labels). A form view renders option fields editable and structure fields read-only. NOTE: not all keys are valid at every level; the cascade + the per-location form decide relevance. Server-side validation still lives in validate.go (this draft-2020-12 schema uses $ref + patternProperties, which the in-tree validator does not yet support); the schema drives the form + client today.", "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string", "description": "Human title for this directory.", "x-zddc-tier": "option" }, "created_by": { "type": "string", "description": "Email of the user who created this folder. Set by the server; audit only.", "x-zddc-tier": "structure" }, "admins": { "type": "array", "items": { "type": "string" }, "description": "Principals (emails, globs, or role names) who administer this subtree. Root admins are super-admins; deeper entries are subtree admins. Elevation-gated full bypass over scope.", "x-zddc-tier": "option" }, "roles": { "type": "object", "description": "Named principal groups referenced by acl/worm/admins. Membership UNIONS across the cascade. The operator fills the members.", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "members": { "type": "array", "items": { "type": "string" }, "description": "Email patterns (alice@x, *@acme.com, *) in this role." }, "reset": { "type": "boolean", "description": "Stop the membership union here: ancestor definitions above this level are excluded." } } }, "x-zddc-tier": "option" }, "acl": { "type": "object", "description": "Access control for this level. permissions maps a principal (email/glob/role) to a verb string from r w c d a (empty string = explicit deny). inherit:false clamps the ACL level-walk so ancestor levels' grants do not apply.", "additionalProperties": false, "properties": { "inherit": { "type": "boolean", "description": "false = this level's ACL does not inherit ancestor levels." }, "permissions": { "type": "object", "patternProperties": { "^.+$": { "type": "string", "pattern": "^[rwcda]*$", "description": "Verb subset of r w c d a; empty = explicit deny." } }, "additionalProperties": false } }, "x-zddc-tier": "structure" }, "worm": { "type": "array", "items": { "type": "string" }, "description": "WORM zone: write/delete/admin stripped for all; create survives only for the listed principals; admins bypass. Unions across the cascade.", "x-zddc-tier": "structure" }, "inherit": { "type": "boolean", "description": "false = stop the cascade here; everything below (ancestors + embedded defaults) is ignored. Makes a subtree a self-contained island.", "x-zddc-tier": "structure" }, "default_tool": { "type": "string", "enum": ["archive", "transmittal", "classifier", "browse", "tables", "landing", "form"], "description": "Tool served at