@elevasis/sdk 1.8.2 → 1.9.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 (62) hide show
  1. package/dist/cli.cjs +289 -105
  2. package/dist/index.d.ts +90 -39
  3. package/dist/types/worker/adapters/lead.d.ts +1 -1
  4. package/dist/worker/index.js +2 -0
  5. package/package.json +2 -2
  6. package/reference/_navigation.md +7 -1
  7. package/reference/_reference-manifest.json +14 -0
  8. package/reference/claude-config/logs/scaffold-registry-reminder.log +3 -0
  9. package/reference/claude-config/rules/agent-start-here.md +254 -254
  10. package/reference/claude-config/rules/frontend.md +43 -43
  11. package/reference/claude-config/rules/operations.md +64 -64
  12. package/reference/claude-config/rules/organization-model.md +42 -43
  13. package/reference/claude-config/rules/organization-os.md +107 -107
  14. package/reference/claude-config/rules/shared-types.md +2 -2
  15. package/reference/claude-config/rules/task-tracking.md +1 -1
  16. package/reference/claude-config/rules/ui.md +202 -202
  17. package/reference/claude-config/rules/vibe.md +202 -202
  18. package/reference/claude-config/skills/configure/SKILL.md +98 -98
  19. package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -100
  20. package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -158
  21. package/reference/claude-config/skills/configure/operations/customers.md +150 -150
  22. package/reference/claude-config/skills/configure/operations/features.md +162 -162
  23. package/reference/claude-config/skills/configure/operations/goals.md +147 -147
  24. package/reference/claude-config/skills/configure/operations/identity.md +133 -133
  25. package/reference/claude-config/skills/configure/operations/labels.md +128 -128
  26. package/reference/claude-config/skills/configure/operations/offerings.md +159 -159
  27. package/reference/claude-config/skills/configure/operations/roles.md +153 -153
  28. package/reference/claude-config/skills/configure/operations/techStack.md +139 -139
  29. package/reference/claude-config/skills/explore/SKILL.md +78 -78
  30. package/reference/claude-config/skills/git-sync/SKILL.md +126 -0
  31. package/reference/claude-config/skills/save/SKILL.md +183 -183
  32. package/reference/claude-config/skills/setup/SKILL.md +275 -275
  33. package/reference/claude-config/skills/sync/SKILL.md +10 -44
  34. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -0
  35. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -0
  36. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -0
  37. package/reference/claude-config/sync-notes/README.md +43 -0
  38. package/reference/deployment/index.mdx +42 -7
  39. package/reference/examples/organization-model.ts +689 -0
  40. package/reference/index.mdx +6 -5
  41. package/reference/packages/core/src/README.md +39 -36
  42. package/reference/packages/core/src/business/README.md +52 -52
  43. package/reference/packages/core/src/organization-model/README.md +97 -97
  44. package/reference/packages/core/src/test-utils/README.md +42 -0
  45. package/reference/scaffold/core/organization-graph.mdx +272 -272
  46. package/reference/scaffold/core/organization-model.mdx +320 -320
  47. package/reference/scaffold/index.mdx +64 -64
  48. package/reference/scaffold/operations/propagation-pipeline.md +125 -104
  49. package/reference/scaffold/operations/scaffold-maintenance.md +122 -122
  50. package/reference/scaffold/operations/workflow-recipes.md +436 -436
  51. package/reference/scaffold/recipes/add-a-feature.md +158 -158
  52. package/reference/scaffold/recipes/add-a-resource.md +158 -158
  53. package/reference/scaffold/recipes/customize-organization-model.md +400 -400
  54. package/reference/scaffold/recipes/extend-a-base-entity.md +140 -140
  55. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +158 -158
  56. package/reference/scaffold/recipes/index.md +32 -32
  57. package/reference/scaffold/reference/contracts.md +608 -607
  58. package/reference/scaffold/reference/feature-registry.md +2 -0
  59. package/reference/scaffold/reference/glossary.md +105 -105
  60. package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
  61. package/reference/scaffold/ui/feature-flags-and-gating.md +1 -1
  62. package/reference/claude-config/commands/submit-request.md +0 -11
@@ -1,64 +1,64 @@
1
- ---
2
- description: Platform workflows, agents, resource definitions, and deployment for the operations/ surface
3
- paths:
4
- - operations/**
5
- ---
6
-
7
- # Operations
8
-
9
- **Status:** Stable
10
-
11
- ## Overview
12
-
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
-
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.
16
-
17
- ## Echo Workflow (Starter Example)
18
-
19
- **Location:** `operations/src/example/echo.ts`
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.
22
-
23
- ```
24
- foundations/types/index.ts -- defines echoInputSchema, echoOutputSchema
25
- operations/src/example/echo.ts -- imports schemas for workflow contract
26
- ui/src/routes/ -- imports schemas for form validation and display
27
- ```
28
-
29
- The workflow is registered in `operations/src/index.ts` as part of the `example` group and deployed with `pnpm -C operations deploy`.
30
-
31
- ## Adding a New Workflow
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:**
40
-
41
- ```bash
42
- pnpm -C operations check # validate resource definitions
43
- pnpm -C operations deploy # deploy to dev
44
- ```
45
-
46
- ## Resource Registry
47
-
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.
49
-
50
- When you need breadth first, read:
51
-
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
-
55
- ## Commands
56
-
57
- | Command | Purpose |
58
- | -------------------------------- | ----------------------------- |
59
- | `pnpm -C operations check` | Validate resource definitions |
60
- | `pnpm -C operations check-types` | TypeScript type-check |
61
- | `pnpm -C operations deploy` | Deploy to dev |
62
- | `pnpm -C operations deploy:prod` | Deploy to production |
63
-
64
- Always run `check` before `deploy`.
1
+ ---
2
+ description: Platform workflows, agents, resource definitions, and deployment for the operations/ surface
3
+ paths:
4
+ - operations/**
5
+ ---
6
+
7
+ # Operations
8
+
9
+ **Status:** Stable
10
+
11
+ ## Overview
12
+
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
+
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.
16
+
17
+ ## Echo Workflow (Starter Example)
18
+
19
+ **Location:** `operations/src/example/echo.ts`
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.
22
+
23
+ ```
24
+ foundations/types/index.ts -- defines echoInputSchema, echoOutputSchema
25
+ operations/src/example/echo.ts -- imports schemas for workflow contract
26
+ ui/src/routes/ -- imports schemas for form validation and display
27
+ ```
28
+
29
+ The workflow is registered in `operations/src/index.ts` as part of the `example` group and deployed with `pnpm -C operations deploy`.
30
+
31
+ ## Adding a New Workflow
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:**
40
+
41
+ ```bash
42
+ pnpm -C operations check # validate resource definitions
43
+ pnpm -C operations deploy # deploy to dev
44
+ ```
45
+
46
+ ## Resource Registry
47
+
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.
49
+
50
+ When you need breadth first, read:
51
+
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
+
55
+ ## Commands
56
+
57
+ | Command | Purpose |
58
+ | -------------------------------- | ----------------------------- |
59
+ | `pnpm -C operations check` | Validate resource definitions |
60
+ | `pnpm -C operations check-types` | TypeScript type-check |
61
+ | `pnpm -C operations deploy` | Deploy to dev |
62
+ | `pnpm -C operations deploy:prod` | Deploy to production |
63
+
64
+ Always run `check` before `deploy`.
@@ -1,44 +1,43 @@
1
- ---
2
- description: Edits to the canonical organization model go through /configure
1
+ ---
2
+ description: Edits to the canonical organization model go through /configure
3
3
  paths:
4
- - operations/foundations/config/organization-model.ts
5
- - operations/foundations/config/organization-model.override.ts
6
- - operations/foundations/config/extensions/**/*.ts
7
- ---
8
-
9
- # Organization Model Edit Guide
10
-
11
- `foundations/config/organization-model.ts` is the single source of truth for this
12
- project's organizational identity -- it encodes customers, offerings, roles, goals,
13
- features, statuses, and resource mappings that agents, workflows, and the UI shell all
14
- consume at runtime.
15
-
16
- ## Preferred Entry Point: `/configure`
17
-
18
- Direct edits to `organization-model.ts` are discouraged. Instead, use `/configure` (or
19
- `/configure <domain>`) to run the read → propose → confirm → write → validate ceremony:
20
-
21
- 1. The skill reads the current model so proposals start from ground truth.
22
- 2. It drafts only the specific block being changed, leaving everything else intact.
23
- 3. The user confirms before any file is written.
24
- 4. After writing, `pnpm -C operations check-types` runs and `OrganizationModelSchema.parse()`
25
- is verified. On failure the file is rolled back automatically.
26
-
27
- Use `/configure <domain>` for targeted edits: `identity`, `customers`, `offerings`,
28
- `roles`, `goals`, `techStack`, `features`, or `labels`.
29
-
30
- ## Runtime Validation
31
-
32
- The model is validated at startup via `resolveOrganizationModel()` followed by
33
- `OrganizationModelSchema.parse()`. Cross-reference checks (segment ID refs in offerings,
34
- role reporting lines, period ordering in goals) are runtime-only and not caught by tsc
35
- alone -- always let the ceremony run both checks before treating a change as complete.
36
-
37
- ## Extension Files
38
-
39
- New Zod extension files under `foundations/config/extensions/` are Level B codify
40
- operations. Route these through `/configure <domain>` as well -- the skill gates Level B
41
- to explicit user confirmation before scaffolding a new `.ts` file.
42
-
43
- This is a soft guide, not a hard block. The ceremony exists to prevent silent schema
44
- drift and to keep the model's editorial history visible.
4
+ - core/config/organization-model.ts
5
+ - core/config/extensions/**/*.ts
6
+ ---
7
+
8
+ # Organization Model Edit Guide
9
+
10
+ `foundations/config/organization-model.ts` is the single source of truth for this
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.
14
+
15
+ ## Preferred Entry Point: `/configure`
16
+
17
+ Direct edits to `organization-model.ts` are discouraged. Instead, use `/configure` (or
18
+ `/configure <domain>`) to run the read propose confirm → write → validate ceremony:
19
+
20
+ 1. The skill reads the current model so proposals start from ground truth.
21
+ 2. It drafts only the specific block being changed, leaving everything else intact.
22
+ 3. The user confirms before any file is written.
23
+ 4. After writing, `pnpm -C operations check-types` runs and `OrganizationModelSchema.parse()`
24
+ is verified. On failure the file is rolled back automatically.
25
+
26
+ Use `/configure <domain>` for targeted edits: `identity`, `customers`, `offerings`,
27
+ `roles`, `goals`, `techStack`, `features`, or `labels`.
28
+
29
+ ## Runtime Validation
30
+
31
+ The model is validated at startup via `resolveOrganizationModel()` followed by
32
+ `OrganizationModelSchema.parse()`. Cross-reference checks (segment ID refs in offerings,
33
+ role reporting lines, period ordering in goals) are runtime-only and not caught by tsc
34
+ alone -- always let the ceremony run both checks before treating a change as complete.
35
+
36
+ ## Extension Files
37
+
38
+ New Zod extension files under `foundations/config/extensions/` are Level B codify
39
+ operations. Route these through `/configure <domain>` as well -- the skill gates Level B
40
+ to explicit user confirmation before scaffolding a new `.ts` file.
41
+
42
+ This is a soft guide, not a hard block. The ceremony exists to prevent silent schema
43
+ drift and to keep the model's editorial history visible.
@@ -1,107 +1,107 @@
1
- # Organization OS
2
-
3
- Organization OS is the semantic contract layer defining how organizations, features, domains, surfaces, entities, capabilities, and resources relate. This project consumes Organization OS through the SDK and foundations config.
4
-
5
- ## Key Files in This Project
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.
10
- - `ui/src/routes/__root.tsx` -- wires `ElevasisFeaturesProvider` with `canonicalOrganizationModel`
11
- - `ui/src/app-config.ts` -- references the org model
12
- - `operations/src/index.ts` -- `DeploymentSpec` registry for workflows and agents
13
-
14
- ## Domain Overview
15
-
16
- As of the 2026-04-20 expansion, `OrganizationModel` contains 14 top-level domains:
17
-
18
- **Platform configuration:** `features`, `branding`, `navigation`, `sales` (formerly `crm`), `prospecting` (formerly `leadGen`), `projects` (formerly `delivery`), `resourceMappings`
19
-
20
- **Organizational reality:** `identity`, `customers`, `offerings`, `roles`, `goals`
21
-
22
- **Vibe layer:** `statuses`, `operations`
23
-
24
- The `resourceMappings` entries may carry an optional `techStack` extension (`platform`, `purpose`, `credentialStatus`, `isSystemOfRecord`) without introducing a new top-level domain.
25
-
26
- ### Domain Rename Note
27
-
28
- Three field names changed in the 2026-04-20 expansion. Feature ID constants and consumer-facing feature IDs are unchanged:
29
-
30
- | Old field | New field | Feature ID (unchanged) | Constant (unchanged) |
31
- | ---------- | ------------- | ---------------------- | --------------------- |
32
- | `crm` | `sales` | `'crm'` | `CRM_FEATURE_ID` |
33
- | `leadGen` | `prospecting` | `'lead-gen'` | `LEAD_GEN_FEATURE_ID` |
34
- | `delivery` | `projects` | `'projects'` | `PROJECTS_FEATURE_ID` |
35
-
36
- ## Reference Documentation
37
-
38
- Full Organization OS documentation ships with the SDK and is available locally after `pnpm install`:
39
-
40
- ### Scaffold Reference (via SDK)
41
-
42
- All paths under `node_modules/@elevasis/sdk/reference/scaffold/`:
43
-
44
- - `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` -- scaffold root and navigation
45
- - `node_modules/@elevasis/sdk/reference/scaffold/core/organization-model.mdx` -- semantic contract, all 14 domains, adapter authoring, validation gate, `/configure` entry point
46
- - `node_modules/@elevasis/sdk/reference/scaffold/core/organization-graph.mdx` -- graph derivation, node/edge taxonomy, lenses
47
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-shell.mdx` -- FeatureModule manifest, provider runtime
48
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/composition-extensibility.mdx` -- layout primitives, router abstraction
49
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- copy-paste UI recipes for pages, nav items, components
50
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- three-concept gating model
51
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar composition via manifest overrides
52
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md` -- end-to-end from org model key through manifest, routes, gating
53
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- author and deploy a workflow or agent
54
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/gate-by-feature-or-admin.md` -- decision table for access control patterns
55
- - `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
56
- - `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` -- how sync and verification work across projects
57
- - `node_modules/@elevasis/sdk/reference/scaffold/operations/scaffold-maintenance.md` -- content placement and auto-generation pipeline
58
- - `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md` -- Organization OS term definitions
59
- - `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- auto-generated TypeScript contract shapes
60
- - `node_modules/@elevasis/sdk/reference/scaffold/reference/feature-registry.md` -- auto-generated feature manifest catalog
61
-
62
- ### Local Project Docs
63
-
64
- - `.claude/rules/agent-start-here.md` -- canonical first-read for agents (includes task-class routing)
65
-
66
- ## Published Subpaths and Constants
67
-
68
- - `@elevasis/core/organization-model` -- the curated organization-model barrel. Exports `defineOrganizationModel`, `resolveOrganizationModel`, `OrganizationModelSchema`, `DEFAULT_ORGANIZATION_MODEL`, organization-model types, and typed feature/surface constants.
69
- - Feature IDs: `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`
70
- - Headline surface IDs: `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`
71
- - Reality domain types: `OrganizationModelIdentity`, `OrganizationModelCustomers`, `OrganizationModelCustomerSegment`, `OrganizationModelOfferings`, `OrganizationModelProduct`, `OrganizationModelRoles`, `OrganizationModelRole`, `OrganizationModelGoals`, `OrganizationModelObjective`, `OrganizationModelKeyResult`
72
- - Vibe domain types: `OrganizationModelStatuses`, `OrganizationModelOperations`
73
- - TechStack: `TechStackEntrySchema`, `OrganizationModelTechStackEntry`
74
- - Use constants instead of magic strings when overriding the org model.
75
- - `@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.
76
-
77
- ## When Working with Organization OS
78
-
79
- - **Changing org model (structural reality):** Use `/configure` as the entry point. Direct edits to `foundations/config/organization-model.ts` are discouraged -- `/configure` runs the read → propose → confirm → write → validate ceremony. Run `/configure` for the full layered flow or `/configure \<domain>` for a targeted domain.
80
- - **Adding a feature:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md`. For toggling an existing feature, use `/configure features`.
81
- - **Adding a resource:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md`.
82
- - **Extending entities:** Start with `foundations/types/entities.ts` for the demo extension pattern. Base shapes come from `@elevasis/core/entities`.
83
- - **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.
84
- - **Understanding contracts:** Check `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` for current type shapes.
85
- - **Debugging sync issues:** Check `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` for the verification pipeline.
86
-
87
- ## `/configure` -- Org Model QA Entry Point
88
-
89
- `/configure` is the recurring, safe-to-re-run org model editor for this project. It is a skill (not a command) at `.claude/skills/configure/SKILL.md`.
90
-
91
- **Usage:**
92
-
93
- - `/configure` -- layered flow: identity → customers → offerings → roles → goals → techStack
94
- - `/configure identity` -- legal identity, mission/vision, industry, geography, timezone
95
- - `/configure customers` -- customer segments with jobs-to-be-done, pains, gains, firmographics
96
- - `/configure offerings` -- products and services with pricing model and segment references
97
- - `/configure roles` -- role chart with responsibilities, reporting lines, and holders
98
- - `/configure goals` -- organizational goals with period and measurable outcomes
99
- - `/configure techStack` -- external-SaaS integration metadata on resource mappings
100
- - `/configure features` -- enable, disable, or add features
101
- - `/configure labels` -- edit display labels on enum entries (statuses, stages)
102
-
103
- Every write is gated: `resolveOrganizationModel()` must succeed (Zod cross-refs pass) and `pnpm -C operations check-types` must pass. On failure the change is rolled back.
104
-
105
- **Distinction from `/setup`:** `/setup` is first-time bootstrap only. After bootstrap it delegates here. `/configure` is idempotent and safe to re-run at any time.
106
-
107
- The ambient vibe layer (`.claude/rules/vibe.md`) automatically detects Codify intent in plain language and delegates to `/configure`. Power users can invoke `/configure` directly to bypass the ambient layer entirely.
1
+ # Organization OS
2
+
3
+ Organization OS is the semantic contract layer defining how organizations, features, domains, surfaces, entities, capabilities, and resources relate. This project consumes Organization OS through the SDK and foundations config.
4
+
5
+ ## Key Files in This Project
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.
10
+ - `ui/src/routes/__root.tsx` -- wires `ElevasisFeaturesProvider` with `canonicalOrganizationModel`
11
+ - `ui/src/app-config.ts` -- references the org model
12
+ - `operations/src/index.ts` -- `DeploymentSpec` registry for workflows and agents
13
+
14
+ ## Domain Overview
15
+
16
+ As of the 2026-04-20 expansion, `OrganizationModel` contains 14 top-level domains:
17
+
18
+ **Platform configuration:** `features`, `branding`, `navigation`, `sales` (formerly `crm`), `prospecting` (formerly `leadGen`), `projects` (formerly `delivery`), `resourceMappings`
19
+
20
+ **Organizational reality:** `identity`, `customers`, `offerings`, `roles`, `goals`
21
+
22
+ **Vibe layer:** `statuses`, `operations`
23
+
24
+ The `resourceMappings` entries may carry an optional `techStack` extension (`platform`, `purpose`, `credentialStatus`, `isSystemOfRecord`) without introducing a new top-level domain.
25
+
26
+ ### Domain Rename Note
27
+
28
+ Three field names changed in the 2026-04-20 expansion. Feature ID constants and consumer-facing feature IDs are unchanged:
29
+
30
+ | Old field | New field | Feature ID (unchanged) | Constant (unchanged) |
31
+ | ---------- | ------------- | ---------------------- | --------------------- |
32
+ | `crm` | `sales` | `'crm'` | `CRM_FEATURE_ID` |
33
+ | `leadGen` | `prospecting` | `'lead-gen'` | `LEAD_GEN_FEATURE_ID` |
34
+ | `delivery` | `projects` | `'projects'` | `PROJECTS_FEATURE_ID` |
35
+
36
+ ## Reference Documentation
37
+
38
+ Full Organization OS documentation ships with the SDK and is available locally after `pnpm install`:
39
+
40
+ ### Scaffold Reference (via SDK)
41
+
42
+ All paths under `node_modules/@elevasis/sdk/reference/scaffold/`:
43
+
44
+ - `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` -- scaffold root and navigation
45
+ - `node_modules/@elevasis/sdk/reference/scaffold/core/organization-model.mdx` -- semantic contract, all 14 domains, adapter authoring, validation gate, `/configure` entry point
46
+ - `node_modules/@elevasis/sdk/reference/scaffold/core/organization-graph.mdx` -- graph derivation, node/edge taxonomy, lenses
47
+ - `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-shell.mdx` -- FeatureModule manifest, provider runtime
48
+ - `node_modules/@elevasis/sdk/reference/scaffold/ui/composition-extensibility.mdx` -- layout primitives, router abstraction
49
+ - `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- copy-paste UI recipes for pages, nav items, components
50
+ - `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- three-concept gating model
51
+ - `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar composition via manifest overrides
52
+ - `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md` -- end-to-end from org model key through manifest, routes, gating
53
+ - `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- author and deploy a workflow or agent
54
+ - `node_modules/@elevasis/sdk/reference/scaffold/recipes/gate-by-feature-or-admin.md` -- decision table for access control patterns
55
+ - `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
56
+ - `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` -- how sync and verification work across projects
57
+ - `node_modules/@elevasis/sdk/reference/scaffold/operations/scaffold-maintenance.md` -- content placement and auto-generation pipeline
58
+ - `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md` -- Organization OS term definitions
59
+ - `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- auto-generated TypeScript contract shapes
60
+ - `node_modules/@elevasis/sdk/reference/scaffold/reference/feature-registry.md` -- auto-generated feature manifest catalog
61
+
62
+ ### Local Project Docs
63
+
64
+ - `.claude/rules/agent-start-here.md` -- canonical first-read for agents (includes task-class routing)
65
+
66
+ ## Published Subpaths and Constants
67
+
68
+ - `@elevasis/core/organization-model` -- the curated organization-model barrel. Exports `defineOrganizationModel`, `resolveOrganizationModel`, `OrganizationModelSchema`, `DEFAULT_ORGANIZATION_MODEL`, organization-model types, and typed feature/surface constants.
69
+ - Feature IDs: `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`
70
+ - Headline surface IDs: `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`
71
+ - Reality domain types: `OrganizationModelIdentity`, `OrganizationModelCustomers`, `OrganizationModelCustomerSegment`, `OrganizationModelOfferings`, `OrganizationModelProduct`, `OrganizationModelRoles`, `OrganizationModelRole`, `OrganizationModelGoals`, `OrganizationModelObjective`, `OrganizationModelKeyResult`
72
+ - Vibe domain types: `OrganizationModelStatuses`, `OrganizationModelOperations`
73
+ - TechStack: `TechStackEntrySchema`, `OrganizationModelTechStackEntry`
74
+ - Use constants instead of magic strings when overriding the org model.
75
+ - `@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.
76
+
77
+ ## When Working with Organization OS
78
+
79
+ - **Changing org model (structural reality):** Use `/configure` as the entry point. Direct edits to `foundations/config/organization-model.ts` are discouraged -- `/configure` runs the read → propose → confirm → write → validate ceremony. Run `/configure` for the full layered flow or `/configure \<domain>` for a targeted domain.
80
+ - **Adding a feature:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md`. For toggling an existing feature, use `/configure features`.
81
+ - **Adding a resource:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md`.
82
+ - **Extending entities:** Start with `foundations/types/entities.ts` for the demo extension pattern. Base shapes come from `@elevasis/core/entities`.
83
+ - **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.
84
+ - **Understanding contracts:** Check `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` for current type shapes.
85
+ - **Debugging sync issues:** Check `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` for the verification pipeline.
86
+
87
+ ## `/configure` -- Org Model QA Entry Point
88
+
89
+ `/configure` is the recurring, safe-to-re-run org model editor for this project. It is a skill (not a command) at `.claude/skills/configure/SKILL.md`.
90
+
91
+ **Usage:**
92
+
93
+ - `/configure` -- layered flow: identity → customers → offerings → roles → goals → techStack
94
+ - `/configure identity` -- legal identity, mission/vision, industry, geography, timezone
95
+ - `/configure customers` -- customer segments with jobs-to-be-done, pains, gains, firmographics
96
+ - `/configure offerings` -- products and services with pricing model and segment references
97
+ - `/configure roles` -- role chart with responsibilities, reporting lines, and holders
98
+ - `/configure goals` -- organizational goals with period and measurable outcomes
99
+ - `/configure techStack` -- external-SaaS integration metadata on resource mappings
100
+ - `/configure features` -- enable, disable, or add features
101
+ - `/configure labels` -- edit display labels on enum entries (statuses, stages)
102
+
103
+ Every write is gated: `resolveOrganizationModel()` must succeed (Zod cross-refs pass) and `pnpm -C operations check-types` must pass. On failure the change is rolled back.
104
+
105
+ **Distinction from `/setup`:** `/setup` is first-time bootstrap only. After bootstrap it delegates here. `/configure` is idempotent and safe to re-run at any time.
106
+
107
+ The ambient vibe layer (`.claude/rules/vibe.md`) automatically detects Codify intent in plain language and delegates to `/configure`. Power users can invoke `/configure` directly to bypass the ambient layer entirely.
@@ -1,7 +1,7 @@
1
1
  ---
2
- description: Shared type boundary -- what belongs in shared/, import rules, schema conventions
2
+ description: Shared type boundary -- what belongs in core/types, import rules, schema conventions
3
3
  paths:
4
- - shared/**
4
+ - core/types/**
5
5
  ---
6
6
 
7
7
  # Shared Types
@@ -10,7 +10,7 @@ Exactly three values for frontmatter `status`: `planned`, `in-progress`, `comple
10
10
 
11
11
  ## Doc Format
12
12
 
13
- - Frontmatter: `title`, `description`, `status` (per the monorepo rule in `.claude/rules/in-progress-tasks.md` -- nothing else belongs in task-doc frontmatter; `resume_context` is DB-canonical on `prj_tasks`)
13
+ - Frontmatter: `title`, `description`, `status` only -- nothing else belongs in task-doc frontmatter; `resume_context` is DB-canonical on `prj_tasks`
14
14
  - Sections: Objective, Plan, Progress, Resume Context
15
15
  - Progress subsections use markers: `### Step N: Title -- PENDING`, `-- IN PROGRESS`, `-- COMPLETE`
16
16