@x12i/memorix-docs 1.0.1 → 1.1.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.
Files changed (236) hide show
  1. package/dist/generated/bundle.d.ts +4849 -3
  2. package/dist/generated/bundle.d.ts.map +1 -1
  3. package/dist/generated/bundle.js +7582 -47
  4. package/dist/generated/bundle.js.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +6 -4
  8. package/dist/index.js.map +1 -1
  9. package/files/INDEX.md +84 -0
  10. package/files/SEARCH.json +3087 -0
  11. package/files/agent-manifest.json +1785 -0
  12. package/files/apis/memorix-records/overview.md +22 -0
  13. package/files/concepts/abstracts-bindings.md +27 -0
  14. package/files/concepts/agents-inheritance.md +28 -0
  15. package/files/concepts/analysis-objects.md +26 -0
  16. package/files/concepts/composition.md +27 -0
  17. package/files/concepts/decisions-content.md +27 -0
  18. package/files/concepts/effective-metadata.md +27 -0
  19. package/files/concepts/explicit-metadata-installation.md +26 -0
  20. package/files/concepts/intelligence-proposals.md +27 -0
  21. package/files/concepts/mappings-transforms.md +26 -0
  22. package/files/concepts/object-content-category.md +26 -0
  23. package/files/concepts/org-agent-scope.md +27 -0
  24. package/files/concepts/people-union.md +27 -0
  25. package/files/concepts/raw-records.md +26 -0
  26. package/files/concepts/record-revisions.md +26 -0
  27. package/files/concepts/relationship-definitions.md +26 -0
  28. package/files/concepts/relationship-references.md +27 -0
  29. package/files/concepts/resolved-unresolved.md +27 -0
  30. package/files/concepts/sources-and-memory.md +26 -0
  31. package/files/concepts/traversal.md +27 -0
  32. package/files/diagrams/agent-inheritance.md +34 -0
  33. package/files/diagrams/intelligence-journey.md +38 -0
  34. package/files/diagrams/memorix-central-journey.md +51 -0
  35. package/files/diagrams/metadata-lifecycle.md +40 -0
  36. package/files/diagrams/people-union-diagram.md +36 -0
  37. package/files/diagrams/record-content-model.md +43 -0
  38. package/files/diagrams/relationship-traversal.md +40 -0
  39. package/files/diagrams/revision-safe-write.md +39 -0
  40. package/files/examples/analysis-decision-records.md +11 -0
  41. package/files/examples/memorix-record-envelope.md +11 -0
  42. package/files/examples/metadata-pack-install.md +11 -0
  43. package/files/examples/people-abstract-query.md +11 -0
  44. package/files/examples/raw-vs-composed.md +11 -0
  45. package/files/examples/relationship-def-and-ref.md +11 -0
  46. package/files/examples/revision-conflict-response.md +11 -0
  47. package/files/examples/revision-safe-write.md +11 -0
  48. package/files/examples/traversal-resolved-unresolved.md +11 -0
  49. package/files/glossary/abstract.md +9 -0
  50. package/files/glossary/agent.md +9 -0
  51. package/files/glossary/analysis.md +9 -0
  52. package/files/glossary/binding.md +9 -0
  53. package/files/glossary/composition.md +9 -0
  54. package/files/glossary/content-type.md +9 -0
  55. package/files/glossary/data-category.md +9 -0
  56. package/files/glossary/decision.md +9 -0
  57. package/files/glossary/effective-metadata.md +9 -0
  58. package/files/glossary/intelligence-proposal.md +9 -0
  59. package/files/glossary/mapping.md +9 -0
  60. package/files/glossary/memory.md +9 -0
  61. package/files/glossary/object-type.md +9 -0
  62. package/files/glossary/relationship-definition.md +9 -0
  63. package/files/glossary/relationship-reference.md +9 -0
  64. package/files/glossary/revision.md +9 -0
  65. package/files/glossary/scope.md +9 -0
  66. package/files/glossary/source.md +9 -0
  67. package/files/glossary/traversal.md +9 -0
  68. package/files/guides/apply-scope.md +40 -0
  69. package/files/guides/choose-access-method.md +24 -0
  70. package/files/guides/compose-subject-ui.md +24 -0
  71. package/files/guides/define-traverse-relationship.md +26 -0
  72. package/files/guides/diagnose-unresolved.md +24 -0
  73. package/files/guides/evidence-to-decision.md +25 -0
  74. package/files/guides/first-revision-safe-write.md +30 -0
  75. package/files/guides/inspect-effective-metadata.md +30 -0
  76. package/files/guides/query-people-abstract.md +25 -0
  77. package/files/guides/reload-retry-conflict.md +32 -0
  78. package/files/guides/validate-install-pack.md +32 -0
  79. package/files/indexes/books.json +95 -0
  80. package/files/indexes/books.md +17 -0
  81. package/files/indexes/concepts.json +119 -0
  82. package/files/indexes/concepts.md +21 -0
  83. package/files/indexes/diagrams.json +53 -0
  84. package/files/indexes/diagrams.md +10 -0
  85. package/files/indexes/guides.json +71 -0
  86. package/files/indexes/guides.md +13 -0
  87. package/files/indexes/scenarios.json +41 -0
  88. package/files/indexes/scenarios.md +8 -0
  89. package/files/indexes/tutorials.json +47 -0
  90. package/files/indexes/tutorials.md +9 -0
  91. package/files/indexes/use-cases.json +239 -0
  92. package/files/indexes/use-cases.md +41 -0
  93. package/files/knowledge.json +2940 -0
  94. package/files/packs/concept/abstracts-bindings/PACK.md +11 -0
  95. package/files/packs/concept/abstracts-bindings/pack.json +13 -0
  96. package/files/packs/concept/agents-inheritance/PACK.md +11 -0
  97. package/files/packs/concept/agents-inheritance/pack.json +13 -0
  98. package/files/packs/concept/analysis-objects/PACK.md +11 -0
  99. package/files/packs/concept/analysis-objects/pack.json +14 -0
  100. package/files/packs/concept/composition/PACK.md +11 -0
  101. package/files/packs/concept/composition/pack.json +13 -0
  102. package/files/packs/concept/decisions-content/PACK.md +11 -0
  103. package/files/packs/concept/decisions-content/pack.json +13 -0
  104. package/files/packs/concept/effective-metadata/PACK.md +11 -0
  105. package/files/packs/concept/effective-metadata/pack.json +13 -0
  106. package/files/packs/concept/explicit-metadata-installation/PACK.md +11 -0
  107. package/files/packs/concept/explicit-metadata-installation/pack.json +14 -0
  108. package/files/packs/concept/intelligence-proposals/PACK.md +11 -0
  109. package/files/packs/concept/intelligence-proposals/pack.json +13 -0
  110. package/files/packs/concept/mappings-transforms/PACK.md +11 -0
  111. package/files/packs/concept/mappings-transforms/pack.json +13 -0
  112. package/files/packs/concept/object-content-category/PACK.md +11 -0
  113. package/files/packs/concept/object-content-category/pack.json +14 -0
  114. package/files/packs/concept/org-agent-scope/PACK.md +11 -0
  115. package/files/packs/concept/org-agent-scope/pack.json +14 -0
  116. package/files/packs/concept/people-union/PACK.md +11 -0
  117. package/files/packs/concept/people-union/pack.json +13 -0
  118. package/files/packs/concept/raw-records/PACK.md +11 -0
  119. package/files/packs/concept/raw-records/pack.json +14 -0
  120. package/files/packs/concept/record-revisions/PACK.md +11 -0
  121. package/files/packs/concept/record-revisions/pack.json +13 -0
  122. package/files/packs/concept/relationship-definitions/PACK.md +11 -0
  123. package/files/packs/concept/relationship-definitions/pack.json +14 -0
  124. package/files/packs/concept/relationship-references/PACK.md +11 -0
  125. package/files/packs/concept/relationship-references/pack.json +13 -0
  126. package/files/packs/concept/resolved-unresolved/PACK.md +11 -0
  127. package/files/packs/concept/resolved-unresolved/pack.json +13 -0
  128. package/files/packs/concept/sources-and-memory/PACK.md +11 -0
  129. package/files/packs/concept/sources-and-memory/pack.json +13 -0
  130. package/files/packs/concept/traversal/PACK.md +11 -0
  131. package/files/packs/concept/traversal/pack.json +13 -0
  132. package/files/packs/guide/apply-scope/PACK.md +11 -0
  133. package/files/packs/guide/apply-scope/pack.json +13 -0
  134. package/files/packs/guide/choose-access-method/PACK.md +11 -0
  135. package/files/packs/guide/choose-access-method/pack.json +15 -0
  136. package/files/packs/guide/compose-subject-ui/PACK.md +11 -0
  137. package/files/packs/guide/compose-subject-ui/pack.json +13 -0
  138. package/files/packs/guide/define-traverse-relationship/PACK.md +11 -0
  139. package/files/packs/guide/define-traverse-relationship/pack.json +14 -0
  140. package/files/packs/guide/diagnose-unresolved/PACK.md +11 -0
  141. package/files/packs/guide/diagnose-unresolved/pack.json +13 -0
  142. package/files/packs/guide/evidence-to-decision/PACK.md +11 -0
  143. package/files/packs/guide/evidence-to-decision/pack.json +14 -0
  144. package/files/packs/guide/first-revision-safe-write/PACK.md +11 -0
  145. package/files/packs/guide/first-revision-safe-write/pack.json +13 -0
  146. package/files/packs/guide/inspect-effective-metadata/PACK.md +11 -0
  147. package/files/packs/guide/inspect-effective-metadata/pack.json +13 -0
  148. package/files/packs/guide/query-people-abstract/PACK.md +11 -0
  149. package/files/packs/guide/query-people-abstract/pack.json +13 -0
  150. package/files/packs/guide/reload-retry-conflict/PACK.md +11 -0
  151. package/files/packs/guide/reload-retry-conflict/pack.json +13 -0
  152. package/files/packs/guide/validate-install-pack/PACK.md +11 -0
  153. package/files/packs/guide/validate-install-pack/pack.json +13 -0
  154. package/files/packs/scenario/choose-subject-view/PACK.md +11 -0
  155. package/files/packs/scenario/choose-subject-view/pack.json +11 -0
  156. package/files/packs/scenario/pack-valid-not-installed/PACK.md +11 -0
  157. package/files/packs/scenario/pack-valid-not-installed/pack.json +11 -0
  158. package/files/packs/scenario/scope-mismatch/PACK.md +11 -0
  159. package/files/packs/scenario/scope-mismatch/pack.json +11 -0
  160. package/files/packs/scenario/stale-revision-conflict/PACK.md +11 -0
  161. package/files/packs/scenario/stale-revision-conflict/pack.json +11 -0
  162. package/files/packs/scenario/traversal-direction/PACK.md +11 -0
  163. package/files/packs/scenario/traversal-direction/pack.json +11 -0
  164. package/files/packs/scenario/unresolved-relationship/PACK.md +11 -0
  165. package/files/packs/scenario/unresolved-relationship/pack.json +11 -0
  166. package/files/packs/tutorial/analysis-decision-lab/PACK.md +11 -0
  167. package/files/packs/tutorial/analysis-decision-lab/pack.json +14 -0
  168. package/files/packs/tutorial/compare-views/PACK.md +11 -0
  169. package/files/packs/tutorial/compare-views/pack.json +14 -0
  170. package/files/packs/tutorial/conflict-lab/PACK.md +11 -0
  171. package/files/packs/tutorial/conflict-lab/pack.json +13 -0
  172. package/files/packs/tutorial/first-revision-safe-record/PACK.md +11 -0
  173. package/files/packs/tutorial/first-revision-safe-record/pack.json +13 -0
  174. package/files/packs/tutorial/install-pack-lab/PACK.md +11 -0
  175. package/files/packs/tutorial/install-pack-lab/pack.json +13 -0
  176. package/files/packs/tutorial/relationships-lab/PACK.md +11 -0
  177. package/files/packs/tutorial/relationships-lab/pack.json +13 -0
  178. package/files/packs/tutorial/start-with-sample-data/PACK.md +11 -0
  179. package/files/packs/tutorial/start-with-sample-data/pack.json +13 -0
  180. package/files/sample-data/memorix-synthetic-basic.md +13 -0
  181. package/files/scenarios/choose-subject-view.md +36 -0
  182. package/files/scenarios/pack-valid-not-installed.md +33 -0
  183. package/files/scenarios/scope-mismatch.md +44 -0
  184. package/files/scenarios/stale-revision-conflict.md +38 -0
  185. package/files/scenarios/traversal-direction.md +30 -0
  186. package/files/scenarios/unresolved-relationship.md +31 -0
  187. package/files/tutorials/analysis-decision-lab.md +18 -0
  188. package/files/tutorials/compare-views.md +22 -0
  189. package/files/tutorials/conflict-lab.md +18 -0
  190. package/files/tutorials/first-revision-safe-record.md +18 -0
  191. package/files/tutorials/install-pack-lab.md +22 -0
  192. package/files/tutorials/relationships-lab.md +18 -0
  193. package/files/tutorials/start-with-sample-data.md +18 -0
  194. package/files/ui/clients/memorix-studio.md +9 -0
  195. package/files/use-cases/abstract-people-list.md +237 -0
  196. package/files/use-cases/ai-pipeline-fail-closed.md +117 -0
  197. package/files/use-cases/author-pipeline-e2e.md +339 -0
  198. package/files/use-cases/build-callable-service.md +347 -0
  199. package/files/use-cases/builder-acceptance-ops.md +112 -0
  200. package/files/use-cases/choose-access-method.md +111 -0
  201. package/files/use-cases/client-first-read-write.md +374 -0
  202. package/files/use-cases/compose-for-ui.md +97 -0
  203. package/files/use-cases/custom-kind-descriptors.md +137 -0
  204. package/files/use-cases/data-journey-evidence.md +115 -0
  205. package/files/use-cases/discriminated-content-writes.md +152 -0
  206. package/files/use-cases/embed-studio-host.md +165 -0
  207. package/files/use-cases/four-field-links.md +246 -0
  208. package/files/use-cases/http-process-compliance.md +225 -0
  209. package/files/use-cases/install-metadata-pack.md +180 -0
  210. package/files/use-cases/intelligence-propose-install.md +163 -0
  211. package/files/use-cases/knowx-claims-review.md +396 -0
  212. package/files/use-cases/learn-record-envelope.md +233 -0
  213. package/files/use-cases/lists-cursors-pagination.md +196 -0
  214. package/files/use-cases/local-acceptance-g12ops.md +160 -0
  215. package/files/use-cases/memory-hourly-ingest.md +276 -0
  216. package/files/use-cases/metadata-before-write.md +145 -0
  217. package/files/use-cases/migrate-associated-star.md +159 -0
  218. package/files/use-cases/openapi-typed-client.md +78 -0
  219. package/files/use-cases/ops-pack-fixtures.md +168 -0
  220. package/files/use-cases/orient-platform.md +172 -0
  221. package/files/use-cases/pipeline-retry-evidence.md +121 -0
  222. package/files/use-cases/relationship-rebuild-verify.md +128 -0
  223. package/files/use-cases/revision-stale-conflicts.md +194 -0
  224. package/files/use-cases/start-from-zero.md +171 -0
  225. package/files/use-cases/studio-design-types.md +122 -0
  226. package/files/use-cases/studio-explore-subject.md +89 -0
  227. package/files/use-cases/studio-operate-pipelines.md +100 -0
  228. package/files/use-cases/studio-review-intelligence.md +74 -0
  229. package/files/use-cases/studio-scope-isolation.md +67 -0
  230. package/files/use-cases/studio-stale-conflict-ui.md +54 -0
  231. package/files/use-cases/troubleshoot-http-matrix.md +164 -0
  232. package/files/use-cases/trusted-in-process-embed.md +94 -0
  233. package/files/use-cases/workflow-sibling-api.md +212 -0
  234. package/files/visuals/revision-conflict.md +19 -0
  235. package/files/visuals/scope-apply.md +19 -0
  236. package/package.json +5 -4
@@ -0,0 +1,168 @@
1
+ # Package ops fixtures and acceptance harness
2
+
3
+ > **Use case id:** `ops-pack-fixtures`
4
+ > **Goal:** Build or extend an agent pack with g12ops* acceptance, goldens, and harness commands.
5
+ > **Audiences:** developers
6
+ > **Tags:** ops-pack, fixtures, acceptance
7
+
8
+ ## Reading path
9
+
10
+ 1. **Agent Packs & Ops** (developers) → chapters: `2-pack-layout`, `3-harness-up-down-reset-accept`, `7-install-into-a-fresh-acceptance-org`, `6-golden-v2-validation`
11
+
12
+ ## From: Agent Packs & Ops — 2. Pack layout
13
+
14
+ ```text
15
+ memorix-ops-pack/
16
+ metadata/
17
+ manifest.json
18
+ agents/ops.json
19
+ agents/project-ops.json
20
+ abstract-types.json
21
+ abstract-bindings.json
22
+ object-types.json
23
+ relationship-definitions.json
24
+ view-definitions.json
25
+ write-and-source-mappings.json
26
+ pipelines-and-sources.json
27
+ fixtures/ # deterministic source data
28
+ ops-source/server.mjs # local REST fixture (no internet)
29
+ scripts/harness.mjs # up / down / reset / accept
30
+ examples/v2/ # memorix-record/2 goldens
31
+ ```
32
+
33
+ Diagram (same idea):
34
+
35
+ ```text
36
+ pack/
37
+ metadata/
38
+ fixtures/
39
+ ops-source/
40
+ scripts/
41
+ examples/v2/
42
+ ```
43
+
44
+ ### Manifest
45
+
46
+ `metadata/manifest.json` lists includes for agent `ops` (versioned). Install tooling resolves those files into installable metadata items.
47
+
48
+ Typical includes: parent agent `ops`, child `project-ops`, abstracts + bindings, object types, relationship definitions, views, write/source mappings, pipelines and sources.
49
+
50
+ ### Subjects in the narrative
51
+
52
+ | Subject | Role in fixtures |
53
+ |---|---|
54
+ | Employee **Alex** | Stable `recordId` across snapshot / workflow / optional knowx |
55
+ | Work item **WI-100** | Prepare quarterly operations review |
56
+ | Procedure **PROC-2** | Knowledge-category procedure content |
57
+ | Activity events | Event-category samples |
58
+ | Malformed / deleted items | Negative paths for quarantine / 404 checks |
59
+
60
+ ---
61
+
62
+ ## From: Agent Packs & Ops — 3. Harness: up / down / reset / accept
63
+
64
+ ```bash
65
+ cd memorix-ops-pack
66
+ npm install && npm test
67
+ node scripts/harness.mjs up # OPS_SOURCE_PORT default 5102
68
+ node scripts/harness.mjs reset # reset fixture control state
69
+ node scripts/harness.mjs accept # smoke: metadata files + source routes
70
+ node scripts/harness.mjs down
71
+ ```
72
+
73
+ Prefer the monorepo stack when exercising Studio + service together:
74
+
75
+ ```bash
76
+ node scripts/dev-stack.mjs
77
+ # includes ops-source on :5102 (even ports = APIs), stack-status :5103, /_live on APIs
78
+ ```
79
+
80
+ | Command | Purpose |
81
+ |---|---|
82
+ | `up` | Start localhost `ops-source` (PID under `.run/`) |
83
+ | `down` | Stop ops-source via PID file |
84
+ | `reset` | POST fixture control reset; re-establish known source state |
85
+ | `accept` | Verify manifest files exist; hit key source routes; assert negative paths |
86
+
87
+ ### What `accept` is (and is not)
88
+
89
+ **Is:** a deterministic smoke that the pack’s metadata files and fixture server behave.
90
+
91
+ **Is not:** a license to use live customer orgs; not a substitute for service-level gates on a fresh `g12ops*` with explicit metadata install + pipeline green.
92
+
93
+ Platform product acceptance always pairs pack smoke with:
94
+
95
+ ```http
96
+ x-memorix-org-id: g12ops<suffix>
97
+ x-memorix-agent-ids: ops
98
+ ```
99
+
100
+ and an explicit `/api/metadata/install` (or Studio install) into that org.
101
+
102
+ ### Harness sketch in CI
103
+
104
+ ```bash
105
+ node scripts/harness.mjs up
106
+ node scripts/harness.mjs accept
107
+ npx memorix-format validate-v2 examples/v2
108
+ node scripts/harness.mjs down
109
+ ```
110
+
111
+ ---
112
+
113
+ ## From: Agent Packs & Ops — 7. Install into a fresh acceptance org
114
+
115
+ ```bash
116
+ ORG=$(node -e "console.log('g12ops'+Math.random().toString(36).slice(2,10))")
117
+ H=(-H "x-memorix-org-id: $ORG" -H "x-memorix-agent-ids: ops")
118
+
119
+ curl -s "${H[@]}" -X POST "$SERVICE/api/metadata/install" \
120
+ -H "content-type: application/json" \
121
+ -d '{"packId":"ops","confirm":true}'
122
+
123
+ curl -s "${H[@]}" "$SERVICE/api/metadata/effective" | head
124
+
125
+ # Memory pull from ops-source (credentialRef per Memory contracts)
126
+ # Pipeline start → assert WI-100 composition + links
127
+ ```
128
+
129
+ Assertions for a full gate:
130
+
131
+ - [ ] Manifest files present; `harness accept` green
132
+ - [ ] `validate-v2` green on `examples/v2`
133
+ - [ ] Install with `confirm: true` into `g12ops*`
134
+ - [ ] Memory pull lands raw for employees / work-items / …
135
+ - [ ] Pipeline green; Explore/HTTP composition for `wi-100`
136
+ - [ ] Relationship verify for documented definitions
137
+ - [ ] Custom kinds (if any) visible via `/api/metadata/kinds` and **not** executed by pipelines
138
+ - [ ] No live customer org; agents `["ops"]`
139
+
140
+ ---
141
+
142
+ ## From: Agent Packs & Ops — 6. Golden V2 validation
143
+
144
+ Ops pack ships goldens under `examples/v2/` (snapshots, raw, workflow, analysis, decisions, lightweight-refs, …).
145
+
146
+ ```bash
147
+ npx memorix-format validate-v2 examples/v2
148
+ ```
149
+
150
+ Rules:
151
+
152
+ - Every golden must be `format: "memorix-record/2"`.
153
+ - No copied associated payloads (`V2-ASSOC-COPIED`).
154
+ - Discriminators present when required (`V2-DISCRIMINATOR`).
155
+ - Workflow / analysis / decisions siblings stay separate content types.
156
+ - Relationship **navigation** is not proven by fat goldens — use four-field links + engine verify in service gates.
157
+
158
+ Migration note: present → v2 belongs in book `13` / Format §§18–19. Pack authors ship **V2**, not present envelopes, as target truth.
159
+
160
+ ---
161
+
162
+ ## Also see
163
+
164
+ - **Platform Overview** (`00-platform-overview`) — Surfaces, packages, hard rules, and where to start — developers and builders twins.
165
+
166
+ ---
167
+
168
+ _Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
@@ -0,0 +1,172 @@
1
+ # Orient on Memorix after G12
2
+
3
+ > **Use case id:** `orient-platform`
4
+ > **Goal:** Understand surfaces, packages, hard rules, and which ebook to open next.
5
+ > **Audiences:** developers, builders
6
+ > **Tags:** platform, start-here
7
+
8
+ ## Reading path
9
+
10
+ 1. **Platform Overview** (developers) → chapters: `the-central-mental-model`, `2-architecture`, `8-hard-product-rules-integrator-checklist`, `10-decision-tree-which-ebook-next`
11
+
12
+ ## From: Platform Overview — The central mental model
13
+
14
+ Memorix is a **descriptor-driven data platform**.
15
+
16
+ > **One kind of content about one stable subject** — composed by `recordId`, navigated by four-field relationships, projected by virtual abstracts.
17
+
18
+ | Idea | Meaning |
19
+ |---|---|
20
+ | Subject | The stable thing (`WI-100`, employee Alex) |
21
+ | Content | One kind of information *about* that subject (snapshot, workflow, analysis, …) |
22
+ | Metadata | Declares object types, content types, abstracts, relationships, views, services, pipelines |
23
+ | Runtime data | Stored as `memorix-record/2` documents |
24
+ | Scope | Every request names a data universe (`orgId`) and effective metadata (`agentIds[]`) |
25
+
26
+ Integrators never invent list columns or write shapes in the host. They load metadata, then read/write through the supported boundary.
27
+
28
+ **Published npm lineup:** all public `@x12i/memorix-*` packages are version **`3.0.0`**. Install with `^3.0.0` (or omit the range and take `latest`).
29
+
30
+ ---
31
+
32
+ ## From: Platform Overview — 2. Architecture
33
+
34
+ ```mermaid
35
+ flowchart TB
36
+ YourApp[Your solution] --> Service[memorix-service]
37
+ Studio[memorix-studio] --> Service
38
+ Service --> MD[metadata]
39
+ Service --> Data[memorix-data]
40
+ Service --> Rel[relationships]
41
+ Service --> Mem[memory]
42
+ Service --> Pipe[pipeline]
43
+ Service --> Intel[intelligence]
44
+ Service --> Wf[workflow]
45
+ Data --> Mongo[(Mongo)]
46
+ ```
47
+
48
+ See also [_shared/diagrams/platform-planes.md](../../_shared/diagrams/platform-planes.md) and [diagrams/surfaces.md](../diagrams/surfaces.md).
49
+
50
+ ### How packages connect
51
+
52
+ ```mermaid
53
+ flowchart TB
54
+ App[Your solution] --> Svc[memorix-service]
55
+ Studio[memorix-studio] --> Svc
56
+ Svc --> Meta[metadata + runtime]
57
+ Svc --> DataPlane[memorix-data]
58
+ Svc --> RelEng[relationships]
59
+ Svc --> MemEng[memory]
60
+ Svc --> PipeEng[pipeline]
61
+ Svc --> IntelEng[intelligence]
62
+ Fmt[format] --> DataPlane
63
+ Map[mapping] --> PipeEng
64
+ DataPlane --> Mongo[(Mongo)]
65
+ RelEng --> Store[relationship-store]
66
+ PipeEng --> PipeRt[pipeline-runtime]
67
+ MemEng --> DataPlane
68
+ PipeEng --> DataPlane
69
+ PipeEng --> RelEng
70
+ IntelEng -.->|proposes| Meta
71
+ ```
72
+
73
+ ### Request lifecycle
74
+
75
+ 1. Client sends `x-memorix-org-id` + `x-memorix-agent-ids`.
76
+ 2. Service resolves **effective metadata** for that agent set.
77
+ 3. The requested engine (data, relationships, memory, pipelines, …) runs against scoped Mongo.
78
+ 4. Response may include composition and/or relationship expansion (virtual at read time).
79
+
80
+ ### Ingest path (ops journey)
81
+
82
+ ```text
83
+ External source (ops-source)
84
+ → Memory pull lands exact raw payload (*-raw)
85
+ → Pipeline maps / validates / writes subject content
86
+ → Relationship engine materializes navigation links
87
+ → Explore / host apps see composition + links (never copied payloads)
88
+ ```
89
+
90
+ Example subjects in the permanent narrative: employee **Alex**, work item **WI-100**, procedure **PROC-2**. See [_shared/ops-scenario.md](../../_shared/ops-scenario.md).
91
+
92
+ ### Trusted writers
93
+
94
+ | Concern | Writer |
95
+ |---|---|
96
+ | Subject content | `memorix-data` (via service HTTP) |
97
+ | Links | `memorix-relationships` only |
98
+ | Raw landing | `memorix-memory` → data plane |
99
+ | Metadata install | Explicit metadata-runtime / HTTP — **not** intelligence |
100
+
101
+ ---
102
+
103
+ ## From: Platform Overview — 8. Hard product rules (integrator checklist)
104
+
105
+ These invariants apply to every integration, acceptance example, and ebook:
106
+
107
+ 1. Acceptance orgs are fresh `g12ops*` with `agentIds: ["ops"]`.
108
+ 2. Permanent narrative is non-cyber **ops** (employees, work-items, procedures).
109
+ 3. Relationships are four-field links only — no root `associated*` storage, no copied payloads.
110
+ 4. Abstracts are virtual projections — no abstract collections / abstract `recordId`.
111
+ 5. KnowX is one content type + `data.kind` (`NODE` | `EDGE`) + one abstract `KnowXEntity`.
112
+ 6. Provenance (`docHash` + `SourceSpan`) is mandatory for KnowX; `epistemic.state` ≠ extraction confidence.
113
+ 7. Deterministic fixtures only for acceptance — no live AI required.
114
+ 8. Mutations go through the data plane (`memorix-service` / `@x12i/memorix-data`), never direct Mongo domain writes.
115
+
116
+ Full text: [HARD-RULES.md](../../HARD-RULES.md).
117
+
118
+ ---
119
+
120
+ ## From: Platform Overview — 10. Decision tree — which ebook next?
121
+
122
+ ```text
123
+ Need the record envelope?
124
+ → Format for Dummies
125
+ Need to call the API correctly?
126
+ → Runtime Data Client
127
+ Need list/cursor/bulk semantics?
128
+ → Lists, Queries, Pagination
129
+ Need “which call for this job?”
130
+ → Data Access Patterns
131
+ Need agents / OT / CT / abstracts / mappings?
132
+ → Metadata, Agents, Abstracts & Mappings
133
+ Need links or source landing?
134
+ → Relationships & Memory
135
+ Need custom code / AI jobs?
136
+ → Building Services
137
+ Need ordered multi-step work?
138
+ → Building Pipelines
139
+ Need Studio / workflow siblings?
140
+ → Workflow & Studio
141
+ Need profiling proposals?
142
+ → Structural Intelligence
143
+ Need fixtures / harness?
144
+ → Agent Packs & Ops
145
+ Building knowledge claims?
146
+ → Building KnowX
147
+ Migrating or stuck?
148
+ → Migration & Troubleshooting
149
+ ```
150
+
151
+ ### Recommended reading order
152
+
153
+ 1. [Format for Dummies](../../01-format-for-dummies/developers/BOOK.md)
154
+ 2. [Runtime Data Client](../../02-runtime-data-client/developers/BOOK.md)
155
+ 3. [Data Access Patterns](../../04-data-access-patterns/developers/BOOK.md)
156
+ 4. Then topic books as your product needs them
157
+
158
+ ### Glossary
159
+
160
+ Shared vocabulary: [_shared/glossary.md](../../_shared/glossary.md).
161
+
162
+ ### Twin for Studio audiences
163
+
164
+ Builders who design and operate without API detail: [Builders version](../builders/BOOK.md).
165
+
166
+ ## Also see
167
+
168
+ - **Platform Overview** (`00-platform-overview`) — Surfaces, packages, hard rules, and where to start — developers and builders twins.
169
+
170
+ ---
171
+
172
+ _Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
@@ -0,0 +1,121 @@
1
+ # Retry a failed pipeline step with evidence
2
+
3
+ > **Use case id:** `pipeline-retry-evidence`
4
+ > **Goal:** Operate failed attempts, retry safely, and keep artifacts for forensics.
5
+ > **Audiences:** developers
6
+ > **Tags:** pipelines, ops, retry
7
+
8
+ ## Reading path
9
+
10
+ 1. **Building Pipelines** (developers) → chapters: `10-operations`, `11-errors-catalog`, `14-antipatterns-and-troubleshooting`
11
+
12
+ ## From: Building Pipelines — 10. Operations
13
+
14
+ | Need | Where |
15
+ |---|---|
16
+ | Start / retry runs | `/api/pipelines` or Studio Operate |
17
+ | Run graph / ledger | Pipeline runtime collections (org-scoped operational DB) |
18
+ | Step / attempt inspection | Attempt documents with status, error, item outcomes |
19
+ | Artifacts | Artifact store + DataRef |
20
+ | Schedules | Design schedules + Operate history |
21
+ | Memory diagnostics | Memory pull/quarantine ledgers |
22
+ | Relationship diagnostics | `/api/relationships` verify/rebuild |
23
+ | AI evidence | Request/response artifacts |
24
+
25
+ ### Operator diagnosis
26
+
27
+ 1. Open failed attempt — read structured `error.code`.
28
+ 2. Compare captured context artifact vs current Explore data.
29
+ 3. Fix mapping/service/metadata; reinstall if needed.
30
+ 4. Retry failed step or failed batch items only.
31
+ 5. After process restart, confirm resume without redoing succeeded steps.
32
+ 6. Confirm Explore for **WI-100** / **Alex** / **PROC-2**.
33
+
34
+ ### Retention
35
+
36
+ Keep run evidence needed for audit; clean up expired context artifacts per Memory/policy. Do not delete ledgers that explain production incidents until retention allows.
37
+
38
+ ---
39
+
40
+ ## From: Building Pipelines — 11. Errors (catalog)
41
+
42
+ | Code class | Layer | Retryable? | Safe action |
43
+ |---|---|---|---|
44
+ | Invalid definition / unknown step / cycle | Validate | No | Fix pack |
45
+ | Missing dependency / invalid reference | Validate | No | Fix graph |
46
+ | Missing service / port | Startup/run | No | Bind registry / ports |
47
+ | Missing prod ledger/artifact store | Startup | No | Configure durable stores |
48
+ | Invalid scope / input | Run | No | Fix caller |
49
+ | Mapping / validation failure | Step | No | Fix mapping/data |
50
+ | Identity conflict | Step | No | Resolve identity |
51
+ | Stale revision | Write | No auto | Re-read; new revision |
52
+ | Relationship discover/write failure | Step | Often partial | Retry relationship portion |
53
+ | Memory / cursor failure | Step | Often yes | Fix source; resume cursor |
54
+ | Artifact missing / wrong org | DataRef | No | Restore / fix scope |
55
+ | Timeout / cancelled | Attempt | Policy | Retry or accept cancel |
56
+ | Retry exhausted | Step | No | Manual intervene |
57
+ | Partial batch | Run | Mixed | Retry failed items |
58
+ | Invalid AI output | Step | Policy | Repair or fail |
59
+ | External action uncertain/failed | Step | Keyed only | Inspect receipt |
60
+ | Unsupported atomicity | Validate | No | Disable atomicBatch |
61
+ | Schedule error | Scheduler | No | Fix cron/config |
62
+
63
+ Sanitize all evidence — no secrets, no unrestricted payloads.
64
+
65
+ ---
66
+
67
+ ## From: Building Pipelines — 14. Antipatterns and troubleshooting
68
+
69
+ ### Antipatterns
70
+
71
+ | Antipattern | Prefer |
72
+ |---|---|
73
+ | Pipeline for a pure rename | Mapping |
74
+ | Service that hides persistence | Capture → service → validate → write |
75
+ | Auto-promote raw to snapshot | Explicit map/validate/`write-record` |
76
+ | Ad-hoc relationship `PUT` | Discover → relationship-write via engine |
77
+ | Secrets in pipeline JSON | `credentialRef` on sources/services |
78
+ | AI auto-installs metadata | Proposal artifact + human install |
79
+ | Global transaction assumption | Explicit partial success; retry failed portion |
80
+ | Live AI for ops acceptance | Recorded adapter / fixtures |
81
+ | Re-schedule to “fix” resume | Resume from durable ledger |
82
+ | Direct Mongo domain writes | Data plane + relationship engine |
83
+
84
+ ### Troubleshooting decision tree
85
+
86
+ ```text
87
+ Fails before any step?
88
+ ├─ Invalid definition / cycle / unknown step → fix pack
89
+ ├─ Missing service/port/ledger → bind durable stores
90
+ └─ Wrong scope → fresh g12ops* + ops
91
+
92
+ Map/validate fails?
93
+ └─ Fix mapping against raw for PROC-2 / WI-100
94
+
95
+ Write stale?
96
+ └─ Re-read or new run; do not force overwrite blindly
97
+
98
+ Green run, empty Explore?
99
+ ├─ Missing write-record?
100
+ └─ Wrong objectType/contentType?
101
+
102
+ Links missing?
103
+ ├─ Discover without write?
104
+ └─ Verify/rebuild not run?
105
+
106
+ Partial batch?
107
+ └─ Retry failed items only — do not redo succeeded writes
108
+
109
+ AI flaky in acceptance?
110
+ └─ Recorded adapter; inspect request/response artifacts
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Also see
116
+
117
+ - **Workflow & Studio** (`09-workflow-and-studio`) — Design · Operate · Explore — scope bar ≡ headers, workflow siblings, embedding guidance. Builders primary.
118
+
119
+ ---
120
+
121
+ _Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
@@ -0,0 +1,128 @@
1
+ # Rebuild and verify relationship links
2
+
3
+ > **Use case id:** `relationship-rebuild-verify`
4
+ > **Goal:** Run discover / verify / rebuild / cleanup through the relationship engine.
5
+ > **Audiences:** developers
6
+ > **Tags:** relationships, ops
7
+
8
+ ## Reading path
9
+
10
+ 1. **Relationships & Memory** (developers) → chapters: `4-engine-lifecycle-discover-verify-rebuild-cleanup`, `6-ops-narrative-walkthrough`
11
+
12
+ ## From: Relationships & Memory — 4. Engine lifecycle — discover / verify / rebuild / cleanup
13
+
14
+ The relationship engine owns a deliberate lifecycle. Product callers do **not** PUT/DELETE individual links.
15
+
16
+ ### Responsibilities
17
+
18
+ 1. **Compile** abstract relationship definitions → concrete binding plans.
19
+ 2. **Discover** candidate links (bounded, non-Cartesian).
20
+ 3. **Materialize** idempotent four-field links via the store.
21
+ 4. **Verify** existing links against current definitions and subject content.
22
+ 5. **Rebuild** a definition’s links when definitions or source evidence change.
23
+ 6. **Cleanup** stale links for a definition according to policy.
24
+
25
+ Conceptual trusted call:
26
+
27
+ ```ts
28
+ import { createRelationshipEngine } from "@x12i/memorix-relationships";
29
+
30
+ await engine.discoverAndMaterialize(scope, "people-assigned-to-work-items");
31
+ ```
32
+
33
+ ### HTTP surface
34
+
35
+ | Capability | Via |
36
+ |---|---|
37
+ | List definitions | `GET /api/relationships/definitions` (and related) |
38
+ | Verify / rebuild / query | `/api/relationships` operator routes |
39
+ | Ad-hoc link PUT/DELETE | **405** — forbidden for product callers |
40
+
41
+ There is:
42
+
43
+ - **No** public manual put/delete relationship API for product callers
44
+ - **No** auto-run on metadata change (installing a definition does not silently rewrite all links)
45
+ - **No** AI on the deterministic path
46
+
47
+ ### Discover (bounded)
48
+
49
+ Discovery rules read evidence (often source fields on raw/snapshots) and resolve endpoints across concrete types that bind to the abstract sides.
50
+
51
+ Guarantees you should expect:
52
+
53
+ - Candidates are **bounded** — not “every person × every work item.”
54
+ - Unresolved targets are **first-class** (quarantined / reported), not silently invented.
55
+ - Repeated discover+materialize is **idempotent** for the same logical link (`relationshipId` is deterministic).
56
+
57
+ ### Verify / rebuild / cleanup
58
+
59
+ | Operation | Intent |
60
+ |---|---|
61
+ | Verify | Compare materialized links to what discovery would produce now; report drift |
62
+ | Rebuild | Re-run discover+materialize for one definition; reconcile store |
63
+ | Cleanup | Remove stale links for one definition per policy |
64
+
65
+ Always operate **one definition at a time** unless a higher-level pipeline explicitly sequences multiple definitions.
66
+
67
+ ### Pipeline pairing (ops)
68
+
69
+ The ops pack includes an explicit relationship pipeline pattern:
70
+
71
+ ```text
72
+ relationship-discover → relationship-write → relationship-verify
73
+ ```
74
+
75
+ Pipelines **invoke** the engine; they do not become a second link writer.
76
+
77
+ ---
78
+
79
+ ## From: Relationships & Memory — 6. Ops narrative walkthrough
80
+
81
+ ### Scope
82
+
83
+ ```http
84
+ x-memorix-org-id: g12ops7
85
+ x-memorix-agent-ids: ops
86
+ ```
87
+
88
+ ### Happy path
89
+
90
+ 1. **Metadata installed** for `ops` (sources, object types, relationship definitions).
91
+ 2. **Memory knowledge pull** from `ops-source` using `credentialRef` → `employees-raw`, `work-items-raw`, …
92
+ 3. **Pipeline promote** → snapshots for Alex, WI-100, PROC-2, …
93
+ 4. **Relationship discover/materialize** for `people-assigned-to-work-items` (and others as needed).
94
+ 5. **Verify** the definition — no unexpected drift.
95
+ 6. **Read** WI-100 or Alex with `relationships.include: true` — navigation only, no copied payloads.
96
+ 7. If a target is missing, Explore shows **unresolved** — fix data or rebuild; do not hand-edit links.
97
+
98
+ ### Integrator checklist
99
+
100
+ - [ ] Source uses `credentialRef`, not pasted secrets
101
+ - [ ] `*-raw` exists before you expect snapshots
102
+ - [ ] Snapshots exist on both sides before you expect links
103
+ - [ ] Relationship definition installed for the agent
104
+ - [ ] Links created via discover/materialize or Operate verify/rebuild — never ad-hoc PUT
105
+ - [ ] Expansion shows four-field navigation; unresolved list explained or empty
106
+ - [ ] No `associated*` blobs on subject records
107
+
108
+ ### Failure modes
109
+
110
+ | Symptom | Likely cause | Fix |
111
+ |---|---|---|
112
+ | 405 on link PUT/DELETE | Calling forbidden ad-hoc API | Use verify/rebuild/query only |
113
+ | Empty links after promote | Discovery not run / wrong definition id | Run discover+materialize for that definition |
114
+ | Unresolved targets | Missing subject content or bad source ids | Seed/fix data; rebuild |
115
+ | Cartesian explosion fear | Misread discovery | Confirm bounded rules; report if unbounded |
116
+ | Secrets in quarantine | Credential misuse | Switch to `credentialRef` |
117
+
118
+ Tutorial companion: [documentation/tutorials/05-relationships.md](../../../documentation/tutorials/05-relationships.md).
119
+
120
+ ---
121
+
122
+ ## Also see
123
+
124
+ - **Agent Packs & Ops** (`11-agent-packs-and-ops`) — Pack layout, harness, g12ops* acceptance, custom kinds, golden V2 validation.
125
+
126
+ ---
127
+
128
+ _Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._