@elevasis/sdk 1.6.0 → 1.8.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 (53) hide show
  1. package/dist/cli.cjs +527 -4564
  2. package/dist/index.d.ts +72 -16
  3. package/package.json +2 -2
  4. package/reference/claude-config/hooks/post-edit-validate.mjs +0 -11
  5. package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -0
  6. package/reference/claude-config/logs/pre-edit-vibe-gate.log +40 -0
  7. package/reference/claude-config/logs/scaffold-registry-reminder.log +17 -0
  8. package/reference/claude-config/rules/active-change-index.md +80 -0
  9. package/reference/claude-config/rules/agent-start-here.md +254 -0
  10. package/reference/claude-config/rules/deployment.md +0 -1
  11. package/reference/claude-config/rules/observability.md +2 -2
  12. package/reference/claude-config/rules/operations.md +64 -0
  13. package/reference/claude-config/rules/organization-model.md +44 -0
  14. package/reference/claude-config/rules/organization-os.md +56 -11
  15. package/reference/claude-config/rules/task-tracking.md +4 -4
  16. package/reference/claude-config/rules/ui.md +202 -0
  17. package/reference/claude-config/rules/vibe.md +202 -0
  18. package/reference/claude-config/settings.json +4 -0
  19. package/reference/claude-config/skills/configure/SKILL.md +98 -0
  20. package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -0
  21. package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -0
  22. package/reference/claude-config/skills/configure/operations/customers.md +150 -0
  23. package/reference/claude-config/skills/configure/operations/features.md +161 -0
  24. package/reference/claude-config/skills/configure/operations/goals.md +147 -0
  25. package/reference/claude-config/skills/configure/operations/identity.md +133 -0
  26. package/reference/claude-config/skills/configure/operations/labels.md +128 -0
  27. package/reference/claude-config/skills/configure/operations/offerings.md +159 -0
  28. package/reference/claude-config/skills/configure/operations/roles.md +153 -0
  29. package/reference/claude-config/skills/configure/operations/techStack.md +139 -0
  30. package/reference/claude-config/skills/deploy/SKILL.md +3 -13
  31. package/reference/claude-config/skills/dsp/SKILL.md +2 -2
  32. package/reference/claude-config/skills/elevasis/SKILL.md +0 -4
  33. package/reference/claude-config/skills/explore/SKILL.md +5 -5
  34. package/reference/claude-config/skills/project/SKILL.md +1 -1
  35. package/reference/claude-config/skills/save/SKILL.md +5 -19
  36. package/reference/claude-config/skills/setup/SKILL.md +105 -40
  37. package/reference/claude-config/skills/status/SKILL.md +2 -3
  38. package/reference/claude-config/skills/submit-request/SKILL.md +1 -1
  39. package/reference/deployment/command-center.mdx +0 -17
  40. package/reference/framework/project-structure.mdx +1 -5
  41. package/reference/packages/core/src/organization-model/README.md +16 -12
  42. package/reference/packages/ui/src/hooks/README.md +1 -2
  43. package/reference/scaffold/core/organization-graph.mdx +1 -0
  44. package/reference/scaffold/core/organization-model.mdx +84 -19
  45. package/reference/scaffold/operations/propagation-pipeline.md +10 -11
  46. package/reference/scaffold/operations/scaffold-maintenance.md +1 -4
  47. package/reference/scaffold/recipes/add-a-feature.md +1 -1
  48. package/reference/scaffold/recipes/add-a-resource.md +3 -12
  49. package/reference/scaffold/recipes/customize-organization-model.md +5 -5
  50. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +3 -3
  51. package/reference/scaffold/reference/contracts.md +115 -7
  52. package/reference/scaffold/reference/glossary.md +25 -4
  53. package/reference/claude-config/rules/docs.md +0 -26
@@ -14,7 +14,7 @@ The public entry point exposes:
14
14
  - `resolveOrganizationModel`
15
15
  - `PROJECTS_FEATURE_ID`
16
16
  - `PROJECTS_INDEX_SURFACE_ID`
17
- - `DELIVERY_PROJECTS_VIEW_CAPABILITY_ID`
17
+ - `PROJECTS_VIEW_CAPABILITY_ID`
18
18
  - `OrganizationModel` and the supporting domain types
19
19
 
20
20
  Import it from the published subpath:
@@ -22,7 +22,7 @@ Import it from the published subpath:
22
22
  ```ts
23
23
  import {
24
24
  DEFAULT_ORGANIZATION_MODEL,
25
- DELIVERY_PROJECTS_VIEW_CAPABILITY_ID,
25
+ PROJECTS_VIEW_CAPABILITY_ID,
26
26
  defineOrganizationModel,
27
27
  PROJECTS_FEATURE_ID,
28
28
  PROJECTS_INDEX_SURFACE_ID,
@@ -41,30 +41,34 @@ Top-level fields:
41
41
  - `branding` - organization branding defaults and overrides.
42
42
  - `features` - unified feature entries that combine enablement, labels, and semantic references.
43
43
  - `navigation` - navigation model for the product shell.
44
- - `crm` - CRM-specific contract data.
45
- - `leadGen` - lead generation contract data.
46
- - `delivery` - delivery and project contract data.
47
- - `resourceMappings` - cross-surface resource mappings.
44
+ - `sales` - sales pipeline and relationship management.
45
+ - `prospecting` - lists, companies, and contacts.
46
+ - `projects` - projects, milestones, and tasks.
47
+ - `identity`, `customers`, `offerings`, `roles`, `goals` - reality domains (2026-04 expansion).
48
+ - `statuses` - unified status registry across delivery / hitl / execution / request / schedule.
49
+ - `operations` - catalog of stateful runtime entities (HITL queue, sessions, executions, notifications, schedules).
50
+ - `resourceMappings` - cross-surface resource mappings (includes techStack subsection).
48
51
 
49
52
  ## Default Feature Set
50
53
 
51
- The default model includes seven feature IDs:
54
+ The default model includes eight feature IDs:
52
55
 
53
- - `crm` - deal pipeline and relationship management.
54
- - `lead-gen` - lists, companies, and contacts.
56
+ - `sales` - deal pipeline and relationship management.
57
+ - `prospecting` - lists, companies, and contacts.
55
58
  - `projects` - projects, milestones, and tasks.
56
59
  - `operations` - organization graph and command-view surfaces.
57
60
  - `monitoring` - monitoring surfaces.
58
61
  - `settings` - organization settings.
59
62
  - `seo` - SEO surfaces (disabled by default).
63
+ - `configure` - `/configure` skill entry point (external projects).
60
64
 
61
65
  ## Project Bridge Constants
62
66
 
63
- The organization-model surface now exports a narrow set of canonical IDs for the shared Projects bridge:
67
+ The organization-model surface exports a narrow set of canonical IDs for the shared Projects bridge:
64
68
 
65
69
  - `PROJECTS_FEATURE_ID` -> `projects`
66
70
  - `PROJECTS_INDEX_SURFACE_ID` -> `projects.index`
67
- - `DELIVERY_PROJECTS_VIEW_CAPABILITY_ID` -> `delivery.projects.view`
71
+ - `PROJECTS_VIEW_CAPABILITY_ID` -> `delivery.projects.view`
68
72
 
69
73
  Use these when wiring shared UI manifests, template adapters, or other consumers that need to agree on the same Projects contract without repeating raw literals.
70
74
 
@@ -89,5 +93,5 @@ Use these when wiring shared UI manifests, template adapters, or other consumers
89
93
 
90
94
  - Use `resolveOrganizationModel()` when you need a runtime-safe model for rendering or policy checks.
91
95
  - Use `defineOrganizationModel()` when authoring a static partial model in source.
92
- - Treat feature IDs such as `crm`, `lead-gen`, and `projects` as the canonical shell-level contract in new organization-model authoring.
96
+ - Treat feature IDs such as `sales`, `prospecting`, and `projects` as the canonical shell-level contract in new organization-model authoring.
93
97
  - Keep feature IDs, surface IDs, and capability IDs stable because downstream UI and policy code depend on them.
@@ -8,7 +8,7 @@ The hooks barrel is the published headless hook surface for the UI package.
8
8
  - Scheduling hooks
9
9
  - Monitoring, observability, and notification hooks
10
10
  - Session and SSE hooks
11
- - Operations hooks, including command-view and knowledge-base helpers
11
+ - Operations hooks, including command-view helpers
12
12
  - Feature access, table state, and service helpers
13
13
  - Acquisition and delivery hooks
14
14
 
@@ -21,4 +21,3 @@ The hooks barrel is the published headless hook surface for the UI package.
21
21
  ## Notes
22
22
 
23
23
  - This barrel is intentionally headless. It should not pull in the visual component layer.
24
-
@@ -62,6 +62,7 @@ This means runtime topology is represented as bridged `resource` nodes plus rela
62
62
  - Implementation-resource bridging prefers `organizationModel.resourceMappings`.
63
63
  - Semantic grouping now comes from the unified `organizationModel.features` array. The builder no longer emits separate `domain` nodes.
64
64
  - Command View resource `domains` metadata is currently bridged onto `feature` references, not onto a distinct domain-node layer.
65
+ - The 2026-04-20 reality-domain expansion (identity, customers, offerings, roles, goals, statuses, operations, techStack) does not introduce new graph node kinds. Those domains are model-layer data; they are not independently represented as graph nodes. They can be surfaced as metadata on the organization root node when a consumer needs to expose them through a graph lens.
65
66
  - Graph defaults remain valid when produced by `resolveOrganizationModel()`.
66
67
  - If the graph needs a concept the model cannot express, extend the model first.
67
68
 
@@ -5,7 +5,7 @@ description: Organization OS Model layer documentation for the semantic organiza
5
5
 
6
6
  ## Overview
7
7
 
8
- Within Organization OS, the organization model is the **Model** layer and part of the cross-cutting **Public API** layer. It is the semantic contract that maps an organization's product shape to domains, features, navigation surfaces and groups, domain-specific semantics (CRM pipeline, lead-gen lifecycle, delivery status), and resource mappings. It is schema-first, versioned, and validated.
8
+ Within Organization OS, the organization model is the **Model** layer and part of the cross-cutting **Public API** layer. It is the semantic contract that maps an organization's full organizational reality to domains, features, navigation surfaces and groups, domain-specific semantics (sales pipeline, prospecting lifecycle, projects status), and resource mappings. It is schema-first, versioned, and validated.
9
9
 
10
10
  The model is authored in `@repo/core` and published as a curated external package `@elevasis/core`. It is consumed by:
11
11
 
@@ -21,7 +21,7 @@ The model does **not** replace the shared feature-provider system. It enriches a
21
21
  - `packages/core/src/organization-model/types.ts` -- exported TypeScript types
22
22
  - `packages/core/src/organization-model/defaults.ts` -- `DEFAULT_ORGANIZATION_MODEL`
23
23
  - `packages/core/src/organization-model/resolve.ts` -- `defineOrganizationModel`, `resolveOrganizationModel`
24
- - `packages/core/src/organization-model/domains/*.ts` -- feature schema, navigation surfaces, CRM/lead-gen/delivery semantics
24
+ - `packages/core/src/organization-model/domains/*.ts` -- feature schema, navigation surfaces, sales/prospecting/projects semantics, and the 8 reality domains (identity, customers, offerings, roles, goals, statuses, operations, shared/techStack)
25
25
  - `packages/core/src/published.ts` -- curated root barrel for the published package
26
26
  - `packages/core/src/organization-model/published.ts` -- curated organization-model barrel
27
27
  - `packages/core/src/__tests__/template-foundations-compatibility.test.ts` -- adapter-baseline guard
@@ -32,12 +32,31 @@ Top-level fields on `OrganizationModel`:
32
32
 
33
33
  - `version`
34
34
  - `features` -- unified feature array (`OrganizationModelFeature[]`); each entry combines access gating, semantic grouping, and display metadata
35
- - `branding`
35
+ - `branding` -- display identity (org name, product name, logos)
36
36
  - `navigation` -- surfaces, groups, `defaultSurfaceId`
37
- - `crm` -- pipeline stages and stage semantics
38
- - `leadGen` -- company/contact lifecycle stages
39
- - `delivery` -- project/milestone/task statuses
40
- - `resourceMappings`
37
+ - `sales` -- pipeline stages and stage semantics (formerly `crm`)
38
+ - `prospecting` -- company/contact lifecycle stages (formerly `leadGen`)
39
+ - `projects` -- project/milestone/task statuses (formerly `delivery`)
40
+ - `identity` -- legal identity, mission/vision, industry, geography, and temporal anchors
41
+ - `customers` -- customer segments with jobs-to-be-done, firmographics, and value propositions
42
+ - `offerings` -- products and services with pricing model and segment/feature references
43
+ - `roles` -- role chart with responsibilities, reporting lines, and role holders
44
+ - `goals` -- organizational goals with period and measurable outcomes
45
+ - `statuses` -- flat registry of all status entries across delivery, queue, execution, schedule, and request semantic classes
46
+ - `operations` -- catalog of stateful runtime entities (HITL queue, executions, sessions, notifications, schedules)
47
+ - `resourceMappings` -- deployable resource links, each optionally extended with `techStack` metadata
48
+
49
+ ### Domain Rename Wave
50
+
51
+ Three legacy domain names were renamed in the 2026-04-20 expansion to align developer-facing code with user-visible labels:
52
+
53
+ | Old name | New name | Notes |
54
+ | ---------- | ------------- | ------------------------------------------------------------------------------------ |
55
+ | `crm` | `sales` | Domain files, feature IDs, surface IDs, imports, and sidebar labels all updated |
56
+ | `leadGen` | `prospecting` | Same scope as above |
57
+ | `delivery` | `projects` | Aligns with the "Projects" sidebar label; `projects` feature ID was already in place |
58
+
59
+ Any reference to `crm`, `leadGen`, or `delivery` in domain files, imports, or surface IDs should be treated as a historical artifact unless explicitly annotated otherwise.
41
60
 
42
61
  ### Branding Shape
43
62
 
@@ -56,22 +75,25 @@ All `id` fields, `parentId`, `defaultSurfaceId`, and reference ID arrays use `Mo
56
75
  - Regex: `/^[a-z0-9]+(?:[-._][a-z0-9]+)*$/`
57
76
  - Max length: 100 chars
58
77
  - Allowed separators: `-`, `_`, `.`
59
- - Examples: `crm.pipeline`, `lead-gen.lists`, `operations.organization-graph`
78
+ - Examples: `sales.pipeline`, `prospecting.lists`, `operations.organization-graph`
60
79
 
61
80
  This applies to domain IDs, surface IDs, navigation group IDs, and resource mapping IDs.
62
81
 
63
82
  ### Default Features
64
83
 
65
- Seven features ship by default in `DEFAULT_ORGANIZATION_MODEL.features`:
84
+ Eight features ship by default in `DEFAULT_ORGANIZATION_MODEL.features`:
66
85
 
67
- - `crm` -- enabled; CRM pipeline and deal management
68
- - `lead-gen` -- enabled; prospecting, qualification, and outreach
69
- - `projects` -- enabled; projects, milestones, and client work execution (formerly `delivery`)
86
+ - `crm` -- enabled; sales pipeline and deal management (feature ID unchanged; domain renamed to `sales`)
87
+ - `lead-gen` -- enabled; prospecting, qualification, and outreach (feature ID unchanged; domain renamed to `prospecting`)
88
+ - `projects` -- enabled; projects, milestones, and client work execution
70
89
  - `operations` -- enabled; organizational topology and orchestration visibility
71
90
  - `monitoring` -- enabled; execution monitoring
72
91
  - `settings` -- enabled; organization settings
92
+ - `submitted-requests` -- enabled; submitted-request lifecycle surface
73
93
  - `seo` -- disabled by default; SEO surface
74
94
 
95
+ Note: the feature IDs (`crm`, `lead-gen`) are consumer-facing identifiers that have not changed. The underlying domain key on `OrganizationModel` was renamed (`crm` → `sales`, `leadGen` → `prospecting`). Adapters that already use the feature ID constants (`CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`) require no change.
96
+
75
97
  Each feature entry (`OrganizationModelFeature`) combines what were previously three separate concepts: an access/gating key (the former `OrganizationModelFeatureKey`), a semantic domain (the former `SemanticDomainSchema` entry), and display metadata. The `features` field is now `z.array(FeatureSchema)` -- there is no separate `domains` array and no separate `enabled`/`labels` map.
76
98
 
77
99
  `FeatureModule.featureId` on the UI side maps directly to one of these IDs. No alias layer is needed. See [Feature Shell](../ui/feature-shell.mdx) for how the provider resolves feature access from this array.
@@ -88,18 +110,30 @@ Each feature entry (`OrganizationModelFeature`) combines what were previously th
88
110
  - `entityIds` -- entities this resource operates on
89
111
  - `surfaceIds` -- surfaces this resource is exposed in
90
112
  - `capabilityIds` -- capabilities this resource fulfills
113
+ - `techStack` (optional) -- external-SaaS integration metadata; see TechStack Extension below
91
114
 
92
115
  All four ID arrays are bidirectionally validated against their counterparts (see Referential Integrity).
93
116
 
117
+ ### TechStack Extension
118
+
119
+ `techStack` is an optional nested object on `ResourceMappingSchema` defined in `domains/shared.ts`. It captures external-SaaS integration metadata without introducing a tenth top-level domain. Fields:
120
+
121
+ - `platform` -- name of the external platform (e.g. "HubSpot", "Stripe", "Notion")
122
+ - `purpose` -- free-form description of what this integration does
123
+ - `credentialStatus` -- one of `'configured' | 'pending' | 'expired' | 'missing'`
124
+ - `isSystemOfRecord` -- boolean; whether this integration is the primary source of truth for its domain (defaults to `false`)
125
+
126
+ Backward-compatible: existing resource mappings without `techStack` parse cleanly. The extension flows through `ResourceMappingSchema` automatically with no changes to `schema.ts` composition.
127
+
94
128
  ### Default Navigation
95
129
 
96
- Surfaces such as `crm.pipeline`, `lead-gen.lists`, `projects.index`, `operations.organization-graph`, and `operations.command-view`. Groups include `primary-workspace` and `primary-operations`. The model can shape shell meaning even when route files stay app-local.
130
+ Surfaces such as `sales.pipeline`, `prospecting.lists`, `projects.index`, `operations.organization-graph`, and `operations.command-view`. Groups include `primary-workspace` and `primary-operations`. The model can shape shell meaning even when route files stay app-local.
97
131
 
98
132
  ### SurfaceDefinition Shape
99
133
 
100
134
  `OrganizationModelSurface` (inferred from `SurfaceDefinitionSchema`) defines a navigable view:
101
135
 
102
- - `id` -- ModelId (e.g. `crm.pipeline`)
136
+ - `id` -- ModelId (e.g. `sales.pipeline`)
103
137
  - `label` -- display name
104
138
  - `path` -- route path, must start with `/`, max 300 chars
105
139
  - `surfaceType` -- `'page' | 'dashboard' | 'graph' | 'detail' | 'list' | 'settings'`
@@ -124,14 +158,36 @@ The default groups (`primary-workspace`, `primary-operations`) both use `placeme
124
158
 
125
159
  ### Feature-Specific Semantics
126
160
 
127
- The top-level `crm`, `leadGen`, and `delivery` fields on `OrganizationModel` remain as named fields (not moved into per-feature config) and carry domain-specific semantic shapes:
161
+ Three renamed top-level domain fields carry feature-specific semantic shapes (pipeline stages, lifecycle stages, project statuses). These are named fields on `OrganizationModel`, not embedded in per-feature config:
128
162
 
129
- - `crm` -- pipeline stages and stage semantics
130
- - `leadGen` -- company and contact lifecycle stages
131
- - `delivery` -- project, milestone, and task statuses (used by the `projects` feature)
163
+ - `sales` -- pipeline stages and stage semantics (formerly `crm`)
164
+ - `prospecting` -- company and contact lifecycle stages (formerly `leadGen`)
165
+ - `projects` -- project, milestone, and task statuses (formerly `delivery`)
132
166
 
133
167
  This is why the organization model is semantic, not just nav config -- it owns product meaning for the business objects the shell surfaces expose.
134
168
 
169
+ ### Reality Domains (New in 2026-04-20 Expansion)
170
+
171
+ Five new domains capture organizational reality that was absent from the original model. They sit alongside the existing platform-configuration domains and follow the same `domains/*.ts` pattern:
172
+
173
+ **`identity`** -- legal identity distinct from `branding` (which is display identity). Fields: `mission`, `vision`, `legalName`, `entityType`, `jurisdiction`, `industryCategory`, `geographicFocus`, `timeZone`, `businessHours`. All fields default to empty strings; `timeZone` defaults to `'UTC'`; `businessHours` defaults to `{}`.
174
+
175
+ **`customers`** -- customer segments. Each `CustomerSegment` entry has: `id`, `name`, `description`, `jobsToBeDone`, `pains`, `gains`, `valueProp` (all plain-language strings), and `firmographics` (optional object with `companySize`, `industry`, `revenue`, `geography`). Domain defaults to `{ segments: [] }`.
176
+
177
+ **`offerings`** -- products and services. Each `Product` entry has: `id`, `name`, `description`, `pricingModel` (enum: `'one-time' | 'subscription' | 'usage-based' | 'custom'`), `price` (optional number), `currency` (optional string), `targetSegmentIds` (cross-ref validated against `customers.segments[].id`), `deliveryFeatureId` (optional cross-ref validated against `features[].id`). Domain defaults to `{ products: [] }`.
178
+
179
+ **`roles`** -- role chart. Each `Role` entry has: `id`, `title`, `responsibilities` (string array, default `[]`), `reportsToId` (optional, cross-ref validated within the same collection), `heldBy` (optional name or email string). All field names are plain-language; no EOS jargon (`seats`, `accountabilities`) survives. Domain defaults to `{ roles: [] }`.
180
+
181
+ **`goals`** -- organizational goals. Each `Objective` entry has: `id`, `description`, `periodStart` (ISO 8601 date), `periodEnd` (ISO 8601 date, must be strictly after `periodStart`), `keyResults` (array of `{ id, description, targetValue?, currentValue?, unit? }`). User-facing text uses "goals" and "measurable outcomes" -- never "OKR" or "key results". Domain defaults to `{ objectives: [] }`.
182
+
183
+ ### Statuses and Operations Domains (Vibe Layer)
184
+
185
+ Two domains support the ambient vibe layer's plain-language rendering:
186
+
187
+ **`statuses`** -- flat registry of `StatusEntry` objects. Each entry: `id`, `label`, `semanticClass` (one of `'delivery.task' | 'delivery.project' | 'delivery.milestone' | 'queue' | 'execution' | 'schedule' | 'schedule.run' | 'request'`), optional `category`. Labels are vibe-readable: the ambient classifier narrates state using `label` from the model, never hardcoded strings. `QueueTaskStatus` in the queue domain routes through this registry. Defaults to a seed set covering all semantic classes.
188
+
189
+ **`operations`** -- catalog of stateful runtime entities. Each `OperationEntry`: `id`, `label`, `semanticClass` (one of `'queue' | 'executions' | 'sessions' | 'notifications' | 'schedules'`), optional `featureId`, optional `supportedStatusSemanticClass` (ties an operation entry back to which status semantic classes apply). Default entries: `operations.queue` (HITL queue), `operations.executions`, `operations.sessions`, `operations.notifications`, `operations.schedules`.
190
+
135
191
  ## Authoring & Resolution
136
192
 
137
193
  - `defineOrganizationModel()` -- typed authoring helper; returns the input unchanged but constrains the type.
@@ -179,6 +235,13 @@ Merge semantics:
179
235
 
180
236
  This bidirectional enforcement is what keeps the organization model semantically consistent rather than loosely structured config.
181
237
 
238
+ **Reality domain cross-refs** (validated in the same `superRefine` pass):
239
+
240
+ - each `offerings.products[].targetSegmentIds[]` must resolve to a `customers.segments[].id`
241
+ - each `offerings.products[].deliveryFeatureId` (when present) must resolve to a `features[].id`
242
+ - each `roles.roles[].reportsToId` (when present) must resolve to another `roles.roles[].id` in the same collection
243
+ - each `goals.objectives[].periodEnd` must be strictly after `periodStart` (ISO 8601 string comparison)
244
+
182
245
  ## Provider Integration
183
246
 
184
247
  `ElevasisFeaturesProvider` uses the organization model in three ways:
@@ -236,7 +299,9 @@ Exports the foundations module provides to consumers:
236
299
  - `FoundationFeatureKey`, `FoundationSurfaceIcon`, `FoundationNavigationSurface`, `FoundationOrganizationModel`
237
300
  - `homeLabel`, `quickAccessSurfaceIds`, `getOrganizationSurface(surfaceId)`
238
301
 
239
- Downstream template shells pass `canonicalOrganizationModel` into `ElevasisFeaturesProvider`, preserving host-local dashboard/nav customizations alongside the shared runtime. Feature IDs are now direct matches -- `crm`, `lead-gen`, `projects` in the org model correspond directly to the same IDs on `FeatureModule.featureId`. No alias layer is needed.
302
+ Downstream template shells pass `canonicalOrganizationModel` into `ElevasisFeaturesProvider`, preserving host-local dashboard/nav customizations alongside the shared runtime. Feature IDs are direct matches -- `crm`, `lead-gen`, `projects` in the org model correspond directly to the same IDs on `FeatureModule.featureId`. No alias layer is needed. The domain rename wave (crm→sales, leadGen→prospecting, delivery→projects) affects the schema field names, not the feature ID constants; adapters using `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, etc. require no changes.
303
+
304
+ Adapters that override the new reality domains (`identity`, `customers`, `offerings`, `roles`, `goals`) or add `techStack` metadata to resource mappings should use `/configure` as the structured entry point for those edits in external projects. `/configure` runs a layered QA flow, proposes changes, and gates the write through `resolveOrganizationModel()` + `OrganizationModelSchema.parse()` before committing.
240
305
 
241
306
  Derivative projects (`external/nirvana-marketing`, `external/ZentaraHQ`) follow the same adapter + provider-wiring baseline with their own project-local customizations.
242
307
 
@@ -30,11 +30,11 @@ Layer 3: Sync Verification (pnpm sync:verify)
30
30
 
31
31
  `pnpm scaffold:sync` is the meta-script that regenerates all derived documentation and validates the output. It chains three sub-scripts:
32
32
 
33
- | Script | Input | Output |
34
- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
35
- | `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` |
36
- | `generate-scaffold-feature-registry.js` | `packages/ui/src/features/*/manifest.ts`, `packages/core/src/organization-model/domains/features.ts` | `packages/ui/src/scaffold/_generated/feature-registry.md` |
37
- | `generate-reference-artifacts.js` | SDK manifest, navigation sources | `packages/sdk/reference/_reference-manifest.json`, `_navigation.md`, `external/_template/docs/platform-navigation-map.md` |
33
+ | Script | Input | Output |
34
+ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
35
+ | `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` |
36
+ | `generate-scaffold-feature-registry.js` | `packages/ui/src/features/*/manifest.ts`, `packages/core/src/organization-model/domains/features.ts` | `packages/ui/src/scaffold/_generated/feature-registry.md` |
37
+ | `generate-reference-artifacts.js` | SDK manifest, navigation sources | `packages/sdk/reference/_reference-manifest.json`, `_navigation.md` |
38
38
 
39
39
  After generation, `validate-reference-artifacts.js` checks that the outputs are consistent. Exit 1 if drifted.
40
40
 
@@ -55,11 +55,11 @@ Drift is healed at the moment it would otherwise leak downstream. This is cheape
55
55
 
56
56
  `/external sync` propagates the `external/_template` to downstream projects. It uses a three-tier model:
57
57
 
58
- | Tier | Policy | Examples |
59
- | ------------------------------ | ----------------------------------------- | ------------------------------------------------------------------- |
58
+ | Tier | Policy | Examples |
59
+ | ------------------------------ | ----------------------------------------- | --------------------------------------------------------------------- |
60
60
  | **Tier 1 (Infrastructure)** | Always replaced from template | Configs, shared runtime surfaces, `lib/`, `test-utils/`, entry points |
61
- | **Tier 2 (Standard Features)** | Synced unless project has customized them | Standard UI features, common patterns |
62
- | **Tier 3 (Project-Specific)** | Never touched | `nav-items.ts`, `operations/src/`, `docs/`, `CLAUDE.md` |
61
+ | **Tier 2 (Standard Features)** | Synced unless project has customized them | Standard UI features, common patterns |
62
+ | **Tier 3 (Project-Specific)** | Never touched | `nav-items.ts`, `operations/src/`, `docs/`, `CLAUDE.md` |
63
63
 
64
64
  The sync skill doc (`.claude/skills/external/SKILL.md`) defines the full tier model and phase sequence.
65
65
 
@@ -78,8 +78,7 @@ The sync skill doc (`.claude/skills/external/SKILL.md`) defines the full tier mo
78
78
  | `org-os` | Organization model exists, exports canonical symbols, imports from `@elevasis/core/organization-model`, calls `defineOrganizationModel` + `resolveOrganizationModel`, app-config references org model, `__root.tsx` uses `ElevasisFeaturesProvider` + `canonicalOrganizationModel`, `main.tsx` uses `ElevasisUIProvider`, all 3 CSS subpath imports present |
79
79
  | `placeholders` | No unresolved `__PROJECT_SLUG__`, `__PROJECT_NAME__`, `__PROJECT_DESCRIPTION__` in key config files |
80
80
  | `scripts` | `ui` and `operations` `package.json` have required npm scripts |
81
- | `generated-docs` | `docs/index.md` and `docs/resources.md` are current with `pnpm exec elevasis-sdk generate-docs` and `pnpm exec elevasis-sdk generate-resources`; `pnpm exec elevasis-sdk validate-docs` passes |
82
- | `lib` | `ui/src/lib/`, `lib/`, `test-utils/` exist with minimum file counts |
81
+ | `lib` | `ui/src/lib/`, `lib/`, `test-utils/` exist with minimum file counts |
83
82
  | `tier3` | `nav-items.ts` has project-specific customization (not overwritten by template) |
84
83
  | `conflicts` | No merge conflict markers in source files |
85
84
  | `git` | Working tree is clean |
@@ -71,7 +71,6 @@ Generated by `scripts/monorepo/generate-reference-artifacts.js`:
71
71
 
72
72
  - `packages/sdk/reference/_reference-manifest.json` -- machine-readable catalog of all reference entries
73
73
  - `packages/sdk/reference/_navigation.md` -- navigation table
74
- - `external/_template/docs/platform-navigation-map.md` -- cross-package reference map for external projects
75
74
 
76
75
  ### Running Generators
77
76
 
@@ -120,6 +119,4 @@ The output lands in `packages/sdk/reference/` which is included in the npm packa
120
119
 
121
120
  ## Freshness Validation
122
121
 
123
- External projects validate generated docs with `pnpm check:autogenerated-docs`, which now calls `pnpm exec elevasis-sdk validate-docs`. The legacy `scripts/validate-autogenerated-docs.mjs` file may still exist as a temporary compatibility shim in the template, but the SDK CLI is the canonical path.
124
-
125
- At the monorepo level, `pnpm scaffold:sync` followed by `pnpm sync:verify` confirms that all artifacts are current and all downstream projects are consistent.
122
+ At the monorepo level, `pnpm scaffold:sync` followed by `pnpm sync:verify` confirms that all artifacts are current and all downstream projects are consistent. The SDK no longer ships doc validation because external projects no longer carry a `docs/` tree.
@@ -34,7 +34,7 @@ Add a new feature object to the `features[]` array passed to `defineOrganization
34
34
  import { defineOrganizationModel } from '@elevasis/core/organization-model'
35
35
  ```
36
36
 
37
- Use typed constants for the 7 platform features (`CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`); use string literals for project-specific features you invent.
37
+ Use typed constants for the 7 platform features (`SALES_FEATURE_ID`, `PROSPECTING_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`); use string literals for project-specific features you invent.
38
38
 
39
39
  ```ts
40
40
  const foundationOrganizationModelOverride = defineOrganizationModel({
@@ -109,7 +109,7 @@ const org: DeploymentSpec = {
109
109
  }
110
110
  ```
111
111
 
112
- Full relationship and checkpoint types are defined in `@elevasis/sdk` (`DeploymentSpec`). The generated `docs/resources.md` topology map will reflect these in the Topology Relationships, Triggers, and Human Checkpoints sections after regeneration.
112
+ Full relationship and checkpoint types are defined in `@elevasis/sdk` (`DeploymentSpec`). Resources are discovered live via `pnpm elevasis-sdk project:list` or by globbing `operations/resources/**` directly.
113
113
 
114
114
  ---
115
115
 
@@ -133,18 +133,9 @@ See `OrganizationModelResourceMapping` in [contracts.md](../reference/contracts.
133
133
 
134
134
  ---
135
135
 
136
- ## 5. Regenerate the topology map
136
+ ## 5. Verify resource inventory
137
137
 
138
- ```bash
139
- pnpm exec elevasis-sdk generate-resources
140
- ```
141
-
142
- Open `docs/resources.md` and confirm:
143
-
144
- - Section 1 (Workflows table) lists the new resource with correct `resourceId`, `version`, and `status`.
145
- - Section 2 (Topology Relationships) shows any declared `relationships` edges.
146
- - Sections 3-6 (Triggers, Integrations, Human Checkpoints, External Resources) show any relevant declarations.
147
- - Section 7 (Schema Signatures) includes the new resource's input/output field list.
138
+ Resources are discovered live via `pnpm elevasis-sdk project:list` or by globbing `operations/resources/**` directly. Confirm the new resource appears with the correct `resourceId`, `version`, and `status`.
148
139
 
149
140
  ---
150
141
 
@@ -163,12 +163,12 @@ for the full resource authoring workflow.
163
163
 
164
164
  ### Domain-specific config
165
165
 
166
- The `crm`, `leadGen`, and `delivery` top-level keys configure pipeline stages, entity ID bindings,
166
+ The `sales`, `prospecting`, and `projects` top-level keys configure pipeline stages, entity ID bindings,
167
167
  and status vocabularies for those domains. These are consumed by the platform adapters and UI
168
168
  components -- they are not just labels.
169
169
 
170
170
  ```ts
171
- crm: {
171
+ sales: {
172
172
  entityId: 'crm.deal',
173
173
  defaultPipelineId: 'default',
174
174
  pipelines: [
@@ -184,7 +184,7 @@ crm: {
184
184
  }
185
185
  ]
186
186
  },
187
- leadGen: {
187
+ prospecting: {
188
188
  listEntityId: 'leadgen.list',
189
189
  companyEntityId: 'leadgen.company',
190
190
  contactEntityId: 'leadgen.contact',
@@ -197,7 +197,7 @@ leadGen: {
197
197
  { id: 'uploaded', label: 'Uploaded', order: 4 }
198
198
  ]
199
199
  },
200
- delivery: {
200
+ projects: {
201
201
  projectEntityId: 'delivery.project',
202
202
  milestoneEntityId: 'delivery.milestone',
203
203
  taskEntityId: 'delivery.task',
@@ -207,7 +207,7 @@ delivery: {
207
207
  }
208
208
  ```
209
209
 
210
- `semanticClass` on CRM stages is significant: the platform uses `closed_won`, `closed_lost`,
210
+ `semanticClass` on sales pipeline stages is significant: the platform uses `closed_won`, `closed_lost`,
211
211
  `nurturing`, `open`, and `active` for funnel analytics and workflow triggers. Do not rename these
212
212
  to arbitrary strings.
213
213
 
@@ -30,7 +30,7 @@ Do not substitute one for the other. `FeatureGuard` reads feature flags; `AdminG
30
30
  Ensure a feature object with the matching `id` exists in the org model. File: `foundations/config/organization-model.ts`.
31
31
 
32
32
  ```ts
33
- import { defineOrganizationModel, OPERATIONS_FEATURE_ID, CRM_FEATURE_ID } from '@elevasis/core/organization-model'
33
+ import { defineOrganizationModel, OPERATIONS_FEATURE_ID, SALES_FEATURE_ID } from '@elevasis/core/organization-model'
34
34
 
35
35
  // In the features[] array inside defineOrganizationModel:
36
36
  features: [
@@ -39,7 +39,7 @@ features: [
39
39
  ]
40
40
  ```
41
41
 
42
- Use typed constants for the 7 platform features (`CRM_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, etc.); use string literals for project-specific features you invent. In this example, `'analytics'` is a project-local feature and stays as a string literal.
42
+ Use typed constants for the 7 platform features (`SALES_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, etc.); use string literals for project-specific features you invent. In this example, `'analytics'` is a project-local feature and stays as a string literal.
43
43
 
44
44
  See [add-a-feature.md](add-a-feature.md) step 2 for the full feature object shape.
45
45
 
@@ -119,7 +119,7 @@ navEntry: {
119
119
  { label: 'Admin', icon: IconShield, link: '/admin', requiresAdmin: true }
120
120
  ```
121
121
 
122
- `featureKey` on a nav entry is a display hint only -- it does not protect the route. Always pair with a route-level `FeatureGuard`. See [glossary.md](../reference/glossary.md) under **accessFeatureKey vs featureKey** for the distinction. When the `featureKey` is one of the 7 platform features, prefer the typed constant (e.g., `featureKey: CRM_FEATURE_ID`) over a string literal to catch renames at compile time.
122
+ `featureKey` on a nav entry is a display hint only -- it does not protect the route. Always pair with a route-level `FeatureGuard`. See [glossary.md](../reference/glossary.md) under **accessFeatureKey vs featureKey** for the distinction. When the `featureKey` is one of the 7 platform features, prefer the typed constant (e.g., `featureKey: SALES_FEATURE_ID`) over a string literal to catch renames at compile time.
123
123
 
124
124
  ---
125
125
 
@@ -1,4 +1,4 @@
1
- <!-- Auto-generated on 2026-04-20T07:18:04.491Z by scripts/monorepo/generate-scaffold-contracts.js -->
1
+ <!-- Auto-generated on 2026-04-21T05:52:18.229Z by scripts/monorepo/generate-scaffold-contracts.js -->
2
2
  ---
3
3
  title: Reference Contracts
4
4
  description: Auto-generated TypeScript contracts for SDK consumers. Do not edit manually.
@@ -20,22 +20,22 @@ export type OrganizationModel = z.infer<typeof OrganizationModelSchema>
20
20
  export type OrganizationModelBranding = z.infer<typeof OrganizationModelBrandingSchema>
21
21
  ```
22
22
 
23
- ### `OrganizationModelCrm`
23
+ ### `OrganizationModelSales`
24
24
 
25
25
  ```typescript
26
- export type OrganizationModelCrm = z.infer<typeof OrganizationModelCrmSchema>
26
+ export type OrganizationModelSales = z.infer<typeof OrganizationModelSalesSchema>
27
27
  ```
28
28
 
29
- ### `OrganizationModelLeadGen`
29
+ ### `OrganizationModelProspecting`
30
30
 
31
31
  ```typescript
32
- export type OrganizationModelLeadGen = z.infer<typeof OrganizationModelLeadGenSchema>
32
+ export type OrganizationModelProspecting = z.infer<typeof OrganizationModelProspectingSchema>
33
33
  ```
34
34
 
35
- ### `OrganizationModelDelivery`
35
+ ### `OrganizationModelProjects`
36
36
 
37
37
  ```typescript
38
- export type OrganizationModelDelivery = z.infer<typeof OrganizationModelDeliverySchema>
38
+ export type OrganizationModelProjects = z.infer<typeof OrganizationModelProjectsSchema>
39
39
  ```
40
40
 
41
41
  ### `OrganizationModelFeature`
@@ -62,6 +62,114 @@ export type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>
62
62
  export type OrganizationModelResourceMapping = z.infer<typeof ResourceMappingSchema>
63
63
  ```
64
64
 
65
+ ### `OrganizationModelTechStackEntry`
66
+
67
+ ```typescript
68
+ export type OrganizationModelTechStackEntry = z.infer<typeof TechStackEntrySchema>
69
+ ```
70
+
71
+ ### `OrganizationModelStatuses`
72
+
73
+ ```typescript
74
+ export type OrganizationModelStatuses = z.infer<typeof StatusesDomainSchema>
75
+ ```
76
+
77
+ ### `OrganizationModelStatusEntry`
78
+
79
+ ```typescript
80
+ export type OrganizationModelStatusEntry = z.infer<typeof StatusEntrySchema>
81
+ ```
82
+
83
+ ### `OrganizationModelStatusSemanticClass`
84
+
85
+ ```typescript
86
+ export type OrganizationModelStatusSemanticClass = z.infer<typeof StatusSemanticClassSchema>
87
+ ```
88
+
89
+ ### `OrganizationModelOperations`
90
+
91
+ ```typescript
92
+ export type OrganizationModelOperations = z.infer<typeof OperationsDomainSchema>
93
+ ```
94
+
95
+ ### `OrganizationModelOperationEntry`
96
+
97
+ ```typescript
98
+ export type OrganizationModelOperationEntry = z.infer<typeof OperationEntrySchema>
99
+ ```
100
+
101
+ ### `OrganizationModelOperationSemanticClass`
102
+
103
+ ```typescript
104
+ export type OrganizationModelOperationSemanticClass = z.infer<typeof OperationSemanticClassSchema>
105
+ ```
106
+
107
+ ### `OrganizationModelCustomers`
108
+
109
+ ```typescript
110
+ export type OrganizationModelCustomers = z.infer<typeof CustomersDomainSchema>
111
+ ```
112
+
113
+ ### `OrganizationModelCustomerSegment`
114
+
115
+ ```typescript
116
+ export type OrganizationModelCustomerSegment = z.infer<typeof CustomerSegmentSchema>
117
+ ```
118
+
119
+ ### `OrganizationModelCustomerFirmographics`
120
+
121
+ ```typescript
122
+ export type OrganizationModelCustomerFirmographics = z.infer<typeof FirmographicsSchema>
123
+ ```
124
+
125
+ ### `OrganizationModelOfferings`
126
+
127
+ ```typescript
128
+ export type OrganizationModelOfferings = z.infer<typeof OfferingsDomainSchema>
129
+ ```
130
+
131
+ ### `OrganizationModelProduct`
132
+
133
+ ```typescript
134
+ export type OrganizationModelProduct = z.infer<typeof ProductSchema>
135
+ ```
136
+
137
+ ### `OrganizationModelPricingModel`
138
+
139
+ ```typescript
140
+ export type OrganizationModelPricingModel = z.infer<typeof PricingModelSchema>
141
+ ```
142
+
143
+ ### `OrganizationModelRoles`
144
+
145
+ ```typescript
146
+ export type OrganizationModelRoles = z.infer<typeof RolesDomainSchema>
147
+ ```
148
+
149
+ ### `OrganizationModelRole`
150
+
151
+ ```typescript
152
+ export type OrganizationModelRole = z.infer<typeof RoleSchema>
153
+ ```
154
+
155
+ ### `OrganizationModelGoals`
156
+
157
+ ```typescript
158
+ export type OrganizationModelGoals = z.infer<typeof GoalsDomainSchema>
159
+ ```
160
+
161
+ ### `OrganizationModelObjective`
162
+
163
+ ```typescript
164
+ export type OrganizationModelObjective = z.infer<typeof ObjectiveSchema>
165
+ ```
166
+
167
+ ### `OrganizationModelKeyResult`
168
+
169
+ ```typescript
170
+ export type OrganizationModelKeyResult = z.infer<typeof KeyResultSchema>
171
+ ```
172
+
65
173
  ### `DeepPartial`
66
174
 
67
175
  ```typescript