@elevasis/sdk 1.20.2 → 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.
Files changed (58) hide show
  1. package/dist/cli.cjs +3386 -1529
  2. package/dist/index.d.ts +412 -149
  3. package/dist/index.js +955 -721
  4. package/dist/node/index.d.ts +0 -3
  5. package/dist/node/index.js +21 -48
  6. package/dist/test-utils/index.d.ts +395 -128
  7. package/dist/test-utils/index.js +599 -368
  8. package/dist/worker/index.js +536 -323
  9. package/package.json +2 -2
  10. package/reference/_navigation.md +9 -7
  11. package/reference/_reference-manifest.json +1 -1
  12. package/reference/claude-config/rules/agent-start-here.md +4 -0
  13. package/reference/claude-config/rules/frontend.md +2 -2
  14. package/reference/claude-config/rules/organization-model.md +44 -2
  15. package/reference/claude-config/rules/organization-os.md +12 -12
  16. package/reference/claude-config/rules/ui.md +14 -14
  17. package/reference/claude-config/rules/vibe.md +37 -33
  18. package/reference/claude-config/skills/explore/SKILL.md +6 -6
  19. package/reference/claude-config/skills/knowledge/SKILL.md +73 -29
  20. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +1 -1
  21. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +25 -24
  22. package/reference/claude-config/skills/knowledge/operations/features.md +56 -93
  23. package/reference/claude-config/skills/knowledge/operations/labels.md +19 -14
  24. package/reference/claude-config/skills/knowledge/operations/offerings.md +6 -6
  25. package/reference/claude-config/skills/save/SKILL.md +2 -2
  26. package/reference/claude-config/skills/setup/SKILL.md +1 -1
  27. package/reference/claude-config/skills/tutorial/technical.md +23 -26
  28. package/reference/claude-config/skills/tutorial/vibe-coder.md +9 -9
  29. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
  30. package/reference/cli.mdx +140 -0
  31. package/reference/deployment/provided-features.mdx +29 -15
  32. package/reference/examples/organization-model.ts +1 -1
  33. package/reference/packages/core/src/knowledge/README.md +8 -7
  34. package/reference/packages/core/src/organization-model/README.md +66 -26
  35. package/reference/packages/ui/src/provider/README.md +5 -5
  36. package/reference/scaffold/core/organization-graph.mdx +16 -15
  37. package/reference/scaffold/core/organization-model.mdx +89 -41
  38. package/reference/scaffold/index.mdx +9 -9
  39. package/reference/scaffold/operations/propagation-pipeline.md +3 -3
  40. package/reference/scaffold/operations/scaffold-maintenance.md +11 -11
  41. package/reference/scaffold/recipes/add-a-feature.md +26 -24
  42. package/reference/scaffold/recipes/add-a-resource.md +10 -14
  43. package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
  44. package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
  45. package/reference/scaffold/recipes/customize-organization-model.md +72 -44
  46. package/reference/scaffold/recipes/extend-crm.md +40 -39
  47. package/reference/scaffold/recipes/extend-lead-gen.md +15 -16
  48. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +34 -30
  49. package/reference/scaffold/recipes/index.md +13 -12
  50. package/reference/scaffold/recipes/query-the-knowledge-graph.md +200 -0
  51. package/reference/scaffold/reference/contracts.md +362 -99
  52. package/reference/scaffold/reference/feature-registry.md +9 -20
  53. package/reference/scaffold/reference/glossary.md +18 -18
  54. package/reference/scaffold/ui/composition-extensibility.mdx +23 -23
  55. package/reference/scaffold/ui/customization.md +11 -11
  56. package/reference/scaffold/ui/feature-flags-and-gating.md +8 -8
  57. package/reference/scaffold/ui/feature-shell.mdx +19 -19
  58. package/reference/scaffold/ui/recipes.md +29 -28
@@ -4,34 +4,23 @@
4
4
  <!-- @generated by scripts/monorepo/generate-scaffold-feature-registry.js — DO NOT EDIT -->
5
5
  <!-- Regenerate: pnpm scaffold:sync -->
6
6
  ---
7
- title: Feature Registry
8
- description: Auto-generated catalog of registered feature manifests. Do not edit manually.
7
+ title: System Manifest Registry
8
+ description: Auto-generated catalog of registered system manifests. Do not edit manually.
9
9
  ---
10
10
 
11
11
  > **Auto-generated** from source manifests. Do not edit manually. Run `node scripts/monorepo/generate-scaffold-feature-registry.js` to regenerate.
12
12
 
13
- ## Registered Feature Manifests
13
+ ## Registered System Manifests
14
14
 
15
- | Feature Key | Feature ID | Nav Label | Domains | Routes |
15
+ | System Key | System ID | Nav Label | Domains | Routes |
16
16
  | --- | --- | --- | --- | --- |
17
17
  | `crm` | `sales.crm` | — | — | — |
18
18
  | `delivery` | `projects` | — | — | — |
19
- | `knowledge` | `knowledge` | — | — | — |
19
+ | `knowledge` | `—` | — | — | — |
20
20
  | `lead-gen` | `sales.lead-gen` | — | — | — |
21
- | `monitoring` | `monitoring` | — | — | — |
22
- | `operations` | `operations` | — | — | — |
21
+ | `monitoring` | `—` | — | — | — |
22
+ | `operations` | `—` | — | — | — |
23
23
  | `seo` | `seo` | — | — | — |
24
- | `settings` | `settings` | — | — | — |
24
+ | `settings` | `—` | — | — | — |
25
25
 
26
- > **Note:** `auth` and `dashboard` are not in the registry — they are app-shell concerns, not gated features.
27
-
28
- ## Default Feature IDs
29
-
30
- Feature IDs defined in `DEFAULT_ORGANIZATION_MODEL.features` (`packages/core/src/organization-model/defaults.ts`):
31
-
32
- ```typescript
33
- // FeatureSchema: { id, label, enabled, color?, icon?, entityIds, surfaceIds, resourceIds, capabilityIds }
34
- type DefaultFeatureId = 'dashboard' | 'identity' | 'platform' | 'finance' | 'business' | 'sales' | 'sales.crm' | 'sales.lead-gen' | 'projects' | 'clients' | 'operations' | 'knowledge.command-view' | 'operations.overview' | 'operations.resources' | 'operations.command-queue' | 'operations.sessions' | 'operations.task-scheduler' | 'monitoring' | 'monitoring.calendar' | 'monitoring.activity-log' | 'monitoring.execution-logs' | 'monitoring.execution-health' | 'monitoring.cost-analytics' | 'monitoring.notifications' | 'monitoring.submitted-requests' | 'settings' | 'settings.account' | 'settings.appearance' | 'settings.roles' | 'settings.organization' | 'settings.credentials' | 'settings.api-keys' | 'settings.webhooks' | 'settings.deployments' | 'admin' | 'admin.system-health' | 'admin.organizations' | 'admin.users' | 'admin.design-showcase' | 'admin.debug' | 'archive' | 'archive.agent-chat' | 'archive.execution-runner' | 'seo' | 'knowledge' | 'knowledge.base'
35
- ```
36
-
37
- These are the built-in feature IDs. The `featureId` field on a `FeatureModule` manifest must match the `id` of a feature in the organization model to enable access-flag gating.
26
+ > **Note:** `auth` and `dashboard` are not in the registry — they are app-shell concerns, not gated systems.
@@ -16,31 +16,31 @@ description: Terminology disambiguation for Organization OS concepts used in the
16
16
 
17
17
  **DeploymentSpec** -- runtime/deploy assembly for one organization: workflows, agents, triggers, integrations, relationships, external resources, and human checkpoints. It assembles executable behavior around Organization Model resource descriptors; it is not the source of resource identity.
18
18
 
19
- **Feature** -- either a platform capability, a shell `FeatureModule`, or an Organization Model feature node. In the current shell contract, Organization Model feature nodes drive sidebar hierarchy and access state.
19
+ **Feature** -- legacy or UI-package wording for a platform capability area. In the current Organization Model, use **System** for semantic ownership and **navigation surface** for shell placement. Keep "feature" only when referring to existing UI package folders, exported manifest names, or legacy compatibility recipes.
20
20
 
21
- **FeatureGuard** -- route-level feature gate from `@elevasis/ui/features/auth`.
21
+ **SystemGuard** -- route-level System gate from `@elevasis/ui/features/auth`.
22
22
 
23
- **FeatureModule** -- manifest contract a shell feature provides to `ElevasisFeaturesProvider`. Key fields are `key`, `featureId`, optional `capabilityIds`, optional `icon`, optional `sidebar`, and optional graph bridge metadata.
23
+ **SystemModule** -- manifest contract a shell module provides to `ElevasisSystemsProvider`. Key fields are `key`, optional `systemId`, optional `routePrefixes`, optional `capabilityIds`, optional `icon`, optional `sidebar`, optional `sidebarWidth`, and optional graph bridge metadata.
24
24
 
25
- **featureId** -- the `FeatureModule` field that must match an `OrganizationModel.features[].id`.
25
+ **systemId** -- the `SystemModule` field that points to an `OrganizationModel.systems` entry. Navigation-only app modules may omit it and use route prefixes/surface metadata instead.
26
26
 
27
27
  **Foundations** -- local adapter layer in external projects that exports `canonicalOrganizationModel`, `organizationModel`, and workflow I/O schemas.
28
28
 
29
- **Graph node ID** -- kind-prefixed cross-collection identifier such as `feature:sales.crm`, `integration:instantly`, or `resource:lead-import`.
29
+ **Graph node ID** -- kind-prefixed cross-collection identifier such as `system:sales.crm`, `integration:instantly`, or `resource:lead-import`.
30
30
 
31
31
  **Manifest** -- a runtime declaration for a feature or resource collection.
32
32
 
33
- **MembershipFeatureConfig** -- per-member feature override config: `{ features?: Record<string, boolean> }`.
33
+ **MembershipFeatureConfig** -- legacy per-member feature override config. Current System visibility is resolved through Organization Model lifecycle/access metadata and provider compatibility layers.
34
34
 
35
- **OrganizationModel** -- top-level semantic contract for an organization. Current primary fields include `features`, `branding`, `navigation`, `sales`, `prospecting`, `projects`, `identity`, `customers`, `offerings`, `roles`, `goals`, `systems`, `resources`, `statuses`, `operations`, and `knowledge`.
35
+ **OrganizationModel** -- top-level semantic contract for an organization. Current primary fields include `version`, `domainMetadata`, `branding`, `navigation`, `sales`, `prospecting`, `projects`, `identity`, `customers`, `offerings`, `roles`, `goals`, `systems`, `resources`, `actions`, `entities`, `policies`, `statuses`, and `knowledge`.
36
36
 
37
- **OrganizationModelFeature** -- feature node in `OrganizationModel.features`. Fields include `id`, `label`, `description`, `enabled`, `path`, `icon`, `color`, `uiPosition`, `requiresAdmin`, and `devOnly`.
37
+ **OrganizationModelSystemEntry** -- System node in `OrganizationModel.systems`. Fields include `id`, `label`, `description`, `parentSystemId`, `subsystems`, `lifecycle`, `ui`, `requiresAdmin`, `devOnly`, `responsibleRoleId`, `governedByKnowledge`, `drivesGoals`, `actions`, `content`, and `order`.
38
38
 
39
- **Provider / ElevasisFeaturesProvider** -- runtime that registers manifests, resolves feature access against the org model, and exposes shell helpers through `useElevasisFeatures()`.
39
+ **Provider / ElevasisSystemsProvider** -- runtime that registers System modules, resolves System access against the org model, projects sidebar navigation, and exposes shell helpers through `useElevasisSystems()`.
40
40
 
41
- **Resource** -- governance-only descriptor in `OrganizationModel.resources.entries` for a workflow, agent, or integration. Runtime code derives `resourceId` and kind from the descriptor, then attaches executable behavior in operations.
41
+ **Resource** -- governance-only descriptor in `OrganizationModel.resources` for a workflow, agent, integration, or script. Runtime code derives `resourceId` and kind from the descriptor, then attaches executable behavior in operations.
42
42
 
43
- **Resource descriptor** -- OM entry with canonical `id`, required `systemId`, governance `status`, and optional role ownership. Workflow descriptors may mirror `capabilityKey`; agent descriptors carry `agentKind`, `sessionCapable`, and optional `actsAsRoleId`; integration descriptors name a provider.
43
+ **Resource descriptor** -- OM entry with canonical `id`, required `systemPath`, governance `status`, and optional role ownership. Workflow descriptors may mirror `actionKey`; agent descriptors carry `agentKind`, `sessionCapable`, and optional `actsAsRoleId`; integration descriptors name a provider.
44
44
 
45
45
  **System** -- tenant-defined bounded context in `OrganizationModel.systems.systems` that groups operational resources and carries governance metadata such as responsible role, governing knowledge, driven goals, kind, and status.
46
46
 
@@ -48,11 +48,11 @@ description: Terminology disambiguation for Organization OS concepts used in the
48
48
 
49
49
  **ResourceLink** -- graph binding on resource metadata: `{ nodeId, kind }`.
50
50
 
51
- **Settings asymmetry** -- settings is a feature node, but individual access is normally governed by admin checks rather than user-facing feature toggles.
51
+ **Settings asymmetry** -- Settings is a navigation/app surface whose individual pages are normally governed by admin checks rather than user-facing System toggles.
52
52
 
53
- **Shell model** -- provider output used by sidebars and breadcrumbs. Includes `features`, `childrenOf`, `ancestorsOf`, `parentOf`, `topLevel`, `findByPath`, `uiPositionFor`, `requiresAdminFor`, and `devOnlyFor`.
53
+ **Shell model** -- provider output used by sidebars and breadcrumbs. Includes `systems`, `childrenOf`, `ancestorsOf`, `parentOf`, `topLevel`, `findByPath`, `requiresAdminFor`, and `devOnlyFor`.
54
54
 
55
- **Subshell / Sidebar** -- feature-scoped UI region rendered when the current route matches a feature whose manifest supplies a sidebar.
55
+ **Subshell / Sidebar** -- System- or route-prefix-scoped UI region rendered when the current route matches a module whose manifest supplies a sidebar.
56
56
 
57
57
  **Topology** -- runtime resource relationships declared in `DeploymentSpec.relationships`.
58
58
 
@@ -60,7 +60,7 @@ description: Terminology disambiguation for Organization OS concepts used in the
60
60
 
61
61
  **`@elevasis/core`**
62
62
 
63
- - `OrganizationModel`, `OrganizationModelFeature`
63
+ - `OrganizationModel`, `OrganizationModelSystemEntry`
64
64
  - `SystemEntry`, `ResourceEntry`
65
65
  - `resolveOrganizationModel`, `defineOrganizationModel`, `DEFAULT_ORGANIZATION_MODEL`
66
66
  - `MembershipFeatureConfig`
@@ -68,9 +68,9 @@ description: Terminology disambiguation for Organization OS concepts used in the
68
68
 
69
69
  **`@elevasis/ui`**
70
70
 
71
- - `FeatureModule`
72
- - `FeatureGuard`, `AdminGuard`, `ProtectedRoute`
73
- - `ElevasisFeaturesProvider`, `ElevasisCoreProvider`, `useElevasisFeatures`
71
+ - `SystemModule`
72
+ - `SystemGuard`, `AdminGuard`, `ProtectedRoute`
73
+ - `ElevasisSystemsProvider`, `ElevasisCoreProvider`, `useElevasisSystems`
74
74
 
75
75
  **External project source**
76
76
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Composition & Extensibility
3
- description: Organization OS Toolkit layer guidance for customizing shared shell features without forking, including exported nav arrays, optional sidebar props, composable layout primitives, and the manifest.sidebar override pattern.
3
+ description: Organization OS Toolkit layer guidance for customizing shared shell systems without forking, including exported nav arrays, optional sidebar props, composable layout primitives, and the manifest.sidebar override pattern.
4
4
  ---
5
5
  <!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
6
6
  <!-- Regenerate: pnpm scaffold:sync -->
@@ -8,20 +8,20 @@ description: Organization OS Toolkit layer guidance for customizing shared shell
8
8
 
9
9
  ## Overview
10
10
 
11
- Within Organization OS, this doc covers the **Toolkit** layer: the primitives consumers use to customize shared shell features by composition instead of fork. Consumers extend nav items, inject panels, or wrap pages by combining published primitives and assigning a custom component to `manifest.sidebar`. Copying source is physically possible but unsupported -- a fork owns upstream drift forever.
11
+ Within Organization OS, this doc covers the **Toolkit** layer: the primitives consumers use to customize shared shell systems by composition instead of fork. Consumers extend nav items, inject panels, or wrap pages by combining published primitives and assigning a custom component to `manifest.sidebar`. Copying source is physically possible but unsupported -- a fork owns upstream drift forever.
12
12
 
13
- The core pattern: set `sidebar` on your manifest to a component that composes the feature's published pieces. If the published pieces can't express what you need, the missing export is a bug. File an issue instead of forking.
13
+ The core pattern: set `sidebar` on your manifest to a component that composes the system's published pieces. If the published pieces can't express what you need, the missing export is a bug. File an issue instead of forking.
14
14
 
15
15
  Shipped in `@elevasis/ui >= 2.8.1`.
16
16
 
17
17
  ## The Override Pattern
18
18
 
19
- Every `FeatureModule.sidebar` is a `ComponentType`. Consumers customize by:
19
+ Every `SystemModule.sidebar` is a `ComponentType`. Consumers customize by:
20
20
 
21
- 1. Importing the feature's published sidebar wrapper and middle component.
21
+ 1. Importing the system's published sidebar wrapper and middle component.
22
22
  2. Wrapping or replacing the middle with custom content.
23
23
  3. Spreading the stock manifest and setting `sidebar` to their component.
24
- 4. Passing the customized manifest to `ElevasisFeaturesProvider`.
24
+ 4. Passing the customized manifest to `ElevasisSystemsProvider`.
25
25
 
26
26
  No new manifest fields. No discriminated unions. No runtime machinery.
27
27
 
@@ -29,14 +29,14 @@ No new manifest fields. No discriminated unions. No runtime machinery.
29
29
 
30
30
  - **Adding or changing nav items?** -> Extend the exported item array and pass to `<*SidebarMiddle items={...}>`.
31
31
  - **Structural changes (injecting panels, wrapping sections)?** -> Compose `SidebarTop`, `SidebarMiddle`, and exported panels directly in your own component.
32
- - **Wrapping pages?** -> Import the feature's page component and wrap with custom chrome in a route file.
32
+ - **Wrapping pages?** -> Import the system's page component and wrap with custom chrome in a route file.
33
33
  - **None of these fits?** -> Missing export is the bug. File an issue.
34
34
 
35
35
  ## Exported Primitives
36
36
 
37
37
  ### Nav item arrays
38
38
 
39
- Re-exported from each feature's sidebar barrel:
39
+ Re-exported from each system sidebar barrel:
40
40
 
41
41
  - `CRM_ITEMS` from `@elevasis/ui/features/crm`
42
42
  - `LEAD_GEN_ITEMS` from `@elevasis/ui/features/lead-gen`
@@ -71,16 +71,16 @@ From `@elevasis/ui/layout`:
71
71
  - `SubshellContentContainer` -- scrollable content area with standard `md` padding and automatic topbar offset applied via `paddingTop`
72
72
  - `SubshellLoader` -- loading placeholder centered in the subshell viewport; reads the active loader from `AppearanceContext`
73
73
 
74
- `FeatureShell` wires these together at `width={250}` as the default sidebar width. Consumers composing their own shell layout can pass a different `width` prop to `SubshellSidebar`.
74
+ `SystemShell` wires these together at `width={250}` as the default sidebar width. Consumers composing their own shell layout can pass a different `width` prop to `SubshellSidebar`.
75
75
 
76
- ### SubshellSidebar features
76
+ ### SubshellSidebar behavior
77
77
 
78
78
  `SubshellSidebar` is more than a thin wrapper. Key behaviors verified in source:
79
79
 
80
80
  - **Collapsible** -- controlled by `collapsible` prop (defaults to `true`) and `defaultOpen` prop (defaults to `true`). When collapsed, the sidebar animates to zero width and a small toggle button remains visible at the bottom-right edge.
81
81
  - **Glass morphism** -- applies `color-mix(in srgb, var(--glass-background) 80%, transparent)` as background and `var(--glass-blur)` as `backdropFilter`, consistent with the theme token system.
82
82
  - **Animated transitions** -- width and opacity animate on collapse/expand using `sidebarTransitionDuration` from the layout constants.
83
- - **Width** -- no built-in default; the caller supplies `width`. `FeatureShell` passes `250` and this is the canonical default for stock feature sidebars.
83
+ - **Width** -- no built-in default; the caller supplies `width`. `SystemShell` passes `250` and this is the canonical default for stock system sidebars.
84
84
 
85
85
  From `@elevasis/ui/router/context`:
86
86
 
@@ -105,26 +105,26 @@ It wraps `RouterProvider` and supplies the adapter by reading `useLocation` and
105
105
 
106
106
  ```tsx
107
107
  <TanStackRouterBridge>
108
- <ElevasisFeaturesProvider ...>
109
- <FeatureShell>...</FeatureShell>
110
- </ElevasisFeaturesProvider>
108
+ <ElevasisSystemsProvider ...>
109
+ <SystemShell>...</SystemShell>
110
+ </ElevasisSystemsProvider>
111
111
  </TanStackRouterBridge>
112
112
  ```
113
113
 
114
114
  Consumers using a different router can implement `RouterAdapter` directly and pass it to `RouterProvider` instead of using this bridge.
115
115
 
116
- ### Feature panels (CRM)
116
+ ### System panels (CRM)
117
117
 
118
118
  - `MyTasksPanel`, `QuickCreateActions` -- exported from `@elevasis/ui/features/crm`, included by default in `CrmSidebarMiddle`; consumers composing their own middle can re-include them explicitly.
119
119
 
120
- ### Feature pages
120
+ ### System pages
121
121
 
122
- Every page each feature renders is exported from its feature barrel, so consumers can wrap with custom chrome without forking:
122
+ Every page each system renders is exported from its system barrel, so consumers can wrap with custom chrome without forking:
123
123
 
124
124
  - CRM: `DealsListPage`, `DealDetailPage`
125
125
  - Lead-gen: `LeadGenOverviewPage`, `LeadGenListsPage`, `LeadGenListDetailPage`, `LeadGenCompaniesPage`, `LeadGenContactsPage`
126
126
  - Delivery: `AllTasksPage`, `UpcomingMilestonesPage`, `ProjectsListPage`, `ProjectDetailPage`
127
- - Operations, monitoring, settings -- full page inventories exported from their feature barrels
127
+ - Operations, monitoring, settings -- full page inventories exported from their system barrels
128
128
 
129
129
  ## Consumer Patterns
130
130
 
@@ -199,7 +199,7 @@ export default function CustomDealsRoute() {
199
199
  }
200
200
  ```
201
201
 
202
- ## Operations & Unmodified Features
202
+ ## Operations & Unmodified Systems
203
203
 
204
204
  - **Operations** -- uses `sidebar?: ComponentType` with route-aware dispatch; the items-prop pattern does not apply.
205
205
  - **Monitoring, Settings** -- no subshell sidebar. No customization surface needed.
@@ -207,7 +207,7 @@ export default function CustomDealsRoute() {
207
207
 
208
208
  ## Publish-Surface Discipline
209
209
 
210
- All primitives above flow through published subpaths (`@elevasis/ui/features/<feature>`, `@elevasis/ui/layout`, `@elevasis/ui/router/context`). Any new primitive must sync four files per `.claude/rules/ui-package.md`: `package.json` `exports`, `publishConfig.exports`, `rollup.dts.config.mjs`, and `tsup.config.ts`.
210
+ All primitives above flow through published subpaths (`@elevasis/ui/features/<system>`, `@elevasis/ui/layout`, `@elevasis/ui/router/context`). Any new primitive must sync four files per `.claude/rules/ui-package.md`: `package.json` `exports`, `publishConfig.exports`, `rollup.dts.config.mjs`, and `tsup.config.ts`.
211
211
 
212
212
  The published barrel (`packages/ui/src/provider/published.ts`) remains headless -- no Mantine-dependent visual pieces leak into the external contract.
213
213
 
@@ -215,9 +215,9 @@ The published barrel (`packages/ui/src/provider/published.ts`) remains headless
215
215
 
216
216
  The Knowledge Browser follows the same pattern described in this document. The three tiers map directly:
217
217
 
218
- - **Tier 1** -- import `knowledgeManifest` from `@elevasis/ui/features/knowledge` and pass it to `ElevasisFeaturesProvider`. No further code required.
218
+ - **Tier 1** -- import `knowledgeManifest` from `@elevasis/ui/features/knowledge` and pass it to `ElevasisSystemsProvider`. No further code required.
219
219
  - **Tier 2** -- spread the manifest, override `sidebar` to a component that composes `KnowledgeSidebar` + `KnowledgeSidebarMiddle items={customItems}`. Same shape as the CRM example above.
220
- - **Tier 3** -- skip the manifest, own the route, call `byFeature` / `byKind` / `byOwner` from `@elevasis/core/knowledge` directly.
220
+ - **Tier 3** -- skip the manifest, own the route, call `bySystem` / `byKind` / `byOwner` from `@elevasis/core/knowledge` directly.
221
221
 
222
222
  One additional wiring step is required for Knowledge Browser that does not apply to CRM or Lead Gen: add `knowledgePlugin()` from `@elevasis/ui/vite-plugin-knowledge` to `vite.config.ts`. The plugin runs build-time MDX codegen so rendered body components are available at runtime.
223
223
 
@@ -232,5 +232,5 @@ Phase 1.5 adds two further extension surfaces documented in the same recipe file
232
232
 
233
233
  - **Don't fork sidebar files into your app tree.** You own upstream drift forever.
234
234
  - **Don't redefine `NavItem` locally.** Import it from `@elevasis/ui/layout` so future shape changes stay coherent.
235
- - **Don't monkey-patch `FEATURE_MANIFESTS`.** It's a published convenience constant; consumers build their own manifest array and pass it to the provider.
235
+ - **Don't monkey-patch `SYSTEM_MANIFESTS`.** It's a published convenience constant; consumers build their own manifest array and pass it to the provider.
236
236
  - **Don't add discriminated-union sidebar configuration to manifests.** The single pattern (assign a component to `manifest.sidebar`) is intentional.
@@ -1,18 +1,18 @@
1
1
  ---
2
- title: Customizing Features
3
- description: One pattern for customizing feature sidebars and pages -- set manifest.sidebar to a component composing the feature's published pieces. Decision tree + three worked examples.
2
+ title: Customizing Systems
3
+ description: One pattern for customizing system sidebars and pages -- set manifest.sidebar to a component composing the system's published pieces. Decision tree + three worked examples.
4
4
  ---
5
5
  <!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
6
6
  <!-- Regenerate: pnpm scaffold:sync -->
7
7
 
8
8
 
9
- # Customizing Features
9
+ # Customizing Systems
10
10
 
11
11
  **Status:** 🟢 Stable
12
12
 
13
13
  > **Requires `@elevasis/ui` >= 2.8.1.**
14
14
 
15
- There is one pattern for customizing a feature's sidebar or pages: set `sidebar` on your manifest override to a component that composes the feature's published pieces. Pass custom `items` to swap the nav array, or compose `SidebarTop` + `SidebarMiddle` + exported panels directly for structural changes. Never fork a source file as a first resort -- if you copy source you own upstream drift forever.
15
+ There is one pattern for customizing a system's sidebar or pages: set `sidebar` on your manifest override to a component that composes the system's published pieces. Pass custom `items` to swap the nav array, or compose `SidebarTop` + `SidebarMiddle` + exported panels directly for structural changes. Never fork a source file as a first resort -- if you copy source you own upstream drift forever.
16
16
 
17
17
  ## Decision Tree
18
18
 
@@ -20,7 +20,7 @@ There is one pattern for customizing a feature's sidebar or pages: set `sidebar`
20
20
 
21
21
  **Structural changes (injecting panels, reordering sections, wrapping sections)?** Compose `SidebarTop`, `SidebarMiddle`, and exported panels (`MyTasksPanel`, `QuickCreateActions`) directly into your own component and assign it to the manifest's `sidebar` field.
22
22
 
23
- **Wrapping pages?** Import the feature's page component and wrap with custom chrome in a route file.
23
+ **Wrapping pages?** Import the system's page component and wrap with custom chrome in a route file.
24
24
 
25
25
  **Neither fits?** The missing export is a bug in `@elevasis/ui` -- file an issue. Copying source is physically possible but unsupported. You own upstream drift forever.
26
26
 
@@ -28,7 +28,7 @@ There is one pattern for customizing a feature's sidebar or pages: set `sidebar`
28
28
 
29
29
  Extend CRM's nav by spreading `CRM_ITEMS` and appending a Reports entry. Pass the extended array to `CrmSidebarMiddle`.
30
30
 
31
- Wire the override in `ui/src/routes/__root.tsx`, where feature manifests are assembled before being passed to `ElevasisFeaturesProvider`.
31
+ Wire the override in `ui/src/routes/__root.tsx`, where system manifests are assembled before being passed to `ElevasisSystemsProvider`.
32
32
 
33
33
  ```tsx
34
34
  // ui/src/routes/__root.tsx (excerpt -- add after existing imports)
@@ -54,11 +54,11 @@ const MyCrmSidebar = () => (
54
54
  const customCrmManifest = { ...crmManifest, sidebar: MyCrmSidebar }
55
55
  ```
56
56
 
57
- Then swap `crmManifest` for `customCrmManifest` in the `FEATURE_MANIFESTS` array:
57
+ Then swap `crmManifest` for `customCrmManifest` in the `SYSTEM_MANIFESTS` array:
58
58
 
59
59
  ```tsx
60
- // In the FEATURE_MANIFESTS array (same file)
61
- const FEATURE_MANIFESTS: FeatureModule[] = [
60
+ // In the SYSTEM_MANIFESTS array (same file)
61
+ const SYSTEM_MANIFESTS: SystemModule[] = [
62
62
  leadGenManifest,
63
63
  customCrmManifest, // <-- replaces crmManifest
64
64
  deliveryManifest,
@@ -120,7 +120,7 @@ const customCrmManifest = { ...crmManifest, sidebar: MyCrmSidebar }
120
120
 
121
121
  ## Worked Example 3: Page Wrapping
122
122
 
123
- Import a feature's page component and wrap it with custom chrome in a route file. This keeps the feature's business logic intact while adding project-specific framing (banners, secondary nav, analytics context, etc.).
123
+ Import a system's page component and wrap it with custom chrome in a route file. This keeps the system's business logic intact while adding project-specific framing (banners, secondary nav, analytics context, etc.).
124
124
 
125
125
  The exported CRM page components are `DealsListPage` and `DealDetailPage`:
126
126
 
@@ -241,6 +241,6 @@ For broader lead-gen extension work across pages, hooks, list/member state, arti
241
241
  | `LEAD_GEN_ITEMS`, `LeadGenSidebar`, `LeadGenSidebarTop`, `LeadGenSidebarMiddle`, `leadGenManifest` | `@elevasis/ui/features/lead-gen` |
242
242
  | `DELIVERY_PROJECT_ITEMS`, `DELIVERY_WORK_ITEMS`, `DELIVERY_COMMUNICATION_ITEMS`, `ProjectsSidebar`, `ProjectsSidebarTop`, `ProjectsSidebarMiddle`, `deliveryManifest` | `@elevasis/ui/features/delivery` |
243
243
  | `SubshellNavList`, `SubshellNavItem`, `SubshellSidebarSection`, `NavItem` | `@elevasis/ui/layout` |
244
- | `FeatureModule` | `@elevasis/ui/provider` |
244
+ | `SystemModule` | `@elevasis/ui/provider` |
245
245
 
246
246
  Operations, monitoring, and settings have no customizable sidebar items. Operations sidebar is route-aware dispatch and not extended via the `items` pattern.
@@ -1,14 +1,14 @@
1
1
  <!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
2
2
  <!-- Regenerate: pnpm scaffold:sync -->
3
3
 
4
- # Feature Flags And Gating
4
+ # System Flags And Gating
5
5
 
6
- Feature visibility is keyed by Organization Model feature ID.
6
+ System visibility is keyed by Organization Model system ID.
7
7
 
8
8
  ## Where Visibility Comes From
9
9
 
10
- - `features[].enabled` in the organization model defines the baseline.
11
- - Membership feature config can override individual feature IDs.
10
+ - `systems.systems[].enabled` in the organization model defines the baseline.
11
+ - Membership system config can override individual system IDs.
12
12
  - `requiresAdmin` hides sidebar entries from non-admins.
13
13
  - `devOnly` hides sidebar entries outside development mode.
14
14
 
@@ -20,9 +20,9 @@ Navigation visibility is cosmetic. Always guard routes directly:
20
20
 
21
21
  ```tsx
22
22
  <ProtectedRoute>
23
- <FeatureGuard featureKey="sales.crm">
23
+ <SystemGuard systemKey="sales.crm">
24
24
  <Outlet />
25
- </FeatureGuard>
25
+ </SystemGuard>
26
26
  </ProtectedRoute>
27
27
  ```
28
28
 
@@ -34,7 +34,7 @@ For admin-only routes:
34
34
  </AdminGuard>
35
35
  ```
36
36
 
37
- ## Adding A Gated Feature
37
+ ## Adding A Gated System
38
38
 
39
39
  ```ts
40
40
  {
@@ -46,4 +46,4 @@ For admin-only routes:
46
46
  }
47
47
  ```
48
48
 
49
- Use the same ID in `FeatureGuard featureKey` and `FeatureModule.featureId`.
49
+ Use the same ID in `SystemGuard systemKey` and `SystemModule.systemId`.
@@ -1,6 +1,6 @@
1
1
  ---
2
- title: Feature Shell & Provider Runtime
3
- description: Current feature shell contract for flat Organization Model features, manifests, route matching, sidebars, and breadcrumbs.
2
+ title: System Shell & Provider Runtime
3
+ description: Current system shell contract for Organization Model systems, manifests, route matching, sidebars, and breadcrumbs.
4
4
  ---
5
5
  <!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
6
6
  <!-- Regenerate: pnpm scaffold:sync -->
@@ -8,38 +8,38 @@ description: Current feature shell contract for flat Organization Model features
8
8
 
9
9
  ## Overview
10
10
 
11
- The feature shell derives app navigation from `OrganizationModel.features`. Feature manifests provide implementation hooks such as icons and sidebars; they no longer own structural navigation.
11
+ The system shell derives app navigation from `OrganizationModel.systems`. System manifests provide implementation hooks such as icons and sidebars; they do not own structural navigation.
12
12
 
13
13
  ## Source Of Truth
14
14
 
15
- - `packages/core/src/organization-model/defaults.ts` -- default flat feature list
15
+ - `packages/core/src/organization-model/defaults.ts` -- default system list
16
16
  - `packages/core/src/organization-model/helpers.ts` -- `childrenOf`, `ancestorsOf`, `parentOf`, `topLevel`, `findByPath`
17
- - `packages/ui/src/features/registry/types.ts` -- `FeatureModule`
18
- - `packages/ui/src/provider/ElevasisFeaturesProvider.tsx` -- runtime resolver
17
+ - `packages/ui/src/features/registry/types.ts` -- `SystemModule`
18
+ - `packages/ui/src/provider/ElevasisSystemsProvider.tsx` -- runtime resolver
19
19
  - `packages/ui/src/components/navigation/useBreadcrumbs.ts` -- breadcrumb derivation
20
20
 
21
- ## FeatureModule
21
+ ## SystemModule
22
22
 
23
23
  ```ts
24
- export interface FeatureModule {
24
+ export interface SystemModule {
25
25
  key: string
26
- featureId: string
26
+ systemId: string
27
27
  capabilityIds?: string[]
28
- icon?: FeatureIconComponent
29
- sidebar?: FeatureSidebarComponent
30
- organizationGraph?: { featureId: string }
28
+ icon?: SystemIconComponent
29
+ sidebar?: SystemSidebarComponent
30
+ organizationGraph?: { systemId: string }
31
31
  }
32
32
  ```
33
33
 
34
- `featureId` must match an Organization Model feature ID. Structural fields such as route lists, nav labels, and nested links belong on `OrganizationModel.features`.
34
+ `systemId` must match an Organization Model system ID. Structural fields such as route lists, nav labels, and nested links belong on `OrganizationModel.systems`.
35
35
 
36
36
  ## Shell Model
37
37
 
38
- `useElevasisFeatures()` exposes `shellModel`:
38
+ `useElevasisSystems()` exposes `shellModel`:
39
39
 
40
40
  ```ts
41
41
  {
42
- features,
42
+ systems,
43
43
  findByPath,
44
44
  findById,
45
45
  childrenOf,
@@ -56,15 +56,15 @@ Sidebar rendering walks `topLevel()` and `childrenOf(id)`. Breadcrumbs resolve `
56
56
 
57
57
  ## Access
58
58
 
59
- Feature access is keyed by Organization Model feature ID. `requiresAdmin` and `devOnly` inherit from ancestor feature nodes and are applied when deriving visible sidebar entries.
59
+ System access is keyed by Organization Model system ID. `requiresAdmin` and `devOnly` inherit from ancestor system nodes and are applied when deriving visible sidebar entries.
60
60
 
61
61
  Routes still need guards:
62
62
 
63
63
  ```tsx
64
64
  <ProtectedRoute>
65
- <FeatureGuard featureKey="sales.crm">
65
+ <SystemGuard systemKey="sales.crm">
66
66
  <Outlet />
67
- </FeatureGuard>
67
+ </SystemGuard>
68
68
  </ProtectedRoute>
69
69
  ```
70
70
 
@@ -72,4 +72,4 @@ Use `AdminGuard` for pages that require platform-admin privileges.
72
72
 
73
73
  ## External Shells
74
74
 
75
- External templates pass `canonicalOrganizationModel` into `ElevasisFeaturesProvider` and derive sidebar links locally from `shellModel`. There is no separate nav config file to keep in sync.
75
+ Host apps pass `SYSTEM_MANIFESTS` or their own `SystemModule[]` into `ElevasisSystemsProvider` and derive sidebar links locally from `shellModel`. There is no separate nav config file to keep in sync.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: UI Recipes
3
- description: Current recipes for adding pages, feature-gated routes, feature components, theme tokens, Organization Model sidebar entries, and executable resources.
3
+ description: Current recipes for adding pages, system-gated routes, system components, theme tokens, Organization Model sidebar entries, and executable resources.
4
4
  ---
5
5
  <!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
6
6
  <!-- Regenerate: pnpm scaffold:sync -->
@@ -10,25 +10,25 @@ description: Current recipes for adding pages, feature-gated routes, feature com
10
10
 
11
11
  ## 1. Add a Top-Level Page
12
12
 
13
- Create `ui/src/routes/my-feature.index.tsx`:
13
+ Create `ui/src/routes/my-system.index.tsx`:
14
14
 
15
15
  ```tsx
16
16
  import { createFileRoute } from '@tanstack/react-router'
17
17
  import { ProtectedRoute } from '@/features/auth'
18
18
  import { AppShellContentContainer, AppTopbarAdjusterWrapper, PageContainer } from '@elevasis/ui/layout'
19
- import { MyFeaturePage } from '@/features/my-feature/components/MyFeaturePage'
19
+ import { MySystemPage } from '@/features/my-system/components/MySystemPage'
20
20
 
21
- export const Route = createFileRoute('/my-feature/')({
22
- component: MyFeatureRouteComponent
21
+ export const Route = createFileRoute('/my-system/')({
22
+ component: MySystemRouteComponent
23
23
  })
24
24
 
25
- function MyFeatureRouteComponent() {
25
+ function MySystemRouteComponent() {
26
26
  return (
27
27
  <ProtectedRoute>
28
28
  <AppTopbarAdjusterWrapper>
29
29
  <AppShellContentContainer>
30
30
  <PageContainer>
31
- <MyFeaturePage />
31
+ <MySystemPage />
32
32
  </PageContainer>
33
33
  </AppShellContentContainer>
34
34
  </AppTopbarAdjusterWrapper>
@@ -37,48 +37,50 @@ function MyFeatureRouteComponent() {
37
37
  }
38
38
  ```
39
39
 
40
- Add the sidebar entry as a feature node in `core/config/organization-model.ts`:
40
+ Add the sidebar entry as a system node in `core/config/organization-model.ts`:
41
41
 
42
42
  ```ts
43
- features: [
43
+ systems: {
44
+ systems: [
44
45
  {
45
- id: 'my-feature',
46
- label: 'My Feature',
46
+ id: 'my-system',
47
+ label: 'My System',
47
48
  enabled: true,
48
- path: '/my-feature',
49
+ path: '/my-system',
49
50
  icon: 'star',
50
51
  uiPosition: 'sidebar-primary'
51
52
  }
52
- ]
53
+ ]
54
+ }
53
55
  ```
54
56
 
55
- TanStack Router derives the path from the filename. The sidebar is derived from `OrganizationModel.features`.
57
+ TanStack Router derives the path from the filename. The sidebar is derived from `OrganizationModel.systems`.
56
58
 
57
- ## 2. Add a Feature-Gated Page
59
+ ## 2. Add a System-Gated Page
58
60
 
59
- Wrap the route with `FeatureGuard` and use the same feature ID as the org model node.
61
+ Wrap the route with `SystemGuard` and use the same system ID as the org model node.
60
62
 
61
63
  ```tsx
62
- import { FeatureGuard } from '@/features/auth/guards/FeatureGuard'
64
+ import { SystemGuard } from '@elevasis/ui/features/auth'
63
65
 
64
- function MyFeatureRouteComponent() {
66
+ function MySystemRouteComponent() {
65
67
  return (
66
68
  <ProtectedRoute>
67
- <FeatureGuard featureKey="my-feature">
69
+ <SystemGuard systemKey="my-system">
68
70
  <AppTopbarAdjusterWrapper>
69
71
  <AppShellContentContainer>
70
72
  <PageContainer>
71
- <MyFeaturePage />
73
+ <MySystemPage />
72
74
  </PageContainer>
73
75
  </AppShellContentContainer>
74
76
  </AppTopbarAdjusterWrapper>
75
- </FeatureGuard>
77
+ </SystemGuard>
76
78
  </ProtectedRoute>
77
79
  )
78
80
  }
79
81
  ```
80
82
 
81
- Set `enabled: false` in the feature node to hide it by default. Use `requiresAdmin: true` on the feature node plus `AdminGuard` in the route for admin-only pages.
83
+ Set `enabled: false` in the system node to hide it by default. Use `requiresAdmin: true` on the system node plus `AdminGuard` in the route for admin-only pages.
82
84
 
83
85
  ## 3. Add a Nested Page
84
86
 
@@ -101,7 +103,7 @@ function ReportingLayoutComponent() {
101
103
  }
102
104
  ```
103
105
 
104
- Add dotted feature nodes for the sidebar hierarchy:
106
+ Add dotted system nodes for the sidebar hierarchy:
105
107
 
106
108
  ```ts
107
109
  { id: 'reporting', label: 'Reporting', enabled: true, uiPosition: 'sidebar-primary' },
@@ -111,7 +113,7 @@ Add dotted feature nodes for the sidebar hierarchy:
111
113
 
112
114
  Containers omit `path`; leaves provide `path`.
113
115
 
114
- ## 4. Add a Feature-Scoped Component
116
+ ## 4. Add a System-Scoped Component
115
117
 
116
118
  Use `ui/src/features/<name>/` when logic is shared across routes or owns local state.
117
119
 
@@ -127,7 +129,7 @@ ui/src/features/reporting/
127
129
  types.ts
128
130
  ```
129
131
 
130
- Use `@/*` imports for app-local cross-feature imports and keep route layout concerns in route files.
132
+ Use `@/*` imports for app-local cross-system imports and keep route layout concerns in route files.
131
133
 
132
134
  ## 5. Change Theme Tokens
133
135
 
@@ -180,7 +182,6 @@ config: {
180
182
  type: resourceDescriptors.writeNote.kind,
181
183
  version: '1.0.0',
182
184
  status: 'prod',
183
- links: [{ nodeId: 'feature:sales.crm', kind: 'operates-on' }],
184
185
  category: 'production'
185
186
  }
186
187
  ```
@@ -210,7 +211,7 @@ export function DealPanel({ dealId }: { dealId: string }) {
210
211
 
211
212
  ## Cross-References
212
213
 
213
- - `./feature-flags-and-gating.md` -- feature and admin access model
214
+ - `./feature-flags-and-gating.md` -- system and admin access model
214
215
  - `./feature-shell.mdx` -- provider and sidebar derivation
215
- - `./customization.md` -- feature sidebar customization
216
+ - `./customization.md` -- system sidebar customization
216
217
  - `ui/src/config/README.md` -- theme, background, and loader config