@elevasis/sdk 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +1 -1
- package/dist/index.d.ts +88 -39
- package/dist/types/worker/adapters/lead.d.ts +1 -1
- package/dist/worker/index.js +2 -0
- package/package.json +2 -2
- package/reference/_navigation.md +7 -1
- package/reference/_reference-manifest.json +14 -0
- package/reference/claude-config/logs/scaffold-registry-reminder.log +3 -0
- package/reference/claude-config/rules/agent-start-here.md +254 -254
- package/reference/claude-config/rules/frontend.md +43 -43
- package/reference/claude-config/rules/operations.md +64 -64
- package/reference/claude-config/rules/organization-model.md +42 -43
- package/reference/claude-config/rules/organization-os.md +107 -107
- package/reference/claude-config/rules/shared-types.md +2 -2
- package/reference/claude-config/rules/task-tracking.md +1 -1
- package/reference/claude-config/rules/ui.md +202 -202
- package/reference/claude-config/rules/vibe.md +202 -202
- package/reference/claude-config/skills/configure/SKILL.md +98 -98
- package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -158
- package/reference/claude-config/skills/configure/operations/customers.md +150 -150
- package/reference/claude-config/skills/configure/operations/features.md +162 -162
- package/reference/claude-config/skills/configure/operations/goals.md +147 -147
- package/reference/claude-config/skills/configure/operations/identity.md +133 -133
- package/reference/claude-config/skills/configure/operations/labels.md +128 -128
- package/reference/claude-config/skills/configure/operations/offerings.md +159 -159
- package/reference/claude-config/skills/configure/operations/roles.md +153 -153
- package/reference/claude-config/skills/configure/operations/techStack.md +139 -139
- package/reference/claude-config/skills/explore/SKILL.md +78 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +126 -0
- package/reference/claude-config/skills/save/SKILL.md +183 -183
- package/reference/claude-config/skills/setup/SKILL.md +275 -275
- package/reference/claude-config/skills/sync/SKILL.md +10 -44
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -0
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -0
- package/reference/claude-config/sync-notes/README.md +43 -0
- package/reference/packages/core/src/README.md +39 -36
- package/reference/packages/core/src/business/README.md +52 -52
- package/reference/packages/core/src/organization-model/README.md +97 -97
- package/reference/packages/core/src/test-utils/README.md +42 -0
- package/reference/scaffold/core/organization-graph.mdx +272 -272
- package/reference/scaffold/core/organization-model.mdx +320 -320
- package/reference/scaffold/index.mdx +64 -64
- package/reference/scaffold/operations/propagation-pipeline.md +125 -104
- package/reference/scaffold/operations/scaffold-maintenance.md +122 -122
- package/reference/scaffold/operations/workflow-recipes.md +436 -436
- package/reference/scaffold/recipes/add-a-feature.md +158 -158
- package/reference/scaffold/recipes/add-a-resource.md +158 -158
- package/reference/scaffold/recipes/customize-organization-model.md +400 -400
- package/reference/scaffold/recipes/extend-a-base-entity.md +140 -140
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +158 -158
- package/reference/scaffold/recipes/index.md +32 -32
- package/reference/scaffold/reference/contracts.md +608 -607
- package/reference/scaffold/reference/feature-registry.md +2 -0
- package/reference/scaffold/reference/glossary.md +105 -105
- package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
- package/reference/scaffold/ui/feature-flags-and-gating.md +1 -1
|
@@ -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
|
-
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
2
|
+
description: Shared type boundary -- what belongs in core/types, import rules, schema conventions
|
|
3
3
|
paths:
|
|
4
|
-
-
|
|
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`
|
|
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
|
|