the-custodian/canon/standards/schemas/work-records/engagement.schema.json

30 lines
1.4 KiB
JSON
Raw Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://canon.coulomb.social/schemas/work-records/engagement.schema.json",
"title": "Engagement",
"description": "Authored YAML block for kind=engagement (scheduled external interaction). Id: {PREFIX}-ENG-YYYY-NNN; legacy OH-YYYY-NNN grandfathered. Lifecycle: queued -> prepared -> done.",
"type": "object",
"required": ["id", "title", "status"],
"properties": {
"id": { "type": "string", "pattern": "^([A-Z]+-ENG-[0-9]{4}-[0-9]{3}|OH-[0-9]{4}-[0-9]{3})$" },
"kind": { "const": "engagement" },
"title": { "type": "string", "minLength": 5 },
"status": { "enum": ["queued", "prepared", "done"] },
"counterparty": { "type": "string" },
"lane": { "$ref": "spine.schema.json#/$defs/lane", "description": "Defaults to orange for engagements; explicit value wins." },
"owner": { "$ref": "spine.schema.json#/$defs/owner" },
"tags": { "$ref": "spine.schema.json#/$defs/tags" },
"prepared_material": { "type": "array" },
"deadline_pressure": { "type": "string" },
"origin": { "type": "string" },
"state_hub_engagement_id": { "$ref": "spine.schema.json#/$defs/uuid" }
},
"allOf": [
{
"if": { "properties": { "status": { "const": "prepared" } }, "required": ["status"] },
"then": { "required": ["prepared_material", "counterparty"] }
}
],
"additionalProperties": true
}