the-custodian/canon/standards/schemas/work-records/intake.schema.json
codex b60599f09f
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s
Python Tests / pytest (push) Successful in 33s
docs: residual handoff as work records (role, not kind)
Canon work-record-types: residuals use intake/workplan/decision with
origin residual|handoff and origin_ref parent WP. Schema origin_ref;
agent close protocol aligned.
2026-07-22 18:15:45 +02:00

51 lines
2.1 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://canon.coulomb.social/schemas/work-records/intake.schema.json",
"title": "Intake Item",
"description": "Authored YAML block for kind=intake. Id: {PREFIX}-IN-NNNN; legacy AWQ-NNN grandfathered. Lifecycle: open -> vetted -> routed -> closed(promoted|declined|absorbed).",
"type": "object",
"required": ["id", "title"],
"properties": {
"id": { "type": "string", "pattern": "^([A-Z]+-IN-[0-9]{4}|AWQ-[0-9]{3})$" },
"kind": { "const": "intake" },
"title": { "type": "string", "minLength": 5 },
"status": { "enum": ["open", "vetted", "routed", "closed"] },
"outcome": { "enum": ["promoted", "declined", "absorbed"] },
"lane": { "$ref": "spine.schema.json#/$defs/lane" },
"owner": { "$ref": "spine.schema.json#/$defs/owner" },
"tags": { "$ref": "spine.schema.json#/$defs/tags" },
"priority": { "enum": ["high", "medium", "low"] },
"pulls_from": { "type": "array" },
"promoted_to": { "type": "string", "description": "Canonical id of the record this intake was promoted to." },
"origin": {
"type": "string",
"description": "Where the spark came from. Residuals use residual|handoff; also e.g. legacy-suggestion:<uuid>, mail-triage ids."
},
"origin_ref": {
"type": "string",
"description": "Stable reference into the origin (parent workplan id for residuals, e.g. BINKY-WP-0006)."
},
"notes": { "type": "string" },
"state_hub_intake_id": { "$ref": "spine.schema.json#/$defs/uuid" }
},
"allOf": [
{
"if": { "properties": { "status": { "const": "closed" } }, "required": ["status"] },
"then": { "required": ["outcome"] }
},
{
"if": { "properties": { "outcome": { "const": "promoted" } }, "required": ["outcome"] },
"then": { "required": ["promoted_to"] }
},
{
"if": {
"not": {
"properties": { "status": { "const": "closed" } },
"required": ["status"]
}
},
"then": { "required": ["lane"] }
}
],
"additionalProperties": true
}