@x12i/memorix-format 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +3 -3
- package/docs/association-format.md +1 -1
- package/docs/memorix-format.md +1 -1
- package/docs/memorix-record-v2.md +3 -3
- package/docs/migrate-present-to-v2.md +1 -1
- package/examples/v2/activity-events-snapshots.json +1 -1
- package/examples/v2/{employees-discovery.json → people-discovery.json} +4 -4
- package/examples/v2/{employees-snapshots.json → people-snapshots-employee.json} +3 -3
- package/examples/v2/{procedures-knowledge.json → playbooks-knowledge.json} +6 -6
- package/examples/v2/work-items-context.json +1 -1
- package/examples/v2/work-items-raw.json +3 -3
- package/examples/v2/work-items-relationships-candidate.json +4 -4
- package/examples/v2/work-items-snapshots-lifecycle.json +1 -1
- package/examples/v2/work-items-snapshots-lightweight-refs.json +1 -1
- package/examples/v2/work-items-snapshots.json +1 -1
- package/meta/content-types.json +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ npm install @x12i/memorix-format@3.0.2
|
|
|
37
37
|
"concept": {
|
|
38
38
|
"title": "Prepare quarterly operations review",
|
|
39
39
|
"identifiers": {
|
|
40
|
-
"primary": { "kind": "workItemId", "value": "WI-100", "issuer": "
|
|
40
|
+
"primary": { "kind": "workItemId", "value": "WI-100", "issuer": "opx-source" }
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"data": { "status": "in-progress", "priority": "normal" },
|
|
@@ -70,8 +70,8 @@ if (!result.ok) throw new Error(result.errors.join("; "));
|
|
|
70
70
|
## Docs
|
|
71
71
|
|
|
72
72
|
- [`docs/memorix-record-v2.md`](./docs/memorix-record-v2.md) · [`meta/`](./meta/)
|
|
73
|
-
- Ebook: [Format for Dummies](../
|
|
74
|
-
- Hub: [https://
|
|
73
|
+
- Ebook: [Format for Dummies](../memorix-docs/01-format-for-dummies/)
|
|
74
|
+
- Hub: [https://docs.memorix.x12i.com](https://docs.memorix.x12i.com)
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
77
|
npm test
|
|
@@ -39,7 +39,7 @@ Object-type segments come from Catalox descriptors — not from this format pack
|
|
|
39
39
|
|
|
40
40
|
- Associated properties are **arrays of plain objects** (linked payloads), never full envelopes.
|
|
41
41
|
- On **memorix-record/2**, root `associated*` may hold **lightweight refs only** (Option A — format-valid): `relationshipDefinitionId` + `recordId`, optional `relationshipId`. Copied related business payload is rejected.
|
|
42
|
-
- **Authoritative relationship storage (Gate G4)** is centralized per-category collections (Candidate C), not Option A roots or sibling `relationships` content. See `@x12i/memorix-relationship-store` (archived decision: `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-
|
|
42
|
+
- **Authoritative relationship storage (Gate G4)** is centralized per-category collections (Candidate C), not Option A roots or sibling `relationships` content. See `@x12i/memorix-relationship-store` (archived decision: `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-opx-agent/RELATIONSHIP-STORAGE-DECISION.md`).
|
|
43
43
|
|
|
44
44
|
- **Omit** the property when empty — never write `[]`.
|
|
45
45
|
- Prefer traceability in optional item-level `_system.association` (v2) rather than wrapping envelopes.
|
package/docs/memorix-format.md
CHANGED
|
@@ -56,7 +56,7 @@ Every piece of business data lives in **exactly one** of these buckets (plus the
|
|
|
56
56
|
| **`insights`** | AI / judgment outputs |
|
|
57
57
|
| **`associated*`** | Copied related payloads (present only; removed in V2) |
|
|
58
58
|
|
|
59
|
-
On **memorix-record/2**, snapshot buckets are optional and **omitted when empty**. Root `associated*` may hold **lightweight refs** only (Option A — still format-valid). **Authoritative relationship storage (Gate G4)** is centralized per-category collections (Candidate C); see `@x12i/memorix-relationship-store` (archived: `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-
|
|
59
|
+
On **memorix-record/2**, snapshot buckets are optional and **omitted when empty**. Root `associated*` may hold **lightweight refs** only (Option A — still format-valid). **Authoritative relationship storage (Gate G4)** is centralized per-category collections (Candidate C); see `@x12i/memorix-relationship-store` (archived: `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-opx-agent/RELATIONSHIP-STORAGE-DECISION.md`).
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
@@ -52,8 +52,8 @@ type MemorixRecordV2 = {
|
|
|
52
52
|
3. **Composition** = same `recordId` across content types; not a relationship.
|
|
53
53
|
4. **`_graphRuns` / `_jobTypeRuns` stay off the subject** — operational run ledger owns run history.
|
|
54
54
|
5. **V2 rejects copied related-record payloads.** Root `associated*` may hold **lightweight relationship refs** only: required `relationshipDefinitionId` + `recordId`; optional `relationshipId` (derivable). Without `relationshipDefinitionId` the item is not a relationship. **Option A** (direct-record lightweight `associated*` roots) remains **format-valid** for validation and migration compatibility.
|
|
55
|
-
6. **Authoritative physical relationship storage is Gate G4 Candidate C** — org-prefixed per-category `relationships` collections (`entity` / `event` / `knowledge`). Option A lightweight roots and sibling `relationships` content are **not** the selected authoritative storage model; see `@x12i/memorix-relationship-store` / `@x12i/memorix-relationships` (decision note archived under `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-
|
|
56
|
-
7. **Present format remains the writer/pipeline default** until cutover (`MEMORIX_RECORD_FORMAT=v2`). All **new** refactor packages and the `
|
|
55
|
+
6. **Authoritative physical relationship storage is Gate G4 Candidate C** — org-prefixed per-category `relationships` collections (`entity` / `event` / `knowledge`). Option A lightweight roots and sibling `relationships` content are **not** the selected authoritative storage model; see `@x12i/memorix-relationship-store` / `@x12i/memorix-relationships` (decision note archived under `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-opx-agent/RELATIONSHIP-STORAGE-DECISION.md`).
|
|
56
|
+
7. **Present format remains the writer/pipeline default** until cutover (`MEMORIX_RECORD_FORMAT=v2`). All **new** refactor packages and the `opx` harness use V2 exclusively. The env switch is transitional (`DEL-FORMAT-PRESENT-SOT`).
|
|
57
57
|
|
|
58
58
|
## Revision vs lifecycle
|
|
59
59
|
|
|
@@ -84,7 +84,7 @@ npx memorix-format migrate-to-v2 ./present.json \
|
|
|
84
84
|
--object-type=work-items \
|
|
85
85
|
--content-type=snapshots \
|
|
86
86
|
--data-category=entity \
|
|
87
|
-
--issuer=
|
|
87
|
+
--issuer=opx-source
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
Output includes `v2`, `extractedRelationships`, and `warnings`.
|
|
@@ -44,6 +44,6 @@ Optional `associatedPropertyMap: { associatedPeople: "people-assigned-to-work-it
|
|
|
44
44
|
|
|
45
45
|
## Gate G4 boundary
|
|
46
46
|
|
|
47
|
-
**Authoritative physical relationship storage (Gate G4):** centralized org-prefixed per-category `relationships` collections (Candidate C). See `@x12i/memorix-relationship-store` (archived decision: `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-
|
|
47
|
+
**Authoritative physical relationship storage (Gate G4):** centralized org-prefixed per-category `relationships` collections (Candidate C). See `@x12i/memorix-relationship-store` (archived decision: `.tmp/housekeeping-2026-07-23/docs/re-factoring-and-opx-agent/RELATIONSHIP-STORAGE-DECISION.md`).
|
|
48
48
|
|
|
49
49
|
`migratePresentToV2` still extracts relationship candidates **out-of-band** and does not persist them onto the V2 record. Option A root `associated*` lightweight refs remain **format-valid** but are **not** the selected authoritative storage model.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "memorix-record/2",
|
|
3
|
-
"recordId": "
|
|
3
|
+
"recordId": "person-e-10",
|
|
4
4
|
"revision": 1,
|
|
5
|
-
"objectType": "
|
|
5
|
+
"objectType": "people",
|
|
6
6
|
"contentType": "discovery",
|
|
7
7
|
"dataCategory": "entity",
|
|
8
8
|
"concept": {
|
|
9
|
-
"title": "Discovery for
|
|
9
|
+
"title": "Discovery for person-e-10",
|
|
10
10
|
"identifiers": {
|
|
11
11
|
"primary": {
|
|
12
12
|
"kind": "recordId",
|
|
13
|
-
"value": "
|
|
13
|
+
"value": "person-e-10"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "memorix-record/2",
|
|
3
|
-
"recordId": "
|
|
3
|
+
"recordId": "person-e-10",
|
|
4
4
|
"revision": 1,
|
|
5
|
-
"objectType": "
|
|
5
|
+
"objectType": "people",
|
|
6
6
|
"contentType": "snapshots",
|
|
7
7
|
"dataCategory": "entity",
|
|
8
8
|
"concept": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"primary": {
|
|
12
12
|
"kind": "employeeId",
|
|
13
13
|
"value": "E-10",
|
|
14
|
-
"issuer": "
|
|
14
|
+
"issuer": "opx-source"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
},
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "memorix-record/2",
|
|
3
|
-
"recordId": "
|
|
3
|
+
"recordId": "pb-1",
|
|
4
4
|
"revision": 1,
|
|
5
|
-
"objectType": "
|
|
5
|
+
"objectType": "playbooks",
|
|
6
6
|
"contentType": "snapshots",
|
|
7
7
|
"dataCategory": "knowledge",
|
|
8
8
|
"concept": {
|
|
9
9
|
"title": "Quarterly review checklist",
|
|
10
10
|
"identifiers": {
|
|
11
11
|
"primary": {
|
|
12
|
-
"kind": "
|
|
13
|
-
"value": "
|
|
14
|
-
"issuer": "
|
|
12
|
+
"kind": "playbookId",
|
|
13
|
+
"value": "PB-1",
|
|
14
|
+
"issuer": "opx-source"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"data": {
|
|
19
19
|
"body": "1. Collect metrics\n2. Draft summary\n3. Review with lead",
|
|
20
|
-
"contentHash": "hash-
|
|
20
|
+
"contentHash": "hash-pb-1-v1"
|
|
21
21
|
},
|
|
22
22
|
"_system": {
|
|
23
23
|
"state": "active",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"primary": {
|
|
12
12
|
"kind": "workItemId",
|
|
13
13
|
"value": "WI-100",
|
|
14
|
-
"issuer": "
|
|
14
|
+
"issuer": "opx-source"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"status": "in-progress",
|
|
22
22
|
"priority": "normal",
|
|
23
23
|
"assigneeId": "E-10",
|
|
24
|
-
"
|
|
24
|
+
"playbookIds": ["PB-1"],
|
|
25
25
|
"dependsOnIds": ["WI-90"],
|
|
26
26
|
"updatedAt": "2026-01-15T12:00:00.000Z"
|
|
27
27
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"createdAt": "2026-01-15T12:00:00.000Z",
|
|
31
31
|
"modifiedAt": "2026-01-15T12:00:00.000Z",
|
|
32
32
|
"provenance": {
|
|
33
|
-
"sourceId": "
|
|
33
|
+
"sourceId": "opx-source",
|
|
34
34
|
"endpoint": "/work-items"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"recordId": "employee-10"
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
|
-
"
|
|
25
|
+
"usedPlaybooks": [
|
|
26
26
|
{
|
|
27
|
-
"relationshipId": "rel-wi-use-proc-wi-100-
|
|
28
|
-
"relationshipDefinitionId": "work-items-use-
|
|
29
|
-
"recordId": "
|
|
27
|
+
"relationshipId": "rel-wi-use-proc-wi-100-pb-1",
|
|
28
|
+
"relationshipDefinitionId": "work-items-use-playbooks",
|
|
29
|
+
"recordId": "pb-1"
|
|
30
30
|
}
|
|
31
31
|
]
|
|
32
32
|
},
|
package/meta/content-types.json
CHANGED
|
@@ -63,6 +63,18 @@
|
|
|
63
63
|
"suggested-actions": {
|
|
64
64
|
"profile": "minimal",
|
|
65
65
|
"description": "Product vocabulary — optional CT"
|
|
66
|
+
},
|
|
67
|
+
"knowx": {
|
|
68
|
+
"profile": "minimal",
|
|
69
|
+
"description": "Native KnowX knowledge facet — data.kind NODE|EDGE; provenance (docHash + SourceSpan) mandatory; epistemic.state ≠ extraction confidence"
|
|
70
|
+
},
|
|
71
|
+
"nexum": {
|
|
72
|
+
"profile": "minimal",
|
|
73
|
+
"description": "Nexum contribution / node / claim records (write-record mode nexum)"
|
|
74
|
+
},
|
|
75
|
+
"confirmations": {
|
|
76
|
+
"profile": "minimal",
|
|
77
|
+
"description": "Accept/reject decision sibling for reviewed claims (e.g. KnowX assertions)"
|
|
66
78
|
}
|
|
67
79
|
}
|
|
68
80
|
}
|
package/package.json
CHANGED