@elevasis/sdk 1.20.2 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +4220 -1583
- package/dist/index.d.ts +1035 -481
- package/dist/index.js +7381 -4187
- package/dist/node/index.d.ts +1 -3
- package/dist/node/index.js +40 -49
- package/dist/test-utils/index.d.ts +699 -123
- package/dist/test-utils/index.js +3826 -630
- package/dist/worker/index.js +3616 -442
- package/package.json +3 -3
- package/reference/_navigation.md +9 -7
- package/reference/_reference-manifest.json +1 -1
- package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
- package/reference/claude-config/registries/graph-skills.json +4 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -2
- package/reference/claude-config/rules/active-change-index.md +80 -80
- package/reference/claude-config/rules/agent-start-here.md +277 -273
- package/reference/claude-config/rules/deployment.md +57 -57
- package/reference/claude-config/rules/error-handling.md +56 -56
- package/reference/claude-config/rules/execution.md +40 -40
- package/reference/claude-config/rules/frontend.md +4 -4
- package/reference/claude-config/rules/observability.md +31 -31
- package/reference/claude-config/rules/operations.md +29 -17
- package/reference/claude-config/rules/organization-model.md +108 -40
- package/reference/claude-config/rules/organization-os.md +115 -113
- package/reference/claude-config/rules/package-taxonomy.md +33 -33
- package/reference/claude-config/rules/platform.md +42 -42
- package/reference/claude-config/rules/shared-types.md +49 -46
- package/reference/claude-config/rules/task-tracking.md +47 -47
- package/reference/claude-config/rules/ui.md +200 -200
- package/reference/claude-config/rules/vibe.md +235 -231
- package/reference/claude-config/scripts/statusline-command.js +18 -18
- package/reference/claude-config/settings.json +34 -34
- package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
- package/reference/claude-config/skills/dsp/SKILL.md +66 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
- package/reference/claude-config/skills/explore/SKILL.md +6 -6
- package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
- package/reference/claude-config/skills/knowledge/SKILL.md +330 -271
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -158
- package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/features.md +76 -113
- package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
- package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
- package/reference/claude-config/skills/knowledge/operations/labels.md +94 -89
- package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
- package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
- package/reference/claude-config/skills/project/SKILL.md +1088 -1088
- package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
- package/reference/claude-config/skills/save/SKILL.md +3 -3
- package/reference/claude-config/skills/setup/SKILL.md +275 -275
- package/reference/claude-config/skills/status/SKILL.md +59 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
- package/reference/claude-config/skills/sync/SKILL.md +47 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
- package/reference/claude-config/skills/tutorial/technical.md +1303 -1306
- package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +42 -0
- package/reference/claude-config/sync-notes/README.md +43 -43
- package/reference/cli.mdx +808 -668
- package/reference/concepts.mdx +146 -146
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +209 -209
- package/reference/deployment/index.mdx +195 -195
- package/reference/deployment/provided-features.mdx +107 -93
- package/reference/deployment/ui-execution.mdx +250 -250
- package/reference/examples/organization-model.ts +147 -84
- package/reference/framework/agent.mdx +156 -156
- package/reference/framework/index.mdx +195 -195
- package/reference/framework/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +326 -326
- package/reference/framework/project-structure.mdx +282 -282
- package/reference/framework/tutorial-system.mdx +135 -135
- package/reference/getting-started.mdx +142 -142
- package/reference/index.mdx +106 -106
- package/reference/packages/core/src/README.md +14 -14
- package/reference/packages/core/src/business/README.md +2 -2
- package/reference/packages/core/src/knowledge/README.md +33 -32
- package/reference/packages/core/src/organization-model/README.md +149 -109
- package/reference/packages/core/src/test-utils/README.md +37 -37
- package/reference/packages/ui/src/api/README.md +18 -18
- package/reference/packages/ui/src/app/README.md +24 -24
- package/reference/packages/ui/src/auth/README.md +18 -18
- package/reference/packages/ui/src/components/README.md +24 -24
- package/reference/packages/ui/src/execution/README.md +16 -16
- package/reference/packages/ui/src/features/README.md +28 -28
- package/reference/packages/ui/src/graph/README.md +16 -16
- package/reference/packages/ui/src/hooks/README.md +23 -23
- package/reference/packages/ui/src/initialization/README.md +19 -19
- package/reference/packages/ui/src/knowledge/README.md +31 -31
- package/reference/packages/ui/src/organization/README.md +18 -18
- package/reference/packages/ui/src/profile/README.md +19 -19
- package/reference/packages/ui/src/provider/README.md +32 -32
- package/reference/packages/ui/src/router/README.md +18 -18
- package/reference/packages/ui/src/sse/README.md +13 -13
- package/reference/packages/ui/src/test-utils/README.md +7 -7
- package/reference/packages/ui/src/theme/README.md +23 -23
- package/reference/packages/ui/src/theme/presets/README.md +19 -19
- package/reference/packages/ui/src/types/README.md +16 -16
- package/reference/packages/ui/src/utils/README.md +18 -18
- package/reference/packages/ui/src/zustand/README.md +18 -18
- package/reference/platform-tools/adapters-integration.mdx +301 -301
- package/reference/platform-tools/adapters-platform.mdx +553 -553
- package/reference/platform-tools/index.mdx +217 -217
- package/reference/platform-tools/type-safety.mdx +82 -82
- package/reference/resources/index.mdx +349 -349
- package/reference/resources/patterns.mdx +449 -449
- package/reference/resources/types.mdx +116 -116
- package/reference/roadmap.mdx +165 -165
- package/reference/runtime.mdx +173 -173
- package/reference/scaffold/core/organization-graph.mdx +110 -89
- package/reference/scaffold/core/organization-model.mdx +226 -171
- package/reference/scaffold/index.mdx +67 -67
- package/reference/scaffold/operations/propagation-pipeline.md +77 -77
- package/reference/scaffold/operations/scaffold-maintenance.md +10 -10
- package/reference/scaffold/operations/workflow-recipes.md +138 -138
- package/reference/scaffold/recipes/add-a-feature.md +310 -88
- package/reference/scaffold/recipes/add-a-resource.md +137 -117
- package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
- package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
- package/reference/scaffold/recipes/customize-organization-model.md +281 -118
- package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
- package/reference/scaffold/recipes/extend-crm.md +40 -39
- package/reference/scaffold/recipes/extend-lead-gen.md +400 -401
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -114
- package/reference/scaffold/recipes/index.md +47 -46
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +227 -0
- package/reference/scaffold/reference/contracts.md +2389 -2121
- package/reference/scaffold/reference/feature-registry.md +9 -20
- package/reference/scaffold/reference/glossary.md +76 -76
- package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
- package/reference/scaffold/ui/customization.md +243 -243
- package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
- package/reference/scaffold/ui/feature-shell.mdx +72 -72
- package/reference/scaffold/ui/recipes.md +221 -213
- package/reference/spine/spine-primer.md +96 -96
- package/reference/templates/index.mdx +47 -47
- package/reference/troubleshooting.mdx +223 -223
|
@@ -1,174 +1,229 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Organization Model
|
|
3
|
-
description: Organization OS Model layer documentation for the
|
|
4
|
-
---
|
|
1
|
+
---
|
|
2
|
+
title: Organization Model
|
|
3
|
+
description: Organization OS Model layer documentation for the System hierarchy, semantic domains, resource descriptors, and curated @elevasis/core public API.
|
|
4
|
+
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
The organization model is the semantic contract that maps an organization's
|
|
12
|
-
|
|
13
|
-
The model is authored in `@repo/core` and published through the curated `@elevasis/core/organization-model` surface.
|
|
14
|
-
|
|
15
|
-
## Source of Truth
|
|
16
|
-
|
|
17
|
-
- `packages/core/src/organization-model/schema.ts`
|
|
18
|
-
- `packages/core/src/organization-model/types.ts`
|
|
19
|
-
- `packages/core/src/organization-model/defaults.ts`
|
|
20
|
-
- `packages/core/src/organization-model/helpers.ts`
|
|
21
|
-
- `packages/core/src/organization-model/graph/link.ts`
|
|
22
|
-
- `packages/core/src/organization-model/published.ts`
|
|
23
|
-
- `packages/core/src/__tests__/template-core-compatibility.test.ts`
|
|
24
|
-
|
|
25
|
-
## Contract Shape
|
|
26
|
-
|
|
27
|
-
Top-level fields on `OrganizationModel`:
|
|
28
|
-
|
|
29
|
-
- `version`
|
|
30
|
-
- `
|
|
31
|
-
- `branding`
|
|
32
|
-
- `navigation`
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
35
|
-
- `
|
|
36
|
-
- `
|
|
37
|
-
- `
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
41
|
-
- `
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
|
|
45
|
-
- `knowledge`
|
|
46
|
-
|
|
47
|
-
Resource identity is authored inside `OrganizationModel.resources
|
|
48
|
-
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
`OrganizationModel.
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
|
|
55
|
-
{ id: 'dashboard',
|
|
56
|
-
{ id: 'sales', label: 'Sales',
|
|
57
|
-
{ id: '
|
|
58
|
-
{ id: '
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Authored fields:
|
|
63
|
-
|
|
64
|
-
- `id`
|
|
65
|
-
- `label`
|
|
66
|
-
- `description`
|
|
67
|
-
- `
|
|
68
|
-
- `
|
|
69
|
-
- `
|
|
70
|
-
- `
|
|
71
|
-
- `
|
|
72
|
-
- `
|
|
73
|
-
- `
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
##
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- `
|
|
132
|
-
- `
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
##
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
The organization model is the semantic contract that maps an organization's System hierarchy, business semantics, shell navigation, resource governance, action/entity vocabulary, and graph binding. It is schema-first, versioned, and validated.
|
|
12
|
+
|
|
13
|
+
The model is authored in `@repo/core` and published through the curated `@elevasis/core/organization-model` surface.
|
|
14
|
+
|
|
15
|
+
## Source of Truth
|
|
16
|
+
|
|
17
|
+
- `packages/core/src/organization-model/schema.ts`
|
|
18
|
+
- `packages/core/src/organization-model/types.ts`
|
|
19
|
+
- `packages/core/src/organization-model/defaults.ts`
|
|
20
|
+
- `packages/core/src/organization-model/helpers.ts`
|
|
21
|
+
- `packages/core/src/organization-model/graph/link.ts`
|
|
22
|
+
- `packages/core/src/organization-model/published.ts`
|
|
23
|
+
- `packages/core/src/__tests__/template-core-compatibility.test.ts`
|
|
24
|
+
|
|
25
|
+
## Contract Shape
|
|
26
|
+
|
|
27
|
+
Top-level fields on `OrganizationModel`:
|
|
28
|
+
|
|
29
|
+
- `version`
|
|
30
|
+
- `domainMetadata`
|
|
31
|
+
- `branding`
|
|
32
|
+
- `navigation`
|
|
33
|
+
- `identity`
|
|
34
|
+
- `customers`
|
|
35
|
+
- `offerings`
|
|
36
|
+
- `roles`
|
|
37
|
+
- `goals`
|
|
38
|
+
- `systems`
|
|
39
|
+
- `resources`
|
|
40
|
+
- `actions`
|
|
41
|
+
- `entities`
|
|
42
|
+
- `policies`
|
|
43
|
+
- `knowledge`
|
|
44
|
+
|
|
45
|
+
The pure collection domains are id-keyed maps: `systems`, `roles`, `goals`, `customers`, `offerings`, `resources`, `actions`, `entities`, `policies`, and `knowledge`. The map key must match the entry `id`. Entries carry `order` for deterministic ordered views; use `listDomain(record)` when order matters.
|
|
46
|
+
|
|
47
|
+
Resource identity is authored inside `OrganizationModel.resources`. Runtime workflows, agents, integrations, and scripts import those descriptors, derive `resourceId` and kind from them, and attach executable behavior in operations code.
|
|
48
|
+
|
|
49
|
+
## System Shape
|
|
50
|
+
|
|
51
|
+
`OrganizationModel.systems` is the canonical semantic domain map. Hierarchy is authored with recursive `subsystems`; dotted paths such as `sales.crm` are derived from position in that tree. `parentSystemId` and `id` remain accepted compatibility fields during the migration.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
systems: {
|
|
55
|
+
dashboard: { id: 'dashboard', order: 10, label: 'Dashboard', lifecycle: 'active' },
|
|
56
|
+
sales: { id: 'sales', order: 20, label: 'Sales', lifecycle: 'active' },
|
|
57
|
+
clients: { id: 'clients', order: 30, label: 'Clients', lifecycle: 'active' },
|
|
58
|
+
projects: { id: 'projects', order: 40, label: 'Projects', lifecycle: 'active' }
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Authored fields:
|
|
63
|
+
|
|
64
|
+
- `id`
|
|
65
|
+
- `label`
|
|
66
|
+
- `description`
|
|
67
|
+
- `kind`
|
|
68
|
+
- `parentSystemId`
|
|
69
|
+
- `ui`
|
|
70
|
+
- `lifecycle`
|
|
71
|
+
- `requiresAdmin`
|
|
72
|
+
- `actions`
|
|
73
|
+
- `policies`
|
|
74
|
+
- `content`
|
|
75
|
+
- `subsystems`
|
|
76
|
+
- `order`
|
|
77
|
+
|
|
78
|
+
Systems describe ownership, hierarchy, lifecycle, access, and governance. Sidebar presentation lives in `navigation.sidebar`, not on System entries. UI-backed Systems may still provide `ui.path` for route matching during the migration, but `ui.surfaces` is not an authored contract. `lifecycle` replaces the old feature enabled/dev-only split.
|
|
79
|
+
|
|
80
|
+
## Navigation Shape
|
|
81
|
+
|
|
82
|
+
`OrganizationModel.navigation.sidebar` is the authored shell tree. It has `primary` and `bottom` sections whose records contain recursive group nodes and routeable surface nodes:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
navigation: {
|
|
86
|
+
sidebar: {
|
|
87
|
+
primary: {
|
|
88
|
+
dashboard: {
|
|
89
|
+
type: 'surface',
|
|
90
|
+
order: 10,
|
|
91
|
+
label: 'Dashboard',
|
|
92
|
+
path: '/',
|
|
93
|
+
surfaceType: 'dashboard',
|
|
94
|
+
targets: { systems: ['dashboard'] }
|
|
95
|
+
},
|
|
96
|
+
business: {
|
|
97
|
+
type: 'group',
|
|
98
|
+
order: 20,
|
|
99
|
+
label: 'Business',
|
|
100
|
+
children: {
|
|
101
|
+
sales: {
|
|
102
|
+
type: 'surface',
|
|
103
|
+
order: 10,
|
|
104
|
+
label: 'Sales',
|
|
105
|
+
path: '/sales',
|
|
106
|
+
surfaceType: 'page',
|
|
107
|
+
targets: { systems: ['sales'] }
|
|
108
|
+
},
|
|
109
|
+
clients: {
|
|
110
|
+
type: 'surface',
|
|
111
|
+
order: 20,
|
|
112
|
+
label: 'Clients',
|
|
113
|
+
path: '/clients',
|
|
114
|
+
surfaceType: 'list',
|
|
115
|
+
targets: { systems: ['clients'] }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
bottom: {}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Dashboard is ordered before Business in the primary sidebar. Business is a navigation group only; it is not a System and it is not a URL namespace. Routeable leaves are projected into flat surface DTOs by `projectOrganizationSurfaces(model)`.
|
|
126
|
+
|
|
127
|
+
## Graph IDs and Resource Descriptors
|
|
128
|
+
|
|
129
|
+
Cross-collection links use kind-prefixed graph IDs:
|
|
130
|
+
|
|
131
|
+
- `system:sales.crm`
|
|
132
|
+
- `integration:instantly`
|
|
133
|
+
- `resource:lead-import`
|
|
134
|
+
- `action:operations.queue.review`
|
|
135
|
+
|
|
136
|
+
Resource identity is authored in the OM Resources domain. Operations imports descriptors from `organizationModel.resources` and derives runtime `resourceId` / `type` while attaching executable behavior.
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import { defineResources } from '@elevasis/core/organization-model'
|
|
140
|
+
|
|
141
|
+
export const resourceDescriptors = defineResources({
|
|
142
|
+
leadImport: {
|
|
143
|
+
id: 'lgn-01c-apollo-import-workflow',
|
|
144
|
+
kind: 'workflow',
|
|
145
|
+
systemPath: 'sales.lead-gen',
|
|
146
|
+
ownerRoleId: 'role-ops-lead',
|
|
147
|
+
status: 'active',
|
|
148
|
+
actionKey: 'lead-gen.company.apollo-import',
|
|
149
|
+
codeRefs: [
|
|
150
|
+
{
|
|
151
|
+
path: 'packages/elevasis-operations/src/sales/prospecting/scrape/apollo-import.ts',
|
|
152
|
+
role: 'entrypoint',
|
|
153
|
+
symbol: 'lgnApolloImportWorkflow'
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
export const resourceGovernanceModel = {
|
|
160
|
+
systems,
|
|
161
|
+
resources: resourceDescriptors
|
|
162
|
+
} as const
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Legacy `sys.*` paths may still appear in older examples and external compatibility mirrors.
|
|
166
|
+
For new Organization OS examples, prefer the current semantic System path.
|
|
167
|
+
|
|
168
|
+
## Domain Semantics
|
|
169
|
+
|
|
170
|
+
The model keeps business semantics in named domains:
|
|
171
|
+
|
|
172
|
+
- `identity`, `customers`, `offerings`, `roles`, `goals` -- organizational reality
|
|
173
|
+
- `systems` -- bounded contexts that group governed operational resources and system-local content
|
|
174
|
+
- `actions` -- stable business verbs exposed or consumed by systems
|
|
175
|
+
- `entities` -- durable business nouns and their semantic links
|
|
176
|
+
- `resources` -- governance-only workflow, agent, integration, and script descriptors
|
|
177
|
+
- `policies` -- operational governance rules over systems, actions, resources, and roles
|
|
178
|
+
- `knowledge` -- playbooks, strategies, references, and graph-governing links
|
|
179
|
+
|
|
180
|
+
System-local operational catalogs now live under `System.content`, including pipeline, stage, template, template-step, status-flow, status, and config nodes. The legacy compound and status domains should not be used for new authoring.
|
|
181
|
+
|
|
182
|
+
## Authoring and Resolution
|
|
183
|
+
|
|
184
|
+
- `defineOrganizationModel()` is a typed authoring helper.
|
|
185
|
+
- `resolveOrganizationModel(partial)` deep-merges a partial override into `DEFAULT_ORGANIZATION_MODEL` and validates the result.
|
|
186
|
+
- `createFoundationOrganizationModel(partial)` resolves the canonical model and returns template-facing helpers.
|
|
187
|
+
- Plain objects merge recursively.
|
|
188
|
+
- Id-keyed domain maps merge additively by key.
|
|
189
|
+
- Arrays replace defaults.
|
|
190
|
+
|
|
191
|
+
## Referential Integrity
|
|
192
|
+
|
|
193
|
+
`OrganizationModelSchema` validates:
|
|
194
|
+
|
|
195
|
+
- unique System IDs
|
|
196
|
+
- ancestor existence for dotted System IDs and `parentSystemId`
|
|
197
|
+
- UI path rules for Systems with UI presence
|
|
198
|
+
- valid sidebar positions
|
|
199
|
+
- reality-domain cross references such as offering target segments and role reporting lines
|
|
200
|
+
- system, resource, role, knowledge, and goal cross references used by resource governance
|
|
201
|
+
|
|
202
|
+
`DeploymentSpec` remains the runtime/deploy assembly around these descriptors. It is not the source of resource identity.
|
|
203
|
+
|
|
204
|
+
## Provider Integration
|
|
205
|
+
|
|
206
|
+
`ElevasisSystemsProvider` uses the organization model to:
|
|
207
|
+
|
|
208
|
+
1. validate each manifest's `systemId`
|
|
209
|
+
2. resolve effective system access
|
|
210
|
+
3. derive sidebar entries from `navigation.sidebar`
|
|
211
|
+
4. expose shell helpers such as `childrenOf`, `ancestorsOf`, and `findByPath`
|
|
212
|
+
5. bridge the operations graph into shared UI
|
|
213
|
+
|
|
214
|
+
## Published Package
|
|
215
|
+
|
|
216
|
+
`@elevasis/core` exposes a curated browser-safe surface:
|
|
217
|
+
|
|
218
|
+
- root barrel
|
|
219
|
+
- `./organization-model`
|
|
220
|
+
|
|
221
|
+
The organization graph builder remains monorepo-internal until there is a concrete external contract need.
|
|
222
|
+
|
|
223
|
+
## Verification
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
pnpm --filter @repo/core test -- organization-model
|
|
227
|
+
pnpm --filter @repo/core build:publish
|
|
228
|
+
pnpm -C external/_template/core test
|
|
229
|
+
```
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Scaffold Reference
|
|
3
|
-
description: Universal scaffold documentation for Elevasis SDK projects -- recipes, patterns, architecture, and reference materials that apply to all workspaces.
|
|
4
|
-
---
|
|
1
|
+
---
|
|
2
|
+
title: Scaffold Reference
|
|
3
|
+
description: Universal scaffold documentation for Elevasis SDK projects -- recipes, patterns, architecture, and reference materials that apply to all workspaces.
|
|
4
|
+
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
This scaffold reference contains universal documentation that applies to all Elevasis SDK projects. Content is organized by package ownership:
|
|
12
|
-
|
|
13
|
-
- **recipes/** -- Cross-package pathway recipes (add a
|
|
14
|
-
- **ui/** -- UI patterns,
|
|
15
|
-
- **core/** -- Organization model architecture, graph layer, and semantic contracts
|
|
16
|
-
- **operations/** -- Workflow authoring patterns and adapter usage
|
|
17
|
-
- **reference/** -- Glossary, auto-generated contracts, and
|
|
18
|
-
|
|
19
|
-
## Quick Navigation
|
|
20
|
-
|
|
21
|
-
### Pathway Recipes
|
|
22
|
-
|
|
23
|
-
- [Add
|
|
24
|
-
- [Add a Resource](./recipes/add-a-resource.md) -- author and deploy a workflow or agent
|
|
25
|
-
- [Extend a Base Entity](./recipes/extend-a-base-entity.md) -- add project-specific metadata to canonical entity shapes via the TMeta slot
|
|
26
|
-
- [Gate by
|
|
27
|
-
- [Build and Extend CRM](./recipes/extend-crm.md) -- map CRM UI pages, hooks, actions, workflow adapters, contracts, and org-model boundaries
|
|
28
|
-
- [Build and Extend Lead Gen](./recipes/extend-lead-gen.md) -- map lead-gen UI pages, hooks, list/member state, artifacts, workflow adapters, contracts, and org-model boundaries
|
|
29
|
-
- [Customize CRM Actions](./recipes/customize-crm-actions.md) -- add, hide, or replace CRM deal actions, use the shared `crmActions` provider path, and understand workflow dispatch constraints
|
|
30
|
-
|
|
31
|
-
### UI Patterns
|
|
32
|
-
|
|
33
|
-
- [UI Recipes](./ui/recipes.md) -- copy-paste recipes for pages, nav items, components, theme tokens
|
|
34
|
-
- [
|
|
35
|
-
- [Customizing
|
|
36
|
-
- [
|
|
37
|
-
- [Composition & Extensibility](./ui/composition-extensibility.mdx) -- layout primitives, router abstraction
|
|
38
|
-
|
|
39
|
-
### Core Architecture
|
|
40
|
-
|
|
41
|
-
- [Organization Model](./core/organization-model.mdx) -- semantic contract, schema, authoring helpers
|
|
42
|
-
- [Organization Graph](./core/organization-graph.mdx) -- graph derivation, node/edge taxonomy, lenses
|
|
43
|
-
|
|
44
|
-
### Operations
|
|
45
|
-
|
|
46
|
-
- [Workflow Recipes](./operations/workflow-recipes.md) -- workflow anatomy, adapter patterns, trigger patterns
|
|
47
|
-
- [Propagation Pipeline](./operations/propagation-pipeline.md) -- three-layer sync pipeline, verification checks, integration points
|
|
48
|
-
- [Scaffold Maintenance](./operations/scaffold-maintenance.md) -- content placement, auto-generation, adding new scaffold docs
|
|
49
|
-
|
|
50
|
-
### Reference
|
|
51
|
-
|
|
52
|
-
- [Glossary](./reference/glossary.md) -- term definitions for Organization OS concepts
|
|
53
|
-
- [Contracts](./reference/contracts.md) -- auto-generated TypeScript contract shapes
|
|
54
|
-
- [
|
|
55
|
-
|
|
56
|
-
## Source Locations
|
|
57
|
-
|
|
58
|
-
Content is co-located with its owning package and copied here during SDK build:
|
|
59
|
-
|
|
60
|
-
| Bundle Path | Source Location | Owner |
|
|
61
|
-
| --------------------------------------------- | --------------------------------------------------------- | --------------- |
|
|
62
|
-
| `scaffold/recipes/` | `packages/sdk/docs/scaffold/recipes/` | SDK |
|
|
63
|
-
| `scaffold/operations/` | `packages/sdk/docs/scaffold/operations/` | SDK |
|
|
64
|
-
| `scaffold/operations/propagation-pipeline.md` | `packages/sdk/docs/scaffold/operations/` | SDK |
|
|
65
|
-
| `scaffold/operations/scaffold-maintenance.md` | `packages/sdk/docs/scaffold/operations/` | SDK |
|
|
66
|
-
| `scaffold/ui/` | `packages/ui/src/scaffold/` | UI |
|
|
67
|
-
| `scaffold/core/` | `packages/core/src/organization-model/` | Core |
|
|
68
|
-
| `scaffold/reference/glossary.md` | `packages/core/src/reference/glossary.md` | Core |
|
|
69
|
-
| `scaffold/reference/contracts.md` | `packages/core/src/reference/_generated/contracts.md` | Core (auto-gen) |
|
|
70
|
-
| `scaffold/reference/feature-registry.md` | `packages/ui/src/scaffold/_generated/feature-registry.md` | UI (auto-gen) |
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
This scaffold reference contains universal documentation that applies to all Elevasis SDK projects. Content is organized by package ownership:
|
|
12
|
+
|
|
13
|
+
- **recipes/** -- Cross-package pathway recipes (add a system, add a resource, gating patterns)
|
|
14
|
+
- **ui/** -- UI patterns, system shell architecture, composition, and customization
|
|
15
|
+
- **core/** -- Organization model architecture, graph layer, and semantic contracts
|
|
16
|
+
- **operations/** -- Workflow authoring patterns and adapter usage
|
|
17
|
+
- **reference/** -- Glossary, auto-generated contracts, and system registry
|
|
18
|
+
|
|
19
|
+
## Quick Navigation
|
|
20
|
+
|
|
21
|
+
### Pathway Recipes
|
|
22
|
+
|
|
23
|
+
- [Add an OM-Backed System](./recipes/add-a-feature.md) -- cohesive System, ontology scope, Resource, runtime, UI, and test workflow
|
|
24
|
+
- [Add a Resource](./recipes/add-a-resource.md) -- author and deploy a workflow or agent
|
|
25
|
+
- [Extend a Base Entity](./recipes/extend-a-base-entity.md) -- add project-specific metadata to canonical entity shapes via the TMeta slot
|
|
26
|
+
- [Gate by System or Admin](./recipes/gate-by-feature-or-admin.md) -- decision table for access control patterns
|
|
27
|
+
- [Build and Extend CRM](./recipes/extend-crm.md) -- map CRM UI pages, hooks, actions, workflow adapters, contracts, and org-model boundaries
|
|
28
|
+
- [Build and Extend Lead Gen](./recipes/extend-lead-gen.md) -- map lead-gen UI pages, hooks, list/member state, artifacts, workflow adapters, contracts, and org-model boundaries
|
|
29
|
+
- [Customize CRM Actions](./recipes/customize-crm-actions.md) -- add, hide, or replace CRM deal actions, use the shared `crmActions` provider path, and understand workflow dispatch constraints
|
|
30
|
+
|
|
31
|
+
### UI Patterns
|
|
32
|
+
|
|
33
|
+
- [UI Recipes](./ui/recipes.md) -- copy-paste recipes for pages, nav items, components, theme tokens
|
|
34
|
+
- [System Flags & Gating](./ui/feature-flags-and-gating.md) -- three-concept model for system access
|
|
35
|
+
- [Customizing Systems](./ui/customization.md) -- sidebar composition via manifest overrides
|
|
36
|
+
- [System Shell & Provider](./ui/feature-shell.mdx) -- SystemModule manifest contract, provider runtime
|
|
37
|
+
- [Composition & Extensibility](./ui/composition-extensibility.mdx) -- layout primitives, router abstraction
|
|
38
|
+
|
|
39
|
+
### Core Architecture
|
|
40
|
+
|
|
41
|
+
- [Organization Model](./core/organization-model.mdx) -- semantic contract, schema, authoring helpers
|
|
42
|
+
- [Organization Graph](./core/organization-graph.mdx) -- graph derivation, node/edge taxonomy, lenses
|
|
43
|
+
|
|
44
|
+
### Operations
|
|
45
|
+
|
|
46
|
+
- [Workflow Recipes](./operations/workflow-recipes.md) -- workflow anatomy, adapter patterns, trigger patterns
|
|
47
|
+
- [Propagation Pipeline](./operations/propagation-pipeline.md) -- three-layer sync pipeline, verification checks, integration points
|
|
48
|
+
- [Scaffold Maintenance](./operations/scaffold-maintenance.md) -- content placement, auto-generation, adding new scaffold docs
|
|
49
|
+
|
|
50
|
+
### Reference
|
|
51
|
+
|
|
52
|
+
- [Glossary](./reference/glossary.md) -- term definitions for Organization OS concepts
|
|
53
|
+
- [Contracts](./reference/contracts.md) -- auto-generated TypeScript contract shapes
|
|
54
|
+
- [System Registry](./reference/feature-registry.md) -- auto-generated system manifest catalog
|
|
55
|
+
|
|
56
|
+
## Source Locations
|
|
57
|
+
|
|
58
|
+
Content is co-located with its owning package and copied here during SDK build:
|
|
59
|
+
|
|
60
|
+
| Bundle Path | Source Location | Owner |
|
|
61
|
+
| --------------------------------------------- | --------------------------------------------------------- | --------------- |
|
|
62
|
+
| `scaffold/recipes/` | `packages/sdk/docs/scaffold/recipes/` | SDK |
|
|
63
|
+
| `scaffold/operations/` | `packages/sdk/docs/scaffold/operations/` | SDK |
|
|
64
|
+
| `scaffold/operations/propagation-pipeline.md` | `packages/sdk/docs/scaffold/operations/` | SDK |
|
|
65
|
+
| `scaffold/operations/scaffold-maintenance.md` | `packages/sdk/docs/scaffold/operations/` | SDK |
|
|
66
|
+
| `scaffold/ui/` | `packages/ui/src/scaffold/` | UI |
|
|
67
|
+
| `scaffold/core/` | `packages/core/src/organization-model/` | Core |
|
|
68
|
+
| `scaffold/reference/glossary.md` | `packages/core/src/reference/glossary.md` | Core |
|
|
69
|
+
| `scaffold/reference/contracts.md` | `packages/core/src/reference/_generated/contracts.md` | Core (auto-gen) |
|
|
70
|
+
| `scaffold/reference/feature-registry.md` | `packages/ui/src/scaffold/_generated/feature-registry.md` | UI (auto-gen) |
|