informed-decision/schemas/memo-intake.schema.json
tegwick a973d3656a INFD: frictionless decision intake design and workplan (CUST-WP-0075)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 3775@bnt-lap001
Assistant-Session: cfacb6a5-ad5b-4f79-ac67-053e3b0d34a3
2026-10-03 09:21:05 +02:00

138 lines
3.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://decisions.coulomb.social/schemas/memo-intake.schema.json",
"title": "informed-decision memo intake envelope v1",
"description": "POST /v1/memos body (docs/specs/FrictionlessDecisionIntake.md \u00a73.2). The submitter comes from the verified workload token, never from this body. informed_decision/intake.py is the enforcing validator; this schema documents the shape.",
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"version",
"idempotency_key",
"memo_class",
"review_group",
"approval_intent",
"memo",
"packet"
],
"properties": {
"kind": {
"const": "informed-decision.memo-intake"
},
"version": {
"const": 1
},
"idempotency_key": {
"type": "string",
"pattern": "^[A-Za-z0-9._:-]{8,128}$"
},
"memo_class": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{1,62}$"
},
"review_group": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{1,62}$"
},
"drafted_by": {
"type": "string",
"maxLength": 200,
"description": "Asserted provenance, shown as such; not an identity."
},
"serves": {
"type": "object",
"additionalProperties": false,
"required": [
"hub_decision_id",
"resolves"
],
"properties": {
"hub_decision_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
},
"resolves": {
"enum": [
"on-answer",
"never"
]
}
}
},
"approval_intent": {
"type": "object",
"additionalProperties": false,
"required": [
"action",
"principal",
"purpose",
"target"
],
"description": "binding.actor is not accepted; intake sets it to informed-decision.",
"properties": {
"action": {
"type": "string"
},
"principal": {
"type": "string"
},
"purpose": {
"type": "string"
},
"target": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"type",
"system"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"system": {
"type": "string"
}
}
}
}
},
"memo": {
"type": "object",
"description": "Unsigned draft in the operational shape read by informed_decision.records.memo_from: version 1, sealed false, approval_id and approval_binding_digest null, binding.principal.id pending-human-session."
},
"packet": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"item_id",
"media_type",
"content"
],
"properties": {
"item_id": {
"type": "string"
},
"media_type": {
"enum": [
"text/markdown",
"text/plain",
"application/json"
]
},
"content": {
"type": "string",
"maxLength": 262144
}
}
}
}
}
}