Claim ownership of the browser-facing approver UI that approval-engine deliberately does not contain. approval-engine's INTENT names an approvals inbox under Non-Goals, and docs/keycape-service-registrations.md records that the human approver client's client_id and callback URI "must come from its owner once it exists" — leaving key-cape's KEY-WP-0013-T02 blocked on an unassigned component. - INTENT.md: Decision Memo concept, the binding/awareness split and the two hashes, ownership and non-ownership against the named estate repositories, and a provisional PEP-shaped layer placement flagged for a gate-house ruling rather than asserted. - GOAL.md: Stage 1 is the L3 approval approver surface — the narrowest real consumer with a live blocking dependency — plus the written answer to who owns the approver UI. - workplans/INFD-WP-0001: founding documents, the gate-house layer/ownership ruling, the four specs (PRD, UseCaseCatalog, ArchitectureBlueprint, EvidenceModel), schema and canonicalizer promotion out of history/ with the isolation vectors under test, the key-cape client registration, and a walking skeleton that includes return and discuss. history/ is preserved unmodified as provenance. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V3W1dQG7GFFM9d94jFx7iR Assistant: claude-code Assistant-Model: opus Assistant-Process: 1565372@bnt-lap001 Assistant-Session: 16bb2f25-b34c-49ef-8e94-5fec3567a568
910 lines
30 KiB
JSON
910 lines
30 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://informed-decision.dev/schema/decision-memo/v0.2",
|
|
"title": "Informed-Decision Decision Memo",
|
|
"description": "Portable decision object: context, circulation, disposition, and cryptographic evidence of an informed identity-bound act.",
|
|
"$defs": {
|
|
"uri": { "type": "string", "format": "uri" },
|
|
"datetime": { "type": "string", "format": "date-time" },
|
|
"ulid": {
|
|
"type": "string",
|
|
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
|
|
"description": "ULID. UUID v7 is also acceptable at the API boundary."
|
|
},
|
|
"sha256": {
|
|
"type": "string",
|
|
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
},
|
|
"contentHash": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["alg", "hex"],
|
|
"properties": {
|
|
"alg": { "type": "string", "enum": ["sha256", "sha384", "sha3-256"] },
|
|
"hex": { "type": "string", "pattern": "^[a-f0-9]{64,96}$" }
|
|
}
|
|
},
|
|
"locale": { "type": "string", "pattern": "^[a-z]{2}(-[A-Z]{2})?$" },
|
|
"markdown": { "type": "string", "maxLength": 100000 },
|
|
"shortText": { "type": "string", "minLength": 1, "maxLength": 280 },
|
|
"mediumText": { "type": "string", "maxLength": 4000 },
|
|
|
|
"bindingLevel": {
|
|
"type": "string",
|
|
"description": "How strongly the resulting act is meant to bind.",
|
|
"enum": [
|
|
"none",
|
|
"acknowledgment",
|
|
"organizational",
|
|
"ses",
|
|
"aes",
|
|
"qes",
|
|
"qeseal"
|
|
]
|
|
},
|
|
"assuranceLevel": {
|
|
"type": "string",
|
|
"enum": ["low", "substantial", "high"]
|
|
},
|
|
"depthLevel": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 5,
|
|
"description": "L0 login … L5 multi-party instrument. Advisory; schema is shared."
|
|
},
|
|
"requestedAct": {
|
|
"type": "string",
|
|
"enum": [
|
|
"login",
|
|
"elevate",
|
|
"acknowledge",
|
|
"approve",
|
|
"accept",
|
|
"decline",
|
|
"sign",
|
|
"seal",
|
|
"countersign",
|
|
"ratify"
|
|
]
|
|
},
|
|
"memoStatus": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"submitted",
|
|
"circulating",
|
|
"awaiting_actor",
|
|
"in_discussion",
|
|
"returned",
|
|
"completed",
|
|
"withdrawn",
|
|
"expired",
|
|
"superseded"
|
|
]
|
|
},
|
|
"outcome": {
|
|
"type": "string",
|
|
"enum": [
|
|
"accepted",
|
|
"declined",
|
|
"acknowledged",
|
|
"abstained",
|
|
"recused",
|
|
"cancelled",
|
|
"timed_out"
|
|
]
|
|
},
|
|
"dispositionVerb": {
|
|
"type": "string",
|
|
"enum": [
|
|
"comment",
|
|
"discuss",
|
|
"return",
|
|
"forward",
|
|
"escalate",
|
|
"acknowledge",
|
|
"accept",
|
|
"decline",
|
|
"abstain",
|
|
"recuse",
|
|
"withdraw",
|
|
"stamp",
|
|
"configure",
|
|
"promote"
|
|
]
|
|
},
|
|
"sessionStatus": {
|
|
"type": "string",
|
|
"enum": ["none", "pending", "active", "ended"]
|
|
},
|
|
"awarenessSource": {
|
|
"type": "string",
|
|
"enum": ["system_default", "last_used", "policy", "explicit", "inferred"]
|
|
},
|
|
"scopeKind": {
|
|
"type": "string",
|
|
"enum": ["system", "tenant", "workspace", "resource", "privilege_set", "environment"]
|
|
},
|
|
"partyKind": {
|
|
"type": "string",
|
|
"enum": ["person", "org", "role", "group", "system", "agent"]
|
|
},
|
|
"routeMode": {
|
|
"type": "string",
|
|
"enum": ["sequential", "parallel", "hybrid"]
|
|
},
|
|
"stepKind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"inform",
|
|
"comment",
|
|
"review",
|
|
"mitzeichnung",
|
|
"schlusszeichnung",
|
|
"acknowledge",
|
|
"approve",
|
|
"sign",
|
|
"seal",
|
|
"deposit"
|
|
]
|
|
},
|
|
"documentRole": {
|
|
"type": "string",
|
|
"enum": [
|
|
"brief",
|
|
"primary",
|
|
"annex",
|
|
"supporting",
|
|
"prior_decision",
|
|
"diff",
|
|
"translation",
|
|
"evidence_export"
|
|
]
|
|
},
|
|
"highlightSeverity": {
|
|
"type": "string",
|
|
"enum": ["critical", "material", "informational"]
|
|
},
|
|
"evidenceEventType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"memo.created",
|
|
"memo.updated",
|
|
"memo.submitted",
|
|
"memo.withdrawn",
|
|
"memo.superseded",
|
|
"memo.expired",
|
|
"packet.attached",
|
|
"packet.detached",
|
|
"highlight.added",
|
|
"highlight.updated",
|
|
"route.started",
|
|
"route.step_assigned",
|
|
"route.step_completed",
|
|
"route.returned",
|
|
"route.forwarded",
|
|
"route.escalated",
|
|
"presentation.opened",
|
|
"presentation.viewed",
|
|
"presentation.highlight_acked",
|
|
"identity.authenticated",
|
|
"identity.step_up",
|
|
"disposition.recorded",
|
|
"signature.created",
|
|
"seal.created",
|
|
"timestamp.qualified",
|
|
"file.stamped",
|
|
"bundle.sealed",
|
|
"awareness.shown",
|
|
"session.started",
|
|
"session.configured",
|
|
"session.hat_selected",
|
|
"session.ended",
|
|
"scope.rebind_required"
|
|
]
|
|
},
|
|
|
|
"identifier": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["scheme", "value"],
|
|
"properties": {
|
|
"scheme": {
|
|
"type": "string",
|
|
"description": "idp:oidc-sub | eudi:pid | eidas:person | email | employee_id | lei | orga_id | did"
|
|
},
|
|
"value": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
"issuing_authority": { "type": "string" }
|
|
}
|
|
},
|
|
"mandate": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "scope"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Human-readable competence: 'CFO contracts ≤ 250k EUR', 'prod-admin JIT', 'ADR acceptor'."
|
|
},
|
|
"policy_ref": { "$ref": "#/$defs/uri" },
|
|
"max_value": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"amount": { "type": "number" },
|
|
"currency": { "type": "string", "minLength": 3, "maxLength": 3 }
|
|
}
|
|
},
|
|
"valid_from": { "$ref": "#/$defs/datetime" },
|
|
"valid_until": { "$ref": "#/$defs/datetime" },
|
|
"delegation_of": { "$ref": "#/$defs/ulid" }
|
|
}
|
|
},
|
|
"partyRef": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "kind", "display_name"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"kind": { "$ref": "#/$defs/partyKind" },
|
|
"display_name": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
"identifiers": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/identifier" }
|
|
},
|
|
"org_id": { "$ref": "#/$defs/ulid" },
|
|
"role": { "type": "string" },
|
|
"mandate": { "$ref": "#/$defs/mandate" },
|
|
"contact": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"email": { "type": "string", "format": "email" },
|
|
"channel": { "type": "string", "enum": ["in_app", "email", "matrix", "teams"] }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"locator": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"description": "Stable pointer into a packet item. Prefer quote+context over pixel boxes.",
|
|
"required": ["kind"],
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text_quote",
|
|
"pdf_page_region",
|
|
"markdown_heading",
|
|
"json_pointer",
|
|
"xpath",
|
|
"sheet_range",
|
|
"whole_document"
|
|
]
|
|
},
|
|
"quote": { "type": "string", "maxLength": 2000 },
|
|
"prefix": { "type": "string", "maxLength": 200 },
|
|
"suffix": { "type": "string", "maxLength": 200 },
|
|
"page": { "type": "integer", "minimum": 1 },
|
|
"bbox": {
|
|
"type": "array",
|
|
"items": { "type": "number" },
|
|
"minItems": 4,
|
|
"maxItems": 4
|
|
},
|
|
"heading": { "type": "string" },
|
|
"pointer": { "type": "string" },
|
|
"sheet": { "type": "string" },
|
|
"range": { "type": "string" }
|
|
}
|
|
},
|
|
"packetItem": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "role", "filename", "media_type", "hash", "bytes"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"role": { "$ref": "#/$defs/documentRole" },
|
|
"filename": { "type": "string" },
|
|
"media_type": { "type": "string" },
|
|
"language": { "$ref": "#/$defs/locale" },
|
|
"bytes": { "type": "integer", "minimum": 0 },
|
|
"hash": { "$ref": "#/$defs/contentHash" },
|
|
"storage_uri": { "$ref": "#/$defs/uri" },
|
|
"pages": { "type": "integer", "minimum": 1 },
|
|
"version": { "type": "integer", "minimum": 1 },
|
|
"replaces": { "$ref": "#/$defs/ulid" },
|
|
"is_to_be_signed": { "type": "boolean", "default": false },
|
|
"is_to_be_stamped": { "type": "boolean", "default": false },
|
|
"label": { "type": "string" }
|
|
}
|
|
},
|
|
"highlight": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "item_id", "severity", "locator", "author_id", "created_at"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"item_id": { "$ref": "#/$defs/ulid" },
|
|
"severity": { "$ref": "#/$defs/highlightSeverity" },
|
|
"locator": { "$ref": "#/$defs/locator" },
|
|
"title": { "$ref": "#/$defs/shortText" },
|
|
"note": { "$ref": "#/$defs/mediumText" },
|
|
"required_ack": { "type": "boolean", "default": false },
|
|
"author_id": { "$ref": "#/$defs/ulid" },
|
|
"created_at": { "$ref": "#/$defs/datetime" },
|
|
"source": { "type": "string", "enum": ["requester", "reviewer", "system", "agent"] }
|
|
}
|
|
},
|
|
"routeStep": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "ordinal", "kind", "assignee", "required_verbs"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"ordinal": { "type": "integer", "minimum": 1 },
|
|
"parallel_group": {
|
|
"type": "string",
|
|
"description": "Steps sharing a group may complete in any order. Next ordinal waits for the group."
|
|
},
|
|
"kind": { "$ref": "#/$defs/stepKind" },
|
|
"assignee": { "$ref": "#/$defs/partyRef" },
|
|
"required_verbs": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": { "$ref": "#/$defs/dispositionVerb" }
|
|
},
|
|
"min_binding_level": { "$ref": "#/$defs/bindingLevel" },
|
|
"due_at": { "$ref": "#/$defs/datetime" },
|
|
"started_at": { "$ref": "#/$defs/datetime" },
|
|
"completed_at": { "$ref": "#/$defs/datetime" },
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["pending", "ready", "active", "blocked", "completed", "skipped", "returned"]
|
|
},
|
|
"completion_disposition_id": { "$ref": "#/$defs/ulid" },
|
|
"instructions": { "$ref": "#/$defs/mediumText" }
|
|
}
|
|
},
|
|
"route": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["mode", "steps"],
|
|
"properties": {
|
|
"mode": { "$ref": "#/$defs/routeMode" },
|
|
"policy_ref": { "$ref": "#/$defs/uri" },
|
|
"steps": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": { "$ref": "#/$defs/routeStep" }
|
|
},
|
|
"current_step_ids": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/ulid" }
|
|
}
|
|
}
|
|
},
|
|
"commentAnchor": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item_id": { "$ref": "#/$defs/ulid" },
|
|
"highlight_id": { "$ref": "#/$defs/ulid" },
|
|
"locator": { "$ref": "#/$defs/locator" }
|
|
}
|
|
},
|
|
"threadMessage": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "author_id", "body", "created_at"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"author_id": { "$ref": "#/$defs/ulid" },
|
|
"body": { "$ref": "#/$defs/markdown" },
|
|
"anchor": { "$ref": "#/$defs/commentAnchor" },
|
|
"created_at": { "$ref": "#/$defs/datetime" },
|
|
"visibility": {
|
|
"type": "string",
|
|
"enum": ["all_parties", "internal", "step_only"],
|
|
"default": "all_parties"
|
|
}
|
|
}
|
|
},
|
|
"presentationSnapshot": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"description": "Canonical record of what an actor was shown. The disposition MUST reference a snapshot.",
|
|
"required": [
|
|
"id",
|
|
"actor_id",
|
|
"memo_version",
|
|
"opened_at",
|
|
"ui_release",
|
|
"locale",
|
|
"packet_hashes",
|
|
"highlight_set_hash",
|
|
"view_hash"
|
|
],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"actor_id": { "$ref": "#/$defs/ulid" },
|
|
"memo_version": { "type": "integer", "minimum": 1 },
|
|
"opened_at": { "$ref": "#/$defs/datetime" },
|
|
"closed_at": { "$ref": "#/$defs/datetime" },
|
|
"ui_release": { "type": "string" },
|
|
"locale": { "$ref": "#/$defs/locale" },
|
|
"viewport": { "type": "string", "enum": ["banner", "brief", "packet", "sign", "awareness", "configure"] },
|
|
"phase": { "type": "string", "enum": ["pre_bind", "bind", "post_bind"] },
|
|
"awareness_hash": {
|
|
"$ref": "#/$defs/contentHash",
|
|
"description": "Hash of the awareness slice as shown. Not part of view_hash unless a promote disposition copied fields into binding."
|
|
},
|
|
"packet_hashes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["item_id", "hash"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"item_id": { "$ref": "#/$defs/ulid" },
|
|
"hash": { "$ref": "#/$defs/contentHash" }
|
|
}
|
|
}
|
|
},
|
|
"highlight_ids": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/ulid" }
|
|
},
|
|
"highlight_set_hash": { "$ref": "#/$defs/contentHash" },
|
|
"brief_hash": { "$ref": "#/$defs/contentHash" },
|
|
"view_hash": {
|
|
"$ref": "#/$defs/contentHash",
|
|
"description": "Hash of the canonical presentation document (brief + ordered highlights + visible packet manifests)."
|
|
},
|
|
"acked_highlight_ids": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/ulid" }
|
|
},
|
|
"auth_context": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"password",
|
|
"mfa",
|
|
"passkey",
|
|
"oidc",
|
|
"saml",
|
|
"eudi_wallet",
|
|
"national_eid",
|
|
"qscd"
|
|
]
|
|
},
|
|
"assurance": { "$ref": "#/$defs/assuranceLevel" },
|
|
"idp": { "type": "string" },
|
|
"session_id": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"returnPayload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["reasons"],
|
|
"properties": {
|
|
"reasons": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["code", "text"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"enum": [
|
|
"insufficient_context",
|
|
"wrong_scope",
|
|
"wrong_assignee",
|
|
"highlights_incomplete",
|
|
"document_stale",
|
|
"legal_issue",
|
|
"commercial_issue",
|
|
"risk_unaddressed",
|
|
"other"
|
|
]
|
|
},
|
|
"text": { "$ref": "#/$defs/mediumText" },
|
|
"anchor": { "$ref": "#/$defs/commentAnchor" }
|
|
}
|
|
}
|
|
},
|
|
"required_changes": { "$ref": "#/$defs/markdown" }
|
|
}
|
|
},
|
|
"transferPayload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["to"],
|
|
"properties": {
|
|
"to": { "$ref": "#/$defs/partyRef" },
|
|
"reason": { "$ref": "#/$defs/mediumText" },
|
|
"keep_self_informed": { "type": "boolean", "default": true }
|
|
}
|
|
},
|
|
"signaturePayload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["level", "signed_hash"],
|
|
"properties": {
|
|
"level": { "$ref": "#/$defs/bindingLevel" },
|
|
"profile": {
|
|
"type": "string",
|
|
"enum": ["PAdES-B-LT", "PAdES-B-LTA", "XAdES-B-LT", "CAdES-B-LT", "JAdES", "raw"]
|
|
},
|
|
"signed_hash": { "$ref": "#/$defs/contentHash" },
|
|
"signed_item_ids": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/ulid" }
|
|
},
|
|
"presentation_bound": {
|
|
"type": "boolean",
|
|
"description": "True when view_hash is included in the signed attributes (dynamic linking)."
|
|
},
|
|
"certificate_ref": { "type": "string" },
|
|
"tsp": { "type": "string" },
|
|
"qts_token_ref": { "type": "string" },
|
|
"cms_or_jose": { "type": "string", "description": "Detached signature reference or storage URI." }
|
|
}
|
|
},
|
|
"disposition": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"id",
|
|
"verb",
|
|
"actor",
|
|
"step_id",
|
|
"presentation_id",
|
|
"created_at",
|
|
"payload_hash"
|
|
],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"verb": { "$ref": "#/$defs/dispositionVerb" },
|
|
"actor": { "$ref": "#/$defs/partyRef" },
|
|
"step_id": { "$ref": "#/$defs/ulid" },
|
|
"presentation_id": {
|
|
"$ref": "#/$defs/ulid",
|
|
"description": "Required binding to a presentation snapshot. No snapshot, no binding act."
|
|
},
|
|
"body": { "$ref": "#/$defs/markdown" },
|
|
"return": { "$ref": "#/$defs/returnPayload" },
|
|
"transfer": { "$ref": "#/$defs/transferPayload" },
|
|
"signature": { "$ref": "#/$defs/signaturePayload" },
|
|
"configure": { "$ref": "#/$defs/configurePayload" },
|
|
"created_at": { "$ref": "#/$defs/datetime" },
|
|
"payload_hash": { "$ref": "#/$defs/contentHash" },
|
|
"actor_signature": {
|
|
"description": "Optional signature over payload_hash + presentation.view_hash + memo.id@version.",
|
|
"$ref": "#/$defs/signaturePayload"
|
|
}
|
|
}
|
|
},
|
|
"evidenceEvent": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "seq", "type", "at", "payload_hash", "prev_hash", "event_hash"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"seq": { "type": "integer", "minimum": 0 },
|
|
"type": { "$ref": "#/$defs/evidenceEventType" },
|
|
"at": { "$ref": "#/$defs/datetime" },
|
|
"actor_id": { "$ref": "#/$defs/ulid" },
|
|
"payload": { "type": "object" },
|
|
"payload_hash": { "$ref": "#/$defs/contentHash" },
|
|
"prev_hash": { "$ref": "#/$defs/contentHash" },
|
|
"event_hash": { "$ref": "#/$defs/contentHash" },
|
|
"ip_hash": {
|
|
"type": "string",
|
|
"description": "Optional HMAC of network address; store raw IP only where lawful."
|
|
},
|
|
"device_attestation": { "type": "string" }
|
|
}
|
|
},
|
|
"evidenceBundle": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "memo_id", "memo_version", "events", "head_hash"],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"memo_id": { "$ref": "#/$defs/ulid" },
|
|
"memo_version": { "type": "integer" },
|
|
"events": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/evidenceEvent" }
|
|
},
|
|
"head_hash": { "$ref": "#/$defs/contentHash" },
|
|
"sealed_at": { "$ref": "#/$defs/datetime" },
|
|
"seal": { "$ref": "#/$defs/signaturePayload" },
|
|
"qualified_timestamp_ref": { "type": "string" },
|
|
"export_uri": { "$ref": "#/$defs/uri" }
|
|
}
|
|
},
|
|
"relation": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["kind", "to"],
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"supersedes",
|
|
"superseded_by",
|
|
"relates_to",
|
|
"implements",
|
|
"triggered_by",
|
|
"attachment_of",
|
|
"translation_of"
|
|
]
|
|
},
|
|
"to": { "$ref": "#/$defs/ulid" },
|
|
"note": { "type": "string" }
|
|
}
|
|
},
|
|
"scopeRef": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["kind", "id", "label"],
|
|
"properties": {
|
|
"kind": { "$ref": "#/$defs/scopeKind" },
|
|
"id": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
"label": { "type": "string" },
|
|
"environment": { "type": "string", "enum": ["dev", "test", "stage", "prod", "other"] },
|
|
"requires_new_bind": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "If true, entering this scope is a new binding act, not a post-sign configure."
|
|
}
|
|
}
|
|
},
|
|
"hat": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"description": "Post-bind perspective: role, access profile, or UI/work mode inside an already bound scope.",
|
|
"required": ["id", "label"],
|
|
"properties": {
|
|
"id": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
"label": { "type": "string" },
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": ["role", "access_profile", "perspective", "duty"]
|
|
},
|
|
"permissions_preview": { "type": "array", "items": { "type": "string" } },
|
|
"scope_id": { "type": "string" },
|
|
"elevates": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "If true, selecting this hat is a privilege act and MUST be promoted into binding or a child memo."
|
|
}
|
|
}
|
|
},
|
|
"bindingSlice": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"description": "PRE-SIGN. Identity and scope being bound. Included in view_hash. Choosing among identities or bind-scopes happens here.",
|
|
"required": ["principal", "target"],
|
|
"properties": {
|
|
"principal": { "$ref": "#/$defs/partyRef" },
|
|
"available_identities": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/partyRef" }
|
|
},
|
|
"target": { "$ref": "#/$defs/scopeRef" },
|
|
"available_bind_scopes": {
|
|
"type": "array",
|
|
"description": "Scopes the actor may enter as part of THIS bind (e.g. pick tenant at login).",
|
|
"items": { "$ref": "#/$defs/scopeRef" }
|
|
},
|
|
"granted_at_bind": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"roles": { "type": "array", "items": { "type": "string" } },
|
|
"permissions": { "type": "array", "items": { "type": "string" } },
|
|
"duration_seconds": { "type": "integer", "minimum": 1 }
|
|
}
|
|
},
|
|
"justification": { "$ref": "#/$defs/mediumText" },
|
|
"blast_radius": { "$ref": "#/$defs/mediumText" },
|
|
"terms": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"monitoring": { "type": "boolean" },
|
|
"consent_code": { "type": "string" },
|
|
"consent_text_hash": { "$ref": "#/$defs/contentHash" }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"awarenessSlice": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"description": "Shown before and after bind for situational awareness. Hashed separately as awareness_hash. NOT in view_hash unless promoted.",
|
|
"properties": {
|
|
"proposed_hat": { "$ref": "#/$defs/hat" },
|
|
"proposed_hat_source": { "$ref": "#/$defs/awarenessSource" },
|
|
"available_hats": { "type": "array", "items": { "$ref": "#/$defs/hat" } },
|
|
"available_scopes": {
|
|
"type": "array",
|
|
"description": "Other scopes visible for orientation. Those with requires_new_bind=true cannot be configured post-sign.",
|
|
"items": { "$ref": "#/$defs/scopeRef" }
|
|
},
|
|
"last_session": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"ended_at": { "$ref": "#/$defs/datetime" },
|
|
"hat_id": { "type": "string" },
|
|
"scope_id": { "type": "string" },
|
|
"principal_id": { "$ref": "#/$defs/ulid" }
|
|
}
|
|
},
|
|
"situation_note": { "$ref": "#/$defs/mediumText" }
|
|
}
|
|
},
|
|
"sessionState": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"description": "POST-SIGN live configuration inside a completed bind (login, elevation). Configure acts mutate this, not the sealed binding slice.",
|
|
"required": ["status"],
|
|
"properties": {
|
|
"status": { "$ref": "#/$defs/sessionStatus" },
|
|
"started_at": { "$ref": "#/$defs/datetime" },
|
|
"ended_at": { "$ref": "#/$defs/datetime" },
|
|
"bound_memo_version": { "type": "integer", "minimum": 1 },
|
|
"bound_presentation_id": { "$ref": "#/$defs/ulid" },
|
|
"active_hat": { "$ref": "#/$defs/hat" },
|
|
"active_hat_source": { "$ref": "#/$defs/awarenessSource" }
|
|
}
|
|
},
|
|
"configurePayload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"hat": { "$ref": "#/$defs/hat" },
|
|
"source": { "$ref": "#/$defs/awarenessSource" },
|
|
"note": { "$ref": "#/$defs/mediumText" }
|
|
}
|
|
},
|
|
"identityContext": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"description": "L0/L1 split: binding_slice is pre-sign and signed; awareness_slice is orientation and optional post-sign configure.",
|
|
"properties": {
|
|
"system": { "type": "string" },
|
|
"environment": { "type": "string", "enum": ["dev", "test", "stage", "prod", "other"] },
|
|
"principal": { "$ref": "#/$defs/partyRef" },
|
|
"requested_roles": { "type": "array", "items": { "type": "string" } },
|
|
"requested_permissions": { "type": "array", "items": { "type": "string" } },
|
|
"duration_seconds": { "type": "integer", "minimum": 1 },
|
|
"justification": { "$ref": "#/$defs/mediumText" },
|
|
"blast_radius": { "$ref": "#/$defs/mediumText" },
|
|
"binding": { "$ref": "#/$defs/bindingSlice" },
|
|
"awareness": { "$ref": "#/$defs/awarenessSlice" }
|
|
}
|
|
}
|
|
},
|
|
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"id",
|
|
"version",
|
|
"schema_version",
|
|
"status",
|
|
"created_at",
|
|
"updated_at",
|
|
"requester",
|
|
"question",
|
|
"requested_act",
|
|
"binding_level",
|
|
"brief",
|
|
"packet",
|
|
"route"
|
|
],
|
|
"properties": {
|
|
"id": { "$ref": "#/$defs/ulid" },
|
|
"version": { "type": "integer", "minimum": 1 },
|
|
"schema_version": { "type": "string", "const": "0.2.0" },
|
|
"status": { "$ref": "#/$defs/memoStatus" },
|
|
"outcome": { "$ref": "#/$defs/outcome" },
|
|
"depth": { "$ref": "#/$defs/depthLevel" },
|
|
"title": { "$ref": "#/$defs/shortText" },
|
|
"question": {
|
|
"$ref": "#/$defs/shortText",
|
|
"description": "Single present-tense decision question."
|
|
},
|
|
"requested_act": { "$ref": "#/$defs/requestedAct" },
|
|
"binding_level": { "$ref": "#/$defs/bindingLevel" },
|
|
"locale": { "$ref": "#/$defs/locale" },
|
|
"created_at": { "$ref": "#/$defs/datetime" },
|
|
"updated_at": { "$ref": "#/$defs/datetime" },
|
|
"submitted_at": { "$ref": "#/$defs/datetime" },
|
|
"due_at": { "$ref": "#/$defs/datetime" },
|
|
"completed_at": { "$ref": "#/$defs/datetime" },
|
|
"expires_at": { "$ref": "#/$defs/datetime" },
|
|
|
|
"requester": { "$ref": "#/$defs/partyRef" },
|
|
"subject": {
|
|
"$ref": "#/$defs/partyRef",
|
|
"description": "Who the decision is about, if different from requester (e.g. the person requesting elevation)."
|
|
},
|
|
"parties": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/partyRef" }
|
|
},
|
|
|
|
"brief": {
|
|
"$ref": "#/$defs/markdown",
|
|
"description": "Minimum necessary context. Hash of brief is part of presentation.view_hash."
|
|
},
|
|
"consequences": { "$ref": "#/$defs/markdown" },
|
|
"identity_context": { "$ref": "#/$defs/identityContext" },
|
|
"session": { "$ref": "#/$defs/sessionState" },
|
|
|
|
"packet": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/packetItem" }
|
|
},
|
|
"highlights": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/highlight" }
|
|
},
|
|
"route": { "$ref": "#/$defs/route" },
|
|
"thread": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/threadMessage" }
|
|
},
|
|
"presentations": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/presentationSnapshot" }
|
|
},
|
|
"dispositions": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/disposition" }
|
|
},
|
|
"relations": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/relation" }
|
|
},
|
|
"evidence": { "$ref": "#/$defs/evidenceBundle" },
|
|
|
|
"legal": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"governing_law": { "type": "string" },
|
|
"form_requirement": {
|
|
"type": "string",
|
|
"enum": ["none", "textform", "schriftform", "notarial", "other"]
|
|
},
|
|
"retention_years": { "type": "integer", "minimum": 1 },
|
|
"classification": {
|
|
"type": "string",
|
|
"enum": ["public", "internal", "confidential", "restricted"]
|
|
}
|
|
}
|
|
},
|
|
"extensions": {
|
|
"type": "object",
|
|
"description": "Namespaced vendor or domain extensions. Must not alter binding semantics.",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|