@x12i/memorix-format 2.3.3 → 3.0.0

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/README.md CHANGED
@@ -1,21 +1,13 @@
1
1
  # @x12i/memorix-format
2
2
 
3
- Memorix record format package.
3
+ Canonical **memorix-record/2** validation, migration, and CLI for Memorix.
4
4
 
5
- | Era | API | Status |
6
- |---|---|---|
7
- | **memorix-record/2** | `validateMemorixRecordV2`, `migratePresentToV2`, CLI `validate-v2` / `migrate-to-v2` | **Gate G2 SoT** for new platform work |
8
- | Present | `validateMemorixRecord`, CLI `validate` / `migrate` | Migration source; writer default until `MEMORIX_RECORD_FORMAT=v2` |
5
+ | API | Status |
6
+ |---|---|
7
+ | `validateMemorixRecordV2`, CLI `validate-v2` / `migrate-to-v2` | **Current** SoT for platform work |
8
+ | Present-envelope helpers | Migration/compat only |
9
9
 
10
- Present envelope helpers still come from [`@x12i/memorix-base-format`](https://www.npmjs.com/package/@x12i/memorix-base-format) (temporary; folding into this package per Phase 0 deletion ledger).
11
-
12
- **Object types belong in agent metadata / Catalox, not here.**
13
-
14
- Docs:
15
-
16
- - [docs/memorix-record-v2.md](./docs/memorix-record-v2.md) — V2 contract
17
- - [docs/memorix-format.md](./docs/memorix-format.md) — present + pointers
18
- - Golden V2 examples: [examples/v2/](./examples/v2/)
10
+ Object types belong in **agent metadata**, not in this package.
19
11
 
20
12
  ## Install
21
13
 
@@ -54,12 +46,15 @@ npx memorix-format migrate-to-v2 ./present.json \
54
46
  --object-type=work-items --content-type=snapshots --data-category=entity
55
47
  ```
56
48
 
57
- ## Present envelope (migration)
49
+ ## Docs
58
50
 
59
- Still documented for existing data. Open buckets: `analytics`, `enrichment`, `insights`, `associated*` (copied payloads — **rejected on V2**).
51
+ - [docs/memorix-record-v2.md](./docs/memorix-record-v2.md)
52
+ - Ebook: [Format for Dummies](../new-ebooks/01-format-for-dummies/)
60
53
 
61
- ## Writer flag
54
+ **Exports:** `.` · `./validate` · `./profiles` · `./types` · `./v2`
62
55
 
63
- ```bash
64
- MEMORIX_RECORD_FORMAT=v2
65
- ```
56
+ V2 rejects copied related-record payloads. Authoritative navigation is four-field relationship links (see `@x12i/memorix-relationships`).
57
+
58
+ ---
59
+
60
+ **Ebooks:** [https://ebooks.memorix.x12i.com](https://ebooks.memorix.x12i.com) · in-repo [`../new-ebooks/`](../new-ebooks/)
@@ -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 `docs/re-factoring-and-ops-agent/RELATIONSHIP-STORAGE-DECISION.md`.
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-ops-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.
@@ -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 `docs/re-factoring-and-ops-agent/RELATIONSHIP-STORAGE-DECISION.md`.
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-ops-agent/RELATIONSHIP-STORAGE-DECISION.md`).
60
60
 
61
61
  ---
62
62
 
@@ -52,7 +52,7 @@ 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 `docs/re-factoring-and-ops-agent/RELATIONSHIP-STORAGE-DECISION.md`.
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-ops-agent/RELATIONSHIP-STORAGE-DECISION.md`).
56
56
  7. **Present format remains the writer/pipeline default** until cutover (`MEMORIX_RECORD_FORMAT=v2`). All **new** refactor packages and the `ops` harness use V2 exclusively. The env switch is transitional (`DEL-FORMAT-PRESENT-SOT`).
57
57
 
58
58
  ## Revision vs lifecycle
@@ -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 `docs/re-factoring-and-ops-agent/RELATIONSHIP-STORAGE-DECISION.md`.
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-ops-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/memorix-format",
3
- "version": "2.3.3",
3
+ "version": "3.0.0",
4
4
  "description": "Memorix format: present envelope + memorix-record/2 (Gate G2 SoT), validators, migrate CLIs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",