@elevasis/sdk 1.44.2 → 1.45.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 (245) hide show
  1. package/dist/cli.cjs +1001 -652
  2. package/dist/index.d.ts +1045 -509
  3. package/dist/index.js +748 -690
  4. package/dist/node/index.d.ts +105 -97
  5. package/dist/test-utils/index.d.ts +42 -28
  6. package/dist/test-utils/index.js +549 -732
  7. package/dist/worker/index.d.ts +12112 -0
  8. package/dist/worker/index.js +211 -186
  9. package/package.json +6 -9
  10. package/reference/_navigation.md +151 -21
  11. package/reference/_reference-manifest.json +186 -4
  12. package/reference/claude-config.md +8 -0
  13. package/reference/core/index.mdx +3 -3
  14. package/reference/examples/organization-model.ts +117 -111
  15. package/reference/index.mdx +4 -4
  16. package/reference/rules/active-change-index.md +40 -54
  17. package/reference/rules/agent-runtime.md +81 -0
  18. package/reference/rules/agent-start-here.md +71 -163
  19. package/reference/rules/deployment.md +33 -10
  20. package/reference/rules/error-handling.md +26 -0
  21. package/reference/rules/execution.md +13 -0
  22. package/reference/rules/frontend.md +10 -3
  23. package/reference/rules/observability.md +9 -1
  24. package/reference/rules/operations.md +26 -17
  25. package/reference/rules/organization-model.md +74 -88
  26. package/reference/rules/organization-os.md +71 -88
  27. package/reference/rules/package-taxonomy.md +11 -2
  28. package/reference/rules/platform.md +13 -7
  29. package/reference/rules/shared-types.md +15 -0
  30. package/reference/rules/task-tracking.md +30 -5
  31. package/reference/rules/ui.md +145 -3
  32. package/reference/rules/vibe-intents.md +271 -0
  33. package/reference/rules/vibe.md +17 -243
  34. package/reference/scaffold/core/organization-graph.mdx +111 -97
  35. package/reference/scaffold/core/organization-model.mdx +234 -214
  36. package/reference/scaffold/operations/propagation-pipeline.md +1 -1
  37. package/reference/scaffold/operations/scaffold-maintenance.md +19 -18
  38. package/reference/scaffold/operations/workflow-recipes.md +71 -19
  39. package/reference/scaffold/recipes/add-a-feature.md +156 -146
  40. package/reference/scaffold/recipes/add-a-resource.md +123 -117
  41. package/reference/scaffold/recipes/customize-crm-actions.md +25 -10
  42. package/reference/scaffold/recipes/customize-knowledge-browser.md +52 -117
  43. package/reference/scaffold/recipes/customize-organization-model.md +161 -149
  44. package/reference/scaffold/recipes/extend-a-base-entity.md +156 -140
  45. package/reference/scaffold/recipes/extend-crm.md +16 -11
  46. package/reference/scaffold/recipes/extend-lead-gen.md +25 -7
  47. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
  48. package/reference/scaffold/recipes/index.md +2 -2
  49. package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
  50. package/reference/scaffold/reference/contracts.md +12 -1
  51. package/reference/scaffold/reference/glossary.md +3 -3
  52. package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
  53. package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
  54. package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
  55. package/reference/scaffold/ui/feature-shell.mdx +279 -62
  56. package/reference/scaffold/ui/recipes.md +229 -197
  57. package/reference/sdk/cli-management.mdx +77 -29
  58. package/reference/sdk/concepts.mdx +2 -0
  59. package/reference/sdk/define-builders.mdx +76 -0
  60. package/reference/sdk/deployment/command-center.mdx +6 -2
  61. package/reference/sdk/deployment/execution-reference.mdx +64 -186
  62. package/reference/sdk/deployment/index.mdx +2 -0
  63. package/reference/sdk/exports.mdx +4 -4
  64. package/reference/sdk/framework/agent.mdx +49 -119
  65. package/reference/sdk/framework/index.mdx +46 -65
  66. package/reference/sdk/framework/project-structure.mdx +150 -205
  67. package/reference/sdk/framework/tutorial-system.mdx +2 -2
  68. package/reference/sdk/human-in-the-loop.mdx +152 -0
  69. package/reference/sdk/index.mdx +6 -7
  70. package/reference/sdk/platform-tools/index.mdx +12 -0
  71. package/reference/sdk/platform-tools/type-safety.mdx +4 -0
  72. package/reference/sdk/project-deployment-spec.mdx +131 -0
  73. package/reference/sdk/resources/index.mdx +23 -7
  74. package/reference/sdk/resources/patterns.mdx +54 -24
  75. package/reference/sdk/resources/types.mdx +7 -4
  76. package/reference/sdk/templates/data-enrichment.mdx +7 -3
  77. package/reference/sdk/templates/email-sender.mdx +139 -135
  78. package/reference/sdk/templates/lead-scorer.mdx +5 -1
  79. package/reference/sdk/templates/pdf-generator.mdx +155 -151
  80. package/reference/sdk/templates/recurring-job.mdx +195 -189
  81. package/reference/sdk/templates/text-classifier.mdx +4 -0
  82. package/reference/sdk/templates/web-scraper.mdx +139 -135
  83. package/reference/spine/spine-primer.md +135 -96
  84. package/reference/ui/index.mdx +14 -7
  85. package/dist/types/worker/adapters/anymailfinder.d.ts +0 -14
  86. package/dist/types/worker/adapters/apify.d.ts +0 -14
  87. package/dist/types/worker/adapters/approval.d.ts +0 -23
  88. package/dist/types/worker/adapters/attio.d.ts +0 -22
  89. package/dist/types/worker/adapters/clickup.d.ts +0 -22
  90. package/dist/types/worker/adapters/create-adapter.d.ts +0 -41
  91. package/dist/types/worker/adapters/crm.d.ts +0 -20
  92. package/dist/types/worker/adapters/dropbox.d.ts +0 -14
  93. package/dist/types/worker/adapters/email.d.ts +0 -25
  94. package/dist/types/worker/adapters/execution.d.ts +0 -22
  95. package/dist/types/worker/adapters/gmail.d.ts +0 -14
  96. package/dist/types/worker/adapters/google-sheets.d.ts +0 -14
  97. package/dist/types/worker/adapters/index.d.ts +0 -33
  98. package/dist/types/worker/adapters/instantly.d.ts +0 -14
  99. package/dist/types/worker/adapters/lead.d.ts +0 -28
  100. package/dist/types/worker/adapters/list.d.ts +0 -9
  101. package/dist/types/worker/adapters/llm.d.ts +0 -45
  102. package/dist/types/worker/adapters/millionverifier.d.ts +0 -14
  103. package/dist/types/worker/adapters/notification.d.ts +0 -28
  104. package/dist/types/worker/adapters/pdf.d.ts +0 -22
  105. package/dist/types/worker/adapters/projects.d.ts +0 -20
  106. package/dist/types/worker/adapters/resend.d.ts +0 -14
  107. package/dist/types/worker/adapters/scheduler.d.ts +0 -25
  108. package/dist/types/worker/adapters/signature-api.d.ts +0 -14
  109. package/dist/types/worker/adapters/storage.d.ts +0 -33
  110. package/dist/types/worker/adapters/stripe.d.ts +0 -14
  111. package/dist/types/worker/adapters/tomba.d.ts +0 -14
  112. package/dist/types/worker/index.d.ts +0 -60
  113. package/dist/types/worker/platform.d.ts +0 -90
  114. package/dist/types/worker/utils.d.ts +0 -9
  115. package/reference/claude-config/Overview.md +0 -230
  116. package/reference/claude-config/hooks/post-edit-validate.mjs +0 -98
  117. package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +0 -187
  118. package/reference/claude-config/hooks/tool-failure-recovery.mjs +0 -73
  119. package/reference/claude-config/registries/graph-skills.json +0 -4
  120. package/reference/claude-config/registries/knowledge-flags.json +0 -154
  121. package/reference/claude-config/registries/skill-coverage.json +0 -20
  122. package/reference/claude-config/rules/active-change-index.md +0 -22
  123. package/reference/claude-config/rules/agent-start-here.md +0 -22
  124. package/reference/claude-config/rules/deployment.md +0 -22
  125. package/reference/claude-config/rules/error-handling.md +0 -22
  126. package/reference/claude-config/rules/execution.md +0 -22
  127. package/reference/claude-config/rules/frontend.md +0 -22
  128. package/reference/claude-config/rules/observability.md +0 -22
  129. package/reference/claude-config/rules/operations.md +0 -22
  130. package/reference/claude-config/rules/organization-model.md +0 -22
  131. package/reference/claude-config/rules/organization-os.md +0 -22
  132. package/reference/claude-config/rules/package-taxonomy.md +0 -22
  133. package/reference/claude-config/rules/platform.md +0 -22
  134. package/reference/claude-config/rules/shared-types.md +0 -22
  135. package/reference/claude-config/rules/task-tracking.md +0 -22
  136. package/reference/claude-config/rules/topbar-actions.md +0 -70
  137. package/reference/claude-config/rules/ui.md +0 -22
  138. package/reference/claude-config/rules/vibe.md +0 -22
  139. package/reference/claude-config/scripts/statusline-command.js +0 -18
  140. package/reference/claude-config/settings.json +0 -30
  141. package/reference/claude-config/skills/client/SKILL.md +0 -201
  142. package/reference/claude-config/skills/deploy/SKILL.md +0 -159
  143. package/reference/claude-config/skills/dsp/SKILL.md +0 -66
  144. package/reference/claude-config/skills/elevasis/SKILL.md +0 -251
  145. package/reference/claude-config/skills/explore/SKILL.md +0 -78
  146. package/reference/claude-config/skills/git-sync/SKILL.md +0 -166
  147. package/reference/claude-config/skills/om/SKILL.md +0 -475
  148. package/reference/claude-config/skills/om/operations/build.md +0 -237
  149. package/reference/claude-config/skills/om/operations/codify-level-a.md +0 -109
  150. package/reference/claude-config/skills/om/operations/codify-level-b.md +0 -159
  151. package/reference/claude-config/skills/om/operations/customers.md +0 -114
  152. package/reference/claude-config/skills/om/operations/features.md +0 -88
  153. package/reference/claude-config/skills/om/operations/goals.md +0 -123
  154. package/reference/claude-config/skills/om/operations/identity.md +0 -97
  155. package/reference/claude-config/skills/om/operations/labels.md +0 -110
  156. package/reference/claude-config/skills/om/operations/offerings.md +0 -114
  157. package/reference/claude-config/skills/om/operations/roles.md +0 -104
  158. package/reference/claude-config/skills/om/operations/scaffold.md +0 -163
  159. package/reference/claude-config/skills/om/operations/techStack.md +0 -38
  160. package/reference/claude-config/skills/project/SKILL.md +0 -1114
  161. package/reference/claude-config/skills/run-ui/SKILL.md +0 -73
  162. package/reference/claude-config/skills/save/SKILL.md +0 -183
  163. package/reference/claude-config/skills/setup/SKILL.md +0 -290
  164. package/reference/claude-config/skills/status/SKILL.md +0 -59
  165. package/reference/claude-config/skills/submit-request/SKILL.md +0 -180
  166. package/reference/claude-config/skills/sync/SKILL.md +0 -47
  167. package/reference/claude-config/skills/tutorial/SKILL.md +0 -259
  168. package/reference/claude-config/skills/tutorial/progress-template.md +0 -74
  169. package/reference/claude-config/skills/tutorial/technical.md +0 -1303
  170. package/reference/claude-config/skills/tutorial/vibe-coder.md +0 -890
  171. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +0 -27
  172. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +0 -30
  173. package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +0 -73
  174. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +0 -86
  175. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +0 -55
  176. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +0 -97
  177. package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +0 -112
  178. package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +0 -93
  179. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +0 -58
  180. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +0 -56
  181. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +0 -71
  182. package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +0 -83
  183. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +0 -59
  184. package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +0 -42
  185. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +0 -60
  186. package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +0 -37
  187. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +0 -34
  188. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +0 -38
  189. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +0 -32
  190. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +0 -33
  191. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +0 -69
  192. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +0 -30
  193. package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +0 -45
  194. package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +0 -52
  195. package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +0 -33
  196. package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +0 -32
  197. package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +0 -43
  198. package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +0 -40
  199. package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +0 -61
  200. package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +0 -49
  201. package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +0 -31
  202. package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +0 -42
  203. package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +0 -33
  204. package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +0 -37
  205. package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +0 -28
  206. package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +0 -43
  207. package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +0 -26
  208. package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +0 -33
  209. package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +0 -35
  210. package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +0 -49
  211. package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +0 -47
  212. package/reference/claude-config/sync-notes/2026-05-28-om-snapshot-sdk-workflow-config.md +0 -33
  213. package/reference/claude-config/sync-notes/2026-05-30-client-source-and-om-profiles.md +0 -39
  214. package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +0 -27
  215. package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +0 -45
  216. package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +0 -34
  217. package/reference/claude-config/sync-notes/2026-06-04-scaffold-registry-lane-severity.md +0 -34
  218. package/reference/claude-config/sync-notes/2026-06-05-appearance-app-mode-decouple.md +0 -29
  219. package/reference/claude-config/sync-notes/2026-06-05-ontology-endpoint-rename-and-knowledge-browser-ui.md +0 -86
  220. package/reference/claude-config/sync-notes/2026-06-06-om-build-systems-scaffold.md +0 -47
  221. package/reference/claude-config/sync-notes/2026-06-06-om-item-copy-references.md +0 -50
  222. package/reference/claude-config/sync-notes/2026-06-08-knowledge-base-page-not-found-fix.md +0 -76
  223. package/reference/claude-config/sync-notes/2026-06-09-agent-sessions-public-agent-chat-route.md +0 -75
  224. package/reference/claude-config/sync-notes/2026-06-09-sdk-cli-load-org-model-resolution.md +0 -42
  225. package/reference/claude-config/sync-notes/2026-06-12-agent-grants-visualizer-operations.md +0 -30
  226. package/reference/claude-config/sync-notes/2026-06-14-session-ux-and-project-cli-json.md +0 -33
  227. package/reference/claude-config/sync-notes/2026-06-14-shared-session-conversation-view.md +0 -26
  228. package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +0 -46
  229. package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +0 -34
  230. package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +0 -52
  231. package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +0 -47
  232. package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +0 -75
  233. package/reference/claude-config/sync-notes/2026-07-23-agent-session-memory.md +0 -49
  234. package/reference/claude-config/sync-notes/2026-07-23-workos-org-marker.md +0 -50
  235. package/reference/claude-config/sync-notes/2026-07-24-claude-5-models-and-session-surface-fixes.md +0 -116
  236. package/reference/claude-config/sync-notes/2026-07-27-agent-strict-output-and-turn-drift.md +0 -73
  237. package/reference/claude-config/sync-notes/2026-07-28-agent-reply-is-its-own-field.md +0 -84
  238. package/reference/claude-config/sync-notes/2026-07-30-login-screen-and-member-provisioning-state.md +0 -114
  239. package/reference/claude-config/sync-notes/2026-08-02-auth-guard-defaults-and-truncation-fix.md +0 -122
  240. package/reference/claude-config/sync-notes/2026-08-03-cli-gateway-errors-and-request-timeout.md +0 -120
  241. package/reference/claude-config/sync-notes/README.md +0 -43
  242. package/reference/sdk/framework/interaction-guidance.mdx +0 -182
  243. package/reference/sdk/framework/memory.mdx +0 -326
  244. package/reference/sdk/framework/resource-documentation.mdx +0 -90
  245. package/reference/sdk/roadmap.mdx +0 -164
@@ -1,237 +0,0 @@
1
- ---
2
- name: build
3
- description: Guided Codify-ceremony runbook for building a new Organization Model System end to end in a tenant project — shell, ontology, resources, topology, knowledge node, and verify.
4
- allowed-tools: Read, Glob, Grep, Bash
5
- ---
6
-
7
- # /om build (Tenant)
8
-
9
- Intent-driven runbook for authoring a complete Organization Model System in this tenant project.
10
- The **primary entry is intent**: `/om` routes free-text build intent here via `promptSignals` and
11
- the 5-bucket classifier whenever you describe a system you want to build. Manual `/om build` is a
12
- supported secondary entry.
13
-
14
- Every write runs through the Codify ceremony (snapshot → propose → confirm → write → validate →
15
- rollback). See the "Write Power" section in `SKILL.md` for the ceremony steps.
16
-
17
- **Tenant authoring files** (split layout):
18
-
19
- - `core/config/organization-model/systems.ts` — System entries and system-owned resources
20
- - `core/config/organization-model/navigation.ts` — sidebar wiring
21
- - `core/config/knowledge/nodes/` — knowledge node MDX files
22
-
23
- ---
24
-
25
- ## Phase 0 — Capture Intent
26
-
27
- Before writing anything, extract:
28
-
29
- 1. **System name and dotted path** (`parent.child` format, e.g. `sales.crm`).
30
- 2. **Kind**: `product`, `operational`, `platform`, or `diagnostic`.
31
- 3. **What it does** — one sentence. This becomes the `description`.
32
- 4. **What it owns** — objects, actions, catalogs, events (these become `system.ontology` entries).
33
- 5. **What it calls or reacts to** — other systems, triggers, human checkpoints.
34
- 6. **Whether it needs a UI route** — yes/no determines whether `system.ui` is authored.
35
- 7. **Whether it adopts a platform API interface** — yes/no determines whether `system.apiInterface`
36
- is authored (see "API Interface Readiness" in `SKILL.md`).
37
-
38
- Run a pre-flight read to ground id choices in current model state:
39
-
40
- ```bash
41
- pnpm elevasis-sdk om:ls /all-systems
42
- ```
43
-
44
- ---
45
-
46
- ## Phase 1 — System Shell (Codify Level-A)
47
-
48
- Use `om:scaffold:system` (dry-run first) or the Codify Level-A ceremony to add the `SystemEntry`
49
- to `core/config/organization-model/systems.ts`.
50
-
51
- **Dry-run:**
52
-
53
- ```bash
54
- pnpm elevasis-sdk om:scaffold:system --dry-run
55
- ```
56
-
57
- Minimum fields: `id`, `order`, `label`. Optional at this stage: `description`, `kind`,
58
- `lifecycle`, `responsibleRoleId`.
59
-
60
- **Validate after write:**
61
-
62
- ```bash
63
- pnpm -C operations check-types
64
- pnpm -C operations check
65
- ```
66
-
67
- ---
68
-
69
- ## Phase 2 — Ontology (`system.ontology`)
70
-
71
- Add owned ontology kinds inside the `ontology` field of the `SystemEntry` in `systems.ts`.
72
-
73
- Valid scope keys: `objectTypes`, `linkTypes`, `actionTypes`, `catalogTypes`, `eventTypes`,
74
- `interfaceTypes`, `valueTypes`, `sharedProperties`, `groups`, `endpoints`.
75
-
76
- All ids use the canonical format: `system.path:kind/local-id`
77
- (e.g. `sales.crm:object/deal`, `sales.crm:action/qualify-lead`).
78
-
79
- Apply via the Codify Level-A ceremony — read, propose diff, confirm, write, validate.
80
-
81
- **Validate after write:**
82
-
83
- ```bash
84
- pnpm -C operations check-types
85
- pnpm -C operations check
86
- ```
87
-
88
- ---
89
-
90
- ## Phase 3 — Resources (Codify Level-A + scaffold)
91
-
92
- Add resource entries to `systems.ts` (or the split `resources` section if your project uses one).
93
- Each resource carries `systemPath` (canonical system attachment) and `ontology` bindings.
94
-
95
- Use `om:scaffold:resource` for guided creation, or Codify Level-A for manual addition.
96
-
97
- **Dry-run:**
98
-
99
- ```bash
100
- pnpm elevasis-sdk om:scaffold:resource --dry-run --system-path <your.system>
101
- ```
102
-
103
- Key invariants:
104
-
105
- - `resource.systemPath` is the canonical attachment for `getResourcesForSystem()`.
106
- - Choose `systemPath` based on the business capability the resource operates, not its kind.
107
- - `primaryAction` must be a member of `resource.ontology.actions`.
108
-
109
- **Validate after write:**
110
-
111
- ```bash
112
- pnpm -C operations check-types
113
- pnpm -C operations check
114
- ```
115
-
116
- ---
117
-
118
- ## Phase 4 — Topology (optional)
119
-
120
- If the system reacts to events, calls other systems, or requires human checkpoints, author
121
- topology relationships. In a tenant project, topology lives alongside the System entries in
122
- `systems.ts` (or a dedicated `topology` field if your project uses the split layout with a
123
- separate topology section).
124
-
125
- Canonical relationship kinds:
126
-
127
- - `triggers` — event, webhook, or schedule fires a resource handler
128
- - `uses` — this system calls another system or integration
129
- - `approval` — a step requires human checkpoint before continuing
130
-
131
- Cross-system API handoff requires a `uses` edge with `systemInterfaceGrant` metadata — see the
132
- "API Interface Readiness" section in `SKILL.md`.
133
-
134
- Apply via Codify Level-A ceremony. Validate after each topology write.
135
-
136
- ---
137
-
138
- ## Phase 5 — Knowledge Node (optional)
139
-
140
- Author a governing knowledge node to make the system searchable via `/om` and surfaced in the
141
- knowledge browser.
142
-
143
- Use `om:scaffold:knowledge` for guided creation:
144
-
145
- ```bash
146
- pnpm elevasis-sdk om:scaffold:knowledge --dry-run --system-path <your.system> --kind playbook
147
- ```
148
-
149
- MDX frontmatter shape:
150
-
151
- ```mdx
152
- ---
153
- id: knowledge.my-system-playbook
154
- kind: playbook
155
- label: My System Playbook
156
- description: Rules and patterns for operating My System.
157
- governs:
158
- - my.system
159
- ---
160
- ```
161
-
162
- After authoring, regenerate the knowledge index:
163
-
164
- ```bash
165
- pnpm elevasis-sdk om:generate
166
- ```
167
-
168
- ---
169
-
170
- ## Phase 6 — UI and Navigation (optional)
171
-
172
- If the system needs a sidebar entry, author `system.ui` and add a navigation surface entry.
173
-
174
- `system.ui` fields: `path`, `surfaces[]`, `icon`, `order`. Apply via Codify Level-A.
175
-
176
- Navigation wiring lives in `core/config/organization-model/navigation.ts`. Add the system's
177
- path to the relevant sidebar section. Validate after the navigation write.
178
-
179
- ---
180
-
181
- ## Phase 7 — apiInterface (API-backed systems only)
182
-
183
- `system.apiInterface` is adopt-only in tenant projects. Only add it when the system adopts a
184
- platform-provided API capability from the installed `@elevasis/core` / `@elevasis/sdk` version.
185
- Use only readiness profiles listed in
186
- `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`.
187
-
188
- The profile also fixes the required System path — do not invent a profile or repoint a cataloged
189
- profile to a custom path.
190
-
191
- Apply via Codify Level-A after confirming the readiness profile with the user:
192
-
193
- ```bash
194
- pnpm -C operations check-types
195
- pnpm -C operations check # conformance gate fires here if the marker is incomplete
196
- ```
197
-
198
- ---
199
-
200
- ## Phase 8 — Full Verify
201
-
202
- Run both validation gates once all phases are done:
203
-
204
- ```bash
205
- pnpm -C operations check-types
206
- pnpm -C operations check
207
- ```
208
-
209
- If the conformance gate reports a gaps file, apply it:
210
-
211
- ```bash
212
- pnpm elevasis-sdk om:scaffold:fill --gaps .elevasis/conformance-gaps.json --dry-run
213
- ```
214
-
215
- ---
216
-
217
- ## Quick Reference
218
-
219
- | Phase | OM Slot | Authoring File | Ceremony |
220
- | ----- | --------------------------------- | --------------------------------- | ----------------------- |
221
- | 1 | `systems` map | `systems.ts` | Scaffold or Level-A |
222
- | 2 | `system.ontology.<scope>` | `systems.ts` | Level-A |
223
- | 3 | resources + `resource.systemPath` | `systems.ts` | Scaffold or Level-A |
224
- | 4 | topology relationships | `systems.ts` / topology section | Level-A |
225
- | 5 | `system.governedByKnowledge[]` | `knowledge/nodes/<path>/<id>.mdx` | Scaffold or Level-A |
226
- | 6 | `system.ui` + navigation surfaces | `systems.ts` + `navigation.ts` | Level-A |
227
- | 7 | `system.apiInterface` | `systems.ts` | Level-A (adopt-only) |
228
- | 8 | — | — | `check` + `check-types` |
229
-
230
- ---
231
-
232
- ## Cross-Links
233
-
234
- - Codify Level-A ceremony: `.claude/skills/om/operations/codify-level-a.md`
235
- - Scaffold (guided new entries): `.claude/skills/om/operations/scaffold.md`
236
- - API interface readiness: "API Interface Readiness" section in `.claude/skills/om/SKILL.md`
237
- - Platform narrative guide + worked examples: `operations/node_modules/@elevasis/sdk/reference/guides/building-systems.md` (if present)
@@ -1,109 +0,0 @@
1
- # Codify Pipeline: Level A (Config-Only Edits)
2
-
3
- Level A is the codify pipeline for changes that land in a single config file inside
4
- `core/config/`. No new TypeScript files are created. The entire ceremony is: snapshot the target
5
- file, propose the edit, write the edit, validate, and roll back on failure.
6
-
7
- This pipeline is called by domain operations (identity, customers, offerings, roles, goals,
8
- techStack, systems, actions, labels, and legacy feature compatibility) after the user has confirmed the proposed change. The caller provides
9
- the specific field/block being changed, the proposed new value, and the target file.
10
-
11
- ---
12
-
13
- ## Pipeline
14
-
15
- ### Step 1: Snapshot
16
-
17
- Before any write, read `TARGET_FILE` and keep the full file content in memory as the rollback
18
- snapshot. Do not write any file during this step.
19
-
20
- ```
21
- Read(TARGET_FILE)
22
- -- store as ROLLBACK_SNAPSHOT
23
- ```
24
-
25
- `TARGET_FILE` is the value the caller provides in the Caller Contract (see below). When the
26
- project has not been split yet, callers pass the default
27
- `core/config/organization-model.ts`.
28
-
29
- ### Step 2: Apply the edit
30
-
31
- Use the Edit tool to apply the caller's proposed change to `TARGET_FILE`.
32
-
33
- Rules for the edit:
34
-
35
- - Edit only the specific field or block the caller specified. Do not reformat or restructure
36
- unrelated sections.
37
- - For edits targeting `profile.ts`: preserve all other keys in `defineOrganizationModel({...})`
38
- exactly as they are.
39
- - Maintain the existing code style (trailing commas, quote style, indentation) of the file.
40
- - If the target field does not yet exist in the file, add it as a new property in the appropriate
41
- position (following the declared domain order in the schema).
42
-
43
- ### Step 3: TypeScript type-check
44
-
45
- Run the type-check for the operations package:
46
-
47
- ```bash
48
- pnpm -C operations check-types
49
- ```
50
-
51
- Capture stdout and stderr. If the command exits non-zero, proceed to Step 5 (rollback).
52
-
53
- ### Step 4: Runtime schema validation
54
-
55
- Confirm that the adapter's output passes `OrganizationModelSchema.parse()`. The adapter calls
56
- `resolveOrganizationModel()` internally, which merges defaults with overrides and then parses the
57
- result. A successful `check-types` pass is strong evidence that the schema is valid, but
58
- cross-reference checks (segment ID refs in offerings, role reporting refs, period ordering in
59
- goals) are runtime-only.
60
-
61
- If the project exposes a validation script (e.g. `pnpm -C operations check`), run that too:
62
-
63
- ```bash
64
- pnpm -C operations check
65
- ```
66
-
67
- If either validation step fails, proceed to Step 5 (rollback).
68
-
69
- ### Step 5: Rollback (on failure only)
70
-
71
- If Step 3 or Step 4 failed:
72
-
73
- 1. Write the ROLLBACK_SNAPSHOT content back to `TARGET_FILE` verbatim (use the Write tool with
74
- the exact snapshot content).
75
- 2. Confirm the file has been restored by checking that the content matches the snapshot.
76
- 3. Return the error message to the caller.
77
-
78
- The caller is responsible for reporting the rollback to the user.
79
-
80
- ### Step 6: Success signal
81
-
82
- If Steps 3 and 4 both passed, return a success signal to the caller with:
83
-
84
- - The file edited (`TARGET_FILE`)
85
- - The fields changed
86
- - `Type-check: PASS`
87
- - `Schema validation: PASS`
88
-
89
- The caller formats and presents the final report.
90
-
91
- ---
92
-
93
- ## Caller Contract
94
-
95
- Callers must provide before invoking this pipeline:
96
-
97
- - **Target file:** the sub-file path to snapshot and edit. Default (unsplit projects):
98
- `core/config/organization-model.ts`. Split-project routing:
99
- - `core/config/organization-model/profile.ts` for identity, customers, offerings, roles, goals
100
- (and techStack/labels when those keys exist in `profile.ts`)
101
- - `core/config/organization-model/systems.ts` for systems, actions, resources
102
- - Callers use the default entry path when the domain does not yet have a dedicated sub-file
103
- - **Target block:** the specific domain key or sub-key being changed (e.g. `identity`,
104
- `customers.segments`, `roles.roles`, `resources.hubspot`)
105
- - **Proposed value:** the new TypeScript literal to write for that block
106
- - **Confirmed:** the user has already said yes to the proposed change
107
-
108
- This pipeline does not ask the user any questions. All confirmation happens in the domain
109
- operation before this pipeline is invoked.
@@ -1,159 +0,0 @@
1
- # Codify Pipeline: Level B (New Extension TypeScript Files)
2
-
3
- Level B is the codify pipeline for changes that require creating a new TypeScript file under
4
- `core/config/extensions/`. This pipeline is used when the user wants to add or extend a System,
5
- add an Action, add a custom entity type, or make any structural addition that cannot be expressed as a simple
6
- field override in `core/config/organization-model.ts`.
7
-
8
- Level B is **only offered when the user explicitly asks** for something that requires a new file.
9
- Never silently escalate from Level A to Level B. If Level A is sufficient, use it.
10
-
11
- ---
12
-
13
- ## When Level B applies
14
-
15
- - Adding or extending a System that does not exist in the platform defaults, including routing,
16
- manifest wiring, and route references
17
- - Adding an Action that is invokable by a workflow, agent, command, or UI trigger
18
- - Adding a custom entity extension (new Zod schema extending a base entity type)
19
- - Any structural addition the caller's domain operation has determined cannot be expressed as a
20
- field value in the existing adapter
21
-
22
- The calling operation (or the legacy compatibility notes in `features.md`) is responsible for deciding when Level B is needed
23
- and for confirming the intent with the user before invoking this pipeline.
24
-
25
- ---
26
-
27
- ## Pipeline
28
-
29
- ### Step 1: Snapshot all files that will be touched
30
-
31
- Before any write, read and snapshot:
32
-
33
- 1. `core/config/organization-model.ts` (always touched for wiring)
34
- 2. The target extension file path (if it already exists -- confirm overwrite with user)
35
-
36
- ```
37
- Read("core/config/organization-model.ts") -- store as ROLLBACK_ADAPTER
38
- Read("core/config/extensions/{target}.ts") -- store as ROLLBACK_EXTENSION (if exists)
39
- ```
40
-
41
- The target extension file path follows the naming convention:
42
- `core/config/extensions/{kebab-case-system-or-action-id}.ts`
43
-
44
- ### Step 2: Scaffold the extension file
45
-
46
- Create `core/config/extensions/{id}.ts` using the Write tool.
47
-
48
- The file shape depends on the extension type:
49
-
50
- **Custom system/action extension (common Level B case):**
51
-
52
- ```typescript
53
- /**
54
- * {System or action label} extension.
55
- * Registered in core/config/organization-model.ts.
56
- */
57
- import type { OrganizationModelSystem } from '@elevasis/core/organization-model'
58
-
59
- export const {SYSTEM_CONST}: OrganizationModelSystem = {
60
- id: '{system-or-action-id}',
61
- label: '{System or Action Label}',
62
- description: '{optional description}',
63
- enabled: true,
64
- entityIds: [],
65
- surfaceIds: [],
66
- resourceIds: [],
67
- actionIds: [],
68
- }
69
- ```
70
-
71
- Replace `{SYSTEM_CONST}` with the SCREAMING_SNAKE_CASE version of the system or action ID
72
- (e.g. `CLIENT_PORTAL_SYSTEM`).
73
-
74
- The caller provides the exact field values based on what the user confirmed.
75
-
76
- ### Step 3: Wire the extension into the adapter
77
-
78
- Edit `core/config/organization-model.ts` to:
79
-
80
- 1. Import the new constant from the extension file.
81
- 2. Add it to the appropriate `systems` or `actions` collection in the `defineOrganizationModel({...})` call.
82
-
83
- Example import addition:
84
-
85
- ```typescript
86
- import { CLIENT_PORTAL_SYSTEM } from './extensions/client-portal'
87
- ```
88
-
89
- Example system collection addition:
90
-
91
- ```typescript
92
- systems: [
93
- ...existingSystems,
94
- CLIENT_PORTAL_SYSTEM,
95
- ],
96
- ```
97
-
98
- ### Step 4: TypeScript type-check
99
-
100
- ```bash
101
- pnpm -C operations check-types
102
- ```
103
-
104
- Capture stdout and stderr. If the command exits non-zero, proceed to Step 6 (rollback).
105
-
106
- ### Step 5: Runtime schema validation
107
-
108
- ```bash
109
- pnpm -C operations check
110
- ```
111
-
112
- If either check fails, proceed to Step 6 (rollback).
113
-
114
- ### Step 6: Rollback (on failure only)
115
-
116
- If Step 4 or Step 5 failed:
117
-
118
- 1. Restore `core/config/organization-model.ts` from ROLLBACK_ADAPTER.
119
- 2. If the extension file did not previously exist, delete it. If it previously existed, restore
120
- from ROLLBACK_EXTENSION.
121
- 3. Re-run `pnpm -C operations check-types` to confirm the restore is clean. If the restore
122
- itself fails type-check, report both the original error and the restore state to the user --
123
- do not silently leave the project in a broken state.
124
- 4. Return the error message to the caller.
125
-
126
- ### Step 7: Success signal
127
-
128
- If Steps 4 and 5 both passed, return a success signal to the caller with:
129
-
130
- - Extension file path created
131
- - Adapter wiring changes (import + systems/actions collection entry)
132
- - `Type-check: PASS`
133
- - `Schema validation: PASS`
134
-
135
- The caller formats and presents the final report to the user.
136
-
137
- ---
138
-
139
- ## Caller Contract
140
-
141
- Callers must provide before invoking this pipeline:
142
-
143
- - **Extension file path:** `core/config/extensions/{id}.ts`
144
- - **Extension file content:** the full TypeScript content for the new file
145
- - **Adapter changes:** the exact import line and systems/actions collection addition to write into the adapter
146
- - **Confirmed:** the user has already said yes to the proposed change and explicitly requested
147
- a new extension file
148
-
149
- This pipeline does not ask the user any questions. All confirmation and escalation decisions
150
- happen in the domain operation before this pipeline is invoked.
151
-
152
- ---
153
-
154
- ## Constraint: Extension files are Tier 3 (never synced)
155
-
156
- Files under `core/config/extensions/` are Tier 3 -- project-specific, never overwritten
157
- by `/external sync`. This means custom systems, actions, and entity extensions survive template upgrades
158
- automatically. Do not put platform-default overrides in extension files; those belong directly in
159
- `core/config/organization-model.ts` (Tier 2, merge-aware).
@@ -1,114 +0,0 @@
1
- # Customers domain
2
-
3
- The `customers` domain describes who the organization serves — distinct buyer archetypes modeled
4
- after the Value Proposition Canvas (BMC / VPC). Each segment captures jobs-to-be-done, pains,
5
- gains, firmographics, and a value proposition. Agents use these segments for targeting, outreach
6
- context, and personalization.
7
-
8
- ## Schema
9
-
10
- Source: `packages/core/src/organization-model/domains/customers.ts`
11
-
12
- ```typescript
13
- CustomersDomainSchema = z.object({
14
- segments: z.array(CustomerSegmentSchema).default([])
15
- })
16
-
17
- CustomerSegmentSchema = z.object({
18
- id: z.string().trim().min(1).max(100), // stable ID, e.g. "segment-smb-agencies"
19
- name: z.string().trim().max(200).default(''), // display name
20
- description: z.string().trim().max(2000).default(''), // who this segment is
21
- jobsToBeDone: z.string().trim().max(2000).default(''), // the goal they hire you to accomplish
22
- pains: z.array(z.string().trim().max(500)).default([]),
23
- gains: z.array(z.string().trim().max(500)).default([]),
24
- firmographics: FirmographicsSchema.default({}), // industry, companySize, region
25
- valueProp: z.string().trim().max(2000).default('') // why your offering fits this segment
26
- })
27
-
28
- FirmographicsSchema = z.object({
29
- industry: z.string().trim().max(200).optional(), // e.g. "Marketing Agency"
30
- companySize: z.string().trim().max(100).optional(), // e.g. "11–50"
31
- region: z.string().trim().max(200).optional() // e.g. "North America"
32
- })
33
- ```
34
-
35
- ## Field reference
36
-
37
- | Field | Type | Max | Notes |
38
- | --------------- | -------- | ---- | ------------------------------------------------------------ |
39
- | `id` | string | 100 | Stable key, min 1 char; e.g. `"segment-smb-agencies"` |
40
- | `name` | string | 200 | Display name |
41
- | `description` | string | 2000 | Who this segment is in one or two sentences |
42
- | `jobsToBeDone` | string | 2000 | The goal they hire you to accomplish, in their terms |
43
- | `pains` | string[] | 500 | Each item: a frustration or obstacle |
44
- | `gains` | string[] | 500 | Each item: an outcome or benefit they hope for |
45
- | `firmographics` | object | -- | Optional industry, companySize, region filters for targeting |
46
- | `valueProp` | string | 2000 | Why your offering uniquely addresses this segment's needs |
47
-
48
- ## Validation rules
49
-
50
- - `id` is the stable key used by `offerings.products[].targetSegmentIds` references; once set,
51
- changing the `id` of a segment breaks any offering that references it
52
- - `firmographics` is optional; all three sub-fields (`industry`, `companySize`, `region`) are
53
- individually optional
54
- - `pains` and `gains` default to empty arrays; agents should treat an empty array as unconfigured
55
- - There is no uniqueness constraint enforced by the schema on `id`, but agents must treat it as
56
- unique and surface duplicates if found
57
- - Cross-reference: if a segment is removed, any `offerings.products[].targetSegmentIds` that
58
- reference its `id` become dangling references; surface a warning before removing
59
-
60
- ## Examples
61
-
62
- ```typescript
63
- customers: {
64
- segments: [
65
- {
66
- id: "segment-smb-agencies",
67
- name: "SMB Marketing Agencies",
68
- description: "Owner-operated agencies with 1–15 employees running campaign delivery for SMB clients.",
69
- jobsToBeDone: "Deliver consistent client results without adding headcount.",
70
- pains: [
71
- "Manual campaign QA eats time",
72
- "Client reporting takes hours each week",
73
- "Hard to scale without hiring"
74
- ],
75
- gains: [
76
- "More client capacity without more staff",
77
- "Predictable delivery timelines"
78
- ],
79
- firmographics: {
80
- industry: "Marketing Agency",
81
- companySize: "1–15",
82
- region: "North America"
83
- },
84
- valueProp: "Automates the repetitive delivery and reporting work so agencies can take on more clients."
85
- }
86
- ]
87
- }
88
- ```
89
-
90
- ## Where it lives in the adapter
91
-
92
- **Split projects:** `core/config/organization-model/profile.ts` under the `customers` key of
93
- `defineOrganizationModel({...})`.
94
-
95
- **Unsplit projects:** `core/config/organization-model.ts` under the same key.
96
-
97
- To read current segments: open the appropriate file and inspect the `customers.segments` array,
98
- or use `pnpm exec elevasis-sdk om:cat customers` (external project).
99
-
100
- ## Write path
101
-
102
- To add, edit, or remove a segment, the `/om` skill runs the codify ceremony
103
- (`operations/codify-level-a.md`): snapshot → propose → confirm → write → typecheck → Zod parse →
104
- rollback on failure. Pass `targetFile` as `core/config/organization-model/profile.ts` for split
105
- projects, or `core/config/organization-model.ts` for unsplit projects. Only the `segments` array
106
- is written; no other keys in the target file are touched. When adding, append to the array. When
107
- editing, replace the matching entry by `id`. When removing, filter it out — and surface any
108
- dangling `targetSegmentIds` references first.
109
-
110
- ---
111
-
112
- **Read via `/om`** (legacy `/knowledge` alias also accepted) — natural-language queries like
113
- "who are our customer segments?" or "what pains does the agency segment have?" route to this
114
- domain via the skill's intent classifier.