@elevasis/sdk 1.20.1 → 1.21.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 +3388 -1530
- package/dist/index.d.ts +412 -149
- package/dist/index.js +955 -721
- package/dist/node/index.d.ts +0 -3
- package/dist/node/index.js +22 -49
- package/dist/test-utils/index.d.ts +395 -128
- package/dist/test-utils/index.js +599 -368
- package/dist/worker/index.js +536 -323
- package/package.json +4 -4
- package/reference/_navigation.md +9 -7
- package/reference/_reference-manifest.json +1 -1
- package/reference/claude-config/rules/agent-start-here.md +4 -0
- package/reference/claude-config/rules/frontend.md +2 -2
- package/reference/claude-config/rules/organization-model.md +44 -2
- package/reference/claude-config/rules/organization-os.md +12 -12
- package/reference/claude-config/rules/ui.md +14 -14
- package/reference/claude-config/rules/vibe.md +37 -33
- package/reference/claude-config/skills/explore/SKILL.md +6 -6
- package/reference/claude-config/skills/knowledge/SKILL.md +73 -29
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +25 -24
- package/reference/claude-config/skills/knowledge/operations/features.md +56 -93
- package/reference/claude-config/skills/knowledge/operations/labels.md +19 -14
- package/reference/claude-config/skills/knowledge/operations/offerings.md +6 -6
- package/reference/claude-config/skills/save/SKILL.md +2 -2
- package/reference/claude-config/skills/setup/SKILL.md +1 -1
- package/reference/claude-config/skills/tutorial/technical.md +23 -26
- package/reference/claude-config/skills/tutorial/vibe-coder.md +9 -9
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
- package/reference/cli.mdx +140 -0
- package/reference/deployment/provided-features.mdx +29 -15
- package/reference/examples/organization-model.ts +1 -1
- package/reference/packages/core/src/knowledge/README.md +8 -7
- package/reference/packages/core/src/organization-model/README.md +66 -26
- package/reference/packages/ui/src/provider/README.md +5 -5
- package/reference/scaffold/core/organization-graph.mdx +16 -15
- package/reference/scaffold/core/organization-model.mdx +89 -41
- package/reference/scaffold/index.mdx +9 -9
- package/reference/scaffold/operations/propagation-pipeline.md +3 -3
- package/reference/scaffold/operations/scaffold-maintenance.md +11 -11
- package/reference/scaffold/recipes/add-a-feature.md +26 -24
- package/reference/scaffold/recipes/add-a-resource.md +10 -14
- 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 +72 -44
- package/reference/scaffold/recipes/extend-crm.md +40 -39
- package/reference/scaffold/recipes/extend-lead-gen.md +15 -16
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +34 -30
- package/reference/scaffold/recipes/index.md +13 -12
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +200 -0
- package/reference/scaffold/reference/contracts.md +362 -99
- package/reference/scaffold/reference/feature-registry.md +9 -20
- package/reference/scaffold/reference/glossary.md +18 -18
- package/reference/scaffold/ui/composition-extensibility.mdx +23 -23
- package/reference/scaffold/ui/customization.md +11 -11
- package/reference/scaffold/ui/feature-flags-and-gating.md +8 -8
- package/reference/scaffold/ui/feature-shell.mdx +19 -19
- package/reference/scaffold/ui/recipes.md +29 -28
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
# Organization Model
|
|
2
2
|
|
|
3
|
-
The organization model is the published semantic contract that maps a tenant's
|
|
3
|
+
The organization model is the published semantic contract that maps a tenant's System hierarchy, shell navigation, business semantics, resource governance, and graph bindings.
|
|
4
4
|
|
|
5
|
-
Use this module when resolving or validating an organization's contract before wiring UI shells, routing,
|
|
5
|
+
Use this module when resolving or validating an organization's contract before wiring UI shells, routing, system gates, or domain-specific capability checks.
|
|
6
6
|
|
|
7
7
|
## Published Exports
|
|
8
8
|
|
|
9
9
|
The public entry point exposes:
|
|
10
10
|
|
|
11
11
|
- `OrganizationModelSchema`
|
|
12
|
-
- `FeatureSchema`
|
|
13
12
|
- `DEFAULT_ORGANIZATION_MODEL`
|
|
14
13
|
- `defineOrganizationModel`
|
|
15
14
|
- `resolveOrganizationModel`
|
|
16
15
|
- `createFoundationOrganizationModel`
|
|
17
|
-
- node ID and
|
|
16
|
+
- node ID and System helper types
|
|
18
17
|
- `OrganizationModel` and supporting domain types
|
|
19
18
|
|
|
20
19
|
Import it from the published subpath:
|
|
@@ -36,8 +35,8 @@ The model is versioned and currently validates against `version: 1`.
|
|
|
36
35
|
Top-level fields:
|
|
37
36
|
|
|
38
37
|
- `version`
|
|
38
|
+
- `domainMetadata`
|
|
39
39
|
- `branding`
|
|
40
|
-
- `features`
|
|
41
40
|
- `navigation`
|
|
42
41
|
- `sales`
|
|
43
42
|
- `prospecting`
|
|
@@ -49,40 +48,81 @@ Top-level fields:
|
|
|
49
48
|
- `goals`
|
|
50
49
|
- `systems`
|
|
51
50
|
- `resources`
|
|
51
|
+
- `capabilities`
|
|
52
|
+
- `policies`
|
|
52
53
|
- `statuses`
|
|
53
|
-
- `operations`
|
|
54
54
|
- `knowledge`
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
The pure collection domains are id-keyed maps: `systems`, `roles`, `goals`, `customers`, `offerings`, `resources`, `capabilities`, `policies`, and `statuses`. The map key must match the entry `id`. Entries carry `order` for deterministic ordered views; use `listDomain(record)` when order matters.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Resource identity is authored in `resources`. Runtime workflows, agents, integrations, and scripts import those descriptors, derive `resourceId` and kind from them, and attach executable behavior in operations code.
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
## System Set
|
|
61
|
+
|
|
62
|
+
System hierarchy is authored as an id-keyed `systems` map. Dotted IDs and `parentSystemId` define parent/child relationships:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
systems: {
|
|
66
|
+
dashboard: { id: 'dashboard', order: 10, label: 'Dashboard', lifecycle: 'active' },
|
|
67
|
+
sales: { id: 'sales', order: 20, label: 'Sales', lifecycle: 'active' },
|
|
68
|
+
clients: { id: 'clients', order: 30, label: 'Clients', lifecycle: 'active' },
|
|
69
|
+
projects: { id: 'projects', order: 40, label: 'Projects', lifecycle: 'active' }
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Systems describe semantic ownership, hierarchy, lifecycle, access, and governance. Sidebar presentation is authored separately under `navigation.sidebar`; UI-backed Systems may still provide `ui.path` for route matching during the migration, but they do not author composed surface lists. Lifecycle values such as `active`, `beta`, `deprecated`, and `archived` replace the old feature enabled/dev-only split.
|
|
74
|
+
|
|
75
|
+
## Sidebar Navigation
|
|
76
|
+
|
|
77
|
+
Shell navigation is authored as a recursive sidebar tree:
|
|
61
78
|
|
|
62
79
|
```ts
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
80
|
+
navigation: {
|
|
81
|
+
sidebar: {
|
|
82
|
+
primary: {
|
|
83
|
+
dashboard: {
|
|
84
|
+
type: 'surface',
|
|
85
|
+
order: 10,
|
|
86
|
+
label: 'Dashboard',
|
|
87
|
+
path: '/',
|
|
88
|
+
surfaceType: 'dashboard',
|
|
89
|
+
targets: { systems: ['dashboard'] }
|
|
90
|
+
},
|
|
91
|
+
business: {
|
|
92
|
+
type: 'group',
|
|
93
|
+
order: 20,
|
|
94
|
+
label: 'Business',
|
|
95
|
+
children: {
|
|
96
|
+
clients: {
|
|
97
|
+
type: 'surface',
|
|
98
|
+
order: 20,
|
|
99
|
+
label: 'Clients',
|
|
100
|
+
path: '/clients',
|
|
101
|
+
surfaceType: 'list',
|
|
102
|
+
targets: { systems: ['clients'] }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
bottom: {}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
69
110
|
```
|
|
70
111
|
|
|
71
|
-
|
|
72
|
-
Development-only features remain in the contract with `enabled: true` and `devOnly: true`; shell consumers hide them and guard their paths outside development mode.
|
|
112
|
+
Routeable sidebar leaves are projected into flat semantic surface DTOs by `projectOrganizationSurfaces(model)`. Do not author top-level `surfaces` or `navigationGroups` fields on `OrganizationModel`.
|
|
73
113
|
|
|
74
114
|
## Graph IDs
|
|
75
115
|
|
|
76
116
|
Cross-collection links use kind-prefixed IDs:
|
|
77
117
|
|
|
78
|
-
- `
|
|
118
|
+
- `system:sales.crm`
|
|
79
119
|
- `integration:instantly`
|
|
80
120
|
- `resource:lead-import`
|
|
81
|
-
- `
|
|
121
|
+
- `action:operations.queue.review`
|
|
82
122
|
|
|
83
123
|
## Resource Descriptors
|
|
84
124
|
|
|
85
|
-
The OM Resources domain is governance-only. Descriptors declare canonical `id`, required `
|
|
125
|
+
The OM Resources domain is governance-only. Descriptors declare canonical `id`, required `systemPath`, governance `status`, and optional role ownership. `DeploymentSpec` remains the runtime/deploy assembly around those descriptors, not a second resource identity catalog.
|
|
86
126
|
|
|
87
127
|
## Resolution Semantics
|
|
88
128
|
|
|
@@ -90,20 +130,20 @@ The OM Resources domain is governance-only. Descriptors declare canonical `id`,
|
|
|
90
130
|
- `resolveOrganizationModel()` deep-merges a partial override into the default model, then validates it.
|
|
91
131
|
- `createFoundationOrganizationModel()` resolves the canonical model and returns UI-facing helper outputs.
|
|
92
132
|
- Plain objects merge recursively.
|
|
133
|
+
- Id-keyed domain maps merge additively by key.
|
|
93
134
|
- Arrays replace the default value.
|
|
94
135
|
- Missing fields fall back to `DEFAULT_ORGANIZATION_MODEL`.
|
|
95
136
|
|
|
96
137
|
## Referential Integrity
|
|
97
138
|
|
|
98
|
-
-
|
|
99
|
-
- Child
|
|
100
|
-
-
|
|
101
|
-
- Leaf features provide `path`.
|
|
139
|
+
- System IDs must be unique.
|
|
140
|
+
- Child System IDs require valid ancestors or `parentSystemId` links.
|
|
141
|
+
- Systems with UI provide `ui.path`.
|
|
102
142
|
- Systems, resources, roles, knowledge nodes, and goals must resolve their declared cross-references.
|
|
103
143
|
|
|
104
144
|
## Practical Guidance
|
|
105
145
|
|
|
106
146
|
- Use `resolveOrganizationModel()` when you need a runtime-safe model.
|
|
107
147
|
- Use `defineOrganizationModel()` when authoring static overrides.
|
|
108
|
-
- Keep
|
|
109
|
-
- Put resource identity and governance in `resources
|
|
148
|
+
- Keep System IDs stable because shell routing, gating, breadcrumbs, and docs depend on them.
|
|
149
|
+
- Put resource identity and governance in `resources`; attach executable behavior in operations.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# Provider
|
|
2
2
|
|
|
3
|
-
The provider surface composes the shared Elevasis service,
|
|
3
|
+
The provider surface composes the shared Elevasis service, system, appearance, notification, and UI providers.
|
|
4
4
|
|
|
5
5
|
## Exports
|
|
6
6
|
|
|
7
7
|
The following are exported from `published.ts`, which is the external consumer surface for `@elevasis/ui/provider`:
|
|
8
8
|
|
|
9
9
|
- `ElevasisCoreProvider`
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
10
|
+
- `ElevasisSystemsProvider`
|
|
11
|
+
- `useElevasisSystems`
|
|
12
|
+
- `useOptionalElevasisSystems`
|
|
13
|
+
- `SystemShell`
|
|
14
14
|
- `AppearanceProvider`
|
|
15
15
|
- `useAppearance`
|
|
16
16
|
- `ElevasisServiceProvider`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Organization Graph
|
|
3
|
-
description: Organization OS graph layer documentation for the organization graph derived from
|
|
3
|
+
description: Organization OS graph layer documentation for the organization graph derived from Organization Model Systems, resources, capabilities, and typed links.
|
|
4
4
|
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
@@ -27,30 +27,31 @@ Graph contracts live in `@repo/core`; rendering lives in `@repo/ui`.
|
|
|
27
27
|
Node kinds:
|
|
28
28
|
|
|
29
29
|
- `organization`
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
32
|
-
- `entity`
|
|
30
|
+
- `system`
|
|
31
|
+
- `role`
|
|
33
32
|
- `capability`
|
|
34
33
|
- `resource`
|
|
34
|
+
- `knowledge`
|
|
35
|
+
- `policy`
|
|
35
36
|
|
|
36
37
|
Edge kinds:
|
|
37
38
|
|
|
38
39
|
- `contains`
|
|
39
40
|
- `references`
|
|
40
|
-
- `exposes`
|
|
41
41
|
- `maps_to`
|
|
42
|
-
- `operates-on`
|
|
43
42
|
- `uses`
|
|
43
|
+
- `governs`
|
|
44
|
+
- `governed-by`
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
System nodes come from the id-keyed `OrganizationModel.systems` map. Their graph IDs use `system:<id>`, such as `system:sales.crm`.
|
|
46
47
|
|
|
47
|
-
Resource edges
|
|
48
|
+
Resource and capability edges are derived from canonical OM maps:
|
|
48
49
|
|
|
49
50
|
```ts
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]
|
|
51
|
+
// ResourceEntry.systemPath => system -> resource contains
|
|
52
|
+
// SystemEntry.capabilities[] => system -> capability uses
|
|
53
|
+
// Capability.resourceId => capability -> resource maps_to
|
|
54
|
+
// AgentResource.invocations[] => agent resource -> invocation target uses/references
|
|
54
55
|
```
|
|
55
56
|
|
|
56
57
|
## Build Pipeline
|
|
@@ -64,9 +65,9 @@ interface BuildOrganizationGraphInput {
|
|
|
64
65
|
|
|
65
66
|
`buildOrganizationGraph`:
|
|
66
67
|
|
|
67
|
-
1. Reads
|
|
68
|
-
2. Reads
|
|
69
|
-
3. Emits
|
|
68
|
+
1. Reads Organization Model Systems and derives `system:*` nodes.
|
|
69
|
+
2. Reads OM resources, including workflow, agent, integration, and script resources, as `resource` nodes.
|
|
70
|
+
3. Emits derived graph links from System, Resource, Capability, Agent invocation, and Knowledge contracts.
|
|
70
71
|
4. Bridges Command View runtime topology into resource nodes and relationship edges.
|
|
71
72
|
5. Returns a renderer-agnostic DTO.
|
|
72
73
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Organization Model
|
|
3
|
-
description: Organization OS Model layer documentation for the
|
|
3
|
+
description: Organization OS Model layer documentation for the System hierarchy, semantic domains, resource descriptors, and curated @elevasis/core public API.
|
|
4
4
|
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
@@ -8,7 +8,7 @@ description: Organization OS Model layer documentation for the flat feature hier
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
The organization model is the semantic contract that maps an organization's
|
|
11
|
+
The organization model is the semantic contract that maps an organization's System hierarchy, business semantics, shell navigation, resource governance, and graph binding. It is schema-first, versioned, and validated.
|
|
12
12
|
|
|
13
13
|
The model is authored in `@repo/core` and published through the curated `@elevasis/core/organization-model` surface.
|
|
14
14
|
|
|
@@ -27,7 +27,7 @@ The model is authored in `@repo/core` and published through the curated `@elevas
|
|
|
27
27
|
Top-level fields on `OrganizationModel`:
|
|
28
28
|
|
|
29
29
|
- `version`
|
|
30
|
-
- `
|
|
30
|
+
- `domainMetadata`
|
|
31
31
|
- `branding`
|
|
32
32
|
- `navigation`
|
|
33
33
|
- `sales`
|
|
@@ -40,23 +40,26 @@ Top-level fields on `OrganizationModel`:
|
|
|
40
40
|
- `goals`
|
|
41
41
|
- `systems`
|
|
42
42
|
- `resources`
|
|
43
|
+
- `capabilities`
|
|
44
|
+
- `policies`
|
|
43
45
|
- `statuses`
|
|
44
|
-
- `operations`
|
|
45
46
|
- `knowledge`
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
The pure collection domains are id-keyed maps: `systems`, `roles`, `goals`, `customers`, `offerings`, `resources`, `capabilities`, `policies`, and `statuses`. The map key must match the entry `id`. Entries carry `order` for deterministic ordered views; use `listDomain(record)` when order matters.
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
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.
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
## System Shape
|
|
53
|
+
|
|
54
|
+
`OrganizationModel.systems` is the canonical semantic domain map. Hierarchy is derived from `parentSystemId` and dotted IDs:
|
|
52
55
|
|
|
53
56
|
```ts
|
|
54
|
-
|
|
55
|
-
{ id: 'dashboard',
|
|
56
|
-
{ id: 'sales', label: 'Sales',
|
|
57
|
-
{ id: '
|
|
58
|
-
{ id: '
|
|
59
|
-
|
|
57
|
+
systems: {
|
|
58
|
+
dashboard: { id: 'dashboard', order: 10, label: 'Dashboard', lifecycle: 'active' },
|
|
59
|
+
sales: { id: 'sales', order: 20, label: 'Sales', lifecycle: 'active' },
|
|
60
|
+
clients: { id: 'clients', order: 30, label: 'Clients', lifecycle: 'active' },
|
|
61
|
+
projects: { id: 'projects', order: 40, label: 'Projects', lifecycle: 'active' }
|
|
62
|
+
}
|
|
60
63
|
```
|
|
61
64
|
|
|
62
65
|
Authored fields:
|
|
@@ -64,29 +67,74 @@ Authored fields:
|
|
|
64
67
|
- `id`
|
|
65
68
|
- `label`
|
|
66
69
|
- `description`
|
|
67
|
-
- `
|
|
68
|
-
- `
|
|
69
|
-
- `
|
|
70
|
-
- `
|
|
71
|
-
- `uiPosition`
|
|
70
|
+
- `kind`
|
|
71
|
+
- `parentSystemId`
|
|
72
|
+
- `ui`
|
|
73
|
+
- `lifecycle`
|
|
72
74
|
- `requiresAdmin`
|
|
73
|
-
- `
|
|
75
|
+
- `capabilities`
|
|
76
|
+
- `policies`
|
|
77
|
+
- `order`
|
|
78
|
+
|
|
79
|
+
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.
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
Development-only features remain defined and enabled with `devOnly: true`; shell consumers hide those entries and route paths outside development mode while preserving the semantic contract.
|
|
81
|
+
## Navigation Shape
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
`OrganizationModel.navigation.sidebar` is the authored shell tree. It has `primary` and `bottom` sections whose records contain recursive group nodes and routeable surface nodes:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
navigation: {
|
|
87
|
+
sidebar: {
|
|
88
|
+
primary: {
|
|
89
|
+
dashboard: {
|
|
90
|
+
type: 'surface',
|
|
91
|
+
order: 10,
|
|
92
|
+
label: 'Dashboard',
|
|
93
|
+
path: '/',
|
|
94
|
+
surfaceType: 'dashboard',
|
|
95
|
+
targets: { systems: ['dashboard'] }
|
|
96
|
+
},
|
|
97
|
+
business: {
|
|
98
|
+
type: 'group',
|
|
99
|
+
order: 20,
|
|
100
|
+
label: 'Business',
|
|
101
|
+
children: {
|
|
102
|
+
sales: {
|
|
103
|
+
type: 'surface',
|
|
104
|
+
order: 10,
|
|
105
|
+
label: 'Sales',
|
|
106
|
+
path: '/sales',
|
|
107
|
+
surfaceType: 'page',
|
|
108
|
+
targets: { systems: ['sales'] }
|
|
109
|
+
},
|
|
110
|
+
clients: {
|
|
111
|
+
type: 'surface',
|
|
112
|
+
order: 20,
|
|
113
|
+
label: 'Clients',
|
|
114
|
+
path: '/clients',
|
|
115
|
+
surfaceType: 'list',
|
|
116
|
+
targets: { systems: ['clients'] }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
bottom: {}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
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)`.
|
|
79
127
|
|
|
80
128
|
## Graph IDs and Resource Descriptors
|
|
81
129
|
|
|
82
130
|
Cross-collection links use kind-prefixed graph IDs:
|
|
83
131
|
|
|
84
|
-
- `
|
|
132
|
+
- `system:sales.crm`
|
|
85
133
|
- `integration:instantly`
|
|
86
134
|
- `resource:lead-import`
|
|
87
|
-
- `
|
|
135
|
+
- `action:operations.queue.review`
|
|
88
136
|
|
|
89
|
-
Resource identity is authored in the OM Resources domain. Operations imports descriptors from `organizationModel.resources
|
|
137
|
+
Resource identity is authored in the OM Resources domain. Operations imports descriptors from `organizationModel.resources` and derives runtime `resourceId` / `type` while attaching executable behavior.
|
|
90
138
|
|
|
91
139
|
```ts
|
|
92
140
|
import { defineResources } from '@elevasis/core/organization-model'
|
|
@@ -95,23 +143,22 @@ export const resourceDescriptors = defineResources({
|
|
|
95
143
|
leadImport: {
|
|
96
144
|
id: 'lead-import',
|
|
97
145
|
kind: 'workflow',
|
|
98
|
-
|
|
146
|
+
systemPath: 'sales.lead-gen',
|
|
99
147
|
ownerRoleId: 'role-ops-lead',
|
|
100
148
|
status: 'active',
|
|
101
|
-
|
|
149
|
+
actionKey: 'prospecting.lead-import'
|
|
102
150
|
}
|
|
103
151
|
})
|
|
104
152
|
|
|
105
153
|
export const resourceGovernanceModel = {
|
|
106
|
-
systems
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
resources: {
|
|
110
|
-
entries: Object.values(resourceDescriptors)
|
|
111
|
-
}
|
|
154
|
+
systems,
|
|
155
|
+
resources: resourceDescriptors
|
|
112
156
|
} as const
|
|
113
157
|
```
|
|
114
158
|
|
|
159
|
+
Legacy `sys.*` paths may still appear in older examples and external compatibility mirrors.
|
|
160
|
+
For new Organization OS examples, prefer the current semantic System path.
|
|
161
|
+
|
|
115
162
|
## Domain Semantics
|
|
116
163
|
|
|
117
164
|
The model keeps business semantics in named domains:
|
|
@@ -122,7 +169,7 @@ The model keeps business semantics in named domains:
|
|
|
122
169
|
- `identity`, `customers`, `offerings`, `roles`, `goals` -- organizational reality
|
|
123
170
|
- `systems` -- bounded contexts that group governed operational resources
|
|
124
171
|
- `resources` -- governance-only workflow, agent, and integration descriptors
|
|
125
|
-
- `statuses`
|
|
172
|
+
- `statuses` -- runtime/vibe-layer semantic registry
|
|
126
173
|
- `knowledge` -- playbooks, strategies, references, and graph-governing links
|
|
127
174
|
|
|
128
175
|
## Authoring and Resolution
|
|
@@ -131,15 +178,16 @@ The model keeps business semantics in named domains:
|
|
|
131
178
|
- `resolveOrganizationModel(partial)` deep-merges a partial override into `DEFAULT_ORGANIZATION_MODEL` and validates the result.
|
|
132
179
|
- `createFoundationOrganizationModel(partial)` resolves the canonical model and returns template-facing helpers.
|
|
133
180
|
- Plain objects merge recursively.
|
|
181
|
+
- Id-keyed domain maps merge additively by key.
|
|
134
182
|
- Arrays replace defaults.
|
|
135
183
|
|
|
136
184
|
## Referential Integrity
|
|
137
185
|
|
|
138
186
|
`OrganizationModelSchema` validates:
|
|
139
187
|
|
|
140
|
-
- unique
|
|
141
|
-
- ancestor existence for dotted
|
|
142
|
-
-
|
|
188
|
+
- unique System IDs
|
|
189
|
+
- ancestor existence for dotted System IDs and `parentSystemId`
|
|
190
|
+
- UI path rules for Systems with UI presence
|
|
143
191
|
- valid sidebar positions
|
|
144
192
|
- reality-domain cross references such as offering target segments and role reporting lines
|
|
145
193
|
- system, resource, role, knowledge, and goal cross references used by resource governance
|
|
@@ -148,11 +196,11 @@ The model keeps business semantics in named domains:
|
|
|
148
196
|
|
|
149
197
|
## Provider Integration
|
|
150
198
|
|
|
151
|
-
`
|
|
199
|
+
`ElevasisSystemsProvider` uses the organization model to:
|
|
152
200
|
|
|
153
|
-
1. validate each manifest's `
|
|
154
|
-
2. resolve effective
|
|
155
|
-
3. derive sidebar entries from `
|
|
201
|
+
1. validate each manifest's `systemId`
|
|
202
|
+
2. resolve effective system access
|
|
203
|
+
3. derive sidebar entries from `navigation.sidebar`
|
|
156
204
|
4. expose shell helpers such as `childrenOf`, `ancestorsOf`, and `findByPath`
|
|
157
205
|
5. bridge the operations graph into shared UI
|
|
158
206
|
|
|
@@ -10,20 +10,20 @@ description: Universal scaffold documentation for Elevasis SDK projects -- recip
|
|
|
10
10
|
|
|
11
11
|
This scaffold reference contains universal documentation that applies to all Elevasis SDK projects. Content is organized by package ownership:
|
|
12
12
|
|
|
13
|
-
- **recipes/** -- Cross-package pathway recipes (add a
|
|
14
|
-
- **ui/** -- UI patterns,
|
|
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
15
|
- **core/** -- Organization model architecture, graph layer, and semantic contracts
|
|
16
16
|
- **operations/** -- Workflow authoring patterns and adapter usage
|
|
17
|
-
- **reference/** -- Glossary, auto-generated contracts, and
|
|
17
|
+
- **reference/** -- Glossary, auto-generated contracts, and system registry
|
|
18
18
|
|
|
19
19
|
## Quick Navigation
|
|
20
20
|
|
|
21
21
|
### Pathway Recipes
|
|
22
22
|
|
|
23
|
-
- [Add a
|
|
23
|
+
- [Add a System](./recipes/add-a-feature.md) -- end-to-end from org model key through manifest, routes, gating
|
|
24
24
|
- [Add a Resource](./recipes/add-a-resource.md) -- author and deploy a workflow or agent
|
|
25
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
|
|
26
|
+
- [Gate by System or Admin](./recipes/gate-by-feature-or-admin.md) -- decision table for access control patterns
|
|
27
27
|
- [Build and Extend CRM](./recipes/extend-crm.md) -- map CRM UI pages, hooks, actions, workflow adapters, contracts, and org-model boundaries
|
|
28
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
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
|
|
@@ -31,9 +31,9 @@ This scaffold reference contains universal documentation that applies to all Ele
|
|
|
31
31
|
### UI Patterns
|
|
32
32
|
|
|
33
33
|
- [UI Recipes](./ui/recipes.md) -- copy-paste recipes for pages, nav items, components, theme tokens
|
|
34
|
-
- [
|
|
35
|
-
- [Customizing
|
|
36
|
-
- [
|
|
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
37
|
- [Composition & Extensibility](./ui/composition-extensibility.mdx) -- layout primitives, router abstraction
|
|
38
38
|
|
|
39
39
|
### Core Architecture
|
|
@@ -51,7 +51,7 @@ This scaffold reference contains universal documentation that applies to all Ele
|
|
|
51
51
|
|
|
52
52
|
- [Glossary](./reference/glossary.md) -- term definitions for Organization OS concepts
|
|
53
53
|
- [Contracts](./reference/contracts.md) -- auto-generated TypeScript contract shapes
|
|
54
|
-
- [
|
|
54
|
+
- [System Registry](./reference/feature-registry.md) -- auto-generated system manifest catalog
|
|
55
55
|
|
|
56
56
|
## Source Locations
|
|
57
57
|
|
|
@@ -36,7 +36,7 @@ Layer 3: Sync Verification (pnpm sync:verify)
|
|
|
36
36
|
| Script | Input | Output |
|
|
37
37
|
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
38
38
|
| `generate-scaffold-contracts.js` | `packages/core/src/organization-model/types.ts`, `packages/ui/src/features/registry/types.ts`, `packages/core/src/platform/registry/types.ts` | `packages/core/src/reference/_generated/contracts.md` |
|
|
39
|
-
| `generate-scaffold-feature-registry.js` | `packages/ui/src/features
|
|
39
|
+
| `generate-scaffold-feature-registry.js` | `packages/ui/src/features/registry/manifests.ts`, `packages/ui/src/features/*/manifest.ts` | `packages/ui/src/scaffold/_generated/feature-registry.md` |
|
|
40
40
|
| `generate-reference-artifacts.js` | SDK manifest, navigation sources | `packages/sdk/reference/_reference-manifest.json`, `_navigation.md` |
|
|
41
41
|
|
|
42
42
|
After generation, `validate-reference-artifacts.js` checks that the outputs are consistent. Exit 1 if drifted.
|
|
@@ -102,7 +102,7 @@ The external skill doc (`.claude/skills/external/SKILL.md`) remains the workflow
|
|
|
102
102
|
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
103
103
|
| `deps` | `@elevasis/ui`, `@elevasis/sdk`, `@elevasis/core` versions match template |
|
|
104
104
|
| `tier1` | registry-backed replace surfaces match template where verification still models them as exact baselines |
|
|
105
|
-
| `org-os` | Organization model exists, exports canonical symbols, imports from `@elevasis/core/organization-model`, calls `createFoundationOrganizationModel`, app-config references org model, `__root.tsx` uses `
|
|
105
|
+
| `org-os` | Organization model exists, exports canonical symbols, imports from `@elevasis/core/organization-model`, calls `createFoundationOrganizationModel`, app-config references org model, `__root.tsx` uses `ElevasisSystemsProvider` + `canonicalOrganizationModel`, `main.tsx` uses `createElevasisApp`, all 3 CSS subpath imports present |
|
|
106
106
|
| `placeholders` | No unresolved `__PROJECT_SLUG__`, `__PROJECT_NAME__`, `__PROJECT_DESCRIPTION__` in key config files |
|
|
107
107
|
| `scripts` | `ui` and `operations` `package.json` have required npm scripts |
|
|
108
108
|
| `lib` | `ui/src/lib/`, `lib/`, `test-utils/` exist with minimum file counts |
|
|
@@ -149,7 +149,7 @@ Treat the old tier labels as display shorthand inside the verifier, not as the c
|
|
|
149
149
|
|
|
150
150
|
| Gap | Priority |
|
|
151
151
|
| ------------------------------------------------------------------------- | -------- |
|
|
152
|
-
|
|
|
152
|
+
| System manifest validation (all manifests imported in `__root.tsx`) | Medium |
|
|
153
153
|
| TypeScript verification (`check-types` per project) | Medium |
|
|
154
154
|
| Template docs surface validation (`docs/index.md`, `agent-start-here.md`) | Medium |
|
|
155
155
|
| Environment variable template validation (`.env.example` completeness) | Low |
|
|
@@ -32,11 +32,11 @@ Scaffold docs are co-located with their owning package and copied into the SDK r
|
|
|
32
32
|
| Glossary | `packages/core/src/reference/glossary.md` | `scaffold/reference/glossary.md` |
|
|
33
33
|
| Contracts (auto-gen) | `packages/core/src/reference/_generated/contracts.md` | `scaffold/reference/contracts.md` |
|
|
34
34
|
| UI Recipes | `packages/ui/src/scaffold/recipes.md` | `scaffold/ui/recipes.md` |
|
|
35
|
-
|
|
|
35
|
+
| System Flags & Gating | `packages/ui/src/scaffold/feature-flags-and-gating.md` | `scaffold/ui/feature-flags-and-gating.md` |
|
|
36
36
|
| Customization | `packages/ui/src/scaffold/customization.md` | `scaffold/ui/customization.md` |
|
|
37
|
-
|
|
|
37
|
+
| System Shell | `packages/ui/src/scaffold/feature-shell.mdx` | `scaffold/ui/feature-shell.mdx` |
|
|
38
38
|
| Composition & Extensibility | `packages/ui/src/scaffold/composition-extensibility.mdx` | `scaffold/ui/composition-extensibility.mdx` |
|
|
39
|
-
|
|
|
39
|
+
| System Registry (auto-gen) | `packages/ui/src/scaffold/_generated/feature-registry.md` | `scaffold/reference/feature-registry.md` |
|
|
40
40
|
| Scaffold Index | `packages/sdk/docs/scaffold/index.mdx` | `scaffold/index.mdx` |
|
|
41
41
|
| Pathway Recipes (4) | `packages/sdk/docs/scaffold/recipes/` | `scaffold/recipes/` |
|
|
42
42
|
| Workflow Recipes | `packages/sdk/docs/scaffold/operations/workflow-recipes.md` | `scaffold/operations/workflow-recipes.md` |
|
|
@@ -53,18 +53,18 @@ Two types of docs are auto-generated from source:
|
|
|
53
53
|
|
|
54
54
|
Generated by `scripts/monorepo/generate-scaffold-contracts.js` from TypeScript source types:
|
|
55
55
|
|
|
56
|
-
- `packages/core/src/organization-model/types.ts` -- Organization Model,
|
|
57
|
-
- `packages/ui/src/features/registry/types.ts` --
|
|
56
|
+
- `packages/core/src/organization-model/types.ts` -- Organization Model, System Model
|
|
57
|
+
- `packages/ui/src/features/registry/types.ts` -- System Registry
|
|
58
58
|
- `packages/core/src/platform/registry/types.ts` -- Resource Registry, Deployment Spec
|
|
59
59
|
|
|
60
60
|
Output: `packages/core/src/reference/_generated/contracts.md`
|
|
61
61
|
|
|
62
|
-
###
|
|
63
|
-
|
|
64
|
-
Generated by `scripts/monorepo/generate-scaffold-feature-registry.js` from
|
|
65
|
-
|
|
66
|
-
- `packages/ui/src/features/*/manifest.ts` -- individual
|
|
67
|
-
- `packages/
|
|
62
|
+
### System Registry (`feature-registry.md`)
|
|
63
|
+
|
|
64
|
+
Generated by `scripts/monorepo/generate-scaffold-feature-registry.js` from system manifests:
|
|
65
|
+
|
|
66
|
+
- `packages/ui/src/features/*/manifest.ts` -- individual system manifests
|
|
67
|
+
- `packages/ui/src/features/registry/manifests.ts` -- `SYSTEM_MANIFESTS`
|
|
68
68
|
|
|
69
69
|
Output: `packages/ui/src/scaffold/_generated/feature-registry.md`
|
|
70
70
|
|