@elevasis/sdk 1.44.3 → 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 (246) hide show
  1. package/dist/cli.cjs +991 -650
  2. package/dist/index.d.ts +1045 -509
  3. package/dist/index.js +738 -688
  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 +514 -783
  7. package/dist/worker/index.d.ts +12112 -0
  8. package/dist/worker/index.js +121 -182
  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 +21 -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-agent-prose-escape-normalization.md +0 -88
  241. package/reference/claude-config/sync-notes/2026-08-03-cli-gateway-errors-and-request-timeout.md +0 -120
  242. package/reference/claude-config/sync-notes/README.md +0 -43
  243. package/reference/sdk/framework/interaction-guidance.mdx +0 -182
  244. package/reference/sdk/framework/memory.mdx +0 -326
  245. package/reference/sdk/framework/resource-documentation.mdx +0 -90
  246. package/reference/sdk/roadmap.mdx +0 -164
@@ -15,7 +15,7 @@ paths:
15
15
 
16
16
  The `operations/` directory contains platform resources and deployment metadata that deploy to the Elevasis platform. It is a standalone TypeScript project with its own `package.json`, `tsconfig.json`, and dependencies.
17
17
 
18
- **Discovering deployed resources:** Read `operations/src/index.ts` for deployment assembly and `core/config/organization-model.ts` for the OM Resources descriptor catalog. Run `pnpm elevasis-sdk project:list --pretty` against the live DB for the deployed surface.
18
+ **Discovering deployed resources:** Read `operations/src/index.ts` for deployment assembly and `core/config/organization-model.ts` for the OM Resources descriptor catalog. Run `pnpm elevasis-sdk project:list --pretty` from the project root against the live DB for the deployed surface.
19
19
 
20
20
  ## Echo Workflow (Starter Example)
21
21
 
@@ -29,7 +29,7 @@ operations/src/example/echo.ts -- imports schemas for workflow contract
29
29
  ui/src/routes/ -- imports schemas for form validation and display
30
30
  ```
31
31
 
32
- The workflow is registered in `operations/src/index.ts` as part of the `example` group and deployed with `pnpm -C operations deploy`.
32
+ The workflow is registered in `operations/src/index.ts` as part of the `example` group and shipped with the deploy commands in `deployment.md`.
33
33
 
34
34
  ## Adding a New Workflow
35
35
 
@@ -45,14 +45,9 @@ The workflow is registered in `operations/src/index.ts` as part of the `example`
45
45
 
46
46
  5. **Add the UI in `ui/src/routes/`** -- Create a new route file. Use TanStack Query to call the workflow execution endpoint. Import schemas from `@core/types` for validation and type inference. Read OM resources, ontology, knowledge, and graph data where possible instead of creating page-local semantic registries.
47
47
 
48
- 6. **Update rules when the pattern persists** -- If the workflow introduces a reusable adapter pattern, checkpoint/schedule convention, domain vocabulary, or workflow family behavior that future agents must follow, update this rule or add a scoped rule under `.claude/rules/` in the same change.
48
+ 6. **Update rules when the pattern persists** -- If the workflow introduces a reusable adapter pattern, checkpoint/schedule convention, domain vocabulary, or workflow family behavior that future agents must follow, add or update a project-local rule under `.claude/rules/` in the same change.
49
49
 
50
- 7. **Deploy and verify:**
51
-
52
- ```bash
53
- pnpm -C operations check # validate resource definitions
54
- pnpm -C operations deploy # deploy to dev
55
- ```
50
+ 7. **Deploy and verify** -- Run the check-then-deploy sequence from the canonical command table in `deployment.md`, then verify the resource with `elevasis-sdk exec`.
56
51
 
57
52
  ## Resource Registry
58
53
 
@@ -67,19 +62,33 @@ When you need breadth first, read:
67
62
 
68
63
  ## Commands
69
64
 
70
- | Command | Purpose |
71
- | -------------------------------- | ----------------------------- |
72
- | `pnpm -C operations check` | Validate resource definitions |
73
- | `pnpm -C operations check-types` | TypeScript type-check |
74
- | `pnpm -C operations deploy` | Deploy to dev |
75
- | `pnpm -C operations deploy:prod` | Deploy to production |
65
+ Canonical command table (`check`, `check-types`, `deploy`, `deploy:prod`) and the production-by-default deploy warning: `operations/node_modules/@elevasis/sdk/reference/rules/deployment.md`.
76
66
 
77
67
  Always run `check` before `deploy`.
78
68
 
79
69
  ## Rule Updates
80
70
 
81
- When developing resources, workflows, agents, integrations, checkpoints, schedules, or recurring operational conventions, keep `.claude/rules/` current.
71
+ When developing resources, workflows, agents, integrations, checkpoints, schedules, or recurring operational conventions, keep this project's own `.claude/rules/` current.
82
72
 
83
- - Update `operations.md` for package-wide operations invariants.
73
+ - Add or update a project-local rule in `.claude/rules/` for package-wide operations invariants.
84
74
  - Add a scoped rule for domain-specific workflow families whose conventions should autoload for future edits.
85
75
  - Do not bury durable operational rules only in task notes or chat context.
76
+ - The rule bodies under `operations/node_modules/@elevasis/sdk/reference/rules/` are read-only shipped content -- edits there are wiped by the next dependency install. Write project-local rules instead.
77
+
78
+ ## Related Rules
79
+
80
+ Sibling rule bodies live at `operations/node_modules/@elevasis/sdk/reference/rules/`.
81
+
82
+ - **deployment.md** -- canonical deploy commands, dev vs prod targeting, version bumping, common deploy errors
83
+ - **platform.md** -- SDK authoring invariants: workflow shape, imports, adapters, resource status
84
+ - **organization-model.md** -- authoring OM Resource descriptors, Systems, ontology, and knowledge
85
+ - **execution.md** -- running and inspecting deployed resources
86
+ - **shared-types.md** -- where reusable Zod contracts live in `core/types/`
87
+
88
+ ## References
89
+
90
+ - `operations/src/README.md` -- source boundary and drill-down guidance for this directory
91
+ - `operations/node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
92
+ - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- end-to-end resource authoring guide
93
+ - `operations/node_modules/@elevasis/sdk/reference/sdk/resources/index.mdx` -- resource types, patterns, and the `DeploymentSpec` contract
94
+ - `operations/node_modules/@elevasis/sdk/reference/sdk/cli.mdx` -- every `elevasis-sdk` command and flag
@@ -11,19 +11,13 @@ paths:
11
11
 
12
12
  # Organization Model Edit Guide
13
13
 
14
- `core/config/organization-model.ts` is the single source of truth for this
15
- project's organizational identity -- it encodes customers, offerings, roles, goals,
16
- Systems, ontology, Policies, Knowledge, config, and Resources
17
- descriptors that agents, workflows, and the UI shell all consume at runtime.
18
- New semantic authoring should start in system-colocated `ontology` scopes. Top-level
19
- `entities` and top-level `actions` remain compatibility mirrors while published
20
- consumers finish moving to compiled ontology indexes. `System.content` is retired.
14
+ `core/config/organization-model.ts` is the single source of truth for this project's organizational identity -- it encodes customers, offerings, roles, goals, Systems, ontology, Policies, Knowledge, config, and Resources descriptors that agents, workflows, and the UI shell all consume at runtime. This rule owns the edit rules for that file; `organization-os.md` is the orientation and reference index around it.
15
+
16
+ New semantic authoring should start in system-colocated `ontology` scopes. Top-level `entities` and top-level `actions` remain compatibility mirrors while published consumers finish moving to compiled ontology indexes. `System.content` is retired.
21
17
 
22
18
  ## File Layout
23
19
 
24
- Projects keep the organization model either as a single `core/config/organization-model.ts`
25
- file, or split into an entry file plus a sibling directory. Both layouts are valid; the entry
26
- filename never changes, so consumer imports and the SDK loader resolve identically:
20
+ Projects keep the organization model either as a single `core/config/organization-model.ts` file, or split into an entry file plus a sibling directory. Both layouts are valid; the entry filename never changes, so consumer imports and the SDK loader resolve identically:
27
21
 
28
22
  - `organization-model.ts` -- ENTRY: assembles the model and re-exports every public symbol.
29
23
  - `organization-model/profile.ts` -- the `defineOrganizationModel(...)` body (identity, customers, offerings, roles, goals). Primary `/om` codify write target.
@@ -34,103 +28,95 @@ filename never changes, so consumer imports and the SDK loader resolve identical
34
28
 
35
29
  ## Preferred Entry Point: `/om`
36
30
 
37
- Direct edits to `organization-model.ts` are discouraged. Instead, use `/om` (or
38
- `/om <domain>`) to run the read → propose → confirm → write → validate ceremony:
31
+ Direct edits to `organization-model.ts` are discouraged. Use `/om` (or `/om <domain>`) to run the read → propose → confirm → write → validate ceremony:
39
32
 
40
33
  1. The skill reads the current model so proposals start from ground truth.
41
34
  2. It drafts only the specific block being changed, leaving everything else intact.
42
35
  3. The user confirms before any file is written.
43
- 4. After writing, `pnpm -C operations check-types` runs and `OrganizationModelSchema.parse()`
44
- is verified. On failure the file is rolled back automatically.
36
+ 4. After writing, `pnpm -C operations check-types` runs and `resolveOrganizationModel()` plus `OrganizationModelSchema.parse()` are verified. Every write is gated on both; a change that fails either one is rolled back automatically and is never kept.
37
+
38
+ Bare `/om` runs the layered flow (identity → customers → offerings → roles → goals → techStack); `/om <domain>` targets one domain:
45
39
 
46
- Use `/om <domain>` for targeted edits: `identity`, `customers`, `offerings`,
47
- `roles`, `goals`, `techStack`, `systems`, `actions`, or `labels`. Resource identity and
48
- governance metadata belong in the id-keyed `resources` map; operations code derives runtime
49
- `resourceId` / `type` from those descriptors.
40
+ - `identity` -- legal identity, mission/vision, industry, geography, timezone
41
+ - `customers` -- customer segments with jobs-to-be-done, pains, gains, firmographics
42
+ - `offerings` -- products and services with pricing model and segment references
43
+ - `roles` -- role chart with responsibilities, reporting lines, and holders
44
+ - `goals` -- organizational goals with period and measurable outcomes
45
+ - `techStack` -- external-SaaS and integration context; resource identity still belongs in the `resources` map
46
+ - `systems` -- enable, disable, or add Systems; route invokable behavior through Actions
47
+ - `actions` -- the top-level compatibility mirror
48
+ - `labels` -- display labels on enum entries (statuses, stages)
50
49
 
51
- Author system-local semantics by boundary:
50
+ ## Authoring Boundaries
52
51
 
53
- - `System.ontology` owns durable object types, action types, catalog types, link types, event types, and surfaces.
54
- - `System.apiInterface` is an adopt-only marker for platform-provided API capabilities. Use only cataloged profiles from `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`, on their convention-locked System paths, and satisfy readiness through ontology/resources/catalogs/topology. Custom Systems do not declare `apiInterface`; route custom behavior through workflows/operations and the OM layers tenants own.
52
+ - `System.ontology` owns durable object types, action types, catalog types, link types, event types, interfaces, and surfaces.
55
53
  - `System.config` owns system-local JSON settings and defaults.
56
- - `resources` own executable workflow/agent descriptors, `systemPath`, owners, governance status, code references, and runtime implementation links.
57
- - `resource.ontology.actions` describes the ontology actions a Resource performs; `resource.ontology.primaryAction` names the default/selectable action when a Resource has one.
58
- - `resource.ontology` also describes reads, writes, catalog use, and emitted events.
59
- - `topology.relationships` owns durable operational wiring between Systems, Resources, ontology nodes, policies, roles, triggers, checkpoints, and external resources.
54
+ - `resources` own executable workflow/agent descriptors, `systemPath`, owners, governance status, code references, and runtime implementation links. Resource identity is authored once in the id-keyed `resources` map; operations imports those descriptors and derives runtime `resourceId` / `type` while assembling the `DeploymentSpec`.
55
+ - `resource.ontology.actions` describes the ontology actions a Resource performs, `resource.ontology.primaryAction` names the default/selectable action when a Resource has one, and `resource.ontology` also describes reads, writes, catalog use, and emitted events.
56
+ - `topology.relationships` owns durable operational wiring between Systems, Resources, ontology nodes, policies, roles, triggers, checkpoints, and external resources. Keep credential values, provider webhook mechanics, deployment environment settings, execution logs, and per-run scheduler state outside the OM.
60
57
  - `knowledge` owns long-form playbooks, strategies, references, and governance context.
61
- - Top-level `entities` and top-level `actions` are compatibility mirrors only. Keep them aligned when current published consumers still need them, but do not treat them as the primary authoring surface.
58
+ - Top-level `entities` and top-level `actions` are compatibility mirrors only. Keep them aligned when current published consumers still need them, rather than inventing a separate source of truth, but do not treat them as the primary authoring surface.
62
59
 
63
60
  Do not author Resource `actionKey` in the target contract. Runtime/UI routing that needs a single selectable action should read `resource.ontology.primaryAction`.
64
61
 
62
+ Do not add `sales.actions` to the org model -- the v1 server-side override surface is intentionally deferred. Customize deal actions through `scaffold/recipes/customize-crm-actions.md` instead.
63
+
64
+ ## `System.apiInterface`
65
+
66
+ `System.apiInterface` is an adopt-only marker for platform-provided API capabilities, with derived readiness requirements. Use only cataloged profiles from `scaffold/reference/system-interface-capabilities.md`, on their convention-locked System paths such as `sales.lead-gen` and `sales.crm`, and satisfy readiness through ontology/resources/catalogs/topology authoring. Custom Systems do not declare `apiInterface` and must never invent readiness profiles; route custom behavior through workflows/operations and the OM layers this project owns.
67
+
68
+ A System with no `apiInterface` is the designed opt-out for a capability this project does not use. That absence is silent by construction and is NOT a defect -- never "fix" it by adding a marker. The anomaly is a stub marker with `resourceIds: []`, which the deploy gate rejects.
69
+
65
70
  Do not confuse ontology `interface` records with `system.apiInterface`. Ontology interface ids such as `<system>:interface/<local-id>` are semantic records under `System.ontology`; `system.apiInterface` is a flat System-level adoption marker for closed platform API profiles.
66
71
 
72
+ ### Readiness contract authoring
73
+
74
+ Three rules govern what you may write inside an `apiInterface`, all enforced at deploy preflight:
75
+
76
+ - **`readinessProfile` must be declared explicitly. There is no positional fallback.** An omitted value resolves to `undefined` and produces a `missing-readiness-profile` diagnostic -- it does **not** fall back to `${systemPath}.${interfaceKey}`. That fallback was removed because it coupled profile identity to tree position: a System sitting at a path that happened to match a built-in profile id (say `sales.crm`) silently inherited that built-in's requirements without ever declaring one.
77
+ - **A `readinessContract` must list at least one entry in `requiredCatalogs`.** An empty or omitted list no longer parses, so a contract that asserts nothing fails at deploy rather than passing silently.
78
+ - **`resourceIds` must scope real resources.** An empty array used to skip readiness validation entirely, which made deploy and runtime disagree -- deploy passed and the API then returned 503. If a stub marker exists, either scope it or remove the marker; absence is the designed opt-out.
79
+
80
+ `profileForInterface` is removed. It had degraded to an identity function returning its third argument; read `apiInterface?.readinessProfile` directly.
81
+
82
+ Your `core/config/organization-model/**` is project-owned (`never-touch`), so nothing propagated by a sync rewrites your Systems or your markers -- every fix here is a manual edit in your own file. The same applies to `core/config/organization-model.contract.test.ts`: a stale assertion there is how this class of change goes red in a project whose source is already correct.
83
+
67
84
  ## Runtime Validation
68
85
 
69
- The model is validated at startup via `resolveOrganizationModel()` followed by
70
- `OrganizationModelSchema.parse()`. Cross-reference checks (segment ID refs in offerings,
71
- role reporting lines, period ordering in goals) are runtime-only and not caught by tsc
72
- alone -- always let the ceremony run both checks before treating a change as complete.
86
+ The model is validated at startup via `resolveOrganizationModel()` followed by `OrganizationModelSchema.parse()`. Cross-reference checks (segment ID refs in offerings, role reporting lines, period ordering in goals) are runtime-only and not caught by tsc alone -- always let the ceremony run both checks before treating a change as complete.
73
87
 
74
88
  ## Extension Files
75
89
 
76
- New Zod extension files under `core/config/extensions/` are Level B codify
77
- operations. Route these through `/om <domain>` as well -- the skill gates Level B
78
- to explicit user confirmation before scaffolding a new `.ts` file.
79
-
80
- This is a soft guide, not a hard block. The ceremony exists to prevent silent schema
81
- drift and to keep the model's editorial history visible.
90
+ New Zod extension files under `core/config/extensions/` are Level B codify operations. Route these through `/om <domain>` as well -- the skill gates Level B to explicit user confirmation before scaffolding a new `.ts` file. This is a soft guide, not a hard block; the ceremony exists to prevent silent schema drift and to keep the model's editorial history visible.
82
91
 
83
92
  ## Resource System Attachment
84
93
 
85
- Every resource in the id-keyed `organizationModel.resources` map declares which System it belongs to
86
- via `systemPath` -- a dot-separated path that resolves against the OM system tree
87
- (e.g. `"sys.operations"`, `"sales.crm"`):
88
-
89
- ```ts
90
- {
91
- id: 'apify-website-crawl',
92
- systemPath: 'sys.operations', // canonical system attachment
93
- kind: 'workflow',
94
- ...
95
- }
96
- ```
97
-
98
- `systemPath` is validated at parse time by `SystemPathSchema` and cross-checked by
99
- `OrganizationModelSchema.superRefine` -- an unresolvable path causes a Zod error at
100
- schema validation. Use `getResourcesForSystem(model, path)` (from `@elevasis/core`) to
101
- query resources for a system at runtime. Pass `{ includeDescendants: true }` to include
102
- all descendant systems (segment-aware -- `'sales'` does NOT match `'salesforce.foo'`).
103
-
104
- Some external templates may carry a `systemId` compatibility mirror while published
105
- `@elevasis/core` releases catch up to the current source contract. Treat that field as
106
- legacy adapter data only; author new resource relationships against `systemPath`.
107
-
108
- Do not fetch resources for every system-oriented read by default. For agent workflows, start
109
- with the user's requested OM/om context and query resources only when the task involves
110
- runtime ownership, executable implementation, observability, deployment, or resource governance.
111
- Use the descendant rollup only when parent-system scope is intended.
112
-
113
- `resource.category` and `resource.links[].nodeId` are **runtime filter overlays** -- they
114
- drive UI faceted filtering in the Command Center but do NOT define system membership.
115
- System membership is `systemPath` only.
116
-
117
- ```ts
118
- // category and links power UI filter chips; systemPath is the
119
- // canonical OM attachment used for graph edges and getResourcesForSystem queries.
120
- ```
121
-
122
- `resource.codeRefs[]` are repo-relative implementation breadcrumbs for agents and
123
- operators. Use them to point from a governed OM Resource descriptor to the operations
124
- entrypoint, handler, schema, test, docs, or config files that implement it. They do
125
- not define resource identity, System membership, runtime execution topology, or graph
126
- relationships.
127
-
128
- `topology.relationships` defines durable operational wiring in the OM. Keep credential
129
- values, provider webhook mechanics, deployment environment settings, execution logs,
130
- and per-run scheduler state outside the OM.
131
-
132
- `System.ontology` owns durable semantic contracts: object types, action types, catalog
133
- types, link types, event types, interfaces, and surfaces. `System.config` owns local settings and
134
- defaults. If current UI or runtime code still needs legacy mirrors, keep `entities`
135
- or `actions` aligned with the ontology record instead of inventing a separate
136
- source of truth.
94
+ Every resource in the id-keyed `organizationModel.resources` map declares which System it belongs to via `systemPath` -- a dot-separated path that resolves against the OM system tree, e.g. `{ id: 'apify-website-crawl', systemPath: 'sys.operations', kind: 'workflow' }`.
95
+
96
+ `systemPath` is validated at parse time by `SystemPathSchema` and cross-checked by `OrganizationModelSchema.superRefine` -- an unresolvable path causes a Zod error at schema validation. Use `getResourcesForSystem(model, path)` (from `@elevasis/core`) to query resources for a system at runtime. Pass `{ includeDescendants: true }` to include all descendant systems (segment-aware -- `'sales'` does NOT match `'salesforce.foo'`), and use that rollup only when parent-system scope is intended.
97
+
98
+ Some external templates may carry a `systemId` compatibility mirror while published `@elevasis/core` releases catch up to the current source contract. Treat that field as legacy adapter data only; author new resource relationships against `systemPath`.
99
+
100
+ Do not fetch resources for every system-oriented read by default. For agent workflows, start with the user's requested OM context and query resources only when the task involves runtime ownership, executable implementation, observability, deployment, or resource governance.
101
+
102
+ `resource.category` and `resource.links[].nodeId` are **runtime filter overlays** -- they drive UI faceted filtering in the Command Center but do NOT define system membership. System membership is `systemPath` only.
103
+
104
+ `resource.codeRefs[]` are repo-relative implementation breadcrumbs pointing from a governed Resource descriptor to the operations entrypoint, handler, schema, test, docs, or config files that implement it. They do not define resource identity, System membership, runtime execution topology, or graph relationships.
105
+
106
+ ## Related Rules
107
+
108
+ - **organization-os.md** -- orientation and reference index: domain overview, published subpaths and constants, and the full SDK documentation map
109
+ - **operations.md** -- authoring and deploying the workflows and agents that `resources` descriptors govern
110
+ - **package-taxonomy.md** -- which packages this project may import (`@elevasis/*` only)
111
+ - **vibe.md** -- ambient plain-language intent layer that delegates codify intent to `/om`
112
+
113
+ ## References
114
+
115
+ Paths below are relative to the SDK reference root `operations/node_modules/@elevasis/sdk/reference/`.
116
+
117
+ - **scaffold/core/organization-model.mdx** -- semantic contract, domains, adapter authoring, validation gate
118
+ - **scaffold/core/organization-graph.mdx** -- graph derivation, node/edge taxonomy, lenses
119
+ - **scaffold/reference/system-interface-capabilities.md** -- generated catalog of `system.apiInterface` readiness profiles and their requirements
120
+ - **scaffold/reference/contracts.md** -- auto-generated TypeScript contract shapes
121
+ - **scaffold/recipes/customize-organization-model.md** -- worked org-model customization walkthrough
122
+ - **scaffold/recipes/customize-crm-actions.md** -- the supported path for deal action customization
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Organization OS orientation -- the semantic contract layer relating Systems, Actions, ontology, resources, policies, roles, goals, and knowledge; consumed via published @elevasis/core / @elevasis/sdk
2
+ description: Organization OS orientation -- what the semantic contract layer is, which surface owns what, and where the full reference docs live; concrete edit rules live in organization-model.md
3
3
  ---
4
4
  <!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
5
5
  <!-- Regenerate: pnpm scaffold:sync -->
@@ -7,36 +7,29 @@ description: Organization OS orientation -- the semantic contract layer relating
7
7
 
8
8
  # Organization OS
9
9
 
10
- Organization OS is the semantic contract layer defining how organizations, Systems, Actions, ontology, resources, policies, roles, goals, knowledge, and runtime surfaces relate. This project consumes Organization OS through published `@elevasis/core` / `@elevasis/sdk` configuration and does not maintain the monorepo schema.
10
+ Organization OS is the semantic contract layer defining how organizations, Systems, Actions, ontology, resources, policies, roles, goals, knowledge, and runtime surfaces relate. This project consumes it through published `@elevasis/core` / `@elevasis/sdk` configuration and does not maintain the upstream schema.
11
11
 
12
- This rule is an orientation and reference map. Concrete edit rules for `core/config/organization-model.ts`, `systemPath`, resources, ontology, knowledge, and validation live in `.claude/rules/organization-model.md`.
12
+ **This rule is orientation and an index only.** The concrete edit rules -- the `/om` ceremony and its gates, `System.apiInterface` versus ontology `interface` records, resource identity and `systemPath` attachment, the ontology/config/knowledge authoring boundary, and validation -- live in `organization-model.md`. Read that rule before changing anything under `core/config/`; never author org-model changes from this rule alone.
13
13
 
14
14
  ## Key Files in This Project
15
15
 
16
- - `core/config/organization-model.ts` -- project-specific org model definition, Systems, system-local ontology/config, Knowledge, and Resources descriptor catalog (`organizationModel.resources`)
16
+ - `core/config/organization-model.ts` -- the project org model: Systems, system-local ontology/config, Knowledge, and the `organizationModel.resources` descriptor catalog. May be split into a sibling `core/config/organization-model/` directory; the entry filename never changes.
17
17
  - `core/config/extensions/` -- project-owned entity extension schemas
18
- - `core/types/entities.ts` -- typed entity contracts (Project, Deal, etc.). Extends `BaseProject`, `BaseDeal` from `@elevasis/core/entities` with project-specific metadata. Read this when authoring workflows that operate on these entities.
18
+ - `core/types/entities.ts` -- typed entity contracts (Project, Deal, etc.) extending `BaseProject` / `BaseDeal` from `@elevasis/core/entities`. Reference these from workflow input schemas -- do not redeclare them.
19
19
  - `ui/src/routes/__root.tsx` -- wires `ElevasisSystemsProvider` with `canonicalOrganizationModel`
20
20
  - `ui/src/app-config.ts` -- references the org model
21
21
  - `operations/src/index.ts` -- `DeploymentSpec` registry for workflows and agents
22
22
 
23
23
  ## Domain Overview
24
24
 
25
- As of the 2026-05 resource-governance expansion, `OrganizationModel` includes platform configuration, organizational reality, governance, and knowledge domains:
25
+ `OrganizationModel` spans four groups of domains:
26
26
 
27
- **Platform configuration:** `systems`, `branding`, `navigation`
27
+ - **Platform configuration:** `systems`, `branding`, `navigation`
28
+ - **Organizational reality:** `identity`, `customers`, `offerings`, `roles`, `goals`
29
+ - **Governance:** `resources`, `policies`, and resource-to-System relationships
30
+ - **Ontology, config, and knowledge:** `System.ontology` owns durable semantic contracts (object types, action types, catalog types, link types, event types, interfaces, surfaces). `System.config` owns system-local JSON settings and defaults. `knowledge` is a flat id-keyed map of playbooks, strategies, and references that explain or govern systems and ontology records.
28
31
 
29
- **Organizational reality:** `identity`, `customers`, `offerings`, `roles`, `goals`
30
-
31
- **Governance:** `resources`, `policies`, and resource-to-System relationships
32
-
33
- **Ontology, config, and knowledge:** `System.ontology` owns durable semantic contracts such as object types, action types, catalog types, link types, event types, and surfaces. `System.config` owns system-local JSON settings and defaults. `knowledge` is a flat id-keyed map of playbooks, strategies, and references that explain or govern systems and ontology records.
34
-
35
- Resource identity is authored once in the id-keyed `resources` map. Each resource attaches to a System via `systemPath` and can declare ontology relationships through `resource.ontology`. Operations imports those descriptors and derives runtime `resourceId` / `type` while assembling the `DeploymentSpec`.
36
-
37
- `System.apiInterface` is an adopt-only marker for platform-provided API capabilities. Tenants may use only the supported profiles listed in `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`, at their convention-locked System paths such as `sales.lead-gen` and `sales.crm`. Custom Systems should not declare `apiInterface`; extend behavior through ontology, resources, catalogs, topology, navigation, and workflows/operations.
38
-
39
- Do not confuse `System.apiInterface` with ontology `interface` records. Ontology interface ids use the semantic record shape such as `<system>:interface/<local-id>`; `system.apiInterface` is a flat System field that declares intent to adopt a platform API capability and has derived readiness requirements.
32
+ `System.apiInterface` is a flat, adopt-only System field marking a platform-provided API capability -- not an ontology record and not a general extension point. Its authoring rules, readiness requirements, and opt-out semantics are owned by `organization-model.md`.
40
33
 
41
34
  ### Domain Rename Note
42
35
 
@@ -48,81 +41,71 @@ Some legacy UI feature constants and consumer-facing route keys are intentionall
48
41
  | `leadGen` | `prospecting` | `'lead-gen'` | `PROSPECTING_FEATURE_ID` |
49
42
  | `delivery` | `projects` | `'projects'` | `PROJECTS_FEATURE_ID` |
50
43
 
51
- ## Reference Documentation
52
-
53
- Full Organization OS documentation ships with the SDK and is available locally after `pnpm install`:
54
-
55
- ### Scaffold Reference (via SDK)
56
-
57
- All paths under `operations/node_modules/@elevasis/sdk/reference/scaffold/`:
58
-
59
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/index.mdx` -- scaffold root and navigation
60
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/core/organization-model.mdx` -- semantic contract, domains, adapter authoring, validation gate, `/om` entry point
61
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/core/organization-graph.mdx` -- graph derivation, node/edge taxonomy, lenses
62
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/feature-shell.mdx` -- SystemModule manifest, provider runtime
63
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/composition-extensibility.mdx` -- layout primitives, router abstraction
64
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- copy-paste UI recipes for pages, nav items, components
65
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- three-concept gating model
66
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar composition via manifest overrides
67
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md` -- end-to-end OM-backed System recipe through manifest, routes, and gating
68
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- author and deploy a workflow or agent
69
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/gate-by-feature-or-admin.md` -- decision table for access control patterns
70
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- build or extend lead-gen pages, sidebars, hooks, list/member state, artifacts, workflow adapters, and prospecting semantics
71
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
72
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` -- how sync and verification work across projects
73
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/operations/scaffold-maintenance.md` -- content placement and auto-generation pipeline
74
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md` -- Organization OS term definitions
75
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- auto-generated TypeScript contract shapes
76
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md` -- generated catalog of platform-owned `system.apiInterface` readiness profiles and requirements
77
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/feature-registry.md` -- auto-generated feature manifest catalog
44
+ ## Where to Start
78
45
 
79
- ### Local Project Docs
46
+ Paths below are relative to the SDK reference root given under References.
80
47
 
81
- - `.claude/rules/agent-start-here.md` -- canonical first-read for agents (includes task-class routing)
48
+ - **Change the org model, any domain** -- `organization-model.md`, then `/om` or `/om <domain>`
49
+ - **Add or toggle a System, or change routing** -- `/om systems`: availability, navigation surfaces, Actions
50
+ - **Ask whether a System can adopt `apiInterface`** -- `scaffold/reference/system-interface-capabilities.md`, then `organization-model.md`
51
+ - **Extend an entity type** -- `core/types/entities.ts`; base shapes from `@elevasis/core/entities`
52
+ - **Build a page, feature, or access gate** -- `scaffold/recipes/add-a-feature.md`, then `scaffold/recipes/gate-by-feature-or-admin.md`
53
+ - **Extend CRM or lead gen** -- `scaffold/recipes/extend-crm.md`, `scaffold/recipes/extend-lead-gen.md`
54
+ - **Add a workflow or agent** -- `scaffold/recipes/add-a-resource.md`, `scaffold/operations/workflow-recipes.md`
55
+ - **Debug sync or propagation** -- `scaffold/operations/propagation-pipeline.md`
82
56
 
83
57
  ## Published Subpaths and Constants
84
58
 
85
59
  - `@elevasis/core/organization-model` -- the curated organization-model barrel. Exports `defineOrganizationModel`, `resolveOrganizationModel`, `OrganizationModelSchema`, `DEFAULT_ORGANIZATION_MODEL`, organization-model types, and typed System/Action plus legacy UI feature/surface constants.
86
60
  - Feature IDs: `SALES_FEATURE_ID`, `PROSPECTING_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`
87
61
  - Headline surface IDs: `SALES_PIPELINE_SURFACE_ID`, `PROSPECTING_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_COMMAND_VIEW_SURFACE_ID`
88
- - Reality domain types: `OrganizationModelIdentity`, `OrganizationModelCustomers`, `OrganizationModelCustomerSegment`, `OrganizationModelOfferings`, `OrganizationModelProduct`, `OrganizationModelRoles`, `OrganizationModelRole`, `OrganizationModelGoals`, `OrganizationModelObjective`, `OrganizationModelKeyResult`
89
- - TechStack: `TechStackEntrySchema`, `OrganizationModelTechStackEntry`
90
- - Use constants instead of magic strings when overriding the org model.
91
- - `@elevasis/core/entities` -- entity contracts barrel. Exports `BaseProject`, `BaseProjectSchema`, `BaseProjectInput` and the equivalents for `Milestone`, `Task`, `Deal`, `Company`, `Contact`. Each base interface is generic over a `\<TMeta>` extension slot. Extend these in `core/types/entities.ts` to add project-specific fields.
92
-
93
- ## When Working with Organization OS
94
-
95
- - **Changing org model (structural reality):** Use `/om` as the entry point. Direct edits to `core/config/organization-model.ts` are discouraged -- `/om` runs the read -> propose -> confirm -> write -> validate ceremony. Run `/om` for the full layered flow or `/om \<domain>` for a targeted domain. See `.claude/rules/organization-model.md` for the concrete authoring boundary.
96
- - **Building or extending CRM:** Start with `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md`. CRM spans Organization OS sales semantics, shared UI primitives, deal hooks, workflow adapters, and generated contracts.
97
- - **Building or extending lead gen:** Start with `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md`. Lead gen spans Organization OS prospecting semantics, shared UI primitives, list/member hooks, artifact hooks, workflow adapters, and generated contracts.
98
- - **Customizing CRM deal actions:** Follow `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md`. Do not add `sales.actions` to the org model; the v1 server-side override surface is intentionally deferred.
99
- - **Adding or toggling a System:** Follow the current scaffold recipes when they mention UI features, but translate Organization OS changes to Systems, navigation surfaces, and Actions. Use `/om systems` for availability/routing changes.
100
- - **Adding a resource:** Follow `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md`.
101
- - **Extending entities:** Start with `core/types/entities.ts` for the demo extension pattern. Base shapes come from `@elevasis/core/entities`.
102
- - **Authoring a workflow that takes a Project/Deal/etc.:** Reference entity types from `core/types/entities.ts` in the input schema -- do not redeclare them.
103
- - **Adding system-local ontology/config:** Put durable business schema in `System.ontology`, local defaults/settings in `System.config`, executable implementations in `resources`, and explanatory or governing material in `knowledge`.
104
- - **API-interface readiness questions:** Check `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md` first. `apiInterface` is a closed platform adoption handshake: use the cataloged profile on the required System path, satisfy derived readiness with ontology/resource/catalog/topology authoring, and do not invent readiness profiles for custom Systems.
105
- - **Understanding generated type shapes:** Check `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` for current TypeScript shapes.
106
- - **Debugging sync issues:** Check `operations/node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` for the verification pipeline.
107
-
108
- ## `/om` -- Org Model QA Entry Point
109
-
110
- `/om` is the recurring, safe-to-re-run org model editor for this project. It is a skill (not a command) at `.claude/skills/om/SKILL.md`.
111
-
112
- **Usage:**
113
-
114
- - `/om` -- layered flow: identity customers → offerings → roles → goals → techStack
115
- - `/om identity` -- legal identity, mission/vision, industry, geography, timezone
116
- - `/om customers` -- customer segments with jobs-to-be-done, pains, gains, firmographics
117
- - `/om offerings` -- products and services with pricing model and segment references
118
- - `/om roles` -- role chart with responsibilities, reporting lines, and holders
119
- - `/om goals` -- organizational goals with period and measurable outcomes
120
- - `/om techStack` -- external-SaaS and integration context; resource identity still belongs in OM Resources descriptors
121
- - `/om systems` -- enable, disable, or add Systems; route invokable behavior through Actions
122
- - `/om labels` -- edit display labels on enum entries (statuses, stages)
123
-
124
- Every write is gated: `resolveOrganizationModel()` must succeed (Zod cross-refs pass) and `pnpm -C operations check-types` must pass. On failure the change is rolled back.
125
-
126
- **Distinction from `/setup`:** `/setup` is first-time bootstrap only. After bootstrap it delegates here. `/om` is idempotent and safe to re-run at any time.
127
-
128
- The ambient vibe layer (`.claude/rules/vibe.md`) automatically detects Codify intent in plain language and delegates to `/om`. Power users can invoke `/om` directly to bypass the ambient layer entirely.
62
+ - Reality domain types: `OrganizationModelIdentity`, `OrganizationModelCustomers`, `OrganizationModelOfferings`, `OrganizationModelRoles`, `OrganizationModelGoals`, plus their member types (`...CustomerSegment`, `...Product`, `...Role`, `...Objective`, `...KeyResult`) and `TechStackEntrySchema` / `OrganizationModelTechStackEntry`
63
+ - Always use these constants instead of magic strings when overriding the org model.
64
+ - `@elevasis/core/entities` -- entity contracts barrel. Exports `BaseProject`, `BaseProjectSchema`, `BaseProjectInput` and the equivalents for `Milestone`, `Task`, `Deal`, `Company`, `Contact`. Each base interface is generic over a `\<TMeta>` extension slot; extend them in `core/types/entities.ts`.
65
+
66
+ ## `/om` -- Org Model Entry Point
67
+
68
+ `/om` is the recurring, safe-to-re-run org model editor for this project. It is a skill (not a command) at `.claude/skills/om/SKILL.md`. Run `/om` for the layered flow or `/om <domain>` for a targeted edit. The domain menu, the read -> propose -> confirm -> write -> validate ceremony, and the gates every write must clear are documented in `organization-model.md`.
69
+
70
+ - `/setup` is first-time bootstrap only; after bootstrap it delegates here. `/om` is idempotent and safe to re-run at any time.
71
+ - The ambient vibe layer (`.claude/rules/vibe.md`) detects Codify intent in plain language and delegates to `/om`. Invoke `/om` directly to bypass the ambient layer entirely.
72
+
73
+ ## Related Rules
74
+
75
+ - **organization-model.md** -- sole owner of the org-model edit rules: `/om` ceremony and gates, `apiInterface` versus ontology `interface`, resource identity and `systemPath`, validation
76
+ - **agent-start-here.md** -- canonical first-read for agents, including task-class routing
77
+ - **package-taxonomy.md** -- which packages this project may import (`@elevasis/*` only)
78
+ - **operations.md** -- workflow and agent authoring, deployment
79
+ - **ui.md** -- shell composition and shared UI primitives
80
+ - **vibe.md** -- ambient plain-language intent layer that delegates to `/om`
81
+
82
+ ## References
83
+
84
+ Full Organization OS documentation ships with the SDK (available after `pnpm install`). Paths below are relative to the reference root `operations/node_modules/@elevasis/sdk/reference/`.
85
+
86
+ - **scaffold/index.mdx** -- scaffold root and navigation
87
+ - **scaffold/core/organization-model.mdx** -- semantic contract, domains, adapter authoring, validation gate
88
+ - **scaffold/core/organization-graph.mdx** -- graph derivation, node/edge taxonomy, lenses
89
+ - **scaffold/ui/feature-shell.mdx** -- SystemModule manifest, provider runtime
90
+ - **scaffold/ui/composition-extensibility.mdx** -- layout primitives, router abstraction
91
+ - **scaffold/ui/recipes.md** -- copy-paste UI recipes for pages, nav items, components
92
+ - **scaffold/ui/feature-flags-and-gating.md** -- three-concept gating model
93
+ - **scaffold/ui/customization.md** -- sidebar composition via manifest overrides
94
+ - **scaffold/recipes/index.md** -- recipe index
95
+ - **scaffold/recipes/add-a-feature.md** -- end-to-end OM-backed System through manifest, routes, and gating
96
+ - **scaffold/recipes/add-a-resource.md** -- author and deploy a workflow or agent
97
+ - **scaffold/recipes/gate-by-feature-or-admin.md** -- decision table for access control patterns
98
+ - **scaffold/recipes/extend-crm.md** -- CRM sales semantics, deal hooks, workflow adapters
99
+ - **scaffold/recipes/extend-lead-gen.md** -- prospecting semantics, list/member and artifact hooks, workflow adapters
100
+ - **scaffold/recipes/customize-crm-actions.md** -- deal action overrides
101
+ - **scaffold/recipes/customize-organization-model.md** -- org-model customization walkthrough
102
+ - **scaffold/recipes/extend-a-base-entity.md** -- adding project-specific fields to a base entity
103
+ - **scaffold/recipes/query-the-knowledge-graph.md** -- graph queries and lenses
104
+ - **scaffold/recipes/customize-knowledge-browser.md** -- knowledge browser customization
105
+ - **scaffold/operations/workflow-recipes.md** -- workflow anatomy, adapter patterns, trigger patterns
106
+ - **scaffold/operations/propagation-pipeline.md** -- how sync and verification work across projects
107
+ - **scaffold/operations/scaffold-maintenance.md** -- content placement and auto-generation pipeline
108
+ - **scaffold/reference/glossary.md** -- Organization OS term definitions
109
+ - **scaffold/reference/contracts.md** -- auto-generated TypeScript contract shapes
110
+ - **scaffold/reference/system-interface-capabilities.md** -- generated catalog of platform-owned `system.apiInterface` readiness profiles and requirements
111
+ - **scaffold/reference/feature-registry.md** -- auto-generated feature manifest catalog
@@ -34,7 +34,16 @@ Check the import path:
34
34
 
35
35
  This project's own org-model and workflows live in `core/config/organization-model.ts` and `operations/src/**` — those are project-owned, not part of either family above.
36
36
 
37
+ ## Related Rules
38
+
39
+ - `operations/node_modules/@elevasis/sdk/reference/rules/shared-types.md` -- the project-owned `core/types/` boundary, which is neither package family
40
+ - `operations/node_modules/@elevasis/sdk/reference/rules/active-change-index.md` -- what resolves from this project and what does not
41
+ - `operations/node_modules/@elevasis/sdk/reference/rules/frontend.md` -- importing from `@elevasis/ui` in `ui/`
42
+ - `operations/node_modules/@elevasis/sdk/reference/rules/operations.md` -- importing from `@elevasis/sdk` in `operations/`
43
+
37
44
  ## References
38
45
 
39
- - `operations/node_modules/@elevasis/sdk/reference/scaffold/index.mdx` full SDK scaffold reference
40
- - Monorepo source rule: `.claude/rules/package-taxonomy.md` in the elevasis-monorepo (when working across both)
46
+ - `operations/node_modules/@elevasis/sdk/reference/scaffold/index.mdx` -- full SDK scaffold reference
47
+ - `operations/node_modules/@elevasis/sdk/reference/core/exports.mdx` -- what `@elevasis/core` actually exports
48
+ - `operations/node_modules/@elevasis/sdk/reference/ui/exports.mdx` -- what `@elevasis/ui` actually exports
49
+ - `operations/node_modules/@elevasis/sdk/reference/sdk/exports.mdx` -- what `@elevasis/sdk` actually exports
@@ -31,15 +31,21 @@ paths:
31
31
 
32
32
  ## CLI Commands
33
33
 
34
- | Command | Purpose |
35
- | ------------------------------------ | ----------------------------- |
36
- | `pnpm -C operations run check` | Validate resource definitions |
37
- | `pnpm -C operations run deploy` | Deploy to dev |
38
- | `pnpm -C operations run deploy:prod` | Deploy to production |
34
+ Canonical command table (`check`, `check-types`, `deploy`, `deploy:prod`) and the production-by-default deploy warning: `operations/node_modules/@elevasis/sdk/reference/rules/deployment.md`.
39
35
 
40
- ## Detailed Reference
36
+ ## Related Rules
37
+
38
+ Sibling rule bodies live at `operations/node_modules/@elevasis/sdk/reference/rules/`.
39
+
40
+ - **deployment.md** -- canonical deploy commands, dev vs prod targeting, version bumping, common deploy errors
41
+ - **operations.md** -- the `operations/` surface: adding a workflow, the resource registry, rule upkeep
42
+ - **organization-model.md** -- OM Resource descriptors that resource identity derives from
43
+ - **shared-types.md** -- where reusable Zod contracts live in `core/types/`
44
+
45
+ ## References
41
46
 
42
47
  - `operations/node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
43
48
  - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- end-to-end resource authoring guide
44
49
  - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead-gen UI, hooks, list/member state, artifacts, and workflow adapter extension guide
45
- - SDK reference docs: `operations/node_modules/@elevasis/sdk/reference/` (concepts, framework, platform-tools, runtime, CLI)
50
+ - `operations/node_modules/@elevasis/sdk/reference/sdk/platform-tools/index.mdx` -- typed adapters and the raw `platform.call()` surface
51
+ - `operations/node_modules/@elevasis/sdk/reference/` -- SDK reference docs (concepts, framework, platform-tools, runtime, CLI)
@@ -31,6 +31,8 @@ Keep this as a standalone rule because it autoloads only for `core/types/**` edi
31
31
 
32
32
  Define Zod schemas first, then infer the type:
33
33
 
34
+ <!-- doc-snippet:skip: illustrative excerpt with `...` elisions, not a standalone compilable file -->
35
+
34
36
  ```typescript
35
37
  export const fooInputSchema = z.object({ ... })
36
38
  export type FooInput = z.infer<typeof fooInputSchema>
@@ -50,3 +52,16 @@ Types live in `core/types/`. The directory structure:
50
52
  ## Path Alias
51
53
 
52
54
  Project tsconfigs resolve `@core/*` to `core/*`. Always use `@core/types` or `@core/types/entities` (not relative paths) when importing shared contracts from `ui/` or `operations/src/`.
55
+
56
+ ## Related Rules
57
+
58
+ - `operations/node_modules/@elevasis/sdk/reference/rules/package-taxonomy.md` -- which packages may be imported at all
59
+ - `operations/node_modules/@elevasis/sdk/reference/rules/frontend.md` -- consuming these types from `ui/`
60
+ - `operations/node_modules/@elevasis/sdk/reference/rules/operations.md` -- consuming these types from `operations/src/`
61
+ - `operations/node_modules/@elevasis/sdk/reference/rules/organization-model.md` -- `core/config/` org-model types, a separate boundary from `core/types/`
62
+
63
+ ## References
64
+
65
+ - `operations/node_modules/@elevasis/sdk/reference/sdk/resources/types.mdx` -- input/output schema contracts for resources
66
+ - `operations/node_modules/@elevasis/sdk/reference/sdk/framework/project-structure.mdx` -- where `core/`, `ui/`, and `operations/` sit relative to each other
67
+ - `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-a-base-entity.md` -- extending published base entities in `core/types/entities.ts`