@elevasis/sdk 1.5.3 → 1.5.5

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 +967 -57
  2. package/dist/index.d.ts +94 -110
  3. package/package.json +2 -2
  4. package/reference/_navigation.md +11 -1
  5. package/reference/_reference-manifest.json +70 -0
  6. package/reference/claude-config/commands/submit-issue.md +11 -0
  7. package/reference/claude-config/hooks/post-edit-validate.mjs +109 -0
  8. package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -0
  9. package/reference/claude-config/rules/deployment.md +57 -0
  10. package/reference/claude-config/rules/docs.md +26 -0
  11. package/reference/claude-config/rules/error-handling.md +56 -0
  12. package/reference/claude-config/rules/execution.md +40 -0
  13. package/reference/claude-config/rules/frontend.md +43 -0
  14. package/reference/claude-config/rules/observability.md +31 -0
  15. package/reference/claude-config/rules/organization-os.md +62 -0
  16. package/reference/claude-config/rules/platform.md +41 -0
  17. package/reference/claude-config/rules/shared-types.md +46 -0
  18. package/reference/claude-config/rules/task-tracking.md +47 -0
  19. package/reference/claude-config/scripts/statusline-command.js +18 -0
  20. package/reference/claude-config/settings.json +30 -0
  21. package/reference/claude-config/skills/deploy/SKILL.md +166 -0
  22. package/reference/claude-config/skills/dsp/SKILL.md +66 -0
  23. package/reference/claude-config/skills/elevasis/SKILL.md +239 -0
  24. package/reference/claude-config/skills/explore/SKILL.md +78 -0
  25. package/reference/claude-config/skills/project/SKILL.md +918 -0
  26. package/reference/claude-config/skills/save/SKILL.md +197 -0
  27. package/reference/claude-config/skills/setup/SKILL.md +210 -0
  28. package/reference/claude-config/skills/status/SKILL.md +60 -0
  29. package/reference/claude-config/skills/submit-issue/SKILL.md +165 -0
  30. package/reference/claude-config/skills/sync/SKILL.md +81 -0
  31. package/reference/cli.mdx +19 -4
  32. package/reference/deployment/provided-features.mdx +24 -2
  33. package/reference/framework/agent.mdx +12 -4
  34. package/reference/framework/project-structure.mdx +9 -3
  35. package/reference/packages/core/src/README.md +1 -1
  36. package/reference/packages/core/src/business/README.md +52 -0
  37. package/reference/packages/core/src/organization-model/README.md +25 -26
  38. package/reference/packages/ui/src/app/README.md +24 -0
  39. package/reference/platform-tools/type-safety.mdx +0 -10
  40. package/reference/scaffold/core/organization-graph.mdx +37 -28
  41. package/reference/scaffold/core/organization-model.mdx +34 -36
  42. package/reference/scaffold/index.mdx +1 -0
  43. package/reference/scaffold/operations/propagation-pipeline.md +7 -3
  44. package/reference/scaffold/operations/scaffold-maintenance.md +2 -2
  45. package/reference/scaffold/operations/workflow-recipes.md +18 -1
  46. package/reference/scaffold/recipes/add-a-feature.md +37 -21
  47. package/reference/scaffold/recipes/add-a-resource.md +4 -2
  48. package/reference/scaffold/recipes/customize-organization-model.md +400 -0
  49. package/reference/scaffold/recipes/extend-a-base-entity.md +140 -0
  50. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +18 -12
  51. package/reference/scaffold/recipes/index.md +3 -3
  52. package/reference/scaffold/reference/contracts.md +11 -32
  53. package/reference/scaffold/reference/feature-registry.md +10 -9
  54. package/reference/scaffold/reference/glossary.md +14 -18
  55. package/reference/scaffold/ui/customization.md +2 -2
  56. package/reference/scaffold/ui/feature-flags-and-gating.md +40 -54
  57. package/reference/scaffold/ui/feature-shell.mdx +22 -23
  58. package/reference/scaffold/ui/recipes.md +118 -3
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: sync
3
+ description: Pull latest changes, wipe all node_modules and caches, fresh reinstall
4
+ ---
5
+
6
+ # Sync
7
+
8
+ Pull latest changes, wipe all stale packages and caches, fresh reinstall.
9
+
10
+ **Usage:** `/sync`
11
+
12
+ Use this when: packages feel stale, Vite cache is serving old code, `pnpm install` didn't fully clean up after a package version bump, or after pulling a branch with dependency changes.
13
+
14
+ ## Process
15
+
16
+ ### Step 1: Check for Uncommitted Changes
17
+
18
+ ```bash
19
+ git status --short
20
+ ```
21
+
22
+ If there are uncommitted changes (modified, staged, or untracked files), ask the user:
23
+
24
+ ```
25
+ You have uncommitted changes:
26
+ <git status --short output>
27
+
28
+ Commit and push before syncing? (yes/no)
29
+ ```
30
+
31
+ - **Yes** — ask for a commit message (or auto-generate one from the diff), then:
32
+ ```bash
33
+ git add -A
34
+ git commit -m "<message>"
35
+ git push
36
+ ```
37
+ If commit or push fails, stop and report the error.
38
+ - **No** — stop and let the user decide:
39
+ ```
40
+ Sync cancelled. Commit, stash, or discard your changes, then re-run /sync.
41
+ ```
42
+
43
+ ### Step 2: Pull
44
+
45
+ ```bash
46
+ git pull
47
+ ```
48
+
49
+ Report any merge conflicts and stop.
50
+
51
+ ### Step 3: Wipe
52
+
53
+ Remove all `node_modules` and build caches across the workspace in parallel:
54
+
55
+ ```bash
56
+ rm -rf node_modules
57
+ rm -rf ui/node_modules
58
+ rm -rf ui/node_modules/.vite
59
+ rm -rf operations/node_modules
60
+ rm -rf shared/node_modules
61
+ ```
62
+
63
+ ### Step 4: Reinstall
64
+
65
+ ```bash
66
+ pnpm install
67
+ ```
68
+
69
+ Report success or any errors.
70
+
71
+ ### Step 5: Report
72
+
73
+ ```
74
+ Sync Complete
75
+ =============
76
+ Git: pulled (<branch>)
77
+ Wiped: node_modules (root, ui, operations, shared) + Vite cache
78
+ Install: success
79
+ ```
80
+
81
+ If `pnpm install` fails, report the error and stop — do not attempt to start the dev server.
package/reference/cli.mdx CHANGED
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  title: CLI Reference
3
- description: Full reference for every elevasis-sdk CLI command -- validate, deploy, execute, inspect resources, and operate project-management surfaces
3
+ description: Full reference for every elevasis-sdk CLI command -- validate, deploy, execute, inspect resources, and manage Projects through the canonical SDK CLI surface
4
4
  loadWhen: "Running CLI operations"
5
5
  ---
6
6
 
7
- The `elevasis-sdk` CLI is the primary interface for working with your Elevasis SDK project. Install it as part of `@elevasis/sdk` and use it to validate resource definitions, deploy to the platform, inspect execution history, and work with the shared project-management API surfaces.
7
+ The `elevasis-sdk` CLI is the primary interface for working with your Elevasis SDK project. Install it as part of `@elevasis/sdk` and use it to validate resource definitions, deploy to the platform, inspect execution history, and manage Projects through `project:*`.
8
8
 
9
9
  **Installation:**
10
10
 
@@ -505,7 +505,15 @@ elevasis-sdk rename ist-upload-workflow --to ist-upload-contacts-workflow --exec
505
505
 
506
506
  ## elevasis-sdk project:\*
507
507
 
508
- Project-management commands operate on the shared delivery system used by packaged Projects pages and task-oriented agent workflows.
508
+ `elevasis-sdk project:*` is the canonical project-management surface. Use it for project, milestone, task, and note operations whether the caller is a human, a scripted workflow, or a slash-command router like `/project`.
509
+
510
+ This CLI family is SDK-first, but it is not semantically standalone. It operates on the same Organization OS contract that the shared delivery UI uses:
511
+
512
+ - UI manifest key: `delivery`
513
+ - Organization model feature ID: `projects`
514
+ - Default surface: `projects.index`
515
+ - Semantic domain fields: `organizationModel.delivery`
516
+ - Core entity/capability IDs: `delivery.project`, `delivery.milestone`, `delivery.task`, `delivery.projects.view`
509
517
 
510
518
  ### Projects
511
519
 
@@ -573,6 +581,13 @@ Most `project:*` commands support:
573
581
 
574
582
  For exact required flags and accepted enum values, see the command source under `packages/sdk/src/cli/commands/project/`.
575
583
 
584
+ ### Command Boundary
585
+
586
+ - `/project` is a convenience router to these `elevasis-sdk project:*` commands. It is not a separate project system.
587
+ - `/work` is for docs-backed in-progress task tracking and session resume, not project CRUD.
588
+ - `/external` is for managing standalone apps in `external/`, not project records inside a deployed system.
589
+ - `/adev` is for implementation, debugging, testing, and platform execution flows. Use it when you need to build or run agent/workflow code rather than update project data.
590
+
576
591
  ---
577
592
 
578
593
  ## Global Flags
@@ -593,4 +608,4 @@ These flags are accepted by all commands:
593
608
 
594
609
  ---
595
610
 
596
- **Last Updated:** 2026-04-15
611
+ **Last Updated:** 2026-04-17
@@ -88,7 +88,7 @@ This is the published contract split in `@elevasis/ui@2.9.0`:
88
88
  | Exported compatibility components | Reusable components exported without a manifest-backed shell contract | Dashboard components such as `Dashboard`, `OperationsOverview`, `ResourceOverview`, `RecentExecutionsByResource`, `UnresolvedErrorsTeaser` |
89
89
  | Compatibility barrel | Existing imports remain available from `@elevasis/ui/components`, but new host integrations should prefer feature/provider subpaths | Manifests, sidebars, and page components re-exported for compatibility |
90
90
 
91
- Projects is currently the only packaged system with a first-class `elevasis-sdk project:*` CLI family. Lead Gen and CRM are still primarily UI + API + workflow/runtime surfaces, and browser-facing interactions remain REST-driven even when runtime tools exist.
91
+ Projects is currently the only packaged system with a first-class `elevasis-sdk project:*` CLI family. Treat that CLI family as the canonical project-management path. Lead Gen and CRM are still primarily UI + API + workflow/runtime surfaces, and browser-facing interactions remain REST-driven even when runtime tools exist.
92
92
 
93
93
  ## System Map
94
94
 
@@ -233,6 +233,15 @@ That means downstream users can build against CRM with shared UI, API, and runti
233
233
 
234
234
  Projects is the packaged delivery/project-management system. It has both a shared UI surface and a first-class CLI surface in `elevasis-sdk`, plus a dedicated runtime adapter for workflow and agent use.
235
235
 
236
+ Within Organization OS, this packaged system sits on the **delivery** semantic domain but is exposed as the first-class feature ID **`projects`**. In practice that means:
237
+
238
+ - the published UI manifest is `deliveryManifest`
239
+ - the manifest gates against `featureId: 'projects'`
240
+ - the default navigation surface is `projects.index`
241
+ - the underlying semantic entities and capabilities still use delivery-scoped IDs such as `delivery.project`, `delivery.milestone`, `delivery.task`, and `delivery.projects.view`
242
+
243
+ Treat `elevasis-sdk project:*` as the operational interface to that same contract, not as a separate project system layered beside Organization OS.
244
+
236
245
  ### Shared UI Surface
237
246
 
238
247
  `@elevasis/ui/features/delivery` exports:
@@ -260,7 +269,7 @@ Projects is the packaged delivery/project-management system. It has both a share
260
269
 
261
270
  ### CLI Surface
262
271
 
263
- The SDK CLI now exposes project-management commands:
272
+ The SDK CLI exposes the canonical project-management commands:
264
273
 
265
274
  ```bash
266
275
  elevasis-sdk project:list
@@ -277,6 +286,19 @@ elevasis-sdk project:task:save <task-id> --current-state "Implemented the API sl
277
286
 
278
287
  This matters for downstream user agents because project tasks now have a resumable machine-readable surface. `project:task:resume` returns `resume_context`, and `project:task:save` updates it.
279
288
 
289
+ For semantic context, the CLI maps onto the same Organization OS contract that drives the shared shell:
290
+
291
+ - project records correspond to the `projects` feature in the organization model
292
+ - the shared UI route space resolves through `projects.index`
293
+ - status semantics still come from `organizationModel.delivery`, not from a separate CLI-only schema
294
+
295
+ ### Command Boundary
296
+
297
+ - `/project` should route here. It is a convenience layer over `elevasis-sdk project:*`, not a separate system.
298
+ - `/work` should stay focused on docs-backed task tracking and resume notes.
299
+ - `/external` applies only to standalone apps in `external/`.
300
+ - `/adev` applies when building, testing, debugging, or executing resources, not when managing project records.
301
+
280
302
  ---
281
303
 
282
304
  ## Choosing The Right Surface
@@ -52,7 +52,7 @@ The following skills are scaffolded by `elevasis-sdk init` and committed to vers
52
52
  | `/setup` | `skills/setup/SKILL.md` | First-time project setup (placeholder replacement, deps) |
53
53
  | `/status` | `skills/status/SKILL.md` | Quick project health check |
54
54
  | `/continue` | `skills/continue/SKILL.md` | Resume in-progress work from docs |
55
- | `/project` | `skills/project/SKILL.md` | Client project management via elevasis-sdk |
55
+ | `/project` | `skills/project/SKILL.md` | Route project management to `elevasis-sdk project:*` |
56
56
  | `/sync` | `skills/sync/SKILL.md` | Pull latest, wipe caches, fresh reinstall |
57
57
  | `/explore` | `skills/explore/SKILL.md` | Codebase exploration anchored to docs |
58
58
  | `/save` | `skills/save/SKILL.md` | Auto-manage docs from conversation context |
@@ -66,7 +66,7 @@ The following skills are scaffolded by `elevasis-sdk init` and committed to vers
66
66
 
67
67
  **`/elevasis`** -- SDK operations entry point: `check` validates resource definitions, `deploy` bundles and uploads, `exec` runs a resource with input.
68
68
 
69
- **`/work`** -- File-based task lifecycle. Creates, resumes, saves, and completes task docs in `docs/in-progress/`. Intent-driven: the agent detects what to do from context.
69
+ **`/work`** -- File-based task lifecycle. Creates, resumes, saves, and completes task docs in `docs/in-progress/`. It tracks in-progress work state, not project records.
70
70
 
71
71
  **`/status`** -- Quick project health check: shows SDK version, deployed resources, last deploy date, and environment status.
72
72
 
@@ -76,7 +76,15 @@ The following skills are scaffolded by `elevasis-sdk init` and committed to vers
76
76
 
77
77
  **`/continue`** -- Resumes in-progress work by reading `docs/in-progress/` and picking up where the last session left off.
78
78
 
79
- **`/project`** -- Client project management: milestones, tasks, and notes via `elevasis-sdk project` commands.
79
+ **`/project`** -- Project-management routing for milestones, tasks, notes, and status. It should call the canonical `elevasis-sdk project:*` CLI surface rather than inventing a parallel workflow.
80
+
81
+ That routing is interface-first, not a separate semantic model. `/project` should treat the SDK CLI as the operational entrypoint for the Organization OS delivery/projects contract: `deliveryManifest` in the shared UI, `featureId: 'projects'` in the organization model, and `organizationModel.delivery` for project/milestone/task status semantics.
82
+
83
+ When these command families overlap conceptually, use this boundary:
84
+
85
+ - `/project` -- update or inspect project data in the shared Projects system
86
+ - `/work` -- capture implementation progress and resume context in docs
87
+ - `/adev` -- build, debug, test, or execute resources
80
88
 
81
89
  **`/dsp`** -- Dispatches subagents in parallel for implementation tasks that can run concurrently.
82
90
 
@@ -145,4 +153,4 @@ The `CLAUDE.md` Interaction Guidance section translates skill dimensions from `m
145
153
 
146
154
  ---
147
155
 
148
- **Last Updated:** 2026-03-03
156
+ **Last Updated:** 2026-04-17
@@ -94,7 +94,7 @@ This file is NOT scaffolded by default. The agent creates it the first time you
94
94
 
95
95
  ### `docs/in-progress/`
96
96
 
97
- Work-in-progress task documents managed by `/work`. Each file represents an active work item with objective, plan, progress markers, and resume context. When all steps are complete, the agent suggests finalizing the task, which moves finished items to their permanent location in `docs/`.
97
+ Work-in-progress task documents managed by `/work`. Each file represents an active work item with objective, plan, progress markers, and resume context. This is separate from the Projects data model exposed through `elevasis-sdk project:*`. When all steps are complete, the agent suggests finalizing the task, which moves finished items to their permanent location in `docs/`.
98
98
 
99
99
  This directory is NOT deployed -- it is filtered out during the doc scan in `elevasis-sdk deploy`.
100
100
 
@@ -229,10 +229,16 @@ The `.claude/skills/` directory contains skills covering the core development lo
229
229
  - **`/save`** -- Auto-manage docs from conversation context
230
230
  - **`/explore`** -- Codebase exploration anchored to docs
231
231
  - **`/continue`** -- Resume in-progress work from docs
232
- - **`/project`** -- Client project management via elevasis-sdk
232
+ - **`/project`** -- Routes project management to the canonical `elevasis-sdk project:*` commands
233
233
  - **`/dsp`** -- Parallel agent dispatch for implementation tasks
234
234
  - **`/sync`** -- Pull latest, wipe caches, fresh reinstall
235
235
 
236
+ Boundary summary:
237
+
238
+ - `/project` updates shared project records
239
+ - `/work` manages docs-backed work tracking
240
+ - `/adev` handles implementation and execution work
241
+
236
242
  For detailed command documentation, see [Agent System](agent).
237
243
 
238
244
  ---
@@ -275,4 +281,4 @@ Not all scaffolded files participate in template updates. Files fall into two ca
275
281
 
276
282
  ---
277
283
 
278
- **Last Updated:** 2026-03-03
284
+ **Last Updated:** 2026-04-17
@@ -23,7 +23,7 @@ Within the monorepo, the internal `@repo/core` package exposes additional subpat
23
23
  - `@repo/core/server` - Node.js-only helpers and services.
24
24
  - `@repo/core/platform` - shared constants, utilities, registry, SSE, and API types.
25
25
  - `@repo/core/auth` - multi-tenancy types for organizations, users, memberships, invitations, and credentials.
26
- - `@repo/core/execution` - workflow, agent, scheduler, calibration, and execution-interface contracts.
26
+ - `@repo/core/execution` - workflow, agent, scheduler, and execution-interface contracts.
27
27
  - `@repo/core/commands` - command queue types and schemas.
28
28
  - `@repo/core/operations` - sessions, notifications, observability, activities, triggers, and debug logs.
29
29
  - `@repo/core/supabase` - generated database types and helpers.
@@ -0,0 +1,52 @@
1
+ # Entities
2
+
3
+ Published base entity contracts for the Elevasis platform. Each entity ships as a TypeScript interface, a matching Zod schema, and an inferred `Input` type, generic over a `<TMeta>` extension slot.
4
+
5
+ External projects extend these in `foundations/types/entities.ts` to attach project-specific metadata while keeping the canonical shape stable.
6
+
7
+ ## Published Exports
8
+
9
+ The published entry point exposes six entity contracts:
10
+
11
+ - `BaseProject<TMeta>`, `BaseProjectSchema`, `BaseProjectInput`
12
+ - `BaseMilestone<TMeta>`, `BaseMilestoneSchema`, `BaseMilestoneInput`
13
+ - `BaseTask<TMeta>`, `BaseTaskSchema`, `BaseTaskInput`
14
+ - `BaseDeal<TMeta>`, `BaseDealSchema`, `BaseDealInput`
15
+ - `BaseCompany<TMeta>`, `BaseCompanySchema`, `BaseCompanyInput`
16
+ - `BaseContact<TMeta>`, `BaseContactSchema`, `BaseContactInput`
17
+
18
+ Import them from the published subpath:
19
+
20
+ ```ts
21
+ import { BaseDealSchema, type BaseDeal } from '@elevasis/core/entities'
22
+ ```
23
+
24
+ ## Extension Pattern
25
+
26
+ Each base interface accepts a generic metadata type. Extend the schema with `.extend({ metadata: ... })` and infer the type with `BaseProject<z.infer<typeof MetaSchema>>`.
27
+
28
+ ```ts
29
+ import { z } from 'zod'
30
+ import { BaseProjectSchema, type BaseProject } from '@elevasis/core/entities'
31
+
32
+ const ProjectMetaSchema = z.object({
33
+ budget: z.number().int().nonnegative(),
34
+ clientPriority: z.enum(['low', 'medium', 'high'])
35
+ })
36
+
37
+ export const ProjectSchema = BaseProjectSchema.extend({ metadata: ProjectMetaSchema })
38
+ export type Project = BaseProject<z.infer<typeof ProjectMetaSchema>>
39
+ ```
40
+
41
+ Use the base shape as-is when no extension is needed:
42
+
43
+ ```ts
44
+ export const DealSchema = BaseDealSchema
45
+ export type Deal = BaseDeal
46
+ ```
47
+
48
+ ## Recipe
49
+
50
+ The full pattern is documented in the SDK scaffold bundle: `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-a-base-entity.md`.
51
+
52
+ The canonical template demo lives at `external/_template/foundations/types/entities.ts`.
@@ -12,6 +12,9 @@ The public entry point exposes:
12
12
  - `DEFAULT_ORGANIZATION_MODEL`
13
13
  - `defineOrganizationModel`
14
14
  - `resolveOrganizationModel`
15
+ - `PROJECTS_FEATURE_ID`
16
+ - `PROJECTS_INDEX_SURFACE_ID`
17
+ - `DELIVERY_PROJECTS_VIEW_CAPABILITY_ID`
15
18
  - `OrganizationModel` and the supporting domain types
16
19
 
17
20
  Import it from the published subpath:
@@ -19,7 +22,10 @@ Import it from the published subpath:
19
22
  ```ts
20
23
  import {
21
24
  DEFAULT_ORGANIZATION_MODEL,
25
+ DELIVERY_PROJECTS_VIEW_CAPABILITY_ID,
22
26
  defineOrganizationModel,
27
+ PROJECTS_FEATURE_ID,
28
+ PROJECTS_INDEX_SURFACE_ID,
23
29
  resolveOrganizationModel,
24
30
  type OrganizationModel
25
31
  } from '@elevasis/core/organization-model'
@@ -31,43 +37,36 @@ The model is versioned and currently validates against `version: 1`.
31
37
 
32
38
  Top-level fields:
33
39
 
34
- - `domains` - semantic domain entries that bind entity IDs, surface IDs, resource IDs, and capability IDs.
40
+ - `version` - schema version for the resolved contract.
35
41
  - `branding` - organization branding defaults and overrides.
36
- - `features` - grouped shell-level feature flags and labels.
42
+ - `features` - unified feature entries that combine enablement, labels, and semantic references.
37
43
  - `navigation` - navigation model for the product shell.
38
44
  - `crm` - CRM-specific contract data.
39
45
  - `leadGen` - lead generation contract data.
40
46
  - `delivery` - delivery and project contract data.
41
47
  - `resourceMappings` - cross-surface resource mappings.
42
48
 
43
- ## Default Domain Set
49
+ ## Default Feature Set
44
50
 
45
- The default model includes four semantic domains:
51
+ The default model includes seven feature IDs:
46
52
 
47
53
  - `crm` - deal pipeline and relationship management.
48
54
  - `lead-gen` - lists, companies, and contacts.
49
- - `delivery` - projects, milestones, and tasks.
55
+ - `projects` - projects, milestones, and tasks.
50
56
  - `operations` - organization graph and command-view surfaces.
57
+ - `monitoring` - monitoring surfaces.
58
+ - `settings` - organization settings.
59
+ - `seo` - SEO surfaces (disabled by default).
51
60
 
52
- ## Feature Keys
61
+ ## Project Bridge Constants
53
62
 
54
- The current canonical feature keys are grouped shell features:
63
+ The organization-model surface now exports a narrow set of canonical IDs for the shared Projects bridge:
55
64
 
56
- - `acquisition`
57
- - `delivery`
58
- - `operations`
59
- - `monitoring`
60
- - `settings`
61
- - `calibration`
62
- - `seo`
65
+ - `PROJECTS_FEATURE_ID` -> `projects`
66
+ - `PROJECTS_INDEX_SURFACE_ID` -> `projects.index`
67
+ - `DELIVERY_PROJECTS_VIEW_CAPABILITY_ID` -> `delivery.projects.view`
63
68
 
64
- Each feature can carry an enabled flag and an optional label override.
65
-
66
- This is intentionally different from the domain and surface vocabulary:
67
-
68
- - domains and surface IDs still use IDs such as `crm`, `lead-gen`, and `projects.index`
69
- - navigation surfaces point those routes at grouped `featureKey` values such as `acquisition` and `delivery`
70
- - downstream apps may still carry compatibility aliases for legacy route-level keys, but the published organization-model contract does not
69
+ 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.
71
70
 
72
71
  ## Resolution Semantics
73
72
 
@@ -82,13 +81,13 @@ This is intentionally different from the domain and surface vocabulary:
82
81
 
83
82
  - `navigation.defaultSurfaceId` must point at a declared navigation surface.
84
83
  - Every navigation group `surfaceId` must resolve to a declared surface.
85
- - Domain, surface, and resource-mapping IDs must resolve to declared counterparts; dangling references fail validation.
86
- - Domain-to-surface and domain/surface-to-resource links are validated in both directions so one-sided declarations fail during resolution.
87
- - Feature-bearing surfaces validate `featureKey` against the canonical grouped feature set.
84
+ - Feature, surface, and resource-mapping IDs must resolve to declared counterparts; dangling references fail validation.
85
+ - Feature-to-surface and feature/surface-to-resource links are validated in both directions so one-sided declarations fail during resolution.
86
+ - Feature-bearing surfaces validate `featureId` against the canonical feature set.
88
87
 
89
88
  ## Practical Guidance
90
89
 
91
90
  - Use `resolveOrganizationModel()` when you need a runtime-safe model for rendering or policy checks.
92
91
  - Use `defineOrganizationModel()` when authoring a static partial model in source.
93
- - Treat `features.enabled` and `features.labels` as the shell-level contract; do not use `crm`, `lead-gen`, or `projects` as canonical feature keys in new organization-model authoring.
94
- - Keep domain IDs, surface IDs, and capability IDs stable because downstream UI and policy code depend on them.
92
+ - Treat feature IDs such as `crm`, `lead-gen`, and `projects` as the canonical shell-level contract in new organization-model authoring.
93
+ - Keep feature IDs, surface IDs, and capability IDs stable because downstream UI and policy code depend on them.
@@ -0,0 +1,24 @@
1
+ # App
2
+
3
+ Published app factory for downstream applications.
4
+
5
+ ## Exports
6
+
7
+ - `createElevasisApp(config)` -- factory that composes providers, router, auth, and theme into a mountable React app
8
+ - `ElevasisAppConfig` -- configuration interface (router, query client, theme, store hooks, error handling)
9
+ - `ElevasisAppStoreConfig` -- store integration hooks for theme state
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { createElevasisApp } from '@elevasis/ui/app'
15
+
16
+ const { App } = createElevasisApp({
17
+ router,
18
+ queryClient,
19
+ store: { useThemePreset, useThemeColorScheme, useSetTheme },
20
+ themeConfig: { presets, defaultPreset },
21
+ })
22
+ ```
23
+
24
+ Consumers must import CSS separately in their entry point.
@@ -79,14 +79,4 @@ Some adapters were audited and deliberately left with flexible types. Do not tig
79
79
 
80
80
  ---
81
81
 
82
- ## Known Exceptions
83
-
84
- ### `website-extract-calibration.ts`
85
-
86
- `external/elevasis/src/client-acquisition/lead-gen-pipeline/02-extract/website-extract-calibration.ts` intentionally omits `provider` and `model` on its `llm.generate()` call. This is a calibration variant that injects model config via `definitionOverrides.modelConfig` at deploy time.
87
-
88
- This file requires `@ts-expect-error` above the `llm.generate()` call after each SDK publish, since the type change would otherwise cause a compile error on a legitimate use case.
89
-
90
- ---
91
-
92
82
  **Source:** `packages/sdk/src/worker/adapters/llm.ts`, `packages/core/src/execution/engine/tools/tool-maps.ts`
@@ -5,7 +5,7 @@ description: Organization OS Graph layer documentation for the Cytoscape-based o
5
5
 
6
6
  ## Overview
7
7
 
8
- Within Organization OS, the organization graph is the dedicated **Graph** layer. It treats the organization model as the top-level ontology and bridges in Command View runtime topology so one graph can support semantic exploration and operations-oriented tracing. It is not a replacement renderer for Command View; it is a shared graph product that subsumes Command View as one operational lens.
8
+ Within Organization OS, the organization graph is the dedicated **Graph** layer. It treats the organization model as the top-level ontology and bridges in Command View runtime topology so one graph can support semantic exploration and operations-oriented tracing. Command View is now one lens over this shared graph, not a separate live graph renderer.
9
9
 
10
10
  Graph contracts live in `@repo/core` alongside the organization model. Rendering lives in `@repo/ui` with Cytoscape.js. The command-center route is a thin wrapper over the shared page.
11
11
 
@@ -32,7 +32,7 @@ Graph types are intentionally **not** part of the published `@elevasis/core` sur
32
32
  The graph helps users:
33
33
 
34
34
  - orient themselves in the organization model
35
- - discover how domains, capabilities, surfaces, entities, resources, and workflows connect
35
+ - discover how features, capabilities, surfaces, entities, resources, and workflows connect
36
36
  - trace upstream/downstream dependencies
37
37
  - understand ownership and implementation boundaries
38
38
  - assess blast radius before changing a workflow, agent, feature, or integration
@@ -46,21 +46,22 @@ The graph does not replace workflow editors, execution-run visualizers, or build
46
46
 
47
47
  The implementation uses one typed graph, not separate semantic and implementation taxonomies.
48
48
 
49
- - Node kinds: `organization`, `feature`, `domain`, `surface`, `entity`, `capability`, `resource`
49
+ - Node kinds: `organization`, `feature`, `surface`, `entity`, `capability`, `resource`
50
50
  - Edge kinds: `contains`, `references`, `exposes`, `maps_to`
51
51
  - `resource` nodes carry `resourceType` metadata: `workflow`, `agent`, `trigger`, `integration`, `external`, or `human_checkpoint`
52
52
  - `references` edges may also carry `relationshipType`: `triggers`, `uses`, or `approval`
53
53
 
54
- This means runtime topology is represented as bridged `resource` nodes plus relationship metadata on shared edge types, rather than as a second disconnected edge/node vocabulary.
54
+ This means runtime topology is represented as bridged `resource` nodes plus relationship metadata on shared edge types, rather than as a second disconnected edge/node vocabulary. `maps_to` is the main crossover edge: the builder emits it from organization-model resource mappings, and the UI presence helpers also treat it as topology-facing when classifying which non-resource nodes participate in runtime-adjacent views.
55
55
 
56
56
  ### Compatibility rules with the organization model
57
57
 
58
58
  - `OrganizationModelSchema` is the source of truth for semantic structure. The graph does not introduce a second ontology.
59
59
  - Graph node IDs and references reuse organization-model IDs wherever those IDs already exist.
60
- - `domain` nodes derive from `organizationModel.domains`.
61
60
  - `surface` nodes derive from `organizationModel.navigation.surfaces`; graph routing respects surface `path` and `defaultSurfaceId`.
62
61
  - Feature gating and labels respect `organizationModel.features.enabled` and `.labels`.
63
62
  - Implementation-resource bridging prefers `organizationModel.resourceMappings`.
63
+ - Semantic grouping now comes from the unified `organizationModel.features` array. The builder no longer emits separate `domain` nodes.
64
+ - Command View resource `domains` metadata is currently bridged onto `feature` references, not onto a distinct domain-node layer.
64
65
  - Graph defaults remain valid when produced by `resolveOrganizationModel()`.
65
66
  - If the graph needs a concept the model cannot express, extend the model first.
66
67
 
@@ -70,7 +71,6 @@ This means runtime topology is represented as bridged `resource` nodes plus rela
70
71
  type OrganizationGraphNodeKind =
71
72
  | 'organization'
72
73
  | 'feature'
73
- | 'domain'
74
74
  | 'surface'
75
75
  | 'entity'
76
76
  | 'capability'
@@ -86,7 +86,7 @@ interface OrganizationGraph {
86
86
  }
87
87
  ```
88
88
 
89
- `OrganizationGraphNode` also includes optional `sourceId`, `description`, `enabled`, `featureKey`, `surfaceType`, and `resourceType`. `OrganizationGraphEdge` includes optional `label` and `relationshipType`.
89
+ `OrganizationGraphNode` also includes optional `sourceId`, `description`, `enabled`, `featureId`, `surfaceType`, and `resourceType`. `OrganizationGraphEdge` includes optional `label` and `relationshipType`.
90
90
 
91
91
  ### Build pipeline
92
92
 
@@ -100,9 +100,9 @@ interface BuildOrganizationGraphInput {
100
100
  `buildOrganizationGraph` accepts optional topology input so the semantic graph still renders when operational bridging is sparse. The derivation flow is additive and upsert-oriented:
101
101
 
102
102
  1. Resolve the active organization model.
103
- 2. Derive semantic nodes and edges from domains, features, surfaces, entities, capabilities, and resource mappings.
103
+ 2. Derive semantic nodes and edges from features, surfaces, entities, capabilities, and resource mappings.
104
104
  3. Upsert bridged runtime resources from Command View data into shared `resource` nodes.
105
- 4. Merge topology relationships onto the same DTO using `references` or `maps_to` edges plus optional `relationshipType`.
105
+ 4. Bridge Command View runtime topology onto the same DTO as `references` edges between `resource` nodes, using `relationshipType` for runtime relationship labels.
106
106
  5. Hand the resulting graph to UI-level lensing, filtering, and Cytoscape projection.
107
107
 
108
108
  Keeping assembly outside the renderer keeps graph semantics testable without UI and prevents Cytoscape concepts from leaking into business logic.
@@ -110,7 +110,7 @@ Keeping assembly outside the renderer keeps graph semantics testable without UI
110
110
  ### Ownership split
111
111
 
112
112
  - `@repo/core` owns normalized node/edge types, schemas, and build/derivation helpers.
113
- - `@repo/ui` owns Cytoscape element conversion, layout presets, selection/hover/expansion/viewport state, detail panels, and presentation helpers.
113
+ - `@repo/ui` owns Cytoscape element conversion, layout presets, selection state, path tracing, viewport mechanics, detail panels, and presentation helpers.
114
114
  - `apps/command-center` owns route wiring and page-level integration.
115
115
 
116
116
  ## Interaction Model
@@ -124,6 +124,8 @@ The graph ships with two lens presets in UI code:
124
124
 
125
125
  Lenses do not change the core DTO. They configure how the shared graph is initially presented.
126
126
 
127
+ The command-view preset is intentionally narrow. It starts from topology-focused `resource` nodes so runtime traces stay readable, even though the underlying graph still contains semantic nodes and bridge edges.
128
+
127
129
  ### Modes
128
130
 
129
131
  - **Map mode** -- clustered for broad graph orientation
@@ -138,18 +140,13 @@ Layouts are deterministic presets, not unconstrained force simulation:
138
140
 
139
141
  ### Interactions
140
142
 
141
- Primary set, kept small and high-value:
143
+ Primary set in the current shared page:
142
144
 
143
145
  - click node for detail panel
144
146
  - click edge for relationship meaning
145
- - hover for adjacency preview
146
- - search and jump to node
147
- - expand immediate neighbors
148
- - isolate selected node + N-hop neighborhood
149
147
  - switch mode
150
- - pin selected nodes
151
- - highlight shortest or most relevant path between two nodes
152
- - filter by node kind, domain, capability, feature, status, environment
148
+ - highlight shortest directed paths between two visible nodes in trace mode
149
+ - filter by node kind, topology presence, and free-text search
153
150
 
154
151
  Deferred: freeform node placement, collaborative annotations, graph editing/authoring, arbitrary canvas drawing.
155
152
 
@@ -163,13 +160,15 @@ Filter inputs:
163
160
  - `nodeKinds`
164
161
  - `topologyPresence: 'all' | 'semantic-only' | 'topology-only'`
165
162
 
166
- Presence is derived per node:
163
+ Presence is derived per node in UI helpers:
167
164
 
168
165
  - `resource` nodes are `topology-only`
169
- - nodes with only semantic edges are `semantic-only`
170
- - nodes with both semantic and topology edges are treated as bridge nodes internally
166
+ - non-resource nodes with only semantic edges are `semantic-only`
167
+ - non-resource nodes with `maps_to` edges or runtime relationship edges alongside semantic edges are treated as `bridge` nodes internally
168
+
169
+ `bridge` is an internal classification used by the filtering helpers. The public filter control only exposes `all`, `semantic-only`, and `topology-only`, so bridge nodes appear when presence is `all`.
171
170
 
172
- Search matches node IDs, labels, descriptions, source IDs, feature keys, surface/resource types, edge labels, edge kinds, and `relationshipType`.
171
+ Search matches node IDs, labels, descriptions, source IDs, feature IDs, surface/resource types, edge labels, edge kinds, and `relationshipType`.
173
172
 
174
173
  The page applies `useDeferredValue()` to the active filters so graph search stays responsive while typing.
175
174
 
@@ -188,19 +187,28 @@ The graph is exposed through `ElevasisFeaturesProvider` rather than as app-local
188
187
  - The provider resolves that against `organizationModel.navigation.surfaces` and exposes the result as `organizationGraph` in context.
189
188
  - Shared UI/operations code stays manifest-driven while remaining aware of semantic organization topology.
190
189
 
190
+ This provider bridge resolves the canonical shared graph surface, not a Command View-specific surface. Command View still has its own navigation surface (`operations.command-view`), but the live page delegates into the shared graph renderer.
191
+
191
192
  ## Command View Integration
192
193
 
193
- `CommandViewPage` now delegates to `OrganizationGraphPage` through a command-view lens preset. The lens restores high-value operational context through:
194
+ `CommandViewPage` now delegates to `OrganizationGraphPage` through a command-view lens preset. The shared page adds command-view operational context through:
194
195
 
195
- - route-level execution-health cards
196
+ - command-view summary cards rendered in `OrganizationGraphPage`
196
197
  - selection-aware resource and human-checkpoint summaries inside the shared graph detail panel
197
198
  - follow-up actions for recent executions and pending tasks inside the detail panel
198
- - dedicated command-view sidebar content (`Command View` labeling and node filters live in the subshell sidebar, not on the graph canvas)
199
+ - dedicated command-view sidebar content alongside the shared graph controls
199
200
 
200
201
  Operational summary and drill-down derivation is covered by tests under `packages/ui/src/features/operations/organization-graph/__tests__/`.
201
202
 
202
203
  The detail experience is shared through `OrganizationGraphDetailPanel`, which can render both semantic context and command-view-specific follow-up sections.
203
204
 
205
+ Keep the current seam explicit:
206
+
207
+ - The graph canvas, selection model, path tracing, shared filters, and detail panel all live in `OrganizationGraphPage`.
208
+ - `OperationsSidebarMiddle` still renders `CommandViewSidebarContent` for `/operations/command-view`.
209
+ - That sidebar remains a companion operational panel with some legacy store/filter assumptions and is not the source of truth for the shared graph's filter state.
210
+ - Older React Flow Command View code still exists in the repo, but it is no longer the live renderer for the current Command View route.
211
+
204
212
  ## Cytoscape Responsibility Split
205
213
 
206
214
  Cytoscape owns:
@@ -217,16 +225,17 @@ React owns:
217
225
 
218
226
  - mode switching
219
227
  - side panels and inspectors
220
- - search and command-palette entry
228
+ - filter toolbar search and trace controls
221
229
  - route state and deep-linking
222
230
  - server data fetching
223
- - persistence of saved filters and views
224
231
 
225
232
  ## Package Boundary
226
233
 
227
234
  - `packages/ui/package.json` declares Cytoscape on the published UI surface.
228
235
  - `packages/ui/tsup.config.ts` and `packages/ui/rollup.dts.config.mjs` keep Cytoscape **externalized** for publish output.
229
- - Graph DTO types are internal to `@repo/core`. The published `@elevasis/core` wrapper still exposes only the narrow organization-model API. External graph adoption should not be assumed.
236
+ - Graph DTO types, schemas, and builders live in monorepo `@repo/core` organization-model modules.
237
+ - Cytoscape rendering, lens presets, filtering helpers, and detail/runtime presentation live in `@repo/ui`.
238
+ - The published `@elevasis/core` wrapper still exposes only the narrow organization-model API; this graph contract should be treated as monorepo-internal for now.
230
239
 
231
240
  ## Theming
232
241