@elevasis/sdk 1.23.0 → 1.25.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 (55) hide show
  1. package/dist/cli.cjs +5927 -6985
  2. package/dist/index.d.ts +4893 -4759
  3. package/dist/index.js +1444 -3870
  4. package/dist/node/index.d.ts +3059 -2
  5. package/dist/node/index.js +163 -1
  6. package/dist/test-utils/index.d.ts +4413 -4439
  7. package/dist/test-utils/index.js +1766 -4753
  8. package/dist/types/worker/index.d.ts +5 -2
  9. package/dist/types/worker/platform.d.ts +2 -2
  10. package/dist/types/worker/utils.d.ts +9 -0
  11. package/dist/worker/index.js +427 -3708
  12. package/package.json +5 -4
  13. package/reference/_navigation.md +1 -0
  14. package/reference/claude-config/rules/active-change-index.md +11 -80
  15. package/reference/claude-config/rules/agent-start-here.md +11 -277
  16. package/reference/claude-config/rules/deployment.md +11 -57
  17. package/reference/claude-config/rules/error-handling.md +11 -56
  18. package/reference/claude-config/rules/execution.md +11 -40
  19. package/reference/claude-config/rules/frontend.md +11 -43
  20. package/reference/claude-config/rules/observability.md +11 -31
  21. package/reference/claude-config/rules/operations.md +11 -80
  22. package/reference/claude-config/rules/organization-model.md +5 -110
  23. package/reference/claude-config/rules/organization-os.md +7 -111
  24. package/reference/claude-config/rules/package-taxonomy.md +11 -33
  25. package/reference/claude-config/rules/platform.md +11 -42
  26. package/reference/claude-config/rules/shared-types.md +10 -48
  27. package/reference/claude-config/rules/task-tracking.md +11 -47
  28. package/reference/claude-config/rules/ui.md +11 -200
  29. package/reference/claude-config/rules/vibe.md +5 -229
  30. package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
  31. package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +2 -2
  32. package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +33 -0
  33. package/reference/cli.mdx +1107 -808
  34. package/reference/rules/active-change-index.md +83 -0
  35. package/reference/rules/agent-start-here.md +280 -0
  36. package/reference/rules/deployment.md +60 -0
  37. package/reference/rules/error-handling.md +59 -0
  38. package/reference/rules/execution.md +43 -0
  39. package/reference/rules/frontend.md +46 -0
  40. package/reference/rules/observability.md +34 -0
  41. package/reference/rules/operations.md +85 -0
  42. package/reference/rules/organization-model.md +119 -0
  43. package/reference/rules/organization-os.md +118 -0
  44. package/reference/rules/package-taxonomy.md +36 -0
  45. package/reference/rules/platform.md +45 -0
  46. package/reference/rules/shared-types.md +52 -0
  47. package/reference/rules/task-tracking.md +50 -0
  48. package/reference/rules/ui.md +203 -0
  49. package/reference/rules/vibe.md +238 -0
  50. package/reference/scaffold/core/organization-graph.mdx +4 -5
  51. package/reference/scaffold/core/organization-model.mdx +1 -1
  52. package/reference/scaffold/recipes/customize-crm-actions.md +45 -46
  53. package/reference/scaffold/recipes/extend-crm.md +253 -255
  54. package/reference/scaffold/recipes/index.md +43 -44
  55. package/reference/scaffold/reference/contracts.md +990 -1065
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.23.0",
3
+ "version": "1.25.0",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,6 +30,7 @@
30
30
  "dist/worker/index.js",
31
31
  "dist/types/worker/index.d.ts",
32
32
  "dist/types/worker/platform.d.ts",
33
+ "dist/types/worker/utils.d.ts",
33
34
  "dist/types/worker/adapters/",
34
35
  "dist/test-utils/index.js",
35
36
  "dist/test-utils/index.d.ts",
@@ -57,9 +58,9 @@
57
58
  "tsup": "^8.0.0",
58
59
  "typescript": "5.9.2",
59
60
  "zod": "^4.1.0",
60
- "@repo/core": "0.25.0",
61
- "@repo/typescript-config": "0.0.0",
62
- "@repo/eslint-config": "0.0.0"
61
+ "@repo/core": "0.27.0",
62
+ "@repo/eslint-config": "0.0.0",
63
+ "@repo/typescript-config": "0.0.0"
63
64
  },
64
65
  "scripts": {
65
66
  "lint": "eslint src --max-warnings 0",
@@ -169,3 +169,4 @@ Universal scaffold documentation for all SDK projects. Source locations are co-l
169
169
  | Glossary | `scaffold/reference/glossary.md` | Term definitions |
170
170
  | Contracts | `scaffold/reference/contracts.md` | Auto-generated type contracts |
171
171
  | System Registry | `scaffold/reference/feature-registry.md` | Auto-generated system catalog |
172
+ | Agent Rules | `rules/` | Bundled external-template agent rule corpus for generated projects |
@@ -1,80 +1,11 @@
1
- ---
2
- description: Bridge between stable scaffold docs and higher-volatility in-progress architecture work that may override assumptions for agents working in the template
3
- ---
4
-
5
- # Active Change Index
6
-
7
- Use this rule to decide whether stable scaffold docs are enough, or whether you also need to load in-progress platform architecture docs from the monorepo.
8
-
9
- > **Note:** Paths prefixed with `apps/` or `packages/` are monorepo-internal and unavailable in standalone projects. For those areas, use the stable scaffold docs under `node_modules/@elevasis/sdk/reference/scaffold/` as the primary reference. The monorepo paths are retained for contributors working within the monorepo.
10
-
11
- ## Current Watch Areas
12
-
13
- ### Organization OS
14
-
15
- Use when the task touches:
16
-
17
- - organization model semantics
18
- - feature/provider runtime
19
- - feature manifests or shell composition
20
- - graph or command-view concepts
21
- - downstream propagation of scaffold contract changes
22
-
23
- Load:
24
-
25
- - `apps/docs/content/docs/technical/architecture/core/organization-model/index.mdx`
26
- - `apps/docs/content/docs/technical/architecture/core/organization-model/graph.mdx`
27
- - `apps/docs/content/docs/technical/architecture/ui/feature-shell.mdx`
28
- - `apps/docs/content/docs/technical/architecture/ui/composition-extensibility.mdx`
29
-
30
- Stable scaffold docs affected:
31
-
32
- - `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
33
- - `.claude/rules/ui.md`
34
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md`
35
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md`
36
-
37
- ### Package Surface / Reference System
38
-
39
- Use when the task touches:
40
-
41
- - published `@elevasis/core`, `@elevasis/ui`, or `@elevasis/sdk` surfaces
42
- - generated package maps
43
- - contract drift between source and scaffold docs
44
-
45
- Load:
46
-
47
- - `packages/core/src/organization-model/README.md`
48
- - `packages/ui/src/provider/README.md`
49
- - `packages/ui/src/features/README.md`
50
- - `packages/sdk/reference/_navigation.md`
51
-
52
- Stable scaffold docs affected:
53
-
54
- - `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
55
-
56
- ### Resource / Topology Mapping
57
-
58
- Use when the task touches:
59
-
60
- - resource registration
61
- - triggers, integrations, relationships, human checkpoints
62
- - topology-aware navigation or impact analysis
63
-
64
- Load:
65
-
66
- - `operations/src/README.md`
67
- - `operations/src/index.ts`
68
-
69
- Stable scaffold docs affected:
70
-
71
- - `.claude/rules/operations.md`
72
-
73
- ## Working Rule
74
-
75
- When a task touches one of the watch areas above:
76
-
77
- 1. Read the stable scaffold doc.
78
- 2. Read the listed in-progress or package-local source-of-truth docs.
79
- 3. Prefer source and in-progress architecture docs if they disagree with scaffold prose.
80
- 4. Flag drift instead of silently trusting the scaffold doc.
1
+ ---
2
+ description: Compatibility pointer for the canonical Active Change Index rule bundled with @elevasis/sdk
3
+ ---
4
+
5
+ # Active Change Index
6
+
7
+ Canonical rule source:
8
+
9
+ `node_modules/@elevasis/sdk/reference/rules/active-change-index.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,277 +1,11 @@
1
- ---
2
- description: Canonical first-read for agents entering the template scaffold -- project continuity, task-class routing, and boundary resolution
3
- ---
4
-
5
- # Agent Start Here
6
-
7
- Read this file first when entering a freshly scaffolded project.
8
-
9
- ## Project Profile
10
-
11
- Before doing anything else, check for `.claude/memory/profile.md`. It is created by `/tutorial` on first invocation and persists across sessions.
12
-
13
- If present, read it. The file declares which onboarding **track** is active -- `vibe-coder` (non-technical user, agent does the work) or `technical` (developer, code-first) -- and ships a tone block describing how to communicate.
14
-
15
- Apply the tone block to ALL agent output for the rest of the session, not just inside `/tutorial`:
16
-
17
- - **vibe-coder track:** never use technical vocabulary in user-facing dialogue (workflow -> automation, deploy -> make it live, schema -> "the information your automation needs"). Tool calls are made silently -- do not narrate slash commands, file paths, or build steps. The full swap table lives in `profile.md`.
18
- - **technical track:** code-first, current command surface, real file paths. The user reads diffs and stacktraces; do not over-explain.
19
-
20
- If the file does not exist, the user has not run `/tutorial` yet. Proceed normally and note that running `/tutorial` would establish a project tone for future sessions.
21
-
22
- ## First Action: Check Active Projects
23
-
24
- Before loading any docs for a new session, check whether the user's ask resumes or relates to an in-flight client project. Project context (milestones, tasks, resume notes) is DB-canonical -- agents and CLI read/write it through the `elevasis-sdk project:*` surface.
25
-
26
- 1. **Portfolio snapshot.** Run this first to see what is active or blocked:
27
-
28
- ```bash
29
- pnpm elevasis-sdk project:list --status active --pretty
30
- pnpm elevasis-sdk project:list --status blocked --pretty
31
- ```
32
-
33
- 2. **Resume-style asks.** If the user says "continue", "pick up", references a client name, or names a task/milestone, resolve it via:
34
-
35
- ```bash
36
- pnpm elevasis-sdk project:work <query>
37
- ```
38
-
39
- `project:work` fuzzy-matches a project or task by name/ID and returns the current resume context -- the canonical continuity payload (current state, next steps, files modified, key docs).
40
-
41
- 3. **Fresh non-project asks.** Only if the portfolio snapshot and the request show no overlap with active projects, fall back to the docs-index flow below. Even then, if the work will take more than a single file edit, offer to create a project first (`/project create` or `project:create`) so continuity is captured from the start.
42
-
43
- ### Resume Context Source of Truth
44
-
45
- `resume_context` lives in the `prj_tasks` table in the database, not in task-doc frontmatter. There is one source of truth:
46
-
47
- - **Humans write** via the inline resume-context editor on the Project Detail page in Command Center.
48
- - **Agents and the CLI write** via `pnpm elevasis-sdk project:task:save <task-id> --current-state ... --next-steps ... --files-modified ...`.
49
- - **Readers** consume it via `project:work <query>` or `project:task:resume <id>`.
50
-
51
- Do not write resume state into markdown frontmatter. Task-doc frontmatter is limited to `title`, `description`, and `status`.
52
-
53
- ### Session-Start Dashboard
54
-
55
- The session-start dashboard directive lives in `CLAUDE.md`. If you see it there, follow it on the first response of a session. This file (`agent-start-here` rule) is the drill-down reference layer; `CLAUDE.md` owns session bootstrap.
56
-
57
- ## Template Surfaces
58
-
59
- Once project continuity is resolved (or confirmed irrelevant), the template is not just an app starter. It is an agent operating environment with several distinct surfaces:
60
-
61
- - `ui/` -- React frontend app and shell composition
62
- - `operations/` -- Elevasis SDK resources deployed to the platform
63
- - `core/` -- runtime-agnostic shared contracts and organization model adaptation
64
- - `.claude/` -- local agent rules, skills, and hooks
65
- - `client-workspace/` -- optional separate knowledge workspace for richer team knowledge management
66
- - `node_modules/@elevasis/sdk/reference/scaffold/` -- SDK reference scaffold: canonical recipes, UI patterns, gating model, contracts, and glossary. Entry point: `index.mdx`.
67
-
68
- ## Discovery Order
69
-
70
- Use this order unless a more specific doc tells you otherwise:
71
-
72
- 1. Complete the "First Action: Check Active Projects" flow above.
73
- 2. Read `CLAUDE.md` for project rules, command surface, and navigation pointers.
74
- 3. Read this rule and classify the task using the Task Classes below.
75
- 4. Read `identity.clientBrief` from the OrganizationModel (`core/config/organization-model.ts`) for organization context and naming.
76
- 5. Read the relevant structural map:
77
- - Glob `node_modules/@elevasis/sdk/reference/` for published package surfaces
78
- - Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
79
- 6. For feature integration, resource authoring, or UI customization tasks, read `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` to find the canonical recipe or reference doc.
80
- 7. Drill into the co-located local explainer for the abstraction boundary you are changing.
81
- 8. Check the `.claude/rules/active-change-index.md` rule before trusting stable assumptions in areas that are under active architecture work.
82
-
83
- ## SDK Reference Scaffold
84
-
85
- Universal scaffold documentation (recipes, patterns, architecture, reference) has been centralized in the SDK reference. After `pnpm install`, the entry point is:
86
-
87
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx`
88
-
89
- This index links to all scaffold docs including pathway recipes, UI patterns, core architecture, and auto-generated contracts/feature registry.
90
-
91
- For task classes that involve feature integration, resource authoring, or UI customization, start with the scaffold index rather than local docs.
92
-
93
- ## Task Classes
94
-
95
- Classify the request, then follow the load/inspect/verify sequence for that class.
96
-
97
- ### 1. UI / Shell Work
98
-
99
- Examples: add a page, change sidebar behavior, adjust feature visibility, update dashboard labels.
100
-
101
- Load first:
102
-
103
- - `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- UI recipes, feature flags, customization)
104
- - `.claude/rules/ui.md`
105
- - `ui/src/routes/README.md`
106
- - `core/config/README.md`
107
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- specifically recipe 6 when building a "run this resource" surface
108
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- when building or extending CRM pages, sidebars, hooks, workflows, or deal data surfaces
109
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- when building or extending lead-gen pages, sidebars, hooks, workflows, list/member state, or artifacts
110
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- when changing CRM deal action buttons or adding a workflow-backed deal action
111
-
112
- Then inspect:
113
-
114
- - `ui/src/routes/__root.tsx`
115
- - `ui/src/config/*`
116
- - relevant `ui/src/routes/*`
117
- - relevant `ui/src/features/*`
118
- - `core/config/organization-model.ts`
119
-
120
- Verify with:
121
-
122
- - route and manifest source
123
- - any relevant package README from `packages/ui`
124
-
125
- ### 2. Workflow / Agent / Operations Work
126
-
127
- Examples: add a workflow, update an agent, change resource registration, understand deployable resources.
128
-
129
- Load first:
130
-
131
- - `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- workflow recipes, resource authoring)
132
- - `.claude/rules/operations.md`
133
- - `operations/src/README.md`
134
-
135
- Then inspect:
136
-
137
- - `operations/src/index.ts`
138
- - relevant `operations/src/<feature>/*`
139
- - `core/types/index.ts` -- workflow input/output Zod schemas
140
- - `core/types/entities.ts` -- typed entity contracts (Project, Deal, etc.) extending `@elevasis/core/entities` base types. Read this when authoring a workflow that takes or returns these entities so the input/output schemas reference the canonical entity shapes rather than redeclaring them.
141
- - `operations/elevasis.config.ts`
142
-
143
- Verify with:
144
-
145
- - Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
146
- - local SDK guidance in `.claude/skills/elevasis/SKILL.md`
147
-
148
- ### 3. Organization Model / Feature Access Work
149
-
150
- Examples: rename a feature area, change quick access surfaces, map new business terms into the shell, adjust feature gating.
151
-
152
- Load first:
153
-
154
- - `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- contracts, gating patterns, glossary)
155
- - `core/config/README.md`
156
- - `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
157
- - typed feature/surface constants from `@elevasis/core/organization-model` -- `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`, `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`. Use these typed constants instead of magic strings when overriding feature/surface IDs.
158
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- CRM is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending CRM structure.
159
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead gen is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending lead-gen lists, members, artifacts, or state transitions.
160
- - `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- CRM action buttons are not `sales.actions` org-model config in v1; use the recipe's provider/custom-button path.
161
- - `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md`
162
-
163
- Then inspect:
164
-
165
- - `core/config/organization-model.ts`
166
- - `core/config/organization-model.ts` -- Organization Model overrides plus Systems and Resources descriptors. Start here for feature labels, surface mapping, and resource identity/governance changes.
167
- - `ui/src/routes/__root.tsx`
168
- - `ui/src/lib/hooks/useFeatureAccess.ts`
169
- - relevant nav config files
170
-
171
- Verify with:
172
-
173
- - published package docs for `@elevasis/core/organization-model`
174
- - current scaffold routes and manifests
175
-
176
- ### 4. Debugging / Impact Analysis
177
-
178
- Examples: why is this automation disconnected, what does this workflow affect, what should I inspect before changing this resource.
179
-
180
- Load first:
181
-
182
- - `operations/src/README.md`
183
- - `.claude/rules/active-change-index.md`
184
- - Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
185
- - For "why didn't this run?", "why is this still pending?", "what needs approval?", or schedule/queue debugging, inspect live operations state with `pnpm elevasis-sdk schedule:list --pretty`, `pnpm elevasis-sdk queue:list --status pending --pretty`, and `pnpm elevasis-sdk queue:status --pretty`.
186
-
187
- Then inspect:
188
-
189
- - `operations/src/index.ts`
190
- - resource definitions
191
- - related UI route and feature files
192
- - related core contracts
193
- - pending HITL items via `elevasis-sdk queue:get <id>` before selecting or expiring an action
194
- - recurring automation via `elevasis-sdk schedule:get <id>` before pausing, resuming, or cancelling it
195
-
196
- Verify with:
197
-
198
- - resource registration and relationship declarations
199
- - generated maps
200
- - package and source ownership boundaries
201
- - `queue:*` or `schedule:*` CLI output when runtime state is part of the question
202
-
203
- ### 5. Platform Extension / Package Contract Work
204
-
205
- Examples: extend a published package contract, understand how a scaffold surface maps to `@elevasis/ui`, update a package-facing reference doc.
206
-
207
- Load first:
208
-
209
- - `.claude/rules/active-change-index.md`
210
- - Glob `node_modules/@elevasis/sdk/reference/` for the current SDK package surface
211
- - package README found via that glob
212
-
213
- Then inspect:
214
-
215
- - package source entrypoints
216
- - package reference manifests
217
- - scaffold files that consume that contract
218
-
219
- Verify with:
220
-
221
- - published package docs
222
- - source exports
223
- - scaffold consumption points
224
-
225
- ## Boundary Resolution
226
-
227
- Once the request is classified, determine which boundary owns the change:
228
-
229
- - **Core boundary** -- semantics, aliases, labels, shared schemas
230
- - **UI shell boundary** -- provider composition, manifests, navigation, route ownership
231
- - **Operations boundary** -- deployable resource registration, workflow/agent contracts, topology
232
- - **Package boundary** -- public exports, shared platform behavior, reusable contracts
233
-
234
- If a task spans boundaries, start at the semantic boundary, then move to runtime composition, then to registration/deployment.
235
-
236
- ## Main Boundaries
237
-
238
- ### `core/config/organization-model.ts`
239
-
240
- The semantic adaptation point between platform contracts and scaffold-local terminology. Start here for feature labels, legacy aliases, quick-access surfaces, and shell-facing organization semantics.
241
-
242
- ### `ui/src/routes/__root.tsx`
243
-
244
- The shell composition point. Start here for manifest mounting, provider wiring, app-local nav, and how the scaffold combines published feature surfaces with project-owned shell concerns.
245
-
246
- ### `operations/src/index.ts`
247
-
248
- The deployment aggregation point. Start here for what resources are registered and deployed as part of the scaffold.
249
-
250
- ## Source of Truth
251
-
252
- Trust these in order:
253
-
254
- 1. Source code and published package docs
255
- 2. Co-located boundary docs
256
- 3. Generated structural maps
257
- 4. Hand-authored template guidance
258
- 5. In-progress architecture docs when `.claude/rules/active-change-index.md` says the area is actively evolving
259
-
260
- If a hand-authored doc conflicts with source or published package docs, trust source and flag the doc drift.
261
-
262
- ## Common Traps
263
-
264
- - Do not assume feature directories are exhaustive without also checking `operations/src/index.ts` and `core/config/organization-model.ts` directly.
265
- - Do not assume placeholder knowledge is sufficient for real client context. Read `identity.clientBrief` from the OrganizationModel (`core/config/organization-model.ts`).
266
- - Do not trust stable docs blindly when `.claude/rules/active-change-index.md` flags related in-progress architecture work.
267
- - Do not write `resume_context` into task-doc frontmatter. DB is canonical; write via `project:task:save` or the inline editor in Command Center.
268
-
269
- ## Operations-Only Projects
270
-
271
- Some projects derived from this template are operations-only. They have `operations/` (or a top-level `src/`) but NO `ui/`, NO `core/config/organization-model.ts`, and NO frontend. Finding none of these is not missing scaffolding -- it is by design.
272
-
273
- **What applies:** Only Task Classes 2 (Workflow / Agent / Operations Work) and 4 (Debugging / Impact Analysis) apply to operations-only projects. Task Classes 1 (UI / Shell Work), 3 (Organization Model / Feature Access Work), and 5 (Platform Extension / Package Contract Work) do not apply and can be skipped.
274
-
275
- **Primary entrypoint:** For operations-only projects, the project's own `CLAUDE.md` and its Navigation table are the canonical first-read. This rule provides task-routing context but its full surface map is irrelevant for that project type.
276
-
277
- **Signal:** The `CLAUDE.md` of an operations-only project includes `Project type: operations-only` in its `## Project` section. When you see this signal, skip all template surfaces that don't exist and go directly to the operations task class.
1
+ ---
2
+ description: Compatibility pointer for the canonical Agent Start Here rule bundled with @elevasis/sdk
3
+ ---
4
+
5
+ # Agent Start Here
6
+
7
+ Canonical rule source:
8
+
9
+ `node_modules/@elevasis/sdk/reference/rules/agent-start-here.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,57 +1,11 @@
1
- ---
2
- description: Deployment workflow -- check-first, dev vs prod, version bumping, common errors
3
- paths:
4
- - operations/**
5
- ---
6
-
7
- # Deployment
8
-
9
- ## Always Check Before Deploy
10
-
11
- ```bash
12
- pnpm -C operations run check # Validate resource definitions
13
- pnpm -C operations run check-types # TypeScript type-check
14
- pnpm -C operations run deploy # Deploy to dev (only after both pass)
15
- ```
16
-
17
- `check` catches duplicate resource IDs, OM descriptor/code mismatches, invalid step chains, broken relationships, and schema serialization issues. Same validation runs during deploy -- if `check` passes, deploy validation will pass.
18
-
19
- ## Dev vs Prod
20
-
21
- | Command | Target | When |
22
- | ------------------------------------ | ----------------- | ----------------------- |
23
- | `pnpm -C operations run deploy` | Local dev API | Development and testing |
24
- | `pnpm -C operations run deploy:prod` | `api.elevasis.io` | Production release |
25
-
26
- Always test in dev first, verify with `elevasis-sdk exec`, then deploy to prod.
27
-
28
- ## Version Bumping
29
-
30
- Deploy accepts `--major`, `--minor`, `--patch` flags to bump the deployment version. The bumped version is written back to `src/index.ts`. Bump on contract changes (input/output schema modifications).
31
-
32
- ## What Gets Deployed
33
-
34
- 1. **Bundle:** esbuild compiles `src/index.ts` + all dependencies into a single self-contained CJS file. No `node_modules` needed at runtime.
35
- 2. **Metadata:** Resource definitions, OM Resources descriptor bindings, Zod schemas (converted to JSON Schema), relationships, triggers.
36
-
37
- ## Environment
38
-
39
- - `ELEVASIS_PLATFORM_KEY` in `.env` is required for CLI auth
40
- - `.env` is never included in the bundle -- it stays local
41
- - Integration credentials live in Command Center, not `.env`
42
-
43
- ## Common Errors
44
-
45
- | Error | Fix |
46
- | ---------------------------------------- | ------------------------------------------------------- |
47
- | `401: Invalid API key` | Check `ELEVASIS_PLATFORM_KEY` in `.env` |
48
- | `Duplicate resource ID` | Fix the duplicated OM Resource descriptor ID, then derive runtime `resourceId` from that descriptor |
49
- | `Missing OM Resource descriptor` | Add the descriptor to `core/config/organization-model.ts` under the id-keyed `resources` map |
50
- | `Step references non-existent next step` | Fix the `next:` field in the step chain |
51
- | `Schema serialization failed` | Simplify the Zod schema (warning, still deploys) |
52
- | `No default export found` | `src/index.ts` must `export default` a `DeploymentSpec` |
53
- | `Documentation file exceeds 100KB` | Split the `.md` file |
54
-
55
- ## Deployment Replaces Previous
56
-
57
- Only one deployment can be `active` at a time. Deploying again automatically marks the previous deployment as `stopped`. Resources become executable immediately after deploy succeeds.
1
+ ---
2
+ description: Compatibility pointer for the canonical Deployment rule bundled with @elevasis/sdk
3
+ ---
4
+
5
+ # Deployment
6
+
7
+ Canonical rule source:
8
+
9
+ `node_modules/@elevasis/sdk/reference/rules/deployment.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,56 +1,11 @@
1
- ---
2
- description: Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry
3
- paths:
4
- - operations/**
5
- ---
6
-
7
- # Error Handling
8
-
9
- ## Error Types
10
-
11
- Two error classes from `@elevasis/sdk`:
12
-
13
- **`ExecutionError`** -- base class for workflow/step failures.
14
-
15
- ```typescript
16
- import { ExecutionError } from '@elevasis/sdk'
17
-
18
- throw new ExecutionError('Payment processing failed', {
19
- context: { invoiceId: '123', amount: 500 }
20
- })
21
- ```
22
-
23
- **`PlatformToolError`** -- thrown by `platform.call()` and typed adapters.
24
-
25
- ```typescript
26
- import { PlatformToolError } from '@elevasis/sdk'
27
-
28
- try {
29
- await attio.createRecord({ ... })
30
- } catch (err) {
31
- if (err instanceof PlatformToolError && err.retryable) {
32
- // Transient error (rate limit, timeout, network) -- safe to retry
33
- } else {
34
- // Permanent error (invalid credentials, bad input) -- don't retry
35
- }
36
- }
37
- ```
38
-
39
- ## No Auto-Retry
40
-
41
- The platform does NOT automatically retry failed steps. Your handler is responsible for retry logic. Check `PlatformToolError.retryable` to decide whether retrying is safe.
42
-
43
- ## Error Visibility
44
-
45
- - Unhandled exceptions in handlers surface directly to CLI output and AI Studio.
46
- - Use `context.logger.error()` to log errors -- `console.error()` is NOT captured by the platform.
47
- - Write clear, descriptive error messages -- they're the primary debugging signal for end users.
48
-
49
- ## Common PlatformToolError Codes
50
-
51
- | Code | Retryable | Cause |
52
- | --------------------- | --------- | --------------------------------- |
53
- | `rate_limit_exceeded` | Yes | Integration API rate limit hit |
54
- | `timeout_error` | Yes | Integration call timed out |
55
- | `credentials_invalid` | No | Credential not found or expired |
56
- | `validation_error` | No | Invalid parameters passed to tool |
1
+ ---
2
+ description: Compatibility pointer for the canonical Error Handling rule bundled with @elevasis/sdk
3
+ ---
4
+
5
+ # Error Handling
6
+
7
+ Canonical rule source:
8
+
9
+ `node_modules/@elevasis/sdk/reference/rules/error-handling.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,40 +1,11 @@
1
- ---
2
- description: Execution model -- timeouts, memory, concurrency, org isolation, runtime constraints
3
- paths:
4
- - operations/**
5
- ---
6
-
7
- # Execution Model
8
-
9
- ## Runtime Environment
10
-
11
- Each execution runs in an isolated Node.js worker thread spawned from the deployed bundle. Workers are ephemeral -- created on execution start, terminated on completion. No state persists between executions.
12
-
13
- ## Constraints
14
-
15
- | Constraint | Workflows | Agents |
16
- | ---------- | ------------------------------- | ----------------------------------------------------- |
17
- | Timeout | 300s (5 min) | 600s (10 min, configurable via `constraints.timeout`) |
18
- | Memory | 256MB hard limit | 256MB hard limit |
19
- | Disk | None (no persistent filesystem) | None |
20
-
21
- - Platform enforces timeouts -- no handler code needed, worker terminates automatically.
22
- - Memory overflow crashes the worker. Other tenants are unaffected.
23
- - For long-running tasks, break work into multiple steps or use agents with extended timeout.
24
-
25
- ## Concurrency
26
-
27
- Concurrent executions for the same organization run in completely separate workers with zero shared state. No locking, no race conditions between executions.
28
-
29
- ## Organization Isolation
30
-
31
- - `organizationId` is injected server-side from the JWT context -- workers never see it.
32
- - Storage paths are automatically org-prefixed.
33
- - Resource IDs are scoped per organization (not global).
34
- - External developers cannot access other organizations' data by construction.
35
-
36
- No developer action needed for multi-tenancy -- the platform handles it.
37
-
38
- ## Cancellation
39
-
40
- The platform can cancel in-flight executions. The worker terminates immediately with no cleanup handler.
1
+ ---
2
+ description: Compatibility pointer for the canonical Execution rule bundled with @elevasis/sdk
3
+ ---
4
+
5
+ # Execution
6
+
7
+ Canonical rule source:
8
+
9
+ `node_modules/@elevasis/sdk/reference/rules/execution.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.