@elevasis/sdk 1.18.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cli.cjs +1915 -70
  2. package/dist/index.d.ts +825 -16
  3. package/dist/index.js +714 -63
  4. package/dist/node/index.d.ts +1 -0
  5. package/dist/node/index.js +213 -2
  6. package/dist/test-utils/index.d.ts +479 -14
  7. package/dist/test-utils/index.js +660 -54
  8. package/dist/worker/index.js +516 -54
  9. package/package.json +4 -4
  10. package/reference/_navigation.md +2 -1
  11. package/reference/_reference-manifest.json +14 -0
  12. package/reference/claude-config/registries/graph-skills.json +4 -0
  13. package/reference/claude-config/rules/agent-start-here.md +5 -5
  14. package/reference/claude-config/rules/deployment.md +4 -3
  15. package/reference/claude-config/rules/frontend.md +2 -2
  16. package/reference/claude-config/rules/operations.md +17 -13
  17. package/reference/claude-config/rules/organization-model.md +7 -5
  18. package/reference/claude-config/rules/organization-os.md +13 -11
  19. package/reference/claude-config/rules/ui.md +3 -3
  20. package/reference/claude-config/rules/vibe.md +4 -4
  21. package/reference/claude-config/skills/explore/SKILL.md +4 -4
  22. package/reference/claude-config/skills/knowledge/SKILL.md +17 -16
  23. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +7 -7
  24. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +13 -13
  25. package/reference/claude-config/skills/knowledge/operations/customers.md +1 -1
  26. package/reference/claude-config/skills/knowledge/operations/goals.md +1 -1
  27. package/reference/claude-config/skills/knowledge/operations/identity.md +1 -1
  28. package/reference/claude-config/skills/knowledge/operations/offerings.md +1 -1
  29. package/reference/claude-config/skills/knowledge/operations/roles.md +1 -1
  30. package/reference/claude-config/skills/knowledge/operations/techStack.md +19 -91
  31. package/reference/claude-config/skills/project/SKILL.md +73 -13
  32. package/reference/claude-config/skills/save/SKILL.md +5 -5
  33. package/reference/claude-config/skills/tutorial/technical.md +11 -14
  34. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -0
  35. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -0
  36. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -0
  37. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -0
  38. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -0
  39. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -0
  40. package/reference/examples/organization-model.ts +17 -5
  41. package/reference/framework/index.mdx +1 -1
  42. package/reference/framework/project-structure.mdx +10 -8
  43. package/reference/packages/core/src/business/README.md +2 -2
  44. package/reference/packages/core/src/organization-model/README.md +10 -3
  45. package/reference/resources/index.mdx +27 -17
  46. package/reference/scaffold/core/organization-model.mdx +33 -14
  47. package/reference/scaffold/operations/workflow-recipes.md +35 -29
  48. package/reference/scaffold/recipes/add-a-feature.md +18 -3
  49. package/reference/scaffold/recipes/add-a-resource.md +50 -10
  50. package/reference/scaffold/recipes/customize-crm-actions.md +12 -6
  51. package/reference/scaffold/recipes/customize-organization-model.md +18 -3
  52. package/reference/scaffold/recipes/extend-crm.md +17 -19
  53. package/reference/scaffold/recipes/extend-lead-gen.md +31 -31
  54. package/reference/scaffold/recipes/index.md +1 -1
  55. package/reference/scaffold/reference/contracts.md +512 -307
  56. package/reference/scaffold/reference/feature-registry.md +1 -1
  57. package/reference/scaffold/reference/glossary.md +8 -3
  58. package/reference/scaffold/ui/recipes.md +21 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -57,9 +57,9 @@
57
57
  "tsup": "^8.0.0",
58
58
  "typescript": "5.9.2",
59
59
  "zod": "^4.1.0",
60
- "@repo/core": "0.19.0",
61
- "@repo/eslint-config": "0.0.0",
62
- "@repo/typescript-config": "0.0.0"
60
+ "@repo/core": "0.22.0",
61
+ "@repo/typescript-config": "0.0.0",
62
+ "@repo/eslint-config": "0.0.0"
63
63
  },
64
64
  "scripts": {
65
65
  "lint": "eslint src --max-warnings 0",
@@ -2,7 +2,7 @@
2
2
 
3
3
  Auto-generated from the package reference manifests.
4
4
 
5
- Package entries indexed: 54.
5
+ Package entries indexed: 55.
6
6
 
7
7
  ## @elevasis/core / Core
8
8
 
@@ -90,6 +90,7 @@ Package entries indexed: 54.
90
90
  | Features SEO | `packages/ui/src/features/README.md` | Published SEO feature surface for downstream shells. | (not specified) |
91
91
  | Features Settings | `packages/ui/src/features/README.md` | Published settings feature surface for downstream shells. | (not specified) |
92
92
  | Features Knowledge | `packages/ui/src/features/README.md` | Published knowledge feature manifest for downstream shells. | (not specified) |
93
+ | Features Clients | `packages/ui/src/features/README.md` | Published clients feature surface for downstream shells. | (not specified) |
93
94
 
94
95
  ## @elevasis/ui / Foundation
95
96
 
@@ -379,6 +379,20 @@
379
379
  "referencePath": "packages/ui/src/features/README.md",
380
380
  "publishedExportPath": "./dist/features/knowledge/index.js"
381
381
  },
382
+ {
383
+ "packageName": "@elevasis/ui",
384
+ "packageDir": "packages/ui",
385
+ "subpath": "./features/clients",
386
+ "kind": "subpath",
387
+ "title": "Features Clients",
388
+ "description": "Published clients feature surface for downstream shells.",
389
+ "group": "Features",
390
+ "order": 12,
391
+ "sourcePath": "packages/ui/src/features/clients/index.ts",
392
+ "docPath": "packages/ui/src/features/README.md",
393
+ "referencePath": "packages/ui/src/features/README.md",
394
+ "publishedExportPath": "./dist/features/clients/index.js"
395
+ },
382
396
  {
383
397
  "packageName": "@elevasis/ui",
384
398
  "packageDir": "packages/ui",
@@ -0,0 +1,4 @@
1
+ {
2
+ "generatedBy": "generate-knowledge-nodes",
3
+ "domains": {}
4
+ }
@@ -75,7 +75,7 @@ Use this order unless a more specific doc tells you otherwise:
75
75
  4. Read `identity.clientBrief` from the OrganizationModel (`core/config/organization-model.ts`) for organization context and naming.
76
76
  5. Read the relevant structural map:
77
77
  - Glob `node_modules/@elevasis/sdk/reference/` for published package surfaces
78
- - Glob `operations/resources/**` for source, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
78
+ - Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
79
79
  6. For feature integration, resource authoring, or UI customization tasks, read `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` to find the canonical recipe or reference doc.
80
80
  7. Drill into the co-located local explainer for the abstraction boundary you are changing.
81
81
  8. Check the `.claude/rules/active-change-index.md` rule before trusting stable assumptions in areas that are under active architecture work.
@@ -142,7 +142,7 @@ Then inspect:
142
142
 
143
143
  Verify with:
144
144
 
145
- - Glob `operations/resources/**` for local source files, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
145
+ - Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
146
146
  - local SDK guidance in `.claude/skills/elevasis/SKILL.md`
147
147
 
148
148
  ### 3. Organization Model / Feature Access Work
@@ -163,7 +163,7 @@ Load first:
163
163
  Then inspect:
164
164
 
165
165
  - `core/config/organization-model.ts`
166
- - `core/config/organization-model.examples.ts` -- 5 reference patterns: branding override, CRM pipeline stage customization, lead-gen lifecycle customization, resource mapping registration, custom feature declaration. Not imported anywhere -- pure reference. Start here for the override pattern when extending the org model.
166
+ - `core/config/organization-model.ts` -- Organization Model overrides plus Systems and Resources descriptors. Start here for feature labels, surface mapping, and resource identity/governance changes.
167
167
  - `ui/src/routes/__root.tsx`
168
168
  - `ui/src/lib/hooks/useFeatureAccess.ts`
169
169
  - relevant nav config files
@@ -181,7 +181,7 @@ Load first:
181
181
 
182
182
  - `operations/src/README.md`
183
183
  - `.claude/rules/active-change-index.md`
184
- - Glob `operations/resources/**` for source, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
184
+ - Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
185
185
 
186
186
  Then inspect:
187
187
 
@@ -257,7 +257,7 @@ If a hand-authored doc conflicts with source or published package docs, trust so
257
257
 
258
258
  ## Common Traps
259
259
 
260
- - Do not assume `operations/resources/**` is exhaustive without also checking `operations/src/index.ts` directly.
260
+ - Do not assume feature directories are exhaustive without also checking `operations/src/index.ts` and `core/config/organization-model.ts` directly.
261
261
  - Do not assume placeholder knowledge is sufficient for real client context. Read `identity.clientBrief` from the OrganizationModel (`core/config/organization-model.ts`).
262
262
  - Do not trust stable docs blindly when `.claude/rules/active-change-index.md` flags related in-progress architecture work.
263
263
  - Do not write `resume_context` into task-doc frontmatter. DB is canonical; write via `project:task:save` or the inline editor in Command Center.
@@ -14,7 +14,7 @@ pnpm -C operations run check-types # TypeScript type-check
14
14
  pnpm -C operations run deploy # Deploy to dev (only after both pass)
15
15
  ```
16
16
 
17
- `check` catches duplicate resourceIds, invalid step chains, broken relationships, and schema serialization issues. Same validation runs during deploy -- if `check` passes, deploy validation will pass.
17
+ `check` catches duplicate resource IDs, OM descriptor/code mismatches, invalid step chains, broken relationships, and schema serialization issues. Same validation runs during deploy -- if `check` passes, deploy validation will pass.
18
18
 
19
19
  ## Dev vs Prod
20
20
 
@@ -32,7 +32,7 @@ Deploy accepts `--major`, `--minor`, `--patch` flags to bump the deployment vers
32
32
  ## What Gets Deployed
33
33
 
34
34
  1. **Bundle:** esbuild compiles `src/index.ts` + all dependencies into a single self-contained CJS file. No `node_modules` needed at runtime.
35
- 2. **Metadata:** Resource definitions, Zod schemas (converted to JSON Schema), relationships, triggers.
35
+ 2. **Metadata:** Resource definitions, OM Resources descriptor bindings, Zod schemas (converted to JSON Schema), relationships, triggers.
36
36
 
37
37
  ## Environment
38
38
 
@@ -45,7 +45,8 @@ Deploy accepts `--major`, `--minor`, `--patch` flags to bump the deployment vers
45
45
  | Error | Fix |
46
46
  | ---------------------------------------- | ------------------------------------------------------- |
47
47
  | `401: Invalid API key` | Check `ELEVASIS_PLATFORM_KEY` in `.env` |
48
- | `Duplicate resource ID` | Rename `resourceId` in the conflicting resource |
48
+ | `Duplicate resource ID` | Fix the duplicated OM Resource descriptor ID, then derive runtime `resourceId` from that descriptor |
49
+ | `Missing OM Resource descriptor` | Add the descriptor to `core/config/organization-model.ts` under `resources.entries` |
49
50
  | `Step references non-existent next step` | Fix the `next:` field in the step chain |
50
51
  | `Schema serialization failed` | Simplify the Zod schema (warning, still deploys) |
51
52
  | `No default export found` | `src/index.ts` must `export default` a `DeploymentSpec` |
@@ -17,8 +17,8 @@ paths:
17
17
  ## Silent-Break Gotchas
18
18
 
19
19
  - Route files vs layout files: `operations.tsx` is a layout (renders `<Outlet />`), `operations/my-page.index.tsx` is a page. Confusing the two breaks routing silently
20
- - `foundations/` cannot import React or `@elevasis/sdk/worker` -- it is runtime-agnostic shared types only
21
- - `@/*` resolves to `ui/src/*`, `@foundation/*` resolves to `foundations/*` -- never import from `operations/` (separate runtime)
20
+ - `core/` cannot import React or `@elevasis/sdk/worker` -- it is runtime-agnostic shared types and organization configuration only
21
+ - `@/*` resolves to `ui/src/*`, `@core/*` resolves to `core/*` -- never import from `operations/` (separate runtime)
22
22
 
23
23
  ## Stack Constraints
24
24
 
@@ -12,16 +12,16 @@ paths:
12
12
 
13
13
  The `operations/` directory contains platform resources and deployment metadata that deploy to the Elevasis platform. It is a standalone TypeScript project with its own `package.json`, `tsconfig.json`, and dependencies.
14
14
 
15
- **Discovering deployed resources:** Glob `operations/resources/**` for local source files, or run `pnpm elevasis-sdk project:list --pretty` against the live DB for the deployed surface. No static resource map exists -- the file system and CLI are authoritative.
15
+ **Discovering deployed resources:** Read `operations/src/index.ts` for deployment assembly and `core/config/organization-model.ts` for the OM Resources descriptor catalog. Run `pnpm elevasis-sdk project:list --pretty` against the live DB for the deployed surface.
16
16
 
17
17
  ## Echo Workflow (Starter Example)
18
18
 
19
19
  **Location:** `operations/src/example/echo.ts`
20
20
 
21
- The echo workflow accepts a message string and returns it unchanged. Its purpose is the wiring, not the logic: input and output schemas are defined in `foundations/types/index.ts` and imported by both the workflow and the frontend.
21
+ The echo workflow accepts a message string and returns it unchanged. Its purpose is the wiring, not the logic: input and output schemas are defined in `core/types/index.ts` and imported by both the workflow and the frontend.
22
22
 
23
23
  ```
24
- foundations/types/index.ts -- defines echoInputSchema, echoOutputSchema
24
+ core/types/index.ts -- defines echoInputSchema, echoOutputSchema
25
25
  operations/src/example/echo.ts -- imports schemas for workflow contract
26
26
  ui/src/routes/ -- imports schemas for form validation and display
27
27
  ```
@@ -30,13 +30,15 @@ The workflow is registered in `operations/src/index.ts` as part of the `example`
30
30
 
31
31
  ## Adding a New Workflow
32
32
 
33
- 1. **Define the contract in `foundations/`** -- Add Zod schemas and inferred types to `foundations/types/index.ts` (or a new file under `foundations/types/`).
34
-
35
- 2. **Implement the workflow in `operations/src/`** -- Create a new directory under `operations/src/` for the feature. Export the workflow from its `index.ts` and register it in `operations/src/index.ts`.
36
-
37
- 3. **Add the UI in `ui/src/routes/`** -- Create a new route file. Use TanStack Query to call the workflow execution endpoint. Import schemas from `@foundation/types` for validation and type inference.
38
-
39
- 4. **Deploy and verify:**
33
+ 1. **Define the descriptor in `core/config/organization-model.ts`** -- Add the OM Resource descriptor under `resources.entries` so identity, System membership, owner role, and governance status are authored once.
34
+
35
+ 2. **Define the contract in `core/types/`** -- Add Zod schemas and inferred types to `core/types/index.ts` (or a new file under `core/types/`).
36
+
37
+ 3. **Implement the workflow in `operations/src/`** -- Create a new directory under `operations/src/` for the feature. Import the descriptor, derive runtime `resourceId` / `type` from it, export the workflow from its `index.ts`, and register it in `operations/src/index.ts`.
38
+
39
+ 4. **Add the UI in `ui/src/routes/`** -- Create a new route file. Use TanStack Query to call the workflow execution endpoint. Import schemas from `@core/types` for validation and type inference.
40
+
41
+ 5. **Deploy and verify:**
40
42
 
41
43
  ```bash
42
44
  pnpm -C operations check # validate resource definitions
@@ -45,12 +47,14 @@ pnpm -C operations deploy # deploy to dev
45
47
 
46
48
  ## Resource Registry
47
49
 
48
- `operations/src/index.ts` default-exports a `DeploymentSpec` with `version`, `workflows`, `agents`, and optional topology-oriented metadata such as `triggers`, `integrations`, `relationships`, `humanCheckpoints`, and `externalResources`. Each feature group exports `workflows` and `agents` arrays from its own `index.ts`, spread into the top-level spec.
50
+ `operations/src/index.ts` default-exports a `DeploymentSpec` with `version`, `organizationModel`, `workflows`, `agents`, and optional topology-oriented metadata such as `triggers`, `integrations`, `relationships`, `humanCheckpoints`, and `externalResources`. Each feature group exports `workflows` and `agents` arrays from its own `index.ts`, spread into the top-level spec. `DeploymentSpec` assembles deployable behavior; it should not be treated as a second resource identity catalog.
49
51
 
50
52
  When you need breadth first, read:
51
53
 
52
- - `operations/src/README.md` for the source boundary and drill-down guidance
53
- - Glob `operations/resources/**` or run `pnpm elevasis-sdk project:list --pretty` for the live deployed surface
54
+ - `operations/src/README.md` for the source boundary and drill-down guidance
55
+ - `core/config/organization-model.ts` for descriptor identity and governance metadata
56
+ - `operations/src/index.ts` for deployment assembly
57
+ - `pnpm elevasis-sdk project:list --pretty` for the live deployed surface
54
58
 
55
59
  ## Commands
56
60
 
@@ -7,10 +7,10 @@ paths:
7
7
 
8
8
  # Organization Model Edit Guide
9
9
 
10
- `foundations/config/organization-model.ts` is the single source of truth for this
10
+ `core/config/organization-model.ts` is the single source of truth for this
11
11
  project's organizational identity -- it encodes customers, offerings, roles, goals,
12
- features, statuses, and resource mappings that agents, workflows, and the UI shell all
13
- consume at runtime.
12
+ features, statuses, Systems, and Resources descriptors that agents, workflows, and the
13
+ UI shell all consume at runtime.
14
14
 
15
15
  ## Preferred Entry Point: `/knowledge`
16
16
 
@@ -24,7 +24,9 @@ Direct edits to `organization-model.ts` are discouraged. Instead, use `/knowledg
24
24
  is verified. On failure the file is rolled back automatically.
25
25
 
26
26
  Use `/knowledge <domain>` for targeted edits: `identity`, `customers`, `offerings`,
27
- `roles`, `goals`, `techStack`, `features`, or `labels`.
27
+ `roles`, `goals`, `techStack`, `features`, or `labels`. Resource identity and
28
+ governance metadata belong in `resources.entries`; operations code derives runtime
29
+ `resourceId` / `type` from those descriptors.
28
30
 
29
31
  ## Runtime Validation
30
32
 
@@ -35,7 +37,7 @@ alone -- always let the ceremony run both checks before treating a change as com
35
37
 
36
38
  ## Extension Files
37
39
 
38
- New Zod extension files under `foundations/config/extensions/` are Level B codify
40
+ New Zod extension files under `core/config/extensions/` are Level B codify
39
41
  operations. Route these through `/knowledge <domain>` as well -- the skill gates Level B
40
42
  to explicit user confirmation before scaffolding a new `.ts` file.
41
43
 
@@ -4,24 +4,26 @@ Organization OS is the semantic contract layer defining how organizations, featu
4
4
 
5
5
  ## Key Files in This Project
6
6
 
7
- - `foundations/config/organization-model.ts` -- project-specific org model definition (calls `defineOrganizationModel` + `resolveOrganizationModel`)
8
- - `foundations/config/organization-model.examples.ts` -- reference patterns for all 14 domains: branding, identity, customers, offerings, roles, goals, sales stages, prospecting stages, resource mappings with techStack, custom features, statuses, and open-placement navigation groups. Pure reference -- not imported anywhere. Read this when customizing the org model.
9
- - `foundations/types/entities.ts` -- typed entity contracts (Project, Deal, etc.). Extends `BaseProject`, `BaseDeal` from `@elevasis/core/entities` with project-specific metadata. Read this when authoring workflows that operate on these entities.
7
+ - `core/config/organization-model.ts` -- project-specific org model definition, Systems, and Resources descriptor catalog (`organizationModel.resources.entries`)
8
+ - `core/config/extensions/` -- project-owned entity extension schemas
9
+ - `core/types/entities.ts` -- typed entity contracts (Project, Deal, etc.). Extends `BaseProject`, `BaseDeal` from `@elevasis/core/entities` with project-specific metadata. Read this when authoring workflows that operate on these entities.
10
10
  - `ui/src/routes/__root.tsx` -- wires `ElevasisFeaturesProvider` with `canonicalOrganizationModel`
11
11
  - `ui/src/app-config.ts` -- references the org model
12
12
  - `operations/src/index.ts` -- `DeploymentSpec` registry for workflows and agents
13
13
 
14
14
  ## Domain Overview
15
15
 
16
- As of the 2026-04-20 expansion, `OrganizationModel` contains 14 top-level domains:
16
+ As of the 2026-05 resource-governance expansion, `OrganizationModel` includes platform configuration, organizational reality, and governance domains:
17
17
 
18
- **Platform configuration:** `features`, `branding`, `navigation`, `sales` (formerly `crm`), `prospecting` (formerly `leadGen`), `projects` (formerly `delivery`), `resourceMappings`
18
+ **Platform configuration:** `features`, `branding`, `navigation`, `sales` (formerly `crm`), `prospecting` (formerly `leadGen`), `projects` (formerly `delivery`)
19
19
 
20
20
  **Organizational reality:** `identity`, `customers`, `offerings`, `roles`, `goals`
21
21
 
22
+ **Governance:** `systems`, `resources`
23
+
22
24
  **Vibe layer:** `statuses`, `operations`
23
25
 
24
- The `resourceMappings` entries may carry an optional `techStack` extension (`platform`, `purpose`, `credentialStatus`, `isSystemOfRecord`) without introducing a new top-level domain.
26
+ Resource identity is authored once in `resources.entries`. Operations imports those descriptors and derives runtime `resourceId` / `type` while assembling the `DeploymentSpec`.
25
27
 
26
28
  ### Domain Rename Note
27
29
 
@@ -73,18 +75,18 @@ All paths under `node_modules/@elevasis/sdk/reference/scaffold/`:
73
75
  - Vibe domain types: `OrganizationModelStatuses`, `OrganizationModelOperations`
74
76
  - TechStack: `TechStackEntrySchema`, `OrganizationModelTechStackEntry`
75
77
  - Use constants instead of magic strings when overriding the org model.
76
- - `@elevasis/core/entities` -- entity contracts barrel. Exports `BaseProject`, `BaseProjectSchema`, `BaseProjectInput` and the equivalents for `Milestone`, `Task`, `Deal`, `Company`, `Contact`. Each base interface is generic over a `\<TMeta>` extension slot. Extend these in `foundations/types/entities.ts` to add project-specific fields.
78
+ - `@elevasis/core/entities` -- entity contracts barrel. Exports `BaseProject`, `BaseProjectSchema`, `BaseProjectInput` and the equivalents for `Milestone`, `Task`, `Deal`, `Company`, `Contact`. Each base interface is generic over a `\<TMeta>` extension slot. Extend these in `core/types/entities.ts` to add project-specific fields.
77
79
 
78
80
  ## When Working with Organization OS
79
81
 
80
- - **Changing org model (structural reality):** Use `/knowledge` as the entry point. Direct edits to `foundations/config/organization-model.ts` are discouraged -- `/knowledge` runs the read propose confirm write validate ceremony. Run `/knowledge` for the full layered flow or `/knowledge \<domain>` for a targeted domain.
82
+ - **Changing org model (structural reality):** Use `/knowledge` as the entry point. Direct edits to `core/config/organization-model.ts` are discouraged -- `/knowledge` runs the read -> propose -> confirm -> write -> validate ceremony. Run `/knowledge` for the full layered flow or `/knowledge \<domain>` for a targeted domain.
81
83
  - **Building or extending CRM:** Start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md`. CRM spans Organization OS sales semantics, shared UI primitives, deal hooks, workflow adapters, and generated contracts.
82
84
  - **Building or extending lead gen:** Start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md`. Lead gen spans Organization OS prospecting semantics, shared UI primitives, list/member hooks, artifact hooks, workflow adapters, and generated contracts.
83
85
  - **Customizing CRM deal actions:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md`. Do not add `sales.actions` to the org model; the v1 server-side override surface is intentionally deferred.
84
86
  - **Adding a feature:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md`. For toggling an existing feature, use `/knowledge features`.
85
87
  - **Adding a resource:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md`.
86
- - **Extending entities:** Start with `foundations/types/entities.ts` for the demo extension pattern. Base shapes come from `@elevasis/core/entities`.
87
- - **Authoring a workflow that takes a Project/Deal/etc.:** Reference entity types from `foundations/types/entities.ts` in the input schema -- do not redeclare them.
88
+ - **Extending entities:** Start with `core/types/entities.ts` for the demo extension pattern. Base shapes come from `@elevasis/core/entities`.
89
+ - **Authoring a workflow that takes a Project/Deal/etc.:** Reference entity types from `core/types/entities.ts` in the input schema -- do not redeclare them.
88
90
  - **Understanding contracts:** Check `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` for current type shapes.
89
91
  - **Debugging sync issues:** Check `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` for the verification pipeline.
90
92
 
@@ -100,7 +102,7 @@ All paths under `node_modules/@elevasis/sdk/reference/scaffold/`:
100
102
  - `/knowledge offerings` -- products and services with pricing model and segment references
101
103
  - `/knowledge roles` -- role chart with responsibilities, reporting lines, and holders
102
104
  - `/knowledge goals` -- organizational goals with period and measurable outcomes
103
- - `/knowledge techStack` -- external-SaaS integration metadata on resource mappings
105
+ - `/knowledge techStack` -- external-SaaS and integration context; resource identity still belongs in OM Resources descriptors
104
106
  - `/knowledge features` -- enable, disable, or add features
105
107
  - `/knowledge labels` -- edit display labels on enum entries (statuses, stages)
106
108
 
@@ -17,7 +17,7 @@ The main join points are:
17
17
  - `ui/src/main.tsx` -- boots the app with `ElevasisUIProvider`, query client, theme config, WorkOS AuthKit, notifications, and the generated route tree
18
18
  - `ui/src/routes/__root.tsx` -- composes the authenticated shell with `ElevasisFeaturesProvider`, published feature manifests, app-local dashboard nav, shell runtime dependencies, and `FeatureShell`
19
19
  - `ui/src/config/nav-items.ts` -- keeps the host-local dashboard entry separate from the published feature manifests
20
- - `foundations/config/organization-model.ts` -- is the template's semantic source of truth, adapting `@elevasis/core/organization-model` into the preserved branding, dashboard label, quick-access, feature-label, and legacy surface helpers the shell still uses
20
+ - `core/config/organization-model.ts` -- is the template's semantic source of truth, adapting `@elevasis/core/organization-model` into the preserved branding, dashboard label, quick-access, feature-label, resource descriptors, and shell helpers
21
21
 
22
22
  Published feature manifests mounted by the template shell:
23
23
 
@@ -32,7 +32,7 @@ Important distinction:
32
32
 
33
33
  - shared manifests gate on grouped org-model keys such as `acquisition` and `delivery`
34
34
  - template routes and local nav may still use legacy aliases such as `crm`, `lead-gen`, and `projects`
35
- - `foundations/config/organization-model.ts` and `ui/src/lib/hooks/useFeatureAccess.ts` are the bridge between those two vocabularies
35
+ - `core/config/organization-model.ts` and `ui/src/lib/hooks/useFeatureAccess.ts` are the bridge between those two vocabularies
36
36
 
37
37
  Dashboard remains a host-local route at `/`, not a shared feature manifest.
38
38
 
@@ -165,7 +165,7 @@ The main template-owned customization surfaces are:
165
165
  - `ui/src/config/background.tsx` -- shared background treatment
166
166
  - `ui/src/config/loader.tsx` -- global loader element
167
167
  - `ui/src/config/nav-items.ts` -- app-local nav entries, including the preserved dashboard/home entry
168
- - `foundations/config/organization-model.ts` -- product labels, feature enablement, semantic surfaces, canonical-to-legacy surface aliases, and quick-access behavior
168
+ - `core/config/organization-model.ts` -- product labels, feature enablement, resource descriptors, semantic surfaces, canonical-to-legacy surface aliases, and quick-access behavior
169
169
  - `ui/src/config/README.md` -- the deeper guide for those config files
170
170
 
171
171
  ## Customizing Feature Sidebars
@@ -71,7 +71,7 @@ bucket, catalog entry, progress step, pipeline column, or similarly closed busin
71
71
  also show the cross-system impact before the normal description:
72
72
 
73
73
  1. Read `node_modules/@elevasis/sdk/reference/spine/spine-primer.md` for the layering pattern.
74
- 2. Read the relevant domain in `foundations/config/organization-model.ts`.
74
+ 2. Read the relevant domain in `core/config/organization-model.ts`.
75
75
  3. Explain the impact in vibe-coder language only: the business profile entry, the saved progress
76
76
  on each record, the automations that produce updates, and the dashboard or reports that read it.
77
77
  4. Route follow-up changes through `/knowledge <domain>`. Do not mention the technical pattern name
@@ -140,7 +140,7 @@ change and does not expose monorepo-only commands.
140
140
  This routing applies to both codify levels (decision #21 -- Codify ceremony delegated to `/knowledge`):
141
141
 
142
142
  - **Level A** (config-only edits to `organization-model.ts`, feature toggles, label renames): delegate to `/knowledge <domain>` immediately.
143
- - **Level B** (new Zod extension files in `foundations/config/extensions/`): also delegate to `/knowledge <domain>`; `/knowledge` gates Level B to explicit user asks before scaffolding a new TS file.
143
+ - **Level B** (new Zod extension files in `core/config/extensions/`): also delegate to `/knowledge <domain>`; `/knowledge` gates Level B to explicit user asks before scaffolding a new TS file.
144
144
 
145
145
  Vibe detects the intent and delegates in both cases. It does not run either pipeline itself.
146
146
 
@@ -171,7 +171,7 @@ The user wants to enable or disable a feature.
171
171
  | "Disable monitoring for now" | "Disable" + feature reference |
172
172
  | "We don't use SEO, turn it off" | Declarative + "turn it off" = feature disable |
173
173
 
174
- **Agent action:** delegate to `/knowledge features`. The ceremony (confirm + edit `foundations/config/organization-model.ts` + typecheck) belongs to `/knowledge`, not to the ambient rule.
174
+ **Agent action:** delegate to `/knowledge features`. The ceremony (confirm + edit `core/config/organization-model.ts` + typecheck) belongs to `/knowledge`, not to the ambient rule.
175
175
 
176
176
  ## Quick Reference Table
177
177
 
@@ -211,7 +211,7 @@ The threshold controls how aggressively the classifier proposes codification fro
211
211
  - `balanced` -- second mention OR explicit declaration triggers; default
212
212
  - `loose` -- first strong signal triggers a proposal
213
213
 
214
- Override per project in `foundations/config/organization-model.ts` under `vibe.classifierThreshold`. The override is merge-aware (Tier 2 sync) and will not be overwritten by template sync operations.
214
+ Override per project in `core/config/organization-model.ts` under `vibe.classifierThreshold`. The override is merge-aware (Tier 2 sync) and will not be overwritten by template sync operations.
215
215
 
216
216
  ## Phase-1 Scope
217
217
 
@@ -21,7 +21,7 @@ Before orienting, scan the user's query for Organization OS terminology. If any
21
21
  - Shell / nav: `manifest`, `shell`, `sub-shell`, `sidebar`, `nav`, `navigation`, `route`
22
22
  - Auth / guards: `guard`, `FeatureGuard`, `AdminGuard`, `ProtectedRoute`, `admin`
23
23
  - Org model: `organization`, `org model`, `organization model`, `domain`, `surface`
24
- - Foundations: `foundation`, `foundations`, `@foundation/`, `adapter`
24
+ - Foundations: `foundation`, `foundations`, `@core/`, `adapter`
25
25
  - Platform ops: `workflow`, `agent`, `deployment`, `resource`
26
26
 
27
27
  **If OS-relevant:**
@@ -30,8 +30,8 @@ Before orienting, scan the user's query for Organization OS terminology. If any
30
30
  2. Build the OS context bundle to pass into Step 3:
31
31
  - Always: `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md`, `.claude/rules/active-change-index.md`, `.claude/rules/agent-start-here.md`
32
32
  - Features / Shell / Gating queries: add `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` + `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
33
- - Workflow / Operations queries: add `.claude/rules/operations.md` + glob `operations/resources/**`
34
- - Organization-model queries: add `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` + `foundations/config/README.md`
33
+ - Workflow / Operations queries: add `.claude/rules/operations.md` + glob `operations/src/**`
34
+ - Organization-model queries: add `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` + `core/config/README.md`
35
35
 
36
36
  **OS layer → query intent map** (guides which reference docs the investigator loads first):
37
37
 
@@ -41,7 +41,7 @@ Before orienting, scan the user's query for Organization OS terminology. If any
41
41
  | "How do I add a nav item?" | Features + Toolkit | `feature-flags-and-gating.md`, `contracts.md` |
42
42
  | "How does admin gating work?" | Features + UI Shell Runtime | `glossary.md` (AdminGuard, requiresAdmin, ProtectedRoute), `feature-flags-and-gating.md` |
43
43
  | "What runs when this workflow triggers?" | Platform Public API + Operations | `.claude/rules/operations.md`, `resources.md` |
44
- | "Why does the foundations adapter fail?" | Foundations | `glossary.md` (domain vs surface, settings asymmetry), `foundations/config/README.md` |
44
+ | "Why does the foundations adapter fail?" | Foundations | `glossary.md` (domain vs surface, settings asymmetry), `core/config/README.md` |
45
45
 
46
46
  ### Step 1: Orient
47
47
 
@@ -11,14 +11,14 @@ description: |
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
- foundations/config/organization-model.ts, packages/elevasis-core/src/organization-model.ts,
14
+ core/config/organization-model.ts, packages/elevasis-core/src/organization-model.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.
18
18
  metadata:
19
19
  pathPatterns:
20
20
  - "core/config/organization-model.ts"
21
- - "foundations/config/organization-model.ts"
21
+ - "core/config/organization-model.ts"
22
22
  - "packages/elevasis-core/src/organization-model.ts"
23
23
  - "packages/core/src/knowledge/**"
24
24
  promptSignals:
@@ -72,7 +72,7 @@ This skill auto-invokes whenever:
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
- `foundations/config/organization-model.ts`, `packages/elevasis-core/src/organization-model.ts`,
75
+ `core/config/organization-model.ts`, `packages/elevasis-core/src/organization-model.ts`,
76
76
  or `packages/core/src/knowledge/**`
77
77
 
78
78
  Auto-invocation is driven by frontmatter `description`, `metadata.pathPatterns`, and
@@ -131,9 +131,9 @@ through `/knowledge`; do not point them at monorepo-only commands.
131
131
  ```bash
132
132
  pnpm exec elevasis knowledge:ls
133
133
  pnpm exec elevasis knowledge:cat <node-id>
134
- pnpm exec elevasis knowledge:graph --axis by-feature
135
- pnpm exec elevasis knowledge:graph --axis by-domain
136
- pnpm exec elevasis knowledge:graph --mount <mount-id>
134
+ pnpm exec elevasis knowledge:ls /by-feature/<feature-id>
135
+ pnpm exec elevasis knowledge:ls /by-owner/<owner-id>
136
+ pnpm exec elevasis knowledge:graph <node-id>
137
137
  ```
138
138
 
139
139
  ### External projects (org instance)
@@ -141,14 +141,15 @@ pnpm exec elevasis knowledge:graph --mount <mount-id>
141
141
  ```bash
142
142
  pnpm exec elevasis-sdk knowledge:ls
143
143
  pnpm exec elevasis-sdk knowledge:cat <node-id>
144
- pnpm exec elevasis-sdk knowledge:graph --axis by-feature
145
- pnpm exec elevasis-sdk knowledge:graph --axis by-domain
146
- pnpm exec elevasis-sdk knowledge:graph --mount <mount-id>
144
+ pnpm exec elevasis-sdk knowledge:ls /by-feature/<feature-id>
145
+ pnpm exec elevasis-sdk knowledge:ls /by-owner/<owner-id>
146
+ pnpm exec elevasis-sdk knowledge:graph <node-id>
147
147
  ```
148
148
 
149
149
  Use `knowledge:ls` to enumerate all knowledge nodes. Use `knowledge:cat` to read a specific
150
- node's content. Use `knowledge:graph` to navigate the governance graph -- `by-feature` is the
151
- default axis for "what governs X?" queries; `by-domain` for domain-wide surveys.
150
+ node's content. Use `knowledge:ls /by-feature/<feature-id>` or
151
+ `knowledge:ls /by-owner/<owner-id>` to navigate feature and owner groupings. Use
152
+ `knowledge:graph <node-id>` to inspect incoming and outgoing graph edges for a specific node.
152
153
 
153
154
  ### `/knowledge read-folder` (chat shorthand from the Knowledge Browser)
154
155
 
@@ -175,7 +176,7 @@ preserved verbatim from `/configure`.
175
176
 
176
177
  ### Step 1: Snapshot
177
178
 
178
- Read `foundations/config/organization-model.ts` (external) or the appropriate platform OM file
179
+ Read `core/config/organization-model.ts` (external) or the appropriate platform OM file
179
180
  (monorepo) into memory before any edit. This is the rollback target.
180
181
 
181
182
  ### Step 2: Propose
@@ -214,9 +215,9 @@ The rollback is mandatory -- never leave the project in a broken state.
214
215
 
215
216
  **Two-level ceremony:**
216
217
 
217
- - **Level A** -- config-only edits to existing schema fields in `foundations/config/organization-model.ts`.
218
+ - **Level A** -- config-only edits to existing schema fields in `core/config/organization-model.ts`.
218
219
  Execute: `.claude/skills/knowledge/operations/codify-level-a.md`
219
- - **Level B** -- new Zod extension files in `foundations/config/extensions/`. Gated to explicit
220
+ - **Level B** -- new Zod extension files in `core/config/extensions/`. Gated to explicit
220
221
  user ask. On casual second mentions of a new type, suggest Level B and wait for confirmation
221
222
  rather than scaffolding automatically.
222
223
  Execute: `.claude/skills/knowledge/operations/codify-level-b.md`
@@ -250,8 +251,8 @@ and routing.
250
251
 
251
252
  In external projects (`external/nirvana-marketing`, `external/ZentaraHQ`, etc.) this skill has
252
253
  full power: read + write + codify + toggle. The org-model file is
253
- `foundations/config/organization-model.ts` (or `core/config/organization-model.ts` for
254
- `external/_template`-derived projects). Extension files live in `foundations/config/extensions/`.
254
+ `core/config/organization-model.ts` (or `core/config/organization-model.ts` for
255
+ `external/_template`-derived projects). Extension files live in `core/config/extensions/`.
255
256
 
256
257
  This is the environment where Codify and Toggle intents write. All six ceremony steps apply.
257
258
 
@@ -1,7 +1,7 @@
1
1
  # Codify Pipeline: Level A (Config-Only Edits)
2
2
 
3
3
  Level A is the codify pipeline for changes that land exclusively in
4
- `foundations/config/organization-model.ts`. No new TypeScript files are created. The entire
4
+ `core/config/organization-model.ts`. No new TypeScript files are created. The entire
5
5
  ceremony is: snapshot current file, propose the edit, write the edit, validate, and roll back on
6
6
  failure.
7
7
 
@@ -15,18 +15,18 @@ the specific field/block being changed and the proposed new value.
15
15
 
16
16
  ### Step 1: Snapshot
17
17
 
18
- Before any write, read `foundations/config/organization-model.ts` and keep the full file content
18
+ Before any write, read `core/config/organization-model.ts` and keep the full file content
19
19
  in memory as the rollback snapshot. Do not write any file during this step.
20
20
 
21
21
  ```
22
- Read("foundations/config/organization-model.ts")
22
+ Read("core/config/organization-model.ts")
23
23
  -- store as ROLLBACK_SNAPSHOT
24
24
  ```
25
25
 
26
26
  ### Step 2: Apply the edit
27
27
 
28
28
  Use the Edit tool to apply the caller's proposed change to
29
- `foundations/config/organization-model.ts`.
29
+ `core/config/organization-model.ts`.
30
30
 
31
31
  Rules for the edit:
32
32
 
@@ -67,7 +67,7 @@ If either validation step fails, proceed to Step 5 (rollback).
67
67
 
68
68
  If Step 3 or Step 4 failed:
69
69
 
70
- 1. Write the ROLLBACK_SNAPSHOT content back to `foundations/config/organization-model.ts`
70
+ 1. Write the ROLLBACK_SNAPSHOT content back to `core/config/organization-model.ts`
71
71
  verbatim (use the Write tool with the exact snapshot content).
72
72
  2. Confirm the file has been restored by checking that the content matches the snapshot.
73
73
  3. Return the error message to the caller.
@@ -90,9 +90,9 @@ The caller formats and presents the final report.
90
90
 
91
91
  Callers must provide before invoking this pipeline:
92
92
 
93
- - **Target file:** always `foundations/config/organization-model.ts`
93
+ - **Target file:** always `core/config/organization-model.ts`
94
94
  - **Target block:** the specific domain key or sub-key being changed (e.g. `identity`,
95
- `customers.segments`, `roles.roles`, `resourceMappings[id="rm-hubspot"].techStack`)
95
+ `customers.segments`, `roles.roles`, `resources.entries[id="hubspot"]`)
96
96
  - **Proposed value:** the new TypeScript literal to write for that block
97
97
  - **Confirmed:** the user has already said yes to the proposed change
98
98