Skip to content

Commit 0ee12ea

Browse files
authored
Add Workspace Recall promotion packet v0.1
Adds the Memory Mesh handoff for Workspace Context Fabric recall candidates. Changes: - add WorkspaceRecallPromotionPacket docs - add schema and example packet - add validator and make target - add focused workspace-recall-promotion workflow Boundary: review-only promotion packet. Workspace creates RecallCandidate refs; Memory Mesh receives evidence/policy lineage refs. Durable writeback remains disabled by default and promotion requires later governance approval. Validation observed on head 7c9cb06: - workspace-recall-promotion: success - python-validation: success - validate-locks: success - deploy-assets-validation: success - validate-runtime: success - governed-learning-lifecycle: success - agent-learning-proposal: success - test-finance-source-of-truth: success
1 parent 4d46838 commit 0ee12ea

6 files changed

Lines changed: 275 additions & 1 deletion

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: workspace-recall-promotion
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/workspace-recall-promotion.md"
7+
- "schemas/workspace-recall-promotion-packet.schema.json"
8+
- "examples/workspace-recall/**"
9+
- "scripts/validate_workspace_recall_promotion_packet.py"
10+
- ".github/workflows/workspace-recall-promotion.yml"
11+
- "Makefile"
12+
push:
13+
branches:
14+
- main
15+
paths:
16+
- "docs/workspace-recall-promotion.md"
17+
- "schemas/workspace-recall-promotion-packet.schema.json"
18+
- "examples/workspace-recall/**"
19+
- "scripts/validate_workspace_recall_promotion_packet.py"
20+
- ".github/workflows/workspace-recall-promotion.yml"
21+
- "Makefile"
22+
workflow_dispatch:
23+
24+
jobs:
25+
validate-workspace-recall-promotion:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: "3.11"
32+
- name: Validate Workspace Recall promotion packet
33+
run: make validate-workspace-recall-promotion

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PYTHON ?= python
22

3-
.PHONY: validate-upstreams validate-python validate-deploy-assets validate-agent-learning-proposal validate-governed-learning-lifecycle validate local-preflight local-up local-smoke local-debug local-down
3+
.PHONY: validate-upstreams validate-python validate-deploy-assets validate-agent-learning-proposal validate-governed-learning-lifecycle validate-workspace-recall-promotion validate local-preflight local-up local-smoke local-debug local-down
44

55
validate-upstreams:
66
$(PYTHON) scripts/validate_upstreams.py third_party/upstreams.lock.yaml
@@ -20,6 +20,9 @@ validate-agent-learning-proposal:
2020
validate-governed-learning-lifecycle:
2121
$(PYTHON) scripts/validate_governed_learning_lifecycle.py
2222

23+
validate-workspace-recall-promotion:
24+
$(PYTHON) scripts/validate_workspace_recall_promotion_packet.py
25+
2326
validate: validate-upstreams validate-python validate-deploy-assets
2427

2528
local-preflight:

docs/workspace-recall-promotion.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Workspace Recall Promotion
2+
3+
## Purpose
4+
5+
This document defines the Memory Mesh handoff for Workspace Context Fabric recall candidates.
6+
7+
Prophet Workspace owns the workroom-facing `RecallCandidate` object. Memory Mesh owns the review and promotion path for durable recall records.
8+
9+
## Boundary
10+
11+
The v0.1 path is review-only by default:
12+
13+
```text
14+
Workspace RecallCandidate
15+
-> WorkspaceRecallPromotionPacket
16+
-> AgentLearningProposal-compatible review queue
17+
-> approved durable record only after review
18+
```
19+
20+
Memory Mesh does not silently promote workspace context into durable recall. The packet preserves refs to the workroom, context graph, runtime binding, AgentPlane evidence, platform evidence, and policy decisions.
21+
22+
## Object
23+
24+
The first object is:
25+
26+
```text
27+
schemas/workspace-recall-promotion-packet.schema.json
28+
examples/workspace-recall/promotion-packet.example.json
29+
```
30+
31+
## Required posture
32+
33+
- source workspace refs are preserved;
34+
- review mode defaults to `review_only`;
35+
- raw sensitive payload storage is false in the example;
36+
- durable action is disabled until review approval;
37+
- evidence and policy refs are mandatory;
38+
- AgentPlane and Prophet Platform refs remain external authority refs.
39+
40+
## Validation
41+
42+
```bash
43+
python scripts/validate_workspace_recall_promotion_packet.py
44+
```
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"apiVersion": "memory.mesh.workspace-recall-promotion/v1",
3+
"kind": "WorkspaceRecallPromotionPacket",
4+
"packetId": "workspace-recall-promotion-demo-0001",
5+
"createdAt": "2026-05-22T17:00:00Z",
6+
"sourceWorkspace": {
7+
"workroomRef": "workroom://workroom-demo-0001",
8+
"professionalWorkroomRef": "professional-workroom://workroom-demo-0001",
9+
"contextGraphRef": "ctxgraph-demo-0001",
10+
"runtimeBindingRef": "runtime-binding-demo-0001",
11+
"agentPlaneEvidenceRef": "agentplane://evidence/workroom-context-demo-0001",
12+
"platformRecordRef": "platform://workspace-context-record-demo-0001"
13+
},
14+
"candidate": {
15+
"recallCandidateRef": "recall-candidate-demo-0001",
16+
"summary": "Workspace context should remain workroom-bound before promotion.",
17+
"sourceNodeRefs": [
18+
"ctxnode-demo-0002"
19+
],
20+
"scope": "workroom",
21+
"confidence": 0.91,
22+
"reviewState": "pending"
23+
},
24+
"review": {
25+
"mode": "review_only",
26+
"required": true,
27+
"status": "pending",
28+
"reviewerRefs": [
29+
"human:workspace-owner"
30+
],
31+
"approvalRef": null,
32+
"notes": "Review-only packet. Durable writeback is disabled pending approval."
33+
},
34+
"destination": {
35+
"scope": "project",
36+
"targetRef": "SocioProphet/prophet-workspace",
37+
"path": "docs/context-fabric.md",
38+
"memoryNamespace": "workspace-context-fabric"
39+
},
40+
"evidenceRefs": [
41+
"evidence://context-fabric/recall/demo-0001",
42+
"agentplane://evidence/workroom-context-demo-0001",
43+
"platform://workspace-context-record-demo-0001"
44+
],
45+
"policyDecisionRefs": [
46+
"policy-decision://policy-demo-ai-use/decision-0001"
47+
],
48+
"promotion": {
49+
"enabled": false,
50+
"performed": false,
51+
"proposalRef": null,
52+
"writebackRef": null
53+
},
54+
"redaction": {
55+
"rawPayloadStored": false,
56+
"summary": "Only refs and reviewed summary are included."
57+
}
58+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.socioprophet.org/memory-mesh/workspace-recall-promotion-packet.schema.json",
4+
"title": "WorkspaceRecallPromotionPacket",
5+
"type": "object",
6+
"additionalProperties": false,
7+
"required": [
8+
"apiVersion",
9+
"kind",
10+
"packetId",
11+
"createdAt",
12+
"sourceWorkspace",
13+
"candidate",
14+
"review",
15+
"destination",
16+
"evidenceRefs",
17+
"policyDecisionRefs",
18+
"promotion"
19+
],
20+
"properties": {
21+
"apiVersion": { "const": "memory.mesh.workspace-recall-promotion/v1" },
22+
"kind": { "const": "WorkspaceRecallPromotionPacket" },
23+
"packetId": { "type": "string", "minLength": 1 },
24+
"createdAt": { "type": "string", "format": "date-time" },
25+
"sourceWorkspace": {
26+
"type": "object",
27+
"additionalProperties": false,
28+
"required": ["workroomRef", "contextGraphRef", "runtimeBindingRef"],
29+
"properties": {
30+
"workroomRef": { "type": "string", "minLength": 1 },
31+
"professionalWorkroomRef": { "type": ["string", "null"] },
32+
"contextGraphRef": { "type": "string", "minLength": 1 },
33+
"runtimeBindingRef": { "type": "string", "minLength": 1 },
34+
"agentPlaneEvidenceRef": { "type": ["string", "null"] },
35+
"platformRecordRef": { "type": ["string", "null"] }
36+
}
37+
},
38+
"candidate": {
39+
"type": "object",
40+
"additionalProperties": false,
41+
"required": ["recallCandidateRef", "summary", "sourceNodeRefs", "scope", "confidence", "reviewState"],
42+
"properties": {
43+
"recallCandidateRef": { "type": "string", "minLength": 1 },
44+
"summary": { "type": "string", "minLength": 1 },
45+
"sourceNodeRefs": { "type": "array", "items": { "type": "string" } },
46+
"scope": { "enum": ["user", "workroom", "tenant", "project", "organization"] },
47+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
48+
"reviewState": { "enum": ["pending", "approved", "rejected", "superseded"] }
49+
}
50+
},
51+
"review": {
52+
"type": "object",
53+
"additionalProperties": false,
54+
"required": ["mode", "required", "status", "reviewerRefs", "approvalRef"],
55+
"properties": {
56+
"mode": { "enum": ["review_only", "approved_writeback"] },
57+
"required": { "type": "boolean" },
58+
"status": { "enum": ["pending", "approved", "rejected", "superseded"] },
59+
"reviewerRefs": { "type": "array", "items": { "type": "string" } },
60+
"approvalRef": { "type": ["string", "null"] },
61+
"notes": { "type": ["string", "null"] }
62+
}
63+
},
64+
"destination": {
65+
"type": "object",
66+
"additionalProperties": false,
67+
"required": ["scope", "targetRef", "path", "memoryNamespace"],
68+
"properties": {
69+
"scope": { "enum": ["repo", "project", "user", "organization", "enterprise"] },
70+
"targetRef": { "type": "string", "minLength": 1 },
71+
"path": { "type": "string", "minLength": 1 },
72+
"memoryNamespace": { "type": ["string", "null"] }
73+
}
74+
},
75+
"evidenceRefs": { "type": "array", "minItems": 1, "items": { "type": "string" } },
76+
"policyDecisionRefs": { "type": "array", "minItems": 1, "items": { "type": "string" } },
77+
"promotion": {
78+
"type": "object",
79+
"additionalProperties": false,
80+
"required": ["enabled", "performed", "proposalRef", "writebackRef"],
81+
"properties": {
82+
"enabled": { "type": "boolean" },
83+
"performed": { "type": "boolean" },
84+
"proposalRef": { "type": ["string", "null"] },
85+
"writebackRef": { "type": ["string", "null"] }
86+
}
87+
},
88+
"redaction": {
89+
"type": "object",
90+
"additionalProperties": false,
91+
"properties": {
92+
"rawPayloadStored": { "type": "boolean" },
93+
"summary": { "type": "string" }
94+
}
95+
}
96+
}
97+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env python3
2+
"""Validate WorkspaceRecallPromotionPacket example."""
3+
4+
import json
5+
import sys
6+
from pathlib import Path
7+
8+
ROOT = Path(__file__).resolve().parents[1]
9+
SCHEMA = ROOT / "schemas/workspace-recall-promotion-packet.schema.json"
10+
EXAMPLE = ROOT / "examples/workspace-recall/promotion-packet.example.json"
11+
12+
13+
def main():
14+
try:
15+
schema = json.loads(SCHEMA.read_text(encoding="utf-8"))
16+
example = json.loads(EXAMPLE.read_text(encoding="utf-8"))
17+
for key in schema["required"]:
18+
if key not in example:
19+
raise AssertionError(f"missing {key}")
20+
assert example["apiVersion"] == "memory.mesh.workspace-recall-promotion/v1"
21+
assert example["kind"] == "WorkspaceRecallPromotionPacket"
22+
assert example["sourceWorkspace"]["workroomRef"].startswith("workroom://")
23+
assert example["sourceWorkspace"]["contextGraphRef"]
24+
assert example["candidate"]["recallCandidateRef"]
25+
assert example["review"]["mode"] == "review_only"
26+
assert example["review"]["required"] is True
27+
assert example["promotion"]["enabled"] is False
28+
assert example["promotion"]["performed"] is False
29+
assert example["evidenceRefs"]
30+
assert example["policyDecisionRefs"]
31+
except Exception as exc:
32+
print(f"ERR: {exc}", file=sys.stderr)
33+
return 2
34+
print("OK: WorkspaceRecallPromotionPacket validation passed")
35+
return 0
36+
37+
38+
if __name__ == "__main__":
39+
raise SystemExit(main())

0 commit comments

Comments
 (0)