From 4595577430f3f75f1e735ab567a49847adb6dd70 Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Sun, 12 Apr 2026 12:41:17 -0400 Subject: [PATCH 1/4] docs: add polycentric schema lane index --- schemas/polycentric/README.md | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 schemas/polycentric/README.md diff --git a/schemas/polycentric/README.md b/schemas/polycentric/README.md new file mode 100644 index 0000000..cb9abc2 --- /dev/null +++ b/schemas/polycentric/README.md @@ -0,0 +1,44 @@ +# Polycentric Observer-Control Schema Lane + +This directory is the machine-readable contract lane for the **polycentric observer-control** model. + +## Upstream ownership + +- **Normative doctrine / invariants / ADRs:** `SocioProphet/socioprophet-standards-storage` +- **This repository:** machine-readable realization of the schema family + +## Scope of this lane + +The schema family covers: + +- `Entity` +- `Interaction` +- `StateRecord` +- `View` +- `Observation` +- `Evidence` +- `Claim` +- `Inference` +- `Action` +- `Effect` +- `Artifact` +- `PolicyDecision` +- `ResourceAccount` +- `TrustLabel` +- `Attestation` +- `FlowRule` +- `BoundaryCrossing` +- `RetentionPolicy` +- compile-target schemas for CI/CD and NixOS ops +- machine-readable surface profiles + +## Staging rule + +This lane is intentionally namespaced under `schemas/polycentric/` so it can mature without colliding with existing contract families already present in the repository. + +## Downstream consumption + +- `SocioProphet/TriTRPC` consumes transport bindings only. +- `SocioProphet/agentplane` consumes execution/evidence bindings only. +- `SocioProphet/prophet-platform-standards` consumes operational profile bindings only. +- `SocioProphet/prophet-platform` consumes the canon by reference during runtime adoption. From 9a8002da13a244eaf32d3832a1b7e6ecf5b61a5d Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Sun, 12 Apr 2026 13:22:53 -0400 Subject: [PATCH 2/4] schemas: add polycentric Entity schema --- schemas/polycentric/Entity.json | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 schemas/polycentric/Entity.json diff --git a/schemas/polycentric/Entity.json b/schemas/polycentric/Entity.json new file mode 100644 index 0000000..aca328b --- /dev/null +++ b/schemas/polycentric/Entity.json @@ -0,0 +1,84 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Entity", + "type": "object", + "required": [ + "schema_version", + "entity_id", + "entity_type", + "logical_identity", + "boundary", + "capabilities", + "policies", + "trust", + "resources" + ], + "properties": { + "schema_version": { "const": "0.3" }, + "entity_id": { "type": "string", "pattern": "^ent:[A-Za-z0-9._-]+$" }, + "entity_type": { + "type": "string", + "enum": [ + "person","agent","browser_session","terminal_session","ide_workspace","repo","pipeline","host","service","model_provider","cache","artifact_store","policy_engine","search_index","chart","queue","database","cluster","ci_runner","filesystem","other" + ] + }, + "logical_identity": { "type": "string" }, + "execution_instance_id": { "type": ["string", "null"] }, + "aliases": { "type": "array", "items": { "type": "string" } }, + "owner_ref": { "type": ["string", "null"], "pattern": "^ent:[A-Za-z0-9._-]+$" }, + "parent_ref": { "type": ["string", "null"], "pattern": "^ent:[A-Za-z0-9._-]+$" }, + "tenant_ref": { "type": ["string", "null"] }, + "boundary": { + "type": "object", + "required": ["senses","effectors","reachable_surfaces","ingress_modes","egress_modes"], + "properties": { + "senses": { "type": "array", "items": { "type": "string" } }, + "effectors": { "type": "array", "items": { "type": "string" } }, + "reachable_surfaces": { "type": "array", "items": { "type": "string" } }, + "ingress_modes": { "type": "array", "items": { "type": "string" } }, + "egress_modes": { "type": "array", "items": { "type": "string" } }, + "touchpoints": { "type": "array", "items": { "type": "string" } } + }, + "additionalProperties": false + }, + "capabilities": { "type": "array", "items": { "type": "string" } }, + "policies": { + "type": "array", + "items": { + "type": "string", + "pattern": "^(ent|int|state|view|obs|ev|clm|inf|act|eff|art|pdec|racc|bcx|lbl|att|flow|ct|ret):[A-Za-z0-9._-]+$" + } + }, + "trust": { + "type": "object", + "required": ["authn","authz","attestation_refs","delegation_chain"], + "properties": { + "authn": { "type": ["string", "null"] }, + "authz": { "type": "array", "items": { "type": "string" } }, + "attestation_refs": { "type": "array", "items": { "type": "string", "pattern": "^att:[A-Za-z0-9._-]+$" } }, + "delegation_chain": { "type": "array", "items": { "type": "string", "pattern": "^ent:[A-Za-z0-9._-]+$" } }, + "label_refs": { "type": "array", "items": { "type": "string", "pattern": "^lbl:[A-Za-z0-9._-]+$" } } + }, + "additionalProperties": false + }, + "resources": { + "type": "object", + "required": ["latency_budget_ms","compute_budget","storage_budget_bytes","spend_budget","capacity","health","blast_radius"], + "properties": { + "latency_budget_ms": { "type": ["number", "null"] }, + "compute_budget": { "type": ["number", "null"] }, + "storage_budget_bytes": { "type": ["integer", "null"] }, + "spend_budget": { "type": ["number", "null"] }, + "capacity": { "type": ["string", "number", "null"] }, + "health": { "type": "string", "enum": ["healthy","degraded","failed","unknown"] }, + "blast_radius": { "type": ["string", "null"] } + }, + "additionalProperties": false + }, + "hot_state_ref": { "type": ["string", "null"], "pattern": "^state:[A-Za-z0-9._-]+$" }, + "memory_ref": { "type": ["string", "null"], "pattern": "^state:[A-Za-z0-9._-]+$" }, + "artifact_refs": { "type": "array", "items": { "type": "string", "pattern": "^art:[A-Za-z0-9._-]+$" } }, + "status": { "type": ["string", "null"], "enum": ["active","inactive","quarantined","deleted","unknown"] } + }, + "additionalProperties": false +} From 0046950893c96225781dbc3a2f36e1324d3528a3 Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Sun, 12 Apr 2026 13:30:28 -0400 Subject: [PATCH 3/4] schemas: add polycentric Interaction schema --- schemas/polycentric/Interaction.json | 82 ++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 schemas/polycentric/Interaction.json diff --git a/schemas/polycentric/Interaction.json b/schemas/polycentric/Interaction.json new file mode 100644 index 0000000..e12d76b --- /dev/null +++ b/schemas/polycentric/Interaction.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interaction", + "type": "object", + "required": ["schema_version","interaction_id","interaction_type","participants","intent","status","causality","time","provenance"], + "properties": { + "schema_version": { "const": "0.3" }, + "interaction_id": { "type": "string", "pattern": "^int:[A-Za-z0-9._-]+$" }, + "interaction_type": { "type": "string" }, + "participants": { + "type": "array", + "minItems": 3, + "items": { + "type": "object", + "required": ["entity_id","role"], + "properties": { + "entity_id": { "type": "string", "pattern": "^ent:[A-Za-z0-9._-]+$" }, + "role": { "type": "string", "enum": ["initiator","counterparty","substrate","witness_governor","delegate","resource_provider","beneficiary","reviewer","cache","artifact_store","policy_engine","sensor","actuator"] }, + "cardinality": { "type": ["integer","null"], "minimum": 1 } + }, + "additionalProperties": false + } + }, + "intent": { + "type": "object", + "required": ["verb"], + "properties": { + "verb": { "type": "string" }, + "target_ref": { "type": ["string","null"], "pattern": "^(ent|int|state|view|obs|ev|clm|inf|act|eff|art|pdec|racc|bcx|lbl|att|flow|ct|ret):[A-Za-z0-9._-]+$" }, + "description": { "type": ["string","null"] } + }, + "additionalProperties": false + }, + "observation_refs": { "type": "array", "items": { "type": "string", "pattern": "^obs:[A-Za-z0-9._-]+$" } }, + "claim_refs": { "type": "array", "items": { "type": "string", "pattern": "^clm:[A-Za-z0-9._-]+$" } }, + "action_refs": { "type": "array", "items": { "type": "string", "pattern": "^act:[A-Za-z0-9._-]+$" } }, + "effect_refs": { "type": "array", "items": { "type": "string", "pattern": "^eff:[A-Za-z0-9._-]+$" } }, + "boundary_crossing_refs": { "type": "array", "items": { "type": "string", "pattern": "^bcx:[A-Za-z0-9._-]+$" } }, + "policy_decision_refs": { "type": "array", "items": { "type": "string", "pattern": "^pdec:[A-Za-z0-9._-]+$" } }, + "artifact_refs": { "type": "array", "items": { "type": "string", "pattern": "^art:[A-Za-z0-9._-]+$" } }, + "outcome": { "type": ["string","null"] }, + "status": { "type": "string", "enum": ["planned","running","succeeded","failed","compensated","cancelled","unknown"] }, + "causality": { + "type": "object", + "required": ["correlation_id"], + "properties": { + "parent_interaction_ref": { "type": ["string","null"], "pattern": "^int:[A-Za-z0-9._-]+$" }, + "previous_interaction_ref": { "type": ["string","null"], "pattern": "^int:[A-Za-z0-9._-]+$" }, + "correlation_id": { "type": "string" }, + "idempotency_key": { "type": ["string","null"] } + }, + "additionalProperties": false + }, + "time": { + "type": "object", + "required": ["event_time"], + "properties": { + "event_time": { "type": "string", "format": "date-time" }, + "observed_time": { "type": ["string","null"], "format": "date-time" }, + "processed_time": { "type": ["string","null"], "format": "date-time" }, + "decided_time": { "type": ["string","null"], "format": "date-time" }, + "committed_time": { "type": ["string","null"], "format": "date-time" } + }, + "additionalProperties": false + }, + "provenance": { + "type": "object", + "required": ["source_refs","confidence"], + "properties": { + "source_refs": { + "type": "array", + "items": { "type": "string", "pattern": "^(ent|int|state|view|obs|ev|clm|inf|act|eff|art|pdec|racc|bcx|lbl|att|flow|ct|ret):[A-Za-z0-9._-]+$" }, + "minItems": 1 + }, + "confidence": { "type": ["number","null"], "minimum": 0, "maximum": 1 }, + "witness_refs": { "type": "array", "items": { "type": "string", "pattern": "^(ent|int|state|view|obs|ev|clm|inf|act|eff|art|pdec|racc|bcx|lbl|att|flow|ct|ret):[A-Za-z0-9._-]+$" } } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} From abdd67a2fe38e6277b61e9314388ac26206f2603 Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Sun, 12 Apr 2026 14:24:09 -0400 Subject: [PATCH 4/4] schemas: add polycentric StateRecord schema --- schemas/polycentric/StateRecord.json | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 schemas/polycentric/StateRecord.json diff --git a/schemas/polycentric/StateRecord.json b/schemas/polycentric/StateRecord.json new file mode 100644 index 0000000..02f56fa --- /dev/null +++ b/schemas/polycentric/StateRecord.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "StateRecord", + "type": "object", + "required": ["schema_version","state_id","subject_entity_id","state_class","scope","authority_ref","provenance_refs"], + "properties": { + "schema_version": { "const": "0.3" }, + "state_id": { "type": "string", "pattern": "^state:[A-Za-z0-9._-]+$" }, + "subject_entity_id": { "type": "string", "pattern": "^ent:[A-Za-z0-9._-]+$" }, + "state_class": { "type": "string", "enum": ["authoritative","desired","observed","believed","planned","effected","cached","projected","redacted","tombstoned"] }, + "scope": { "type": "string", "enum": ["thread","user","app","workspace","environment","pipeline","fleet","artifact","global","other"] }, + "authority_ref": { "type": "string", "pattern": "^(ent|int|state|view|obs|ev|clm|inf|act|eff|art|pdec|racc|bcx|lbl|att|flow|ct|ret):[A-Za-z0-9._-]+$" }, + "value_ref": { "type": ["string","null"], "pattern": "^(ent|int|state|view|obs|ev|clm|inf|act|eff|art|pdec|racc|bcx|lbl|att|flow|ct|ret):[A-Za-z0-9._-]+$" }, + "value_inline": { "type": ["object","array","string","number","boolean","null"] }, + "provenance_refs": { "type": "array", "items": { "type": "string", "pattern": "^(ent|int|state|view|obs|ev|clm|inf|act|eff|art|pdec|racc|bcx|lbl|att|flow|ct|ret):[A-Za-z0-9._-]+$" } }, + "time": { + "type": "object", + "properties": { + "event_time": { "type": ["string","null"], "format": "date-time" }, + "observed_time": { "type": ["string","null"], "format": "date-time" }, + "decided_time": { "type": ["string","null"], "format": "date-time" }, + "processed_time": { "type": ["string","null"], "format": "date-time" }, + "valid_from": { "type": ["string","null"], "format": "date-time" }, + "valid_to": { "type": ["string","null"], "format": "date-time" }, + "committed_time": { "type": ["string","null"], "format": "date-time" }, + "fresh_until": { "type": ["string","null"], "format": "date-time" } + }, + "additionalProperties": false + }, + "policy_label_refs": { "type": "array", "items": { "type": "string", "pattern": "^lbl:[A-Za-z0-9._-]+$" } }, + "retention_policy_ref": { "type": ["string","null"], "pattern": "^ret:[A-Za-z0-9._-]+$" } + }, + "additionalProperties": false +}