@elevasis/sdk 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +5408 -6605
- package/dist/index.d.ts +183 -242
- package/dist/index.js +1829 -2912
- package/dist/node/index.d.ts +3722 -2
- package/dist/node/index.js +163 -1
- package/dist/test-utils/index.d.ts +60 -72
- package/dist/test-utils/index.js +239 -1479
- package/dist/types/worker/index.d.ts +2 -0
- package/dist/types/worker/utils.d.ts +9 -0
- package/dist/worker/index.js +260 -1487
- package/package.json +5 -4
- package/reference/_navigation.md +1 -0
- package/reference/claude-config/rules/active-change-index.md +11 -80
- package/reference/claude-config/rules/agent-start-here.md +11 -277
- package/reference/claude-config/rules/deployment.md +11 -57
- package/reference/claude-config/rules/error-handling.md +11 -56
- package/reference/claude-config/rules/execution.md +11 -40
- package/reference/claude-config/rules/frontend.md +11 -43
- package/reference/claude-config/rules/observability.md +11 -31
- package/reference/claude-config/rules/operations.md +11 -80
- package/reference/claude-config/rules/organization-model.md +5 -110
- package/reference/claude-config/rules/organization-os.md +7 -111
- package/reference/claude-config/rules/package-taxonomy.md +11 -33
- package/reference/claude-config/rules/platform.md +11 -42
- package/reference/claude-config/rules/shared-types.md +10 -48
- package/reference/claude-config/rules/task-tracking.md +11 -47
- package/reference/claude-config/rules/ui.md +11 -200
- package/reference/claude-config/rules/vibe.md +5 -229
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +2 -2
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +33 -0
- package/reference/rules/active-change-index.md +83 -0
- package/reference/rules/agent-start-here.md +280 -0
- package/reference/rules/deployment.md +60 -0
- package/reference/rules/error-handling.md +59 -0
- package/reference/rules/execution.md +43 -0
- package/reference/rules/frontend.md +46 -0
- package/reference/rules/observability.md +34 -0
- package/reference/rules/operations.md +85 -0
- package/reference/rules/organization-model.md +119 -0
- package/reference/rules/organization-os.md +118 -0
- package/reference/rules/package-taxonomy.md +36 -0
- package/reference/rules/platform.md +45 -0
- package/reference/rules/shared-types.md +52 -0
- package/reference/rules/task-tracking.md +50 -0
- package/reference/rules/ui.md +203 -0
- package/reference/rules/vibe.md +238 -0
- package/reference/scaffold/core/organization-graph.mdx +4 -5
- package/reference/scaffold/core/organization-model.mdx +1 -1
- package/reference/scaffold/reference/contracts.md +14 -2
|
@@ -1,43 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- `useApiClient()` from `@/lib/hooks/useApiClient` for authenticated API calls -- never raw `fetch` with auth headers
|
|
13
|
-
- `routeTree.gen.ts` is auto-generated on `pnpm dev` -- never edit manually
|
|
14
|
-
- Auth protection: wrap page content with `ProtectedRoute` from `@elevasis/ui/auth`. Admin pages nest `AdminGuard` inside `ProtectedRoute`
|
|
15
|
-
- Never fork `@elevasis/ui` components -- if a published component needs a tweak, that missing capability is a bug in `@elevasis/ui`
|
|
16
|
-
|
|
17
|
-
## Silent-Break Gotchas
|
|
18
|
-
|
|
19
|
-
- Route files vs layout files: `operations.tsx` is a layout (renders `<Outlet />`), `operations/my-page.index.tsx` is a page. Confusing the two breaks routing silently
|
|
20
|
-
- `core/` cannot import React or `@elevasis/sdk/worker` -- it is runtime-agnostic shared types and organization configuration only
|
|
21
|
-
- `@/*` resolves to `ui/src/*`, `@core/*` resolves to `core/*` -- never import from `operations/` (separate runtime)
|
|
22
|
-
|
|
23
|
-
## Stack Constraints
|
|
24
|
-
|
|
25
|
-
- Mantine 8.2.7 for all UI components -- no Radix UI, no Tailwind CSS, no shadcn
|
|
26
|
-
- `@tabler/icons-react` for icons -- never Lucide
|
|
27
|
-
- Server state: TanStack Query. Client state: Zustand + Immer. Never mix the two
|
|
28
|
-
- Glass background is the primary surface treatment: `var(--glass-background)` with `backdrop-filter: var(--glass-blur)`
|
|
29
|
-
- Import shared components from `@elevasis/ui/components`, `@elevasis/ui/layout`, `@elevasis/ui/charts`
|
|
30
|
-
- Import charts from `@elevasis/ui/charts`, not directly from `@mantine/charts`
|
|
31
|
-
|
|
32
|
-
## Integration UI Surfaces
|
|
33
|
-
|
|
34
|
-
When building pages that display external data, use published `@elevasis/ui` components before building custom UI. Use Mantine components and CSS variables exclusively -- no inline hex colors, no custom design tokens. Match existing page density and spacing.
|
|
35
|
-
|
|
36
|
-
## Detailed Reference
|
|
37
|
-
|
|
38
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- add a page, add a nav item, theme tokens, feature-scoped components, route patterns (static, nested, dynamic)
|
|
39
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- `systemKey` / `SystemGuard` / `AdminGuard` model
|
|
40
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar composition via manifest overrides
|
|
41
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- TypeScript shapes (`SystemModule`, `NavItem`, `OrganizationModel`)
|
|
42
|
-
- `ui/src/config/theme.ts` -- theme configuration and CSS variable definitions
|
|
43
|
-
- `ui/src/config/nav-items.ts` -- sidebar navigation entries
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Frontend rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Frontend
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/frontend.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Log levels: `debug` (verbose), `info` (normal progress), `warn` (non-fatal, processing continues), `error` (fatal, processing stops)
|
|
13
|
-
- Step lifecycle events (started, completed, failed, route taken) are auto-logged by the SDK worker -- no handler code needed
|
|
14
|
-
|
|
15
|
-
## Key Rules
|
|
16
|
-
|
|
17
|
-
- Every handler should log at: entry (step name + key params), decisions (skips, branches), progress (per-item in loops), summary (counts at end)
|
|
18
|
-
- Error messages in handlers surface as the execution's error message -- write for humans, not machines
|
|
19
|
-
- String values truncated at 200 characters in logs
|
|
20
|
-
- 30-day log retention (includes logs from deleted resources)
|
|
21
|
-
|
|
22
|
-
## Inspecting Executions
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
pnpm elevasis-sdk execution <resourceId> <executionId>
|
|
26
|
-
pnpm elevasis-sdk executions <resourceId>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Detailed Reference
|
|
30
|
-
|
|
31
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- full logging patterns and handler examples
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Observability rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Observability
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/observability.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,80 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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:** Read `operations/src/index.ts` for deployment assembly and `core/config/organization-model.ts` for the OM Resources descriptor catalog. Run `pnpm elevasis-sdk project:list --pretty` against the live DB for the deployed surface.
|
|
16
|
-
|
|
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 `core/types/index.ts` and imported by both the workflow and the frontend.
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
core/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 descriptor in `core/config/organization-model.ts`** -- Add the OM Resource descriptor under the id-keyed `resources` map so identity, System membership, owner role, and governance status are authored once.
|
|
34
|
-
|
|
35
|
-
2. **Model the semantic surface** -- Add durable business nouns, verbs, catalogs, links, events, and surfaces to the owning System's `ontology`; bind executable Resources through `resource.ontology.actions` and optional `resource.ontology.primaryAction`; add system-local defaults/settings to `System.config`; add explanatory or governing material to `knowledge`; and keep transient DTOs and handler internals out of the OM. Top-level `entities`, top-level `actions`, and `System.content` are compatibility mirrors only when current published consumers still need them.
|
|
36
|
-
|
|
37
|
-
3. **Define the contract in `core/types/`** -- Add Zod schemas and inferred types to `core/types/index.ts` (or a new file under `core/types/`). Use `core/types/entities.ts` when workflows operate on project-specific entity contracts.
|
|
38
|
-
|
|
39
|
-
4. **Implement the workflow in `operations/src/`** -- Create a new directory under `operations/src/` for the feature. Import the descriptor, derive runtime `resourceId`, `type`, `name`, and `description` from it, export the workflow from its `index.ts`, and register it in `operations/src/index.ts`.
|
|
40
|
-
|
|
41
|
-
5. **Add the UI in `ui/src/routes/`** -- Create a new route file. Use TanStack Query to call the workflow execution endpoint. Import schemas from `@core/types` for validation and type inference. Read OM resources, ontology, knowledge, and graph data where possible instead of creating page-local semantic registries.
|
|
42
|
-
|
|
43
|
-
6. **Update rules when the pattern persists** -- If the workflow introduces a reusable adapter pattern, checkpoint/schedule convention, domain vocabulary, or workflow family behavior that future agents must follow, update this rule or add a scoped rule under `.claude/rules/` in the same change.
|
|
44
|
-
|
|
45
|
-
7. **Deploy and verify:**
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
pnpm -C operations check # validate resource definitions
|
|
49
|
-
pnpm -C operations deploy # deploy to dev
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Resource Registry
|
|
53
|
-
|
|
54
|
-
`operations/src/index.ts` default-exports a `DeploymentSpec` with `version`, `organizationModel`, `workflows`, `agents`, and optional deployment mechanics such as `triggers`, `integrations`, `relationships`, `humanCheckpoints`, and `externalResources`. Durable operational wiring belongs in `organizationModel.topology.relationships`; deployment mechanics, credentials, provider webhook details, and per-run state stay outside the OM. Each feature group exports `workflows` and `agents` arrays from its own `index.ts`, spread into the top-level spec. `DeploymentSpec` assembles deployable behavior; it should not be treated as a second resource identity catalog.
|
|
55
|
-
|
|
56
|
-
When you need breadth first, read:
|
|
57
|
-
|
|
58
|
-
- `operations/src/README.md` for the source boundary and drill-down guidance
|
|
59
|
-
- `core/config/organization-model.ts` for descriptor identity and governance metadata
|
|
60
|
-
- `operations/src/index.ts` for deployment assembly
|
|
61
|
-
- `pnpm elevasis-sdk project:list --pretty` for the live deployed surface
|
|
62
|
-
|
|
63
|
-
## Commands
|
|
64
|
-
|
|
65
|
-
| Command | Purpose |
|
|
66
|
-
| -------------------------------- | ----------------------------- |
|
|
67
|
-
| `pnpm -C operations check` | Validate resource definitions |
|
|
68
|
-
| `pnpm -C operations check-types` | TypeScript type-check |
|
|
69
|
-
| `pnpm -C operations deploy` | Deploy to dev |
|
|
70
|
-
| `pnpm -C operations deploy:prod` | Deploy to production |
|
|
71
|
-
|
|
72
|
-
Always run `check` before `deploy`.
|
|
73
|
-
|
|
74
|
-
## Rule Updates
|
|
75
|
-
|
|
76
|
-
When developing resources, workflows, agents, integrations, checkpoints, schedules, or recurring operational conventions, keep `.claude/rules/` current.
|
|
77
|
-
|
|
78
|
-
- Update `operations.md` for package-wide operations invariants.
|
|
79
|
-
- Add a scoped rule for domain-specific workflow families whose conventions should autoload for future edits.
|
|
80
|
-
- Do not bury durable operational rules only in task notes or chat context.
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Operations rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Operations
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/operations.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,116 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
paths:
|
|
4
|
-
- core/config/organization-model.ts
|
|
5
|
-
- core/config/extensions/**/*.ts
|
|
2
|
+
description: Compatibility pointer for the canonical Organization Model rule bundled with @elevasis/sdk
|
|
6
3
|
---
|
|
7
4
|
|
|
8
|
-
# Organization Model
|
|
5
|
+
# Organization Model
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
project's organizational identity -- it encodes customers, offerings, roles, goals,
|
|
12
|
-
Systems, ontology, Policies, Knowledge, config, and Resources
|
|
13
|
-
descriptors that agents, workflows, and the UI shell all consume at runtime.
|
|
14
|
-
New semantic authoring should start in system-colocated `ontology` scopes. Top-level
|
|
15
|
-
`entities`, top-level `actions`, and `System.content` remain compatibility mirrors while
|
|
16
|
-
published consumers finish moving to compiled ontology indexes.
|
|
7
|
+
Canonical rule source:
|
|
17
8
|
|
|
18
|
-
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/organization-model.md`
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
`/om <domain>`) to run the read → propose → confirm → write → validate ceremony:
|
|
22
|
-
|
|
23
|
-
1. The skill reads the current model so proposals start from ground truth.
|
|
24
|
-
2. It drafts only the specific block being changed, leaving everything else intact.
|
|
25
|
-
3. The user confirms before any file is written.
|
|
26
|
-
4. After writing, `pnpm -C operations check-types` runs and `OrganizationModelSchema.parse()`
|
|
27
|
-
is verified. On failure the file is rolled back automatically.
|
|
28
|
-
|
|
29
|
-
Use `/om <domain>` for targeted edits: `identity`, `customers`, `offerings`,
|
|
30
|
-
`roles`, `goals`, `techStack`, `systems`, `actions`, or `labels`. Resource identity and
|
|
31
|
-
governance metadata belong in the id-keyed `resources` map; operations code derives runtime
|
|
32
|
-
`resourceId` / `type` from those descriptors.
|
|
33
|
-
|
|
34
|
-
Author system-local semantics by boundary:
|
|
35
|
-
|
|
36
|
-
- `System.ontology` owns durable object types, action types, catalog types, link types, event types, and surfaces.
|
|
37
|
-
- `System.config` owns system-local JSON settings and defaults.
|
|
38
|
-
- `resources` own executable workflow/agent descriptors, `systemPath`, owners, governance status, code references, and runtime implementation links.
|
|
39
|
-
- `resource.ontology.actions` describes the ontology actions a Resource performs; `resource.ontology.primaryAction` names the default/selectable action when a Resource has one.
|
|
40
|
-
- `resource.ontology` also describes reads, writes, catalog use, and emitted events.
|
|
41
|
-
- `topology.relationships` owns durable operational wiring between Systems, Resources, ontology nodes, policies, roles, triggers, checkpoints, and external resources.
|
|
42
|
-
- `knowledge` owns long-form playbooks, strategies, references, and governance context.
|
|
43
|
-
- `System.content`, top-level `entities`, and top-level `actions` are compatibility mirrors only. Keep them aligned when current published consumers still need them, but do not treat them as the primary authoring surface.
|
|
44
|
-
|
|
45
|
-
Do not author Resource `actionKey` in the target contract. Runtime/UI routing that needs a single selectable action should read `resource.ontology.primaryAction`.
|
|
46
|
-
|
|
47
|
-
## Runtime Validation
|
|
48
|
-
|
|
49
|
-
The model is validated at startup via `resolveOrganizationModel()` followed by
|
|
50
|
-
`OrganizationModelSchema.parse()`. Cross-reference checks (segment ID refs in offerings,
|
|
51
|
-
role reporting lines, period ordering in goals) are runtime-only and not caught by tsc
|
|
52
|
-
alone -- always let the ceremony run both checks before treating a change as complete.
|
|
53
|
-
|
|
54
|
-
## Extension Files
|
|
55
|
-
|
|
56
|
-
New Zod extension files under `core/config/extensions/` are Level B codify
|
|
57
|
-
operations. Route these through `/om <domain>` as well -- the skill gates Level B
|
|
58
|
-
to explicit user confirmation before scaffolding a new `.ts` file.
|
|
59
|
-
|
|
60
|
-
This is a soft guide, not a hard block. The ceremony exists to prevent silent schema
|
|
61
|
-
drift and to keep the model's editorial history visible.
|
|
62
|
-
|
|
63
|
-
## Resource System Attachment
|
|
64
|
-
|
|
65
|
-
Every resource in the id-keyed `organizationModel.resources` map declares which System it belongs to
|
|
66
|
-
via `systemPath` -- a dot-separated path that resolves against the OM system tree
|
|
67
|
-
(e.g. `"sys.operations"`, `"sales.crm"`):
|
|
68
|
-
|
|
69
|
-
```ts
|
|
70
|
-
{
|
|
71
|
-
id: 'apify-website-crawl',
|
|
72
|
-
systemPath: 'sys.operations', // canonical system attachment
|
|
73
|
-
kind: 'workflow',
|
|
74
|
-
...
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
`systemPath` is validated at parse time by `SystemPathSchema` and cross-checked by
|
|
79
|
-
`OrganizationModelSchema.superRefine` -- an unresolvable path causes a Zod error at
|
|
80
|
-
schema validation. Use `getResourcesForSystem(model, path)` (from `@elevasis/core`) to
|
|
81
|
-
query resources for a system at runtime. Pass `{ includeDescendants: true }` to include
|
|
82
|
-
all descendant systems (segment-aware -- `'sales'` does NOT match `'salesforce.foo'`).
|
|
83
|
-
|
|
84
|
-
Some external templates may carry a `systemId` compatibility mirror while published
|
|
85
|
-
`@elevasis/core` releases catch up to the current source contract. Treat that field as
|
|
86
|
-
legacy adapter data only; author new resource relationships against `systemPath`.
|
|
87
|
-
|
|
88
|
-
Do not fetch resources for every system-oriented read by default. For agent workflows, start
|
|
89
|
-
with the user's requested OM/om context and query resources only when the task involves
|
|
90
|
-
runtime ownership, executable implementation, observability, deployment, or resource governance.
|
|
91
|
-
Use the descendant rollup only when parent-system scope is intended.
|
|
92
|
-
|
|
93
|
-
`resource.category` and `resource.links[].nodeId` are **runtime filter overlays** -- they
|
|
94
|
-
drive UI faceted filtering in the Command Center but do NOT define system membership.
|
|
95
|
-
System membership is `systemPath` only.
|
|
96
|
-
|
|
97
|
-
```ts
|
|
98
|
-
// category and links power UI filter chips; systemPath is the
|
|
99
|
-
// canonical OM attachment used for graph edges and getResourcesForSystem queries.
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
`resource.codeRefs[]` are repo-relative implementation breadcrumbs for agents and
|
|
103
|
-
operators. Use them to point from a governed OM Resource descriptor to the operations
|
|
104
|
-
entrypoint, handler, schema, test, docs, or config files that implement it. They do
|
|
105
|
-
not define resource identity, System membership, runtime execution topology, or graph
|
|
106
|
-
relationships.
|
|
107
|
-
|
|
108
|
-
`topology.relationships` defines durable operational wiring in the OM. Keep credential
|
|
109
|
-
values, provider webhook mechanics, deployment environment settings, execution logs,
|
|
110
|
-
and per-run scheduler state outside the OM.
|
|
111
|
-
|
|
112
|
-
`System.ontology` owns durable semantic contracts: object types, action types, catalog
|
|
113
|
-
types, link types, event types, and surfaces. `System.config` owns local settings and
|
|
114
|
-
defaults. If current UI or runtime code still needs legacy mirrors, keep `entities`,
|
|
115
|
-
`actions`, or `System.content` aligned with the ontology/config record instead of
|
|
116
|
-
inventing a separate source of truth.
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,115 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Organization Os rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# Organization Os
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Canonical rule source:
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/organization-os.md`
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
- `core/config/extensions/` -- project-owned entity extension schemas
|
|
11
|
-
- `core/types/entities.ts` -- typed entity contracts (Project, Deal, etc.). Extends `BaseProject`, `BaseDeal` from `@elevasis/core/entities` with project-specific metadata. Read this when authoring workflows that operate on these entities.
|
|
12
|
-
- `ui/src/routes/__root.tsx` -- wires `ElevasisSystemsProvider` with `canonicalOrganizationModel`
|
|
13
|
-
- `ui/src/app-config.ts` -- references the org model
|
|
14
|
-
- `operations/src/index.ts` -- `DeploymentSpec` registry for workflows and agents
|
|
15
|
-
|
|
16
|
-
## Domain Overview
|
|
17
|
-
|
|
18
|
-
As of the 2026-05 resource-governance expansion, `OrganizationModel` includes platform configuration, organizational reality, governance, and knowledge domains:
|
|
19
|
-
|
|
20
|
-
**Platform configuration:** `systems`, `branding`, `navigation`
|
|
21
|
-
|
|
22
|
-
**Organizational reality:** `identity`, `customers`, `offerings`, `roles`, `goals`
|
|
23
|
-
|
|
24
|
-
**Governance:** `resources`, `policies`, and resource-to-System relationships
|
|
25
|
-
|
|
26
|
-
**Ontology, config, and knowledge:** `System.ontology` owns durable semantic contracts such as object types, action types, catalog types, link types, event types, and surfaces. `System.config` owns system-local JSON settings and defaults. `knowledge` is a flat id-keyed map of playbooks, strategies, and references that explain or govern systems and ontology records.
|
|
27
|
-
|
|
28
|
-
Resource identity is authored once in the id-keyed `resources` map. Each resource attaches to a System via `systemPath` and can declare ontology relationships through `resource.ontology`. Operations imports those descriptors and derives runtime `resourceId` / `type` while assembling the `DeploymentSpec`.
|
|
29
|
-
|
|
30
|
-
### Domain Rename Note
|
|
31
|
-
|
|
32
|
-
Some legacy UI feature constants and consumer-facing route keys are intentionally unchanged for compatibility:
|
|
33
|
-
|
|
34
|
-
| Old field | New field | Legacy key (unchanged) | UI constant (unchanged) |
|
|
35
|
-
| ---------- | ------------- | ---------------------- | ----------------------- |
|
|
36
|
-
| `crm` | `sales` | `'crm'` | `CRM_FEATURE_ID` |
|
|
37
|
-
| `leadGen` | `prospecting` | `'lead-gen'` | `LEAD_GEN_FEATURE_ID` |
|
|
38
|
-
| `delivery` | `projects` | `'projects'` | `PROJECTS_FEATURE_ID` |
|
|
39
|
-
|
|
40
|
-
## Reference Documentation
|
|
41
|
-
|
|
42
|
-
Full Organization OS documentation ships with the SDK and is available locally after `pnpm install`:
|
|
43
|
-
|
|
44
|
-
### Scaffold Reference (via SDK)
|
|
45
|
-
|
|
46
|
-
All paths under `node_modules/@elevasis/sdk/reference/scaffold/`:
|
|
47
|
-
|
|
48
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` -- scaffold root and navigation
|
|
49
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/core/organization-model.mdx` -- semantic contract, domains, adapter authoring, validation gate, `/om` entry point
|
|
50
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/core/organization-graph.mdx` -- graph derivation, node/edge taxonomy, lenses
|
|
51
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-shell.mdx` -- SystemModule manifest, provider runtime
|
|
52
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/composition-extensibility.mdx` -- layout primitives, router abstraction
|
|
53
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- copy-paste UI recipes for pages, nav items, components
|
|
54
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- three-concept gating model
|
|
55
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar composition via manifest overrides
|
|
56
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md` -- end-to-end OM-backed System recipe through manifest, routes, and gating
|
|
57
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- author and deploy a workflow or agent
|
|
58
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/gate-by-feature-or-admin.md` -- decision table for access control patterns
|
|
59
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- build or extend lead-gen pages, sidebars, hooks, list/member state, artifacts, workflow adapters, and prospecting semantics
|
|
60
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
|
|
61
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` -- how sync and verification work across projects
|
|
62
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/operations/scaffold-maintenance.md` -- content placement and auto-generation pipeline
|
|
63
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md` -- Organization OS term definitions
|
|
64
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- auto-generated TypeScript contract shapes
|
|
65
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/reference/feature-registry.md` -- auto-generated feature manifest catalog
|
|
66
|
-
|
|
67
|
-
### Local Project Docs
|
|
68
|
-
|
|
69
|
-
- `.claude/rules/agent-start-here.md` -- canonical first-read for agents (includes task-class routing)
|
|
70
|
-
|
|
71
|
-
## Published Subpaths and Constants
|
|
72
|
-
|
|
73
|
-
- `@elevasis/core/organization-model` -- the curated organization-model barrel. Exports `defineOrganizationModel`, `resolveOrganizationModel`, `OrganizationModelSchema`, `DEFAULT_ORGANIZATION_MODEL`, organization-model types, and typed System/Action plus legacy UI feature/surface constants.
|
|
74
|
-
- Legacy UI feature IDs: `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`
|
|
75
|
-
- Headline surface IDs: `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`
|
|
76
|
-
- Reality domain types: `OrganizationModelIdentity`, `OrganizationModelCustomers`, `OrganizationModelCustomerSegment`, `OrganizationModelOfferings`, `OrganizationModelProduct`, `OrganizationModelRoles`, `OrganizationModelRole`, `OrganizationModelGoals`, `OrganizationModelObjective`, `OrganizationModelKeyResult`
|
|
77
|
-
- TechStack: `TechStackEntrySchema`, `OrganizationModelTechStackEntry`
|
|
78
|
-
- Use constants instead of magic strings when overriding the org model.
|
|
79
|
-
- `@elevasis/core/entities` -- entity contracts barrel. Exports `BaseProject`, `BaseProjectSchema`, `BaseProjectInput` and the equivalents for `Milestone`, `Task`, `Deal`, `Company`, `Contact`. Each base interface is generic over a `\<TMeta>` extension slot. Extend these in `core/types/entities.ts` to add project-specific fields.
|
|
80
|
-
|
|
81
|
-
## When Working with Organization OS
|
|
82
|
-
|
|
83
|
-
- **Changing org model (structural reality):** Use `/om` as the entry point. Direct edits to `core/config/organization-model.ts` are discouraged -- `/om` runs the read -> propose -> confirm -> write -> validate ceremony. Run `/om` for the full layered flow or `/om \<domain>` for a targeted domain. See `.claude/rules/organization-model.md` for the concrete authoring boundary.
|
|
84
|
-
- **Building or extending CRM:** Start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md`. CRM spans Organization OS sales semantics, shared UI primitives, deal hooks, workflow adapters, and generated contracts.
|
|
85
|
-
- **Building or extending lead gen:** Start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md`. Lead gen spans Organization OS prospecting semantics, shared UI primitives, list/member hooks, artifact hooks, workflow adapters, and generated contracts.
|
|
86
|
-
- **Customizing CRM deal actions:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md`. Do not add `sales.actions` to the org model; the v1 server-side override surface is intentionally deferred.
|
|
87
|
-
- **Adding or toggling a System:** Follow the current scaffold recipes when they mention UI features, but translate Organization OS changes to Systems, navigation surfaces, and Actions. Use `/om systems` for availability/routing changes.
|
|
88
|
-
- **Adding a resource:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md`.
|
|
89
|
-
- **Extending entities:** Start with `core/types/entities.ts` for the demo extension pattern. Base shapes come from `@elevasis/core/entities`.
|
|
90
|
-
- **Authoring a workflow that takes a Project/Deal/etc.:** Reference entity types from `core/types/entities.ts` in the input schema -- do not redeclare them.
|
|
91
|
-
- **Adding system-local ontology/config:** Put durable business schema in `System.ontology`, local defaults/settings in `System.config`, executable implementations in `resources`, and explanatory or governing material in `knowledge`.
|
|
92
|
-
- **Understanding contracts:** Check `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` for current type shapes.
|
|
93
|
-
- **Debugging sync issues:** Check `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` for the verification pipeline.
|
|
94
|
-
|
|
95
|
-
## `/om` -- Org Model QA Entry Point
|
|
96
|
-
|
|
97
|
-
`/om` is the recurring, safe-to-re-run org model editor for this project. It is a skill (not a command) at `.claude/skills/om/SKILL.md`.
|
|
98
|
-
|
|
99
|
-
**Usage:**
|
|
100
|
-
|
|
101
|
-
- `/om` -- layered flow: identity → customers → offerings → roles → goals → techStack
|
|
102
|
-
- `/om identity` -- legal identity, mission/vision, industry, geography, timezone
|
|
103
|
-
- `/om customers` -- customer segments with jobs-to-be-done, pains, gains, firmographics
|
|
104
|
-
- `/om offerings` -- products and services with pricing model and segment references
|
|
105
|
-
- `/om roles` -- role chart with responsibilities, reporting lines, and holders
|
|
106
|
-
- `/om goals` -- organizational goals with period and measurable outcomes
|
|
107
|
-
- `/om techStack` -- external-SaaS and integration context; resource identity still belongs in OM Resources descriptors
|
|
108
|
-
- `/om systems` -- enable, disable, or add Systems; route invokable behavior through Actions
|
|
109
|
-
- `/om labels` -- edit display labels on enum entries (statuses, stages)
|
|
110
|
-
|
|
111
|
-
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.
|
|
112
|
-
|
|
113
|
-
**Distinction from `/setup`:** `/setup` is first-time bootstrap only. After bootstrap it delegates here. `/om` is idempotent and safe to re-run at any time.
|
|
114
|
-
|
|
115
|
-
The ambient vibe layer (`.claude/rules/vibe.md`) automatically detects Codify intent in plain language and delegates to `/om`. Power users can invoke `/om` directly to bypass the ambient layer entirely.
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## What You Will See in Monorepo Docs (and should NOT import)
|
|
14
|
-
|
|
15
|
-
Monorepo source and docs reference `@repo/elevasis-core` and `@repo/elevasis-operations`. These are workspace-internal packages used by Elevasis as a tenant of its own platform. They are `private: true` and never published. If you see them mentioned:
|
|
16
|
-
|
|
17
|
-
- Do NOT add them to this project's `package.json`
|
|
18
|
-
- Do NOT try to import from them — they are not in your `node_modules`
|
|
19
|
-
- They are not a substitute for `@elevasis/core` even though the name overlaps
|
|
20
|
-
|
|
21
|
-
## Confused About Where Something Lives?
|
|
22
|
-
|
|
23
|
-
Check the import path:
|
|
24
|
-
|
|
25
|
-
- `@elevasis/...` → published, consumable here
|
|
26
|
-
- `@repo/...` → monorepo-internal, not consumable
|
|
27
|
-
|
|
28
|
-
This project's own org-model and workflows live in `core/config/organization-model.ts` and `operations/src/**` — those are project-owned, not part of either family above.
|
|
29
|
-
|
|
30
|
-
## References
|
|
31
|
-
|
|
32
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` — full SDK scaffold reference
|
|
33
|
-
- Monorepo source rule: `.claude/rules/package-taxonomy.md` in the elevasis-monorepo (when working across both)
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Package Taxonomy rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Package Taxonomy
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/package-taxonomy.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,42 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Input/output schemas MUST come from `@core/types` or browser-safe sibling schema files -- never define reusable workflow contracts inline in Node-only workflow files
|
|
13
|
-
- `operations/src/index.ts` default-exports a `DeploymentSpec` with `workflows` and `agents` arrays -- every resource must be registered here
|
|
14
|
-
- Always run `check` before `deploy`
|
|
15
|
-
|
|
16
|
-
## Imports
|
|
17
|
-
|
|
18
|
-
- `@elevasis/sdk` for types (`WorkflowDefinition`, `DeploymentSpec`)
|
|
19
|
-
- `@elevasis/sdk/worker` for runtime utilities (`platform`, adapters: `llm`, `storage`, `scheduler`, `notifications`, `acqDb`, `list`)
|
|
20
|
-
- `@core/*` resolves to `../core/*` for shared type and org-model imports
|
|
21
|
-
- Never import from `ui/src/` -- separate runtimes
|
|
22
|
-
|
|
23
|
-
## Key Rules
|
|
24
|
-
|
|
25
|
-
- Use typed adapters over raw `platform.call()` whenever a typed adapter exists
|
|
26
|
-
- `version` in resource config is semver -- bump on contract changes
|
|
27
|
-
- `status` is `'dev'` or `'prod'` -- new resources start as `'dev'`
|
|
28
|
-
|
|
29
|
-
## CLI Commands
|
|
30
|
-
|
|
31
|
-
| Command | Purpose |
|
|
32
|
-
| ------------------------------------ | ----------------------------- |
|
|
33
|
-
| `pnpm -C operations run check` | Validate resource definitions |
|
|
34
|
-
| `pnpm -C operations run deploy` | Deploy to dev |
|
|
35
|
-
| `pnpm -C operations run deploy:prod` | Deploy to production |
|
|
36
|
-
|
|
37
|
-
## Detailed Reference
|
|
38
|
-
|
|
39
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
|
|
40
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- end-to-end resource authoring guide
|
|
41
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead-gen UI, hooks, list/member state, artifacts, and workflow adapter extension guide
|
|
42
|
-
- SDK reference docs: `operations/node_modules/@elevasis/sdk/reference/` (concepts, framework, platform-tools, runtime, CLI)
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Platform rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Platform
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/platform.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,49 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
|
|
4
|
-
- core/types/**
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Core Types
|
|
8
|
-
|
|
9
|
-
`core/types/` is the browser-safe type boundary between the frontend (`ui/`) and platform runtime (`operations/`). Both runtimes import from here but never from each other.
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Shared Types rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- Shared constants
|
|
19
|
-
|
|
20
|
-
## What Does NOT Belong Here
|
|
21
|
-
|
|
22
|
-
- React components, hooks, or anything importing `react`
|
|
23
|
-
- SDK runtime code or anything importing `@elevasis/sdk/worker`
|
|
24
|
-
- Browser APIs or Node-specific APIs
|
|
25
|
-
- Implementation logic -- types and constants only
|
|
26
|
-
|
|
27
|
-
## Schema Convention
|
|
28
|
-
|
|
29
|
-
Define Zod schemas first, then infer the type:
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
export const fooInputSchema = z.object({ ... })
|
|
33
|
-
export type FooInput = z.infer<typeof fooInputSchema>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Name schemas `<name>InputSchema` / `<name>OutputSchema`. Name types `<Name>Input` / `<Name>Output`.
|
|
37
|
-
|
|
38
|
-
## File Organization
|
|
39
|
-
|
|
40
|
-
Types live in `core/types/`. The directory structure:
|
|
41
|
-
|
|
42
|
-
- `core/types/index.ts` -- Main entry point, re-exports from domain files
|
|
43
|
-
- `core/types/entities.ts` -- Entity contracts extending published base entities
|
|
44
|
-
- As the project grows: split into domain files within the directory (e.g., `core/types/billing.ts`, `core/types/auth.ts`)
|
|
45
|
-
- Re-export new domain files from `core/types/index.ts`
|
|
46
|
-
|
|
47
|
-
## Path Alias
|
|
48
|
-
|
|
49
|
-
Project tsconfigs resolve `@core/*` to `core/*`. Always use `@core/types` or `@core/types/entities` (not relative paths) when importing shared contracts from `ui/` or `operations/src/`.
|
|
5
|
+
# Shared Types
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/shared-types.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|