@elevasis/sdk 1.20.1 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +3388 -1530
- package/dist/index.d.ts +412 -149
- package/dist/index.js +955 -721
- package/dist/node/index.d.ts +0 -3
- package/dist/node/index.js +22 -49
- package/dist/test-utils/index.d.ts +395 -128
- package/dist/test-utils/index.js +599 -368
- package/dist/worker/index.js +536 -323
- package/package.json +4 -4
- package/reference/_navigation.md +9 -7
- package/reference/_reference-manifest.json +1 -1
- package/reference/claude-config/rules/agent-start-here.md +4 -0
- package/reference/claude-config/rules/frontend.md +2 -2
- package/reference/claude-config/rules/organization-model.md +44 -2
- package/reference/claude-config/rules/organization-os.md +12 -12
- package/reference/claude-config/rules/ui.md +14 -14
- package/reference/claude-config/rules/vibe.md +37 -33
- package/reference/claude-config/skills/explore/SKILL.md +6 -6
- package/reference/claude-config/skills/knowledge/SKILL.md +73 -29
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +25 -24
- package/reference/claude-config/skills/knowledge/operations/features.md +56 -93
- package/reference/claude-config/skills/knowledge/operations/labels.md +19 -14
- package/reference/claude-config/skills/knowledge/operations/offerings.md +6 -6
- package/reference/claude-config/skills/save/SKILL.md +2 -2
- package/reference/claude-config/skills/setup/SKILL.md +1 -1
- package/reference/claude-config/skills/tutorial/technical.md +23 -26
- package/reference/claude-config/skills/tutorial/vibe-coder.md +9 -9
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
- package/reference/cli.mdx +140 -0
- package/reference/deployment/provided-features.mdx +29 -15
- package/reference/examples/organization-model.ts +1 -1
- package/reference/packages/core/src/knowledge/README.md +8 -7
- package/reference/packages/core/src/organization-model/README.md +66 -26
- package/reference/packages/ui/src/provider/README.md +5 -5
- package/reference/scaffold/core/organization-graph.mdx +16 -15
- package/reference/scaffold/core/organization-model.mdx +89 -41
- package/reference/scaffold/index.mdx +9 -9
- package/reference/scaffold/operations/propagation-pipeline.md +3 -3
- package/reference/scaffold/operations/scaffold-maintenance.md +11 -11
- package/reference/scaffold/recipes/add-a-feature.md +26 -24
- package/reference/scaffold/recipes/add-a-resource.md +10 -14
- package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
- package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
- package/reference/scaffold/recipes/customize-organization-model.md +72 -44
- package/reference/scaffold/recipes/extend-crm.md +40 -39
- package/reference/scaffold/recipes/extend-lead-gen.md +15 -16
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +34 -30
- package/reference/scaffold/recipes/index.md +13 -12
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +200 -0
- package/reference/scaffold/reference/contracts.md +362 -99
- package/reference/scaffold/reference/feature-registry.md +9 -20
- package/reference/scaffold/reference/glossary.md +18 -18
- package/reference/scaffold/ui/composition-extensibility.mdx +23 -23
- package/reference/scaffold/ui/customization.md +11 -11
- package/reference/scaffold/ui/feature-flags-and-gating.md +8 -8
- package/reference/scaffold/ui/feature-shell.mdx +19 -19
- package/reference/scaffold/ui/recipes.md +29 -28
|
@@ -3,15 +3,15 @@ name: knowledge
|
|
|
3
3
|
description: |
|
|
4
4
|
TRIGGER this skill when any of the following apply:
|
|
5
5
|
- The user references organization-model entities by name or concept: identity, customers,
|
|
6
|
-
offerings, roles, goals, techStack,
|
|
6
|
+
offerings, roles, goals, techStack, systems, actions, labels, knowledge nodes, governance edges,
|
|
7
7
|
mounts, playbook, outreach cadence, or any domain in the org model.
|
|
8
8
|
- The user asks to read, list, find, show, query, navigate, describe, codify, add, edit,
|
|
9
9
|
update, toggle, enable, or disable any organization-model domain or knowledge node.
|
|
10
|
-
- The user asks "what governs X?", "what does X control?", "
|
|
10
|
+
- The user asks "what governs X?", "what does X control?", "system governs", "what is our
|
|
11
11
|
identity set to?", "what's our timezone?", "show me all reference docs", "list my roles",
|
|
12
12
|
"where does outreach-cadence apply?", or similar.
|
|
13
13
|
- An agent is editing files matching: core/config/organization-model.ts,
|
|
14
|
-
core/config/organization-model.ts, packages/elevasis-core/src/organization-model.ts,
|
|
14
|
+
core/config/organization-model.ts, packages/elevasis-core/src/organization-model/index.ts,
|
|
15
15
|
or packages/core/src/knowledge/**.
|
|
16
16
|
SKIP this skill when the task is purely UI layout, workflow authoring, or infrastructure
|
|
17
17
|
work with no reference to org-model or knowledge-graph entities.
|
|
@@ -19,19 +19,19 @@ metadata:
|
|
|
19
19
|
pathPatterns:
|
|
20
20
|
- "core/config/organization-model.ts"
|
|
21
21
|
- "core/config/organization-model.ts"
|
|
22
|
-
- "packages/elevasis-core/src/organization-model
|
|
22
|
+
- "packages/elevasis-core/src/organization-model/**"
|
|
23
23
|
- "packages/core/src/knowledge/**"
|
|
24
24
|
promptSignals:
|
|
25
25
|
phrases:
|
|
26
26
|
- playbook
|
|
27
27
|
- knowledge node
|
|
28
|
-
-
|
|
28
|
+
- system governs
|
|
29
29
|
- outreach cadence
|
|
30
30
|
- identity
|
|
31
31
|
- customer segment
|
|
32
32
|
- codify
|
|
33
|
-
- enable
|
|
34
|
-
- toggle
|
|
33
|
+
- enable system
|
|
34
|
+
- toggle system
|
|
35
35
|
- what governs
|
|
36
36
|
- org model
|
|
37
37
|
- organization model
|
|
@@ -68,11 +68,11 @@ context and routes to the appropriate flow internally.
|
|
|
68
68
|
This skill auto-invokes whenever:
|
|
69
69
|
|
|
70
70
|
- Conversation references org-model entities (identity, customers, offerings, roles, goals,
|
|
71
|
-
techStack,
|
|
71
|
+
techStack, systems, actions, labels, knowledge nodes, governance edges, mounts)
|
|
72
72
|
- The user asks to read, list, find, show, query, navigate, describe, codify, add, edit,
|
|
73
73
|
update, toggle, enable, or disable any of those
|
|
74
74
|
- An agent is editing files matching `core/config/organization-model.ts`,
|
|
75
|
-
`core/config/organization-model.ts`, `packages/elevasis-core/src/organization-model.ts`,
|
|
75
|
+
`core/config/organization-model.ts`, `packages/elevasis-core/src/organization-model/index.ts`,
|
|
76
76
|
or `packages/core/src/knowledge/**`
|
|
77
77
|
|
|
78
78
|
Auto-invocation is driven by frontmatter `description`, `metadata.pathPatterns`, and
|
|
@@ -90,10 +90,10 @@ cannot bypass the write gate.
|
|
|
90
90
|
| Flow | Triggers (examples) | Mechanics |
|
|
91
91
|
| -------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
92
92
|
| Read | "what playbooks govern sales.crm?", "show me all reference docs", "list my roles" | Run CLI read commands (monorepo or external); format result |
|
|
93
|
-
| Navigate | "what governs this
|
|
93
|
+
| Navigate | "what governs this system?", "where does outreach-cadence apply?" | Same CLI; pick mount axis from intent; default to `by-system` for orientation queries |
|
|
94
94
|
| Describe | "what is our identity set to?", "what's our timezone?" | Read current values from OM source; narrate |
|
|
95
95
|
| Codify | "we're an e-commerce company", "add a customer segment", "our outreach goal is..." | Run codify ceremony with shared-layer impact preview: snapshot -> propose -> confirm -> write -> typecheck -> Zod parse -> rollback on failure |
|
|
96
|
-
| Toggle | "enable the lead-gen
|
|
96
|
+
| Toggle | "enable the lead-gen system", "turn off SEO" | Codify ceremony scoped to the `systems` domain; flip availability/routing state; same validation/rollback |
|
|
97
97
|
|
|
98
98
|
---
|
|
99
99
|
|
|
@@ -124,6 +124,29 @@ through `/knowledge`; do not point them at monorepo-only commands.
|
|
|
124
124
|
|
|
125
125
|
---
|
|
126
126
|
|
|
127
|
+
## Organization Model Navigation Guide
|
|
128
|
+
|
|
129
|
+
Use this map whenever the task asks what something is, where it lives, what governs it, or
|
|
130
|
+
what adjacent context may matter:
|
|
131
|
+
|
|
132
|
+
| Question | Start here | Then inspect |
|
|
133
|
+
| --- | --- | --- |
|
|
134
|
+
| What Systems exist? | `core/config/organization-model.ts` | System IDs, parentage, lifecycle, UI metadata, and content |
|
|
135
|
+
| What governs a System? | `/by-system/<id>` knowledge read | system entry, governed knowledge, roles, policies, graph `governs` edges |
|
|
136
|
+
| What resources belong to a System? | `organizationModel.resources.entries` and `getResourcesForSystem(model, systemPath)` | use `{ includeDescendants: true }` only for parent-scope rollups |
|
|
137
|
+
| What can a System do? | system action refs and the actions domain | `action.resourceId`, invocation metadata, affected entities, policies |
|
|
138
|
+
| What data does it own? | entities domain | owning System refs, state catalogs, entity links, emitted/projected events |
|
|
139
|
+
| What operational content exists? | system `content` | content helpers and scaffold migration helpers when available |
|
|
140
|
+
| What UI surface exposes it? | `navigation.sidebar` plus `SystemModule` manifests | route files, surface targets, route-prefix modules, guards |
|
|
141
|
+
| What knowledge applies? | knowledge domain plus graph edges | `knowledge:cat`, `knowledge:graph`, `/graph/<id>/governed-by` |
|
|
142
|
+
|
|
143
|
+
Do not treat any one read as a complete system snapshot. The OM is a set of related
|
|
144
|
+
domain maps; follow the relationship that matches the work. Prefer structured helpers
|
|
145
|
+
from `@elevasis/core/organization-model` over ad hoc string scanning when code access is
|
|
146
|
+
available.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
127
150
|
## Read Patterns
|
|
128
151
|
|
|
129
152
|
### Monorepo (platform defaults)
|
|
@@ -131,7 +154,7 @@ through `/knowledge`; do not point them at monorepo-only commands.
|
|
|
131
154
|
```bash
|
|
132
155
|
pnpm exec elevasis knowledge:ls
|
|
133
156
|
pnpm exec elevasis knowledge:cat <node-id>
|
|
134
|
-
pnpm exec elevasis knowledge:ls /by-
|
|
157
|
+
pnpm exec elevasis knowledge:ls /by-system/<system-id>
|
|
135
158
|
pnpm exec elevasis knowledge:ls /by-owner/<owner-id>
|
|
136
159
|
pnpm exec elevasis knowledge:graph <node-id>
|
|
137
160
|
```
|
|
@@ -141,31 +164,52 @@ pnpm exec elevasis knowledge:graph <node-id>
|
|
|
141
164
|
```bash
|
|
142
165
|
pnpm exec elevasis-sdk knowledge:ls
|
|
143
166
|
pnpm exec elevasis-sdk knowledge:cat <node-id>
|
|
144
|
-
pnpm exec elevasis-sdk knowledge:ls /by-
|
|
167
|
+
pnpm exec elevasis-sdk knowledge:ls /by-system/<system-id>
|
|
145
168
|
pnpm exec elevasis-sdk knowledge:ls /by-owner/<owner-id>
|
|
146
169
|
pnpm exec elevasis-sdk knowledge:graph <node-id>
|
|
147
170
|
```
|
|
148
171
|
|
|
149
172
|
Use `knowledge:ls` to enumerate all knowledge nodes. Use `knowledge:cat` to read a specific
|
|
150
|
-
node's content. Use `knowledge:ls /by-
|
|
151
|
-
`knowledge:ls /by-owner/<owner-id>` to navigate
|
|
173
|
+
node's content. Use `knowledge:ls /by-system/<system-id>` or
|
|
174
|
+
`knowledge:ls /by-owner/<owner-id>` to navigate system and owner groupings. Use
|
|
152
175
|
`knowledge:graph <node-id>` to inspect incoming and outgoing graph edges for a specific node.
|
|
153
176
|
|
|
154
177
|
### `/knowledge read-folder` (chat shorthand from the Knowledge Browser)
|
|
155
178
|
|
|
156
|
-
The Knowledge Browser's copy button on a top-level
|
|
179
|
+
The Knowledge Browser's copy button on a top-level system or kind group emits a single
|
|
157
180
|
`/knowledge read-folder <axis>:<id>` line instead of N per-node `read` lines. Resolve it by
|
|
158
181
|
listing the folder via `knowledge:ls` and reading each child:
|
|
159
182
|
|
|
160
|
-
| Copy form
|
|
161
|
-
|
|
|
162
|
-
| `/knowledge read-folder
|
|
163
|
-
| `/knowledge read-folder kind:<kind>`
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
183
|
+
| Copy form | Resolution (external) |
|
|
184
|
+
| ------------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
185
|
+
| `/knowledge read-folder system:<id>` | `pnpm exec elevasis-sdk knowledge:ls /by-system/<id> --ids-only`, then `knowledge:cat` each |
|
|
186
|
+
| `/knowledge read-folder kind:<kind>` | `pnpm exec elevasis-sdk knowledge:ls /by-kind/<kind> --ids-only`, then `knowledge:cat` each |
|
|
187
|
+
| `/knowledge read-folder owner:<id>` | `pnpm exec elevasis-sdk knowledge:ls /by-owner/<id> --ids-only`, then `knowledge:cat` each |
|
|
188
|
+
| `/knowledge read-folder graph:<id>` | inspect `/graph/<id>/governs` and `/graph/<id>/governed-by`; read returned knowledge ids |
|
|
189
|
+
|
|
190
|
+
Dotted system ids may use either dots or slashes (`sales.crm` and `sales/crm` both work
|
|
191
|
+
with `knowledge:ls`). Legacy `feature:<id>` copy lines may still appear in older browser
|
|
192
|
+
builds; treat them as compatibility aliases for `system:<id>` and resolve through `/by-system/`.
|
|
193
|
+
Per-node leaves still copy as `/knowledge read <node-id>`. Browser group/domain/item folders
|
|
194
|
+
usually copy explicit N-line read lists when they contain knowledge nodes; if they fall back to
|
|
195
|
+
`group:`, `domain:`, `item:`, or `folder:` route ids, treat those as UI route breadcrumbs, not
|
|
196
|
+
CLI mounts. Resolve them from visible child knowledge ids or the corresponding OM/graph context.
|
|
197
|
+
|
|
198
|
+
`read-folder system:<id>` is the baseline knowledge read, not a mandatory full-system
|
|
199
|
+
snapshot. Start by loading governing knowledge nodes. Broaden into adjacent Organization
|
|
200
|
+
Model context only when the current task makes it relevant:
|
|
201
|
+
|
|
202
|
+
- Runtime or implementation work: inspect `organizationModel.resources.entries` with
|
|
203
|
+
`getResourcesForSystem(model, id)` or `getResourcesForSystem(model, id, { includeDescendants: true })`.
|
|
204
|
+
- Operational configuration: inspect the system entry, `system.content`, `getContent()`,
|
|
205
|
+
`resolveSystemContent()`, and scaffold migration helpers when applicable.
|
|
206
|
+
- Governance or access work: inspect roles, policies, actions, entities, and graph edges
|
|
207
|
+
through the Organization Graph or direct `core/config/organization-model.ts` domain reads.
|
|
208
|
+
- Deployment/code work: follow resource ids into `operations/src/**` only when the task
|
|
209
|
+
needs executable implementation details.
|
|
210
|
+
|
|
211
|
+
There is no first-class CLI mount for "all resources/actions/entities/policies/roles by
|
|
212
|
+
system" yet. Use the helpers above or scan the org model plus the relevant domain maps.
|
|
169
213
|
|
|
170
214
|
---
|
|
171
215
|
|
|
@@ -236,7 +280,7 @@ classification names a specific domain.
|
|
|
236
280
|
- `.claude/skills/knowledge/operations/roles.md` -- role chart
|
|
237
281
|
- `.claude/skills/knowledge/operations/goals.md` -- organizational goals
|
|
238
282
|
- `.claude/skills/knowledge/operations/techStack.md` -- external integration registry
|
|
239
|
-
- `.claude/skills/knowledge/operations/features.md` -- feature
|
|
283
|
+
- `.claude/skills/knowledge/operations/features.md` -- legacy compatibility notes for feature wording; current availability/routing work uses Systems and Actions language
|
|
240
284
|
- `.claude/skills/knowledge/operations/labels.md` -- inline display labels on enum entries
|
|
241
285
|
|
|
242
286
|
These files are populated by Wave B2 and own the domain-specific schema reference content. The
|
|
@@ -249,7 +293,7 @@ and routing.
|
|
|
249
293
|
|
|
250
294
|
### External projects (canonical scope -- full power)
|
|
251
295
|
|
|
252
|
-
In external projects (`external/
|
|
296
|
+
In external projects (`external/_template`, `external/ZentaraHQ`, etc.) this skill has
|
|
253
297
|
full power: read + write + codify + toggle. The org-model file is
|
|
254
298
|
`core/config/organization-model.ts` (or `core/config/organization-model.ts` for
|
|
255
299
|
`external/_template`-derived projects). Extension files live in `core/config/extensions/`.
|
|
@@ -259,11 +303,11 @@ This is the environment where Codify and Toggle intents write. All six ceremony
|
|
|
259
303
|
### Monorepo (read-only pointer for tenants; direct PR for platform)
|
|
260
304
|
|
|
261
305
|
The monorepo-side skill at `.claude/skills/knowledge/SKILL.md` is a read-only pointer. For
|
|
262
|
-
tenant agents reading the platform OM, it reads `packages/elevasis-core/src/organization-model.ts`
|
|
306
|
+
tenant agents reading the platform OM, it reads `packages/elevasis-core/src/organization-model/index.ts`
|
|
263
307
|
(the workspace-resident platform OM, importable as `@repo/elevasis-core/organization-model`).
|
|
264
308
|
It documents read patterns and explicitly declines write operations for tenant contexts.
|
|
265
309
|
|
|
266
|
-
To modify the Elevasis runtime/platform OM, edit `packages/elevasis-core/src/organization-model
|
|
310
|
+
To modify the Elevasis runtime/platform OM, edit files under `packages/elevasis-core/src/organization-model/`
|
|
267
311
|
via a standard PR in the monorepo -- this is source-controlled workspace code, not an external
|
|
268
312
|
project. To modify your own tenant org-model state, work in `external/<your-project>/` where
|
|
269
313
|
`/knowledge` has full write power via the codify ceremony.
|
|
@@ -6,7 +6,7 @@ ceremony is: snapshot current file, propose the edit, write the edit, validate,
|
|
|
6
6
|
failure.
|
|
7
7
|
|
|
8
8
|
This pipeline is called by domain operations (identity, customers, offerings, roles, goals,
|
|
9
|
-
techStack,
|
|
9
|
+
techStack, systems, actions, labels, and legacy feature compatibility) after the user has confirmed the proposed change. The caller provides
|
|
10
10
|
the specific field/block being changed and the proposed new value.
|
|
11
11
|
|
|
12
12
|
---
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Codify Pipeline: Level B (New Extension TypeScript Files)
|
|
2
2
|
|
|
3
3
|
Level B is the codify pipeline for changes that require creating a new TypeScript file under
|
|
4
|
-
`core/config/extensions/`. This pipeline is used when the user wants to add a
|
|
5
|
-
|
|
4
|
+
`core/config/extensions/`. This pipeline is used when the user wants to add or extend a System,
|
|
5
|
+
add an Action, add a custom entity type, or make any structural addition that cannot be expressed as a simple
|
|
6
6
|
field override in `core/config/organization-model.ts`.
|
|
7
7
|
|
|
8
8
|
Level B is **only offered when the user explicitly asks** for something that requires a new file.
|
|
@@ -12,13 +12,14 @@ Never silently escalate from Level A to Level B. If Level A is sufficient, use i
|
|
|
12
12
|
|
|
13
13
|
## When Level B applies
|
|
14
14
|
|
|
15
|
-
- Adding a
|
|
16
|
-
|
|
15
|
+
- Adding or extending a System that does not exist in the platform defaults, including routing,
|
|
16
|
+
manifest wiring, and route references
|
|
17
|
+
- Adding an Action that is invokable by a workflow, agent, command, or UI trigger
|
|
17
18
|
- Adding a custom entity extension (new Zod schema extending a base entity type)
|
|
18
19
|
- Any structural addition the caller's domain operation has determined cannot be expressed as a
|
|
19
20
|
field value in the existing adapter
|
|
20
21
|
|
|
21
|
-
The calling operation (
|
|
22
|
+
The calling operation (or the legacy compatibility notes in `features.md`) is responsible for deciding when Level B is needed
|
|
22
23
|
and for confirming the intent with the user before invoking this pipeline.
|
|
23
24
|
|
|
24
25
|
---
|
|
@@ -38,7 +39,7 @@ Read("core/config/extensions/{target}.ts") -- store as ROLLBACK_EXTENSION (if e
|
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
The target extension file path follows the naming convention:
|
|
41
|
-
`core/config/extensions/{kebab-case-
|
|
42
|
+
`core/config/extensions/{kebab-case-system-or-action-id}.ts`
|
|
42
43
|
|
|
43
44
|
### Step 2: Scaffold the extension file
|
|
44
45
|
|
|
@@ -46,29 +47,29 @@ Create `core/config/extensions/{id}.ts` using the Write tool.
|
|
|
46
47
|
|
|
47
48
|
The file shape depends on the extension type:
|
|
48
49
|
|
|
49
|
-
**Custom
|
|
50
|
+
**Custom system/action extension (common Level B case):**
|
|
50
51
|
|
|
51
52
|
```typescript
|
|
52
53
|
/**
|
|
53
|
-
* {
|
|
54
|
+
* {System or action label} extension.
|
|
54
55
|
* Registered in core/config/organization-model.ts.
|
|
55
56
|
*/
|
|
56
|
-
import type {
|
|
57
|
+
import type { OrganizationModelSystem } from '@elevasis/core/organization-model'
|
|
57
58
|
|
|
58
|
-
export const {
|
|
59
|
-
id: '{
|
|
60
|
-
label: '{
|
|
59
|
+
export const {SYSTEM_CONST}: OrganizationModelSystem = {
|
|
60
|
+
id: '{system-or-action-id}',
|
|
61
|
+
label: '{System or Action Label}',
|
|
61
62
|
description: '{optional description}',
|
|
62
63
|
enabled: true,
|
|
63
64
|
entityIds: [],
|
|
64
65
|
surfaceIds: [],
|
|
65
66
|
resourceIds: [],
|
|
66
|
-
|
|
67
|
+
actionIds: [],
|
|
67
68
|
}
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
Replace `{
|
|
71
|
-
(e.g. `
|
|
71
|
+
Replace `{SYSTEM_CONST}` with the SCREAMING_SNAKE_CASE version of the system or action ID
|
|
72
|
+
(e.g. `CLIENT_PORTAL_SYSTEM`).
|
|
72
73
|
|
|
73
74
|
The caller provides the exact field values based on what the user confirmed.
|
|
74
75
|
|
|
@@ -77,20 +78,20 @@ The caller provides the exact field values based on what the user confirmed.
|
|
|
77
78
|
Edit `core/config/organization-model.ts` to:
|
|
78
79
|
|
|
79
80
|
1. Import the new constant from the extension file.
|
|
80
|
-
2. Add it to the `
|
|
81
|
+
2. Add it to the appropriate `systems` or `actions` collection in the `defineOrganizationModel({...})` call.
|
|
81
82
|
|
|
82
83
|
Example import addition:
|
|
83
84
|
|
|
84
85
|
```typescript
|
|
85
|
-
import {
|
|
86
|
+
import { CLIENT_PORTAL_SYSTEM } from './extensions/client-portal'
|
|
86
87
|
```
|
|
87
88
|
|
|
88
|
-
Example
|
|
89
|
+
Example system collection addition:
|
|
89
90
|
|
|
90
91
|
```typescript
|
|
91
|
-
|
|
92
|
-
...
|
|
93
|
-
|
|
92
|
+
systems: [
|
|
93
|
+
...existingSystems,
|
|
94
|
+
CLIENT_PORTAL_SYSTEM,
|
|
94
95
|
],
|
|
95
96
|
```
|
|
96
97
|
|
|
@@ -127,7 +128,7 @@ If Step 4 or Step 5 failed:
|
|
|
127
128
|
If Steps 4 and 5 both passed, return a success signal to the caller with:
|
|
128
129
|
|
|
129
130
|
- Extension file path created
|
|
130
|
-
- Adapter wiring changes (import +
|
|
131
|
+
- Adapter wiring changes (import + systems/actions collection entry)
|
|
131
132
|
- `Type-check: PASS`
|
|
132
133
|
- `Schema validation: PASS`
|
|
133
134
|
|
|
@@ -141,7 +142,7 @@ Callers must provide before invoking this pipeline:
|
|
|
141
142
|
|
|
142
143
|
- **Extension file path:** `core/config/extensions/{id}.ts`
|
|
143
144
|
- **Extension file content:** the full TypeScript content for the new file
|
|
144
|
-
- **Adapter changes:** the exact import line and
|
|
145
|
+
- **Adapter changes:** the exact import line and systems/actions collection addition to write into the adapter
|
|
145
146
|
- **Confirmed:** the user has already said yes to the proposed change and explicitly requested
|
|
146
147
|
a new extension file
|
|
147
148
|
|
|
@@ -153,6 +154,6 @@ happen in the domain operation before this pipeline is invoked.
|
|
|
153
154
|
## Constraint: Extension files are Tier 3 (never synced)
|
|
154
155
|
|
|
155
156
|
Files under `core/config/extensions/` are Tier 3 -- project-specific, never overwritten
|
|
156
|
-
by `/external sync`. This means custom
|
|
157
|
+
by `/external sync`. This means custom systems, actions, and entity extensions survive template upgrades
|
|
157
158
|
automatically. Do not put platform-default overrides in extension files; those belong directly in
|
|
158
159
|
`core/config/organization-model.ts` (Tier 2, merge-aware).
|
|
@@ -1,113 +1,76 @@
|
|
|
1
|
-
# Features
|
|
2
|
-
|
|
3
|
-
The `features` domain controls top-level capability switches in the platform. Each entry in the
|
|
4
|
-
`features` array of the OrganizationModel governs whether a feature's nav items, routes, and
|
|
5
|
-
surfaces render. Disabling a feature hides it without removing it from the model; enabling makes
|
|
6
|
-
it visible. Custom features extend the platform's defaults via a TypeScript extension file.
|
|
7
|
-
|
|
8
|
-
## Schema
|
|
9
|
-
|
|
10
|
-
Source: `@elevasis/core/organization-model` (published types) or
|
|
11
|
-
`node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` (generated shapes).
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
FeatureSchema = z.object({
|
|
15
|
-
id: ModelIdSchema, // lowercase, e.g. "crm", "lead-gen", "seo"
|
|
16
|
-
label: LabelSchema, // display label
|
|
17
|
-
description: DescriptionSchema.optional(),
|
|
18
|
-
enabled: z.boolean().default(true),
|
|
19
|
-
color: ColorTokenSchema.optional(),
|
|
20
|
-
icon: IconNameSchema.optional(),
|
|
21
|
-
entityIds: ReferenceIdsSchema,
|
|
22
|
-
surfaceIds: ReferenceIdsSchema,
|
|
23
|
-
resourceIds: ReferenceIdsSchema,
|
|
24
|
-
capabilityIds: ReferenceIdsSchema,
|
|
25
|
-
})
|
|
26
|
-
```
|
|
1
|
+
# Features Compatibility Notes
|
|
27
2
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
the adapter must redeclare every feature it wants to override.
|
|
3
|
+
`features` is legacy organization-model wording. Current Organization OS vocabulary is
|
|
4
|
+
System/Action oriented:
|
|
31
5
|
|
|
32
|
-
|
|
6
|
+
- **Systems** describe availability, routing, ownership, navigation grouping, and knowledge
|
|
7
|
+
mounts.
|
|
8
|
+
- **Actions** describe invokable operations such as workflows, agents, commands, and UI-triggered
|
|
9
|
+
tasks.
|
|
33
10
|
|
|
34
|
-
|
|
11
|
+
Use this file only when older prompts, browser copy text, SDK references, or scaffold recipes still
|
|
12
|
+
say "feature". For current tenant organization-model work, route the user to Systems and Actions
|
|
13
|
+
wording and use `/by-system/<id>` knowledge paths.
|
|
35
14
|
|
|
36
|
-
|
|
37
|
-
typed feature constants from `@elevasis/core/organization-model` (`CRM_FEATURE_ID`,
|
|
38
|
-
`LEAD_GEN_FEATURE_ID`, etc.) instead of magic strings when overriding.
|
|
15
|
+
## Compatibility Mapping
|
|
39
16
|
|
|
40
|
-
|
|
17
|
+
| Legacy wording | Current wording |
|
|
18
|
+
| ---------------------------------- | ---------------------------------------------------- |
|
|
19
|
+
| Feature toggle | System availability or routing toggle |
|
|
20
|
+
| Feature ID | System ID when discussing Organization OS |
|
|
21
|
+
| Add a custom feature | Add or extend a System, then define any Actions |
|
|
22
|
+
| Feature governs X | System governs X |
|
|
23
|
+
| `/knowledge read-folder feature:x` | `/knowledge read-folder system:x` |
|
|
24
|
+
| `/by-feature/x` | `/by-system/x` |
|
|
41
25
|
|
|
42
|
-
|
|
26
|
+
`by-feature` may still exist as a legacy compatibility axis in older tools. Do not introduce new
|
|
27
|
+
guidance that depends on it; prefer `by-system` everywhere.
|
|
43
28
|
|
|
44
|
-
|
|
45
|
-
metadata on a feature that already exists in the platform defaults. No new TypeScript files. See
|
|
46
|
-
`operations/codify-level-a.md`.
|
|
29
|
+
## What To Do With Toggle Requests
|
|
47
30
|
|
|
48
|
-
-
|
|
49
|
-
platform defaults. Requires a new file under `core/config/extensions/` plus wiring it into the
|
|
50
|
-
adapter. Level B is reserved for explicit user requests. See `operations/codify-level-b.md`.
|
|
31
|
+
For natural-language requests like "turn on lead gen", "disable SEO", or "enable CRM":
|
|
51
32
|
|
|
52
|
-
|
|
33
|
+
1. Treat the request as a System availability/routing change.
|
|
34
|
+
2. Read `core/config/organization-model.ts` and find the matching System entry or platform
|
|
35
|
+
default constant exposed by `@elevasis/core/organization-model`.
|
|
36
|
+
3. Propose the exact availability/routing change in plain language.
|
|
37
|
+
4. After confirmation, run the Level A codify ceremony in `operations/codify-level-a.md`.
|
|
53
38
|
|
|
54
|
-
|
|
55
|
-
- `label` is non-empty, max 120 characters.
|
|
56
|
-
- The `features` array replaces entirely on override -- entries omitted from the adapter are
|
|
57
|
-
dropped, even if they appear in the platform defaults.
|
|
58
|
-
- A new custom feature ID must not collide with any platform default ID.
|
|
39
|
+
Do not create new extension files for a simple on/off change.
|
|
59
40
|
|
|
60
|
-
##
|
|
41
|
+
## When Level B Applies
|
|
61
42
|
|
|
62
|
-
|
|
43
|
+
Level B applies only when the user explicitly asks for a new structural concept that cannot be
|
|
44
|
+
represented as an existing System or Action configuration. In current vocabulary this usually
|
|
45
|
+
means adding a project-owned extension under `core/config/extensions/` and wiring it into the
|
|
46
|
+
organization model.
|
|
63
47
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
features: [
|
|
67
|
-
// ... redeclare every default feature you want to keep ...
|
|
68
|
-
{ id: SEO_FEATURE_ID, label: 'SEO', enabled: false, /* ... */ },
|
|
69
|
-
],
|
|
70
|
-
})
|
|
71
|
-
```
|
|
48
|
+
Older references may call this "adding a custom feature"; translate it to "add or extend a
|
|
49
|
+
System and define any Actions it owns" before invoking `operations/codify-level-b.md`.
|
|
72
50
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
id: 'client-portal',
|
|
79
|
-
label: 'Client Portal',
|
|
80
|
-
description: 'Self-serve project status for clients',
|
|
81
|
-
enabled: true,
|
|
82
|
-
entityIds: ['project', 'deliverable'],
|
|
83
|
-
surfaceIds: ['client-portal-dashboard'],
|
|
84
|
-
resourceIds: [],
|
|
85
|
-
capabilityIds: [],
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// core/config/organization-model.ts
|
|
89
|
-
import { clientPortalFeature } from './extensions/client-portal'
|
|
90
|
-
defineOrganizationModel({
|
|
91
|
-
features: [
|
|
92
|
-
/* ... defaults you want to keep ... */
|
|
93
|
-
clientPortalFeature,
|
|
94
|
-
],
|
|
95
|
-
})
|
|
96
|
-
```
|
|
51
|
+
## UI Package Exception
|
|
52
|
+
|
|
53
|
+
Keep the word `features` only for legacy frontend source paths that still use that directory
|
|
54
|
+
name, such as `ui/src/features/`. Current published shell APIs are System-oriented:
|
|
55
|
+
`SystemShell`, `SystemModule`, and `ElevasisSystemsProvider`.
|
|
97
56
|
|
|
98
|
-
##
|
|
57
|
+
## Read Examples
|
|
99
58
|
|
|
100
|
-
|
|
59
|
+
Use current system paths:
|
|
101
60
|
|
|
102
|
-
|
|
103
|
-
|
|
61
|
+
```bash
|
|
62
|
+
pnpm exec elevasis-sdk knowledge:ls /by-system/<id> --ids-only
|
|
63
|
+
pnpm exec elevasis-sdk knowledge:cat <node-id>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Legacy browser output:
|
|
104
67
|
|
|
105
|
-
|
|
106
|
-
|
|
68
|
+
```text
|
|
69
|
+
/knowledge read-folder feature:<id>
|
|
70
|
+
```
|
|
107
71
|
|
|
108
|
-
|
|
72
|
+
Resolve as:
|
|
109
73
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
> intent classifies as Toggle or Codify.
|
|
74
|
+
```bash
|
|
75
|
+
pnpm exec elevasis-sdk knowledge:ls /by-system/<id> --ids-only
|
|
76
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Labels domain
|
|
2
2
|
|
|
3
|
-
`label` is an inline display field carried by status entries, stage entries,
|
|
4
|
-
|
|
3
|
+
`label` is an inline display field carried by status entries, stage entries, System entries,
|
|
4
|
+
knowledge nodes, registry entries, and sidebar surfaces in the OrganizationModel. Labels control what users see in the UI and what
|
|
5
5
|
agents say when narrating state. Editing a label does not change the entry's `id` or
|
|
6
6
|
`semanticClass` -- only the human-readable display string. This is Level A only (config-only
|
|
7
7
|
edits to `core/config/organization-model.ts`).
|
|
@@ -24,11 +24,16 @@ Each status entry shape:
|
|
|
24
24
|
{ id: 'new', label: 'New Lead', semanticClass: 'active', color: 'blue' }
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
**
|
|
28
|
-
|
|
27
|
+
**Systems.** The `label` field on a System entry. Editing it changes agent narration and any
|
|
28
|
+
System-derived shell text, but it does not change the System `id`, route path, or graph node id.
|
|
29
29
|
|
|
30
|
-
**
|
|
31
|
-
Editing changes
|
|
30
|
+
**Sidebar surfaces.** Routeable leaves under `navigation.sidebar.primary` and
|
|
31
|
+
`navigation.sidebar.bottom` carry labels. Editing changes nav item and breadcrumb display without
|
|
32
|
+
changing the route path or target System refs.
|
|
33
|
+
|
|
34
|
+
**Knowledge/domain entries.** Knowledge nodes, customers, offerings, goals, roles, resources,
|
|
35
|
+
actions, entities, and policies may carry labels or titles depending on the domain. Edit only the
|
|
36
|
+
display field that already exists on the entry.
|
|
32
37
|
|
|
33
38
|
## What is NOT in scope
|
|
34
39
|
|
|
@@ -56,19 +61,19 @@ Domain: sales (deal pipeline)
|
|
|
56
61
|
negotiation: (unchanged)
|
|
57
62
|
```
|
|
58
63
|
|
|
59
|
-
Rename a
|
|
64
|
+
Rename a System label without changing its ID:
|
|
60
65
|
|
|
61
66
|
```
|
|
62
|
-
|
|
63
|
-
crm:
|
|
64
|
-
(id stays 'crm';
|
|
67
|
+
systems:
|
|
68
|
+
sales.crm: label "CRM" -> "Sales Pipeline"
|
|
69
|
+
(id stays 'sales.crm'; graph node remains 'system:sales.crm')
|
|
65
70
|
```
|
|
66
71
|
|
|
67
|
-
Rename a
|
|
72
|
+
Rename a sidebar surface:
|
|
68
73
|
|
|
69
74
|
```
|
|
70
|
-
navigation.
|
|
71
|
-
crm
|
|
75
|
+
navigation.sidebar.primary:
|
|
76
|
+
sales.crm: label "Pipeline" -> "Deal Pipeline"
|
|
72
77
|
```
|
|
73
78
|
|
|
74
79
|
## Validation gate
|
|
@@ -84,6 +89,6 @@ procedure.
|
|
|
84
89
|
---
|
|
85
90
|
|
|
86
91
|
> **Read via `/knowledge`** -- natural-language queries like "what's the label for the proposal
|
|
87
|
-
> stage?" or "what do we call the SEO
|
|
92
|
+
> stage?" or "what do we call the SEO System?" route to this domain via the skill's intent
|
|
88
93
|
> classifier. To rename one or more labels, the `/knowledge` skill triggers the codify ceremony
|
|
89
94
|
> when intent classifies as Codify.
|
|
@@ -21,7 +21,7 @@ ProductSchema = z.object({
|
|
|
21
21
|
price: z.number().min(0).default(0), // base price amount (>= 0)
|
|
22
22
|
currency: z.string().trim().max(10).default('USD'),// ISO 4217, e.g. "USD", "EUR"
|
|
23
23
|
targetSegmentIds: z.array(z.string()).default([]), // must ref customers.segments[].id
|
|
24
|
-
|
|
24
|
+
deliverySystemId: z.string().optional() // optional ref to systems[].id
|
|
25
25
|
})
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -43,7 +43,7 @@ ProductSchema = z.object({
|
|
|
43
43
|
| `price` | number | -- | Base price amount, min 0; use 0 for fully custom pricing |
|
|
44
44
|
| `currency` | string | 10 | ISO 4217 code; defaults to `"USD"` |
|
|
45
45
|
| `targetSegmentIds` | string[] | -- | Each entry must reference a `customers.segments[].id` |
|
|
46
|
-
| `
|
|
46
|
+
| `deliverySystemId` | string | -- | Optional reference to a `systems[].id` |
|
|
47
47
|
|
|
48
48
|
## Validation rules
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ ProductSchema = z.object({
|
|
|
51
51
|
references
|
|
52
52
|
- `targetSegmentIds` entries must exist in `customers.segments[].id`; the schema enforces this
|
|
53
53
|
at parse time — missing references cause `resolveOrganizationModel()` to fail
|
|
54
|
-
- `
|
|
54
|
+
- `deliverySystemId` (when present) must exist in `systems[].id`; same parse-time enforcement
|
|
55
55
|
- `price` must be >= 0; use 0 when pricing is fully custom or not yet set
|
|
56
56
|
- `currency` must be a valid ISO 4217 code by convention (the schema only validates length)
|
|
57
57
|
- Cross-reference: if a product is removed, surface any `targetSegmentIds` in other products
|
|
@@ -70,7 +70,7 @@ offerings: {
|
|
|
70
70
|
price: 2500,
|
|
71
71
|
currency: "USD",
|
|
72
72
|
targetSegmentIds: ["segment-smb-agencies"],
|
|
73
|
-
|
|
73
|
+
deliverySystemId: undefined
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
id: "product-one-time-audit",
|
|
@@ -80,7 +80,7 @@ offerings: {
|
|
|
80
80
|
price: 1500,
|
|
81
81
|
currency: "USD",
|
|
82
82
|
targetSegmentIds: ["segment-smb-agencies"],
|
|
83
|
-
|
|
83
|
+
deliverySystemId: undefined
|
|
84
84
|
}
|
|
85
85
|
]
|
|
86
86
|
}
|
|
@@ -99,7 +99,7 @@ use `pnpm exec elevasis-sdk knowledge:cat offerings` (external project).
|
|
|
99
99
|
To add, edit, or remove a product, the `/knowledge` skill runs the codify ceremony
|
|
100
100
|
(`operations/codify-level-a.md`): snapshot → propose → confirm → write → typecheck → Zod parse →
|
|
101
101
|
rollback on failure. Only the `products` array is written; no other keys in the adapter are
|
|
102
|
-
touched. Before writing, the skill verifies all `targetSegmentIds` and `
|
|
102
|
+
touched. Before writing, the skill verifies all `targetSegmentIds` and `deliverySystemId`
|
|
103
103
|
references resolve. When adding, append to the array. When editing, replace by `id`. When
|
|
104
104
|
removing, filter out — and surface any dangling references first.
|
|
105
105
|
|