@elevasis/sdk 1.15.0 → 1.16.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 (66) hide show
  1. package/dist/cli.cjs +2325 -124
  2. package/dist/index.d.ts +882 -794
  3. package/dist/index.js +170 -46
  4. package/dist/node/index.d.ts +69 -0
  5. package/dist/node/index.js +273 -0
  6. package/dist/test-utils/index.d.ts +857 -711
  7. package/dist/test-utils/index.js +2 -0
  8. package/dist/types/worker/adapters/lead.d.ts +1 -1
  9. package/dist/types/worker/platform.d.ts +2 -9
  10. package/dist/worker/index.js +1 -0
  11. package/package.json +12 -3
  12. package/reference/_navigation.md +23 -1
  13. package/reference/_reference-manifest.json +98 -0
  14. package/reference/claude-config/rules/agent-start-here.md +13 -0
  15. package/reference/claude-config/rules/organization-model.md +40 -40
  16. package/reference/claude-config/rules/organization-os.md +16 -16
  17. package/reference/claude-config/rules/ui.md +2 -6
  18. package/reference/claude-config/rules/vibe.md +13 -13
  19. package/reference/claude-config/skills/knowledge/SKILL.md +253 -0
  20. package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-a.md +100 -100
  21. package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-b.md +158 -158
  22. package/reference/claude-config/skills/knowledge/operations/customers.md +109 -0
  23. package/reference/claude-config/skills/knowledge/operations/features.md +113 -0
  24. package/reference/claude-config/skills/knowledge/operations/goals.md +118 -0
  25. package/reference/claude-config/skills/knowledge/operations/identity.md +93 -0
  26. package/reference/claude-config/skills/knowledge/operations/labels.md +89 -0
  27. package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -0
  28. package/reference/claude-config/skills/knowledge/operations/roles.md +99 -0
  29. package/reference/claude-config/skills/knowledge/operations/techStack.md +102 -0
  30. package/reference/claude-config/skills/run-ui/SKILL.md +73 -0
  31. package/reference/claude-config/skills/setup/SKILL.md +270 -270
  32. package/reference/claude-config/skills/tutorial/SKILL.md +249 -0
  33. package/reference/claude-config/skills/tutorial/progress-template.md +74 -0
  34. package/reference/claude-config/skills/tutorial/technical.md +1309 -0
  35. package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -0
  36. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -0
  37. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -0
  38. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -0
  39. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -0
  40. package/reference/deployment/index.mdx +5 -5
  41. package/reference/examples/organization-model.ts +40 -0
  42. package/reference/framework/index.mdx +1 -1
  43. package/reference/framework/tutorial-system.mdx +86 -173
  44. package/reference/packages/core/src/knowledge/README.md +32 -0
  45. package/reference/packages/ui/src/knowledge/README.md +31 -0
  46. package/reference/packages/ui/src/theme/presets/README.md +19 -0
  47. package/reference/scaffold/core/organization-model.mdx +1 -1
  48. package/reference/scaffold/recipes/add-a-feature.md +1 -1
  49. package/reference/scaffold/recipes/customize-crm-actions.md +3 -3
  50. package/reference/scaffold/recipes/customize-organization-model.md +3 -3
  51. package/reference/scaffold/recipes/extend-crm.md +12 -8
  52. package/reference/scaffold/recipes/extend-lead-gen.md +129 -20
  53. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +1 -1
  54. package/reference/scaffold/recipes/index.md +6 -0
  55. package/reference/scaffold/reference/contracts.md +829 -595
  56. package/reference/scaffold/reference/feature-registry.md +2 -1
  57. package/reference/scaffold/ui/composition-extensibility.mdx +17 -0
  58. package/reference/claude-config/skills/configure/SKILL.md +0 -98
  59. package/reference/claude-config/skills/configure/operations/customers.md +0 -150
  60. package/reference/claude-config/skills/configure/operations/features.md +0 -162
  61. package/reference/claude-config/skills/configure/operations/goals.md +0 -147
  62. package/reference/claude-config/skills/configure/operations/identity.md +0 -133
  63. package/reference/claude-config/skills/configure/operations/labels.md +0 -128
  64. package/reference/claude-config/skills/configure/operations/offerings.md +0 -159
  65. package/reference/claude-config/skills/configure/operations/roles.md +0 -153
  66. package/reference/claude-config/skills/configure/operations/techStack.md +0 -139
@@ -0,0 +1,58 @@
1
+ # CRM Ownership and Next-Action Projection
2
+
3
+ ## Why this note exists
4
+
5
+ This release train ships CRM ownership and next-action projection across the shared core, UI, API, and Elevasis operations bundle.
6
+
7
+ Shared CRM deal responses now carry nullable `ownership` and `nextAction` values derived from activity history. The CRM list and detail surfaces render the move owner directly, and detail actions prefer the projected `nextAction` before falling back to ownership-aware derivation. The Elevasis operations bundle also writes canonical follow-up and deferred-next-step activity events so ownership can sort consistently.
8
+
9
+ ## Applies to
10
+
11
+ Template-derived projects that:
12
+
13
+ - consume `@elevasis/core/business/acquisition/api-schemas` deal list or detail response types
14
+ - render CRM list, detail, or action surfaces from `@elevasis/ui`
15
+ - author CRM operations workflows that append or interpret deal activity events
16
+ - read `activity_log` rows and classify who owns the next move
17
+
18
+ Projects with no CRM surface and no `acq_deals` workflow logic can ignore this train.
19
+
20
+ ## Required actions
21
+
22
+ 1. Pull template changes with `/git-sync` after this train publishes so package baselines for `@elevasis/core` and `@elevasis/ui` are refreshed.
23
+
24
+ 2. Upgrade shared packages in the derived project after the publish stages complete:
25
+
26
+ ```bash
27
+ pnpm up @elevasis/core @elevasis/ui --latest
28
+ ```
29
+
30
+ 3. Audit any project-owned CRM workflow code that writes activity events. Outbound follow-up should emit `followup_email_sent`, and "lead will check / get back to us" replies should emit `lead_deferred_next_step` when they defer our next action.
31
+
32
+ 4. Audit any project-owned CRM UI code that computes available actions locally. Prefer the server-projected `nextAction` when present, and suppress send-reply affordances when `ownership` is `them`.
33
+
34
+ 5. If the project deploys an operations bundle with CRM reply or follow-up handlers, redeploy that bundle after package upgrades so runtime activity writes match the new ownership derivation:
35
+
36
+ ```bash
37
+ pnpm -C operations exec elevasis-sdk deploy --prod
38
+ ```
39
+
40
+ ## Verification
41
+
42
+ After upgrading:
43
+
44
+ - `pnpm check-types` passes in project packages that consume CRM types or UI.
45
+ - CRM list rows show the expected move owner for deals with inbound replies, outbound replies, follow-ups, reminders, booking nudges, and deferred-next-step replies.
46
+ - CRM detail actions expose Send Reply only when the server-projected action and ownership allow it.
47
+ - Operations tests or smoke probes confirm follow-up handlers emit `followup_email_sent`.
48
+ - A CRM reply where the lead says they will check internally records `lead_deferred_next_step` and sorts after the inbound reply event.
49
+
50
+ ## Not handled by /git-sync
51
+
52
+ `/git-sync` does not:
53
+
54
+ - publish `@elevasis/core` or `@elevasis/ui`
55
+ - run package upgrades inside derived projects
56
+ - redeploy project-owned operations bundles
57
+ - rewrite project-owned CRM workflow logic that still emits legacy activity event names
58
+ - verify or repair historical `activity_log` rows in project databases
@@ -0,0 +1,56 @@
1
+ # Template WorkOS Hardcode + Strict Dev Port
2
+
3
+ ## Why this note exists
4
+
5
+ The template UI no longer reads WorkOS configuration from `VITE_WORKOS_*` env vars. WorkOS `clientId`, `redirectUri`, and `signoutUri` are hardcoded in a new file `ui/src/config/workos.ts` so a freshly bootstrapped template runs without any UI `.env` setup. The Vite dev server now uses `strictPort: true` on port `4300` so a second `pnpm -C ui dev` on the same machine fails fast instead of silently drifting to another port.
6
+
7
+ This sync moves three pieces into derived projects:
8
+
9
+ - `ui/src/config/workos.ts` -- new merge-baseline file holding `clientId`, `redirectUri`, `signoutUri`
10
+ - `ui/src/main.tsx` and `ui/src/routes/__root.tsx` -- merge-regions updates that import `WORKOS_CONFIG` from `@/config/workos` instead of reading `import.meta.env.VITE_WORKOS_*`
11
+ - `ui/vite.config.ts` -- `strictPort: true` added next to `port: 4300`
12
+ - `ui/.env.example` -- WorkOS section removed (replaced with a single comment pointing at `ui/src/config/workos.ts`)
13
+ - `.claude/rules/ui.md` and `CLAUDE.md` -- prose updated; project-owned `CLAUDE.md` is verify-only and the project keeps its own narrative
14
+
15
+ `nirvana-marketing` and `ZentaraHQ` already received `ui/src/config/workos.ts`, the `strictPort` flag, and the `.claude/rules/ui.md` baseline as prep-gate repairs in the previous train. This note formally attributes those changes to an owning task doc and covers any remaining template-derived projects.
16
+
17
+ ## Applies to
18
+
19
+ Template-derived projects that:
20
+
21
+ - run a WorkOS-authenticated UI from `ui/src/main.tsx` and `ui/src/routes/__root.tsx`
22
+ - run the Vite dev server on port `4300`
23
+ - have a project-owned `ui/src/config/workos.ts` (created via prep-gate repair) or are seeing it land for the first time on this sync
24
+ - maintain a `ui/.env` file that previously set `VITE_WORKOS_CLIENT_ID`, `VITE_WORKOS_REDIRECT_URI`, or `VITE_WORKOS_SIGNOUT_URI`
25
+
26
+ Projects with no WorkOS surface or no Vite dev server are not affected.
27
+
28
+ ## Required actions
29
+
30
+ 1. Pull template changes with `/git-sync` after this train publishes so the WorkOS hardcode and strict-port baselines reach the project's UI shell.
31
+
32
+ 2. Confirm the project's `ui/src/config/workos.ts` reflects the WorkOS client ID the project should authenticate against. The template ships the platform team's dev-tier `clientId`; client-facing projects must overwrite that value with the project's own WorkOS client ID before going to production. Edit the literal in `ui/src/config/workos.ts` -- no env vars are involved.
33
+
34
+ 3. Stop providing `VITE_WORKOS_CLIENT_ID`, `VITE_WORKOS_REDIRECT_URI`, and `VITE_WORKOS_SIGNOUT_URI` in `ui/.env`. They are no longer read. Delete the entries to keep the file honest. The WorkOS values now live in `ui/src/config/workos.ts`.
35
+
36
+ 4. Confirm `ui/vite.config.ts` carries `strictPort: true` next to `server.port: 4300`. If a second dev server starts on the same port, expect a hard failure instead of a drift to `4301`.
37
+
38
+ 5. If the project hand-rolled an env-vars notice component or a `REQUIRED_ENV_VARS` array around WorkOS, remove it. `createElevasisApp` no longer needs the `MissingEnvNotice` prop now that `clientId` is always truthy.
39
+
40
+ ## Verification
41
+
42
+ After upgrading:
43
+
44
+ - `pnpm -C ui check-types` and `pnpm -C ui build` pass with `WORKOS_CONFIG` imported from `@/config/workos`.
45
+ - `pnpm -C ui dev` boots on `4300`. Starting a second `pnpm -C ui dev` in another terminal fails with a port-in-use error instead of incrementing to `4301`.
46
+ - WorkOS sign-in and sign-out still round-trip through the project's WorkOS tenant. Sign-out lands on the URL configured in `ui/src/config/workos.ts` (`signoutUri`).
47
+ - `grep -r VITE_WORKOS_ ui/src` returns nothing.
48
+
49
+ ## Not handled by /git-sync
50
+
51
+ `/git-sync` does not:
52
+
53
+ - delete `VITE_WORKOS_*` entries from project-local `ui/.env` files
54
+ - overwrite `ui/src/config/workos.ts` if the project has already customized the `clientId` for a non-default WorkOS tenant (the file is merge-baseline; customizations are preserved)
55
+ - update WorkOS dashboard redirect URIs or CORS origins for projects that run the dev server on a non-`4300` port; if the project changed the dev port, it must also change the WorkOS dashboard accordingly
56
+ - redeploy any project-owned operations bundle; this train is UI-shell only
@@ -0,0 +1,71 @@
1
+ # Elevasis Workspace Ship-Train
2
+
3
+ ## Why this note exists
4
+
5
+ The Elevasis runtime (`external/elevasis/`) was promoted into the pnpm workspace as `packages/elevasis-{core,operations}/`. That migration exposed two latent SDK pipeline failures -- a rollup `.dts` resolver bug affecting transitive type-only peers (`openai`, `@supabase/*`, `@workos-inc/node`, etc.) and a deploy-validator crash on ESM-only `exports` maps -- both of which are now fixed in `@elevasis/sdk`. The same migration forced a formal subpath boundary contract for `@elevasis/sdk`: the default barrel is now browser-safe only, with `@elevasis/sdk/worker`, `@elevasis/sdk/node`, and `@elevasis/sdk/test-utils` as explicit runtime-gated subpaths, enforced by `no-restricted-imports` lint rules and a build-time bundle-leak test suite. Separately, workflow input/output schemas are now codified as the canonical SSOT through a three-layer pattern (operations contract owns schemas; CC imports from the workflow contract; `apps/api` stays envelope-only). The result is minor bumps to `@elevasis/core`, `@elevasis/ui`, and `@elevasis/sdk`, a `_template` dependency-baseline update, and new boundary rules that external SDK consumers must follow.
6
+
7
+ ## Applies to
8
+
9
+ All template-derived projects that consume `@elevasis/sdk`, `@elevasis/core`, or `@elevasis/ui`. Specifically:
10
+
11
+ - `nirvana-marketing`
12
+ - `ZentaraHQ`
13
+ - Any future external SDK consumer derived from the `_template` baseline
14
+
15
+ `@elevasis/sdk` is now boundary-enforced. Any external project that previously imported Node-only modules from the default `@elevasis/sdk` barrel -- including `knowledge-codegen`, anything touching `node:fs`, or `worker_threads` -- must migrate those imports to `@elevasis/sdk/node`. Workflow handler code that uses `platform.call`, `acqDb`, or adapter factories should already be on `@elevasis/sdk/worker`; verify this is the case.
16
+
17
+ ## Required actions
18
+
19
+ 1. Pull template changes with `/git-sync` after this train publishes so the refreshed package baselines (`core/package.json`, `ui/package.json`, `operations/package.json`) reach the project.
20
+
21
+ 2. After the baseline lands, update package versions in the project:
22
+
23
+ ```bash
24
+ pnpm up @elevasis/core @elevasis/ui @elevasis/sdk --latest
25
+ ```
26
+
27
+ Version baselines are written into the `_template` package files by the release train. Match the versions from `_template` after sync or run `--latest` to pull the published minors.
28
+
29
+ 3. Run `pnpm install` from the project root after the dep bump to ensure the lockfile is updated.
30
+
31
+ 4. **Audit `@elevasis/sdk` import subpaths.** In `operations/src/`, search for any import from `@elevasis/sdk` that touches `knowledge-codegen`, `node:fs`, `worker_threads`, or any other Node-only module. These must move to `@elevasis/sdk/node`. Workflow handler files that use `platform`, `acqDb`, or adapter factories belong on `@elevasis/sdk/worker` -- verify the subpath is explicit.
32
+
33
+ ```ts
34
+ // Before (incorrect for Node-only tooling)
35
+ import { knowledgeCodegen } from '@elevasis/sdk'
36
+
37
+ // After
38
+ import { knowledgeCodegen } from '@elevasis/sdk/node'
39
+ ```
40
+
41
+ 5. **Audit for `@repo/elevasis-core` or `@repo/elevasis-operations` imports.** These package names are workspace-internal to the platform monorepo and are not published. External consumers must use the published packages (`@elevasis/sdk`, `@elevasis/core`, `@elevasis/ui`) exclusively. If a tenant project forked or copied an import path using the `@repo/elevasis-*` namespace, replace it with the appropriate published subpath.
42
+
43
+ 6. **Audit workflow input/output schema usage in `ui/src/`.** Per the schema SSOT pattern, CC code should import schemas from the workflow's `contract.inputSchema` or `contract.outputSchema`, not from hand-duplicated local type declarations. If the project has hand-written copies of workflow input or output schemas in `ui/src/`, flag them for migration to direct imports from the workflow contract. If a workflow's main file imports Node-only code, use the browser-safe sibling-schema pattern (a separate `<workflow-name>-schema.ts` file, importing `node:*`-free schema definitions only) so CC can consume the schema without triggering Vite's `"fs" has been externalized` error.
44
+
45
+ 7. **Rebuild and type-check:**
46
+
47
+ ```bash
48
+ pnpm -C ui build
49
+ pnpm -C ui exec tsc --noEmit
50
+ pnpm -C operations exec tsc --noEmit
51
+ ```
52
+
53
+ ## Verification
54
+
55
+ After applying all actions above:
56
+
57
+ - `pnpm install` completes cleanly with no unresolved peer warnings.
58
+ - `pnpm check-types` passes across all project packages (`ui`, `operations`, `core`).
59
+ - `pnpm test` passes where test suites exist.
60
+ - `pnpm -C ui dev` starts the CC dev server. Navigating to any workflow detail route (e.g., a lead-gen list action form) produces no `Module "fs" has been externalized for browser compatibility` console errors. If those errors appeared before this upgrade, they should be gone.
61
+ - A workflow execution round-trips end-to-end in dev: trigger a workflow from the CC UI, confirm the execution record appears in the monitoring view.
62
+
63
+ ## Not handled by /git-sync
64
+
65
+ `/git-sync` propagates template-authored files (package baselines, scaffold doc copies, sync-managed surfaces) but does NOT:
66
+
67
+ - Run `pnpm up @elevasis/core @elevasis/ui @elevasis/sdk --latest` -- dep bumps are manual after the baseline lands.
68
+ - Infer or apply subpath migrations for `@elevasis/sdk`. If any workflow in `operations/src/` was importing Node-only modules from the default `@elevasis/sdk` barrel, `/git-sync` will not rewrite those import paths to `@elevasis/sdk/node`. That migration is manual per project.
69
+ - Replace hand-duplicated workflow schemas in `ui/src/` with imports from workflow contracts. Tenant-side schema copies need manual migration to use `contract.inputSchema` / `contract.outputSchema`.
70
+ - Remove or update any `no-restricted-imports` lint rule overrides that the project may have added to disable `@elevasis/sdk` subpath enforcement. If the project disabled the rule, re-enable it after sync and resolve any violations it surfaces.
71
+ - Clear the Vite module-graph cache (`ui/node_modules/.vite`). After upgrading the SDK, clear this directory manually and restart the dev server before verifying that browser-safety errors are gone -- stale cache can make fixed boundary violations appear to persist.
@@ -0,0 +1,59 @@
1
+ # Template Skills: `/run-ui` and `/tutorial`
2
+
3
+ ## Why this note exists
4
+
5
+ This sync introduces two new template skills and a project-wide tone-block in the always-loaded `agent-start-here` rule:
6
+
7
+ - **`/run-ui`** -- new skill at `.claude/skills/run-ui/SKILL.md`. One-command path to start the project's Vite dev server on port `4300` in the background. Probes the port, branches on free/own-vite/other-holder, asks before killing a non-vite holder, polls Vite stdout for `Local:` / `ready in`, then surfaces the URL and the background shell ID. Resolves the `strictPort: true` failure mode introduced by the `2026-05-02` WorkOS hardcode train -- before this skill, port collisions were a hard manual debug.
8
+ - **`/tutorial`** -- new skill at `.claude/skills/tutorial/{SKILL,vibe-coder,technical,progress-template}.md`. Persona-aware onboarding that forks at first invocation into a `vibe-coder` track (zero technical vocabulary, agent does all the work) or a `technical` track (full SDK depth, code-first). The choice persists to `.claude/memory/profile.md` and ships a tone block applied project-wide for the rest of every session.
9
+ - **`agent-start-here.md` Project Profile section** -- the always-loaded entrypoint rule now reads `profile.md` at session start and applies the per-track tone block to ALL agent output, not just inside `/tutorial`. This is the load-bearing change that lets `/tutorial` actually flip agent behavior across the whole project.
10
+
11
+ The project-owned `CLAUDE.md` Slash Commands table has a new `/tutorial` row in the template, but `CLAUDE.md` is verify-only on `/git-sync` -- derived projects own that file and need to add the row themselves if they want it documented.
12
+
13
+ This sync moves three pieces into derived projects:
14
+
15
+ - `.claude/skills/run-ui/SKILL.md` -- new file, replace-all surface, lands automatically
16
+ - `.claude/skills/tutorial/{SKILL,vibe-coder,technical,progress-template}.md` -- new files, replace-all surface, lands automatically
17
+ - `.claude/rules/agent-start-here.md` -- replace-all surface, the Project Profile section lands automatically
18
+
19
+ ## Applies to
20
+
21
+ All template-derived projects. There are no surface preconditions -- the new skills do not depend on a particular org-model shape, feature set, or workspace topology. Operations-only projects with no `ui/` will receive `/run-ui` but it will not be useful in that context (no Vite dev server to launch); leaving it installed is harmless.
22
+
23
+ `agent-start-here.md` is replace-all: any project that hand-edited that file will lose those local edits on this sync. Run `git diff .claude/rules/agent-start-here.md` after `/git-sync` and re-apply local customizations if needed -- the template version assumes no project-local changes.
24
+
25
+ ## Required actions
26
+
27
+ 1. Pull template changes with `/git-sync` after this train publishes so the new skills and the `agent-start-here.md` Project Profile section reach the project.
28
+
29
+ 2. Optionally run `/tutorial` to set the project's persona track. The first run asks one gate question (`vibe-coder` vs `technical`) and writes the choice to `.claude/memory/profile.md`. Subsequent runs go straight to the menu. If you skip this, the agent behaves normally and prompts you to consider running `/tutorial` only when relevant.
30
+
31
+ 3. If you want the `/tutorial` row visible in the project's own Slash Commands table, manually add a row to `CLAUDE.md` (project-owned, not overwritten by `/git-sync`):
32
+
33
+ ```
34
+ | `/tutorial` | Guided onboarding -- picks one of two tracks (vibe-coder for non-technical users, technical for developers) and walks through the menu interactively |
35
+ ```
36
+
37
+ 4. If the project hand-edited `.claude/rules/agent-start-here.md` for project-local agent behavior, diff against the new template version and re-apply those edits on top of the new Project Profile section. The replace-all behavior of this file is unchanged from prior trains.
38
+
39
+ 5. Optionally run `/run-ui` at the start of UI work. It is an explicit ask to start the dev server, not an ambient hook -- there is no behavior change unless you invoke it.
40
+
41
+ ## Verification
42
+
43
+ After upgrading:
44
+
45
+ - `.claude/skills/run-ui/SKILL.md` exists and is non-empty.
46
+ - `.claude/skills/tutorial/{SKILL,vibe-coder,technical,progress-template}.md` all exist and are non-empty.
47
+ - `.claude/rules/agent-start-here.md` includes a `## Project Profile` section near the top that references `.claude/memory/profile.md` and the `vibe-coder` / `technical` tracks.
48
+ - Running `/run-ui` from a UI-bearing project either starts Vite on `4300` and reports the URL, or detects a port holder and asks before proceeding.
49
+ - Running `/tutorial` for the first time asks the gate question and writes `.claude/memory/profile.md`. Running it a second time skips the question and shows the menu.
50
+ - For a project that ran `/tutorial`: the agent's tone in subsequent (non-`/tutorial`) responses reflects the chosen track per the tone block in `profile.md`. Vibe-coder track: no technical vocabulary, no slash-command surfacing. Technical track: real paths, code-first, no over-explanation.
51
+
52
+ ## Not handled by /git-sync
53
+
54
+ `/git-sync` does not:
55
+
56
+ - create or update `.claude/memory/profile.md`. The file is created on first `/tutorial` invocation. If a project never runs `/tutorial`, the agent operates as if no profile exists -- normal default behavior.
57
+ - write the new `/tutorial` row into the project's own `CLAUDE.md` Slash Commands table. `CLAUDE.md` is project-owned (verify-only); the row is a manual edit if the project wants it documented.
58
+ - preserve project-local edits to `.claude/rules/agent-start-here.md`. That file is replace-all. Re-apply local customizations after the sync if any exist.
59
+ - run smoke tests for either skill. The `/tutorial` task doc explicitly defers smoke testing to a fresh-scaffold pass; `/run-ui` is exercised on first user invocation, not via sync verification.
@@ -32,16 +32,16 @@ There is no local dev server and no separate staging environment. Deployed resou
32
32
 
33
33
  **Single-package project** (e.g. `external/acme/`): both anchors resolve to the same directory. Invoke from anywhere inside the project tree.
34
34
 
35
- **Multi-package workspace** (e.g. `external/elevasis/` with `operations/` as a sub-package):
35
+ **Multi-package workspace** (e.g. `external/_template/` with `operations/` as a sub-package):
36
36
 
37
37
  ```bash
38
38
  # Invoke from operations/ or any subdir inside it
39
- pnpm -C external/elevasis/operations exec elevasis-sdk deploy
39
+ pnpm -C external/_template/operations exec elevasis-sdk deploy
40
40
 
41
41
  # Both CWDs work identically:
42
- # .elevasis root -> external/elevasis/ (auth / .env)
43
- # package root -> external/elevasis/operations/ (bundle, dist/)
44
- # bundle output -> external/elevasis/operations/dist/bundle.js
42
+ # .elevasis root -> external/_template/ (auth / .env)
43
+ # package root -> external/_template/operations/ (bundle, dist/)
44
+ # bundle output -> external/_template/operations/dist/bundle.js
45
45
  ```
46
46
 
47
47
  Each package in a workspace produces its own `dist/bundle.js` when deployed. Run `elevasis-sdk deploy` from within each package separately.
@@ -222,3 +222,43 @@ export const rolesAndGoalsExample = defineOrganizationModel({
222
222
  ]
223
223
  }
224
224
  })
225
+
226
+ // ---------------------------------------------------------------------------
227
+ // Knowledge nodes
228
+ // ---------------------------------------------------------------------------
229
+ export const knowledgeExample = defineOrganizationModel({
230
+ knowledge: {
231
+ nodes: [
232
+ {
233
+ id: 'knowledge.example-outreach-playbook',
234
+ kind: 'playbook',
235
+ title: 'Example Outreach Playbook',
236
+ summary: 'Step-by-step runbook for launching a cold outreach campaign.',
237
+ body: '## Overview\n\nThis playbook walks through prospect sourcing, message templates, scheduling, and reply triage.\n\n## Steps\n\n1. Source prospects from the lead-gen list.\n2. Personalize the cold email template.\n3. Schedule the sending campaign.\n4. Triage replies in the CRM.',
238
+ links: [{ nodeId: 'feature:sales.crm' }, { nodeId: 'feature:sales.lead-gen' }],
239
+ ownerIds: [],
240
+ updatedAt: '2026-05-01'
241
+ },
242
+ {
243
+ id: 'knowledge.example-icp-strategy',
244
+ kind: 'strategy',
245
+ title: 'Example ICP Strategy',
246
+ summary: 'Describes the ideal customer profile and qualification thresholds.',
247
+ body: '## ICP Profile\n\n- **Industry:** SMB marketing agencies\n- **Size:** 5-50 employees\n- **Region:** North America\n\nProspects scoring \\<60 are excluded from outreach.',
248
+ links: [{ nodeId: 'feature:sales' }],
249
+ ownerIds: [],
250
+ updatedAt: '2026-05-01'
251
+ },
252
+ {
253
+ id: 'knowledge.example-org-model-reference',
254
+ kind: 'reference',
255
+ title: 'Example Organization Model Reference',
256
+ summary: 'Glossary of OM domains and how they relate to features and resources.',
257
+ body: '## Domains\n\nThe organization model splits configuration into typed domains: identity, customers, offerings, roles, goals, techStack, features, statuses, operations, knowledge.',
258
+ links: [],
259
+ ownerIds: [],
260
+ updatedAt: '2026-05-01'
261
+ }
262
+ ]
263
+ }
264
+ })
@@ -87,7 +87,7 @@ The agent adapts its communication based on four independent skill dimensions st
87
87
 
88
88
  Each dimension has its own adaptation rules in the [Interaction Guidance](interaction-guidance.mdx) reference. A user who has deep Zapier experience (automation: low-code) but has never called an API directly (apiIntegration: none) will get credential walkthroughs every time while having automation concepts treated as familiar ground.
89
89
 
90
- `/meta init` runs a 6-question assessment: 3 identity questions, 2 competency questions, and 1 communication preference. Platform Navigation and Automation are assessed directly. API & Integration is inferred from the automation level and tools the user already uses. Domain Expertise is inferred from how specifically the user describes their goals.
90
+ `/tutorial` runs the assessment via a single gate question on first invocation: are you here to build automations by describing what you want, or are you a developer who edits code directly. The choice persists to `.claude/memory/profile.md` and shapes the agent's tone, vocabulary, and tool-call visibility for the entire project, not just inside `/tutorial`. Within the chosen track, lessons adapt further -- senior devs in the technical track can mark Section A items complete to skip them.
91
91
 
92
92
  See [Agent System](agent.mdx) for the full assessment question set, dimensional interaction rules, and communication principles.
93
93