@elevasis/sdk 1.5.5 → 1.7.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 +296 -98
- package/dist/index.d.ts +7 -4
- package/package.json +2 -2
- package/reference/_navigation.md +2 -1
- package/reference/_reference-manifest.json +16 -2
- package/reference/claude-config/commands/submit-request.md +11 -0
- package/reference/claude-config/hooks/__tests__/pre-edit-vibe-gate.test.mjs +169 -0
- package/reference/claude-config/hooks/pre-edit-vibe-gate.mjs +128 -0
- package/reference/claude-config/logs/pre-edit-vibe-gate.log +23 -0
- package/reference/claude-config/rules/organization-os.md +55 -8
- package/reference/claude-config/rules/vibe.md +210 -0
- package/reference/claude-config/settings.json +11 -0
- package/reference/claude-config/skills/configure/SKILL.md +100 -0
- package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -0
- package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -0
- package/reference/claude-config/skills/configure/operations/customers.md +150 -0
- package/reference/claude-config/skills/configure/operations/features.md +163 -0
- package/reference/claude-config/skills/configure/operations/goals.md +147 -0
- package/reference/claude-config/skills/configure/operations/identity.md +133 -0
- package/reference/claude-config/skills/configure/operations/labels.md +128 -0
- package/reference/claude-config/skills/configure/operations/offerings.md +159 -0
- package/reference/claude-config/skills/configure/operations/roles.md +153 -0
- package/reference/claude-config/skills/configure/operations/techStack.md +139 -0
- package/reference/claude-config/skills/project/SKILL.md +96 -39
- package/reference/claude-config/skills/setup/SKILL.md +81 -32
- package/reference/claude-config/skills/{submit-issue → submit-request}/SKILL.md +41 -26
- package/reference/packages/core/src/organization-model/README.md +16 -12
- package/reference/scaffold/core/organization-graph.mdx +1 -0
- package/reference/scaffold/core/organization-model.mdx +84 -19
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/customize-organization-model.md +5 -5
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +3 -3
- package/reference/scaffold/reference/contracts.md +115 -7
- package/reference/scaffold/reference/feature-registry.md +1 -1
- package/reference/scaffold/reference/glossary.md +25 -4
- package/reference/claude-config/commands/submit-issue.md +0 -11
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: submit-
|
|
3
|
-
description: Submit a structured
|
|
2
|
+
name: submit-request
|
|
3
|
+
description: Submit a structured request report to the Elevasis platform via CLI — enforces pre-analysis before posting
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Submit
|
|
6
|
+
# Submit Request
|
|
7
7
|
|
|
8
|
-
Submit a structured
|
|
8
|
+
Submit a structured request report to the Elevasis platform. The agent performs a six-phase analysis before posting so that every submitted request includes meaningful context, not just a one-liner.
|
|
9
9
|
|
|
10
|
-
**Usage:** `/submit-
|
|
10
|
+
**Usage:** `/submit-request [optional description]`
|
|
11
11
|
|
|
12
12
|
If a description is provided, it is the primary signal for Phase 1. Otherwise the agent analyzes recent conversation context plus any active error context.
|
|
13
13
|
|
|
@@ -31,7 +31,7 @@ Gather available context:
|
|
|
31
31
|
|
|
32
32
|
### Phase 2: Identify Source
|
|
33
33
|
|
|
34
|
-
Pinpoint where the
|
|
34
|
+
Pinpoint where the request originates:
|
|
35
35
|
|
|
36
36
|
- File paths (if a code or config file is involved)
|
|
37
37
|
- Workflow or agent resource IDs (if a platform execution failed)
|
|
@@ -42,18 +42,27 @@ Record these for the `evidence` and `affected_page` fields.
|
|
|
42
42
|
|
|
43
43
|
### Phase 3: Gather Errors
|
|
44
44
|
|
|
45
|
-
Extract concrete error signals:
|
|
45
|
+
Extract concrete error signals (if applicable):
|
|
46
46
|
|
|
47
47
|
- Full error messages and stack traces (truncated to the relevant portion)
|
|
48
48
|
- HTTP status codes and response bodies
|
|
49
49
|
- Log lines with timestamps if available
|
|
50
50
|
- Screenshots or screenshot file references if the user provided them
|
|
51
51
|
|
|
52
|
-
These go into the `evidence` object.
|
|
52
|
+
These go into the `evidence` object. For feature requests or questions, this phase may produce an empty `evidence` object — that is expected.
|
|
53
53
|
|
|
54
|
-
### Phase 4: Classify Severity and Category
|
|
54
|
+
### Phase 4: Select Type and Classify Severity and Category
|
|
55
55
|
|
|
56
|
-
Select exactly one value for
|
|
56
|
+
Select exactly one value for **type first**, then **severity**, then **category**:
|
|
57
|
+
|
|
58
|
+
**Type:**
|
|
59
|
+
|
|
60
|
+
| Value | When to use |
|
|
61
|
+
| ---------- | -------------------------------------------------- |
|
|
62
|
+
| `bug` | Something is broken or behaving incorrectly |
|
|
63
|
+
| `feature` | A new capability or enhancement request |
|
|
64
|
+
| `question` | Asking for clarification, guidance, or explanation |
|
|
65
|
+
| `other` | Doesn't fit the above |
|
|
57
66
|
|
|
58
67
|
**Severity:**
|
|
59
68
|
|
|
@@ -65,14 +74,18 @@ Select exactly one value for each:
|
|
|
65
74
|
|
|
66
75
|
**Category:**
|
|
67
76
|
|
|
68
|
-
| Value
|
|
69
|
-
|
|
|
70
|
-
| `ui_bug`
|
|
71
|
-
| `data_inconsistency`
|
|
72
|
-
| `performance`
|
|
73
|
-
| `error_pattern`
|
|
74
|
-
| `configuration`
|
|
75
|
-
| `
|
|
77
|
+
| Value | When to use |
|
|
78
|
+
| --------------------- | ------------------------------------------------------ |
|
|
79
|
+
| `ui_bug` | Frontend rendering or interaction problem |
|
|
80
|
+
| `data_inconsistency` | DB records, API responses, or UI state don't match |
|
|
81
|
+
| `performance` | Slow load, timeout, high resource usage |
|
|
82
|
+
| `error_pattern` | Recurring or systematic error across executions |
|
|
83
|
+
| `configuration` | Misconfigured resource, credential, env var, or policy |
|
|
84
|
+
| `feature_request` | New feature or enhancement being requested |
|
|
85
|
+
| `api_design` | Feedback on API contract, naming, or behavior |
|
|
86
|
+
| `documentation` | Missing, incorrect, or unclear documentation |
|
|
87
|
+
| `integration_request` | Request for a new integration or adapter |
|
|
88
|
+
| `other` | Doesn't fit above |
|
|
76
89
|
|
|
77
90
|
### Phase 5: Build Structured Report
|
|
78
91
|
|
|
@@ -82,6 +95,7 @@ Assemble the report body from phases 1–4:
|
|
|
82
95
|
{
|
|
83
96
|
"title": "One-line summary — specific, not vague",
|
|
84
97
|
"description": "What happened. What was expected. Steps to reproduce if applicable.",
|
|
98
|
+
"type": "<bug|feature|question|other>",
|
|
85
99
|
"severity": "<critical|warning|info>",
|
|
86
100
|
"category": "<category value>",
|
|
87
101
|
"affected_page": "<route or page path, omit if not a UI issue>",
|
|
@@ -99,7 +113,7 @@ Assemble the report body from phases 1–4:
|
|
|
99
113
|
}
|
|
100
114
|
```
|
|
101
115
|
|
|
102
|
-
Omit any field that has nothing meaningful to record. `project_id` and `task_id` are optional UUID fields — include them only if the
|
|
116
|
+
Omit any field that has nothing meaningful to record. `project_id` and `task_id` are optional UUID fields — include them only if the request is clearly scoped to a specific project or task visible in context.
|
|
103
117
|
|
|
104
118
|
Do NOT include `source` or `organization_id` — the server sets both automatically.
|
|
105
119
|
|
|
@@ -108,9 +122,10 @@ Do NOT include `source` or `organization_id` — the server sets both automatica
|
|
|
108
122
|
Unless the command was invoked with `--auto`, present the assembled report to the user before submitting:
|
|
109
123
|
|
|
110
124
|
```
|
|
111
|
-
|
|
125
|
+
Request Report (ready to submit)
|
|
112
126
|
================================
|
|
113
127
|
Title: <title>
|
|
128
|
+
Type: <type>
|
|
114
129
|
Severity: <severity>
|
|
115
130
|
Category: <category>
|
|
116
131
|
Page: <affected_page or "—">
|
|
@@ -137,20 +152,20 @@ Once confirmed (or `--auto`), write the assembled JSON body to a temp file then
|
|
|
137
152
|
|
|
138
153
|
```bash
|
|
139
154
|
# Write the report body to a temp file
|
|
140
|
-
# (Use the Write tool to create
|
|
155
|
+
# (Use the Write tool to create request-report.json at the project root)
|
|
141
156
|
|
|
142
|
-
pnpm exec elevasis-sdk
|
|
157
|
+
pnpm exec elevasis-sdk request:submit --input-file ./request-report.json --pretty
|
|
143
158
|
```
|
|
144
159
|
|
|
145
160
|
Delete the temp file after submission succeeds or fails.
|
|
146
161
|
|
|
147
162
|
## Report Back
|
|
148
163
|
|
|
149
|
-
On success, the CLI prints the
|
|
164
|
+
On success, the CLI prints the request ID. Surface it to the user:
|
|
150
165
|
|
|
151
166
|
```
|
|
152
167
|
Submitted — id: <uuid>
|
|
153
|
-
Track it in Command Center >
|
|
168
|
+
Track it in Command Center > Requests.
|
|
154
169
|
```
|
|
155
170
|
|
|
156
171
|
## Troubleshooting
|
|
@@ -159,7 +174,7 @@ Track it in Command Center > Issues.
|
|
|
159
174
|
| ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
160
175
|
| `ELEVASIS_PLATFORM_KEY` missing | Key not set in root `.env` | Add `ELEVASIS_PLATFORM_KEY=sk_...` to `.env`. Provision from Command Center > Settings > API Keys. |
|
|
161
176
|
| `401 Unauthorized` | Key is malformed or revoked | Verify the key starts with `sk_` and is 67 chars. Re-provision if needed. |
|
|
162
|
-
| `403 Forbidden` | Key's org lacks access to
|
|
163
|
-
| `Invalid
|
|
177
|
+
| `403 Forbidden` | Key's org lacks access to request reporting | Contact the platform operator to verify the key's org permissions. |
|
|
178
|
+
| `Invalid request body` | Report failed CLI-side Zod validation before the request was sent | Read the field errors printed by the CLI. Common causes: missing `title`/`description`/`type`, invalid enum. |
|
|
164
179
|
| `400 Bad Request` | Body passed CLI validation but failed server-side validation | Read the response body for the specific field error. |
|
|
165
180
|
| Connection refused | API server unreachable | Default target is `https://api.elevasis.io` — check network. For local dev, set `ELEVASIS_API_URL` in `.env`. |
|
|
@@ -14,7 +14,7 @@ The public entry point exposes:
|
|
|
14
14
|
- `resolveOrganizationModel`
|
|
15
15
|
- `PROJECTS_FEATURE_ID`
|
|
16
16
|
- `PROJECTS_INDEX_SURFACE_ID`
|
|
17
|
-
- `
|
|
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
|
-
|
|
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
|
-
- `
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
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
|
|
54
|
+
The default model includes eight feature IDs:
|
|
52
55
|
|
|
53
|
-
- `
|
|
54
|
-
- `
|
|
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
|
|
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
|
-
- `
|
|
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 `
|
|
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.
|
|
@@ -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
|
|
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,
|
|
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
|
-
- `
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
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: `
|
|
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
|
-
|
|
84
|
+
Eight features ship by default in `DEFAULT_ORGANIZATION_MODEL.features`:
|
|
66
85
|
|
|
67
|
-
- `crm` -- enabled;
|
|
68
|
-
- `lead-gen` -- enabled; prospecting, qualification, and outreach
|
|
69
|
-
- `projects` -- enabled; projects, milestones, and client work execution
|
|
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 `
|
|
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. `
|
|
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
|
-
|
|
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
|
-
- `
|
|
130
|
-
- `
|
|
131
|
-
- `
|
|
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
|
|
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
|
|
|
@@ -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 (`
|
|
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({
|
|
@@ -163,12 +163,12 @@ for the full resource authoring workflow.
|
|
|
163
163
|
|
|
164
164
|
### Domain-specific config
|
|
165
165
|
|
|
166
|
-
The `
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,
|
|
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 (`
|
|
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:
|
|
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-
|
|
1
|
+
<!-- Auto-generated on 2026-04-20T23:27:16.482Z 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
|
-
### `
|
|
23
|
+
### `OrganizationModelSales`
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
export type
|
|
26
|
+
export type OrganizationModelSales = z.infer<typeof OrganizationModelSalesSchema>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
### `
|
|
29
|
+
### `OrganizationModelProspecting`
|
|
30
30
|
|
|
31
31
|
```typescript
|
|
32
|
-
export type
|
|
32
|
+
export type OrganizationModelProspecting = z.infer<typeof OrganizationModelProspectingSchema>
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
### `
|
|
35
|
+
### `OrganizationModelProjects`
|
|
36
36
|
|
|
37
37
|
```typescript
|
|
38
|
-
export type
|
|
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
|