@elevasis/sdk 1.15.1 → 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.
- package/dist/cli.cjs +2325 -124
- package/dist/index.d.ts +410 -473
- package/dist/index.js +96 -44
- package/dist/node/index.d.ts +69 -0
- package/dist/node/index.js +273 -0
- package/dist/test-utils/index.d.ts +473 -466
- package/dist/types/worker/platform.d.ts +2 -9
- package/package.json +12 -3
- package/reference/_navigation.md +23 -1
- package/reference/_reference-manifest.json +98 -0
- package/reference/claude-config/rules/agent-start-here.md +13 -0
- package/reference/claude-config/rules/organization-model.md +40 -40
- package/reference/claude-config/rules/organization-os.md +16 -16
- package/reference/claude-config/rules/vibe.md +13 -13
- package/reference/claude-config/skills/knowledge/SKILL.md +253 -0
- package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-b.md +158 -158
- package/reference/claude-config/skills/knowledge/operations/customers.md +109 -0
- package/reference/claude-config/skills/knowledge/operations/features.md +113 -0
- package/reference/claude-config/skills/knowledge/operations/goals.md +118 -0
- package/reference/claude-config/skills/knowledge/operations/identity.md +93 -0
- package/reference/claude-config/skills/knowledge/operations/labels.md +89 -0
- package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -0
- package/reference/claude-config/skills/knowledge/operations/roles.md +99 -0
- package/reference/claude-config/skills/knowledge/operations/techStack.md +102 -0
- package/reference/claude-config/skills/run-ui/SKILL.md +73 -0
- package/reference/claude-config/skills/setup/SKILL.md +270 -270
- package/reference/claude-config/skills/tutorial/SKILL.md +249 -0
- package/reference/claude-config/skills/tutorial/progress-template.md +74 -0
- package/reference/claude-config/skills/tutorial/technical.md +1309 -0
- package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -0
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -0
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -0
- package/reference/deployment/index.mdx +5 -5
- package/reference/examples/organization-model.ts +40 -0
- package/reference/framework/index.mdx +1 -1
- package/reference/framework/tutorial-system.mdx +86 -173
- package/reference/packages/core/src/knowledge/README.md +32 -0
- package/reference/packages/ui/src/knowledge/README.md +31 -0
- package/reference/packages/ui/src/theme/presets/README.md +19 -0
- package/reference/scaffold/core/organization-model.mdx +1 -1
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/customize-crm-actions.md +433 -433
- package/reference/scaffold/recipes/customize-organization-model.md +3 -3
- package/reference/scaffold/recipes/extend-lead-gen.md +90 -55
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +1 -1
- package/reference/scaffold/recipes/index.md +6 -0
- package/reference/scaffold/reference/contracts.md +1265 -1154
- package/reference/scaffold/reference/feature-registry.md +2 -1
- package/reference/scaffold/ui/composition-extensibility.mdx +17 -0
- package/reference/claude-config/skills/configure/SKILL.md +0 -98
- package/reference/claude-config/skills/configure/operations/customers.md +0 -150
- package/reference/claude-config/skills/configure/operations/features.md +0 -162
- package/reference/claude-config/skills/configure/operations/goals.md +0 -147
- package/reference/claude-config/skills/configure/operations/identity.md +0 -133
- package/reference/claude-config/skills/configure/operations/labels.md +0 -128
- package/reference/claude-config/skills/configure/operations/offerings.md +0 -159
- package/reference/claude-config/skills/configure/operations/roles.md +0 -153
- package/reference/claude-config/skills/configure/operations/techStack.md +0 -139
|
@@ -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/
|
|
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/
|
|
39
|
+
pnpm -C external/_template/operations exec elevasis-sdk deploy
|
|
40
40
|
|
|
41
41
|
# Both CWDs work identically:
|
|
42
|
-
# .elevasis root -> external/
|
|
43
|
-
# package root -> external/
|
|
44
|
-
# bundle output -> external/
|
|
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
|
-
`/
|
|
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
|
|
|
@@ -1,222 +1,135 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Tutorial System
|
|
3
|
-
description:
|
|
3
|
+
description: The /tutorial skill in the external project scaffold -- two-track onboarding (vibe-coder and technical), gate question, track persistence, and escape hatch
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
The tutorial
|
|
6
|
+
The `/tutorial` skill is included in every scaffolded external project. Run it from Claude Code inside a project to start interactive onboarding. It forks into two tracks on first invocation and adapts agent tone project-wide based on your choice.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Getting Started
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Open a scaffolded external project in Claude Code and run:
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
|
|
16
|
-
==================
|
|
17
|
-
|
|
18
|
-
INTRODUCTION 0/4
|
|
19
|
-
1 Welcome & Orientation [ ]
|
|
20
|
-
2 How This Workspace Works [ ]
|
|
21
|
-
3 The /meta Command [ ]
|
|
22
|
-
4 /work and /docs [ ]
|
|
23
|
-
|
|
24
|
-
CORE CONCEPTS 0/6
|
|
25
|
-
5 Your First Custom Workflow [ ]
|
|
26
|
-
6 Understanding Data (Schemas) [ ]
|
|
27
|
-
7 Using Platform Tools [ ]
|
|
28
|
-
8 Multi-Step Workflows [ ]
|
|
29
|
-
9 Decision Points [ ]
|
|
30
|
-
10 Going to Production [ ]
|
|
31
|
-
|
|
32
|
-
ADVANCED MODULES 0/9
|
|
33
|
-
11 Human-in-the-Loop [ ]
|
|
34
|
-
12 Task Scheduling [ ]
|
|
35
|
-
13 Notification System [ ]
|
|
36
|
-
14 Real-World Integrations [ ]
|
|
37
|
-
15 Error Handling Mastery [ ]
|
|
38
|
-
16 Advanced Workflows [ ]
|
|
39
|
-
17 Resource Composition [ ]
|
|
40
|
-
18 LLM Integration [ ]
|
|
41
|
-
19 AI Agents [ ]
|
|
42
|
-
|
|
43
|
-
ADVANCED WORKSPACE 0/2
|
|
44
|
-
20 Rules, Memory, and Customization [ ]
|
|
45
|
-
21 Template Lifecycle [ ]
|
|
46
|
-
|
|
47
|
-
Pick a number to start.
|
|
15
|
+
/tutorial
|
|
48
16
|
```
|
|
49
17
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
User picks a number to start or resume any item. `"status"` shows the same table.
|
|
18
|
+
On first invocation in a fresh project, the skill asks one gate question:
|
|
53
19
|
|
|
54
|
-
|
|
20
|
+
> "Are you here to **build automations by describing what you want** (and I handle the technical side), or are you a **developer** who'll edit code directly?"
|
|
55
21
|
|
|
56
|
-
|
|
22
|
+
Your answer selects a track. The choice is saved to `.claude/memory/profile.md` and shapes agent vocabulary, tool-call visibility, and verbosity for every conversation in the project -- not just `/tutorial` sessions.
|
|
57
23
|
|
|
58
|
-
|
|
59
|
-
- **CORE CONCEPTS (5-10):** Orchestration lessons (workflows, schemas, tools, multi-step, conditions, production)
|
|
60
|
-
- **ADVANCED MODULES (11-19):** Hands-on feature modules (hitl, schedules, notifications, integrations, error-handling, workflows, composition, llm, agents)
|
|
61
|
-
- **ADVANCED WORKSPACE (20-21):** Power-user customization (rules/memory, template lifecycle)
|
|
24
|
+
Subsequent `/tutorial` invocations skip the gate question and resume your progress.
|
|
62
25
|
|
|
63
26
|
---
|
|
64
27
|
|
|
65
|
-
##
|
|
66
|
-
|
|
67
|
-
Assessed during `/meta init`. Two independent dimensions.
|
|
68
|
-
|
|
69
|
-
### automation dimension
|
|
28
|
+
## Tracks at a Glance
|
|
70
29
|
|
|
71
|
-
|
|
72
|
-
| ---------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
73
|
-
| `none` | Glossary, Workflow overview, Platform Tools Overview only. Skip Zod, Execution Model, Design Decisions. | Agent writes all code. No code shown to user. Analogies throughout. | CLI primary. Agent runs `elevasis-sdk exec` and narrates results. |
|
|
74
|
-
| `low-code` | All concept sections. Zapier/Make mapping. `adapters-integration.mdx` / `adapters-platform.mdx` on-demand. | Map to Zapier/Make equivalents. Show code with explanations. | CLI primary. |
|
|
75
|
-
| `custom` | All docs listed per-lesson and per-module. | Full technical content, code-first. | CLI primary. |
|
|
76
|
-
|
|
77
|
-
### platformNavigation dimension
|
|
78
|
-
|
|
79
|
-
| Level | Behavior |
|
|
80
|
-
| ------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
81
|
-
| `none` | Walk through pages step by step with exact navigation paths. Explain each page before asking user to interact with it. |
|
|
82
|
-
| `oriented` | Reference pages by name; briefly remind purpose on first mention. |
|
|
83
|
-
| `comfortable` | Reference by name only; focus on advanced filtering and schedule types. |
|
|
84
|
-
|
|
85
|
-
**General rules (all levels):** Fast users: acknowledge, offer to skip ahead. Level change observed: note in `skills.md` Growth Log. After lesson/module: update progress file.
|
|
86
|
-
|
|
87
|
-
---
|
|
30
|
+
### Vibe-Coder Track (8 lessons)
|
|
88
31
|
|
|
89
|
-
|
|
32
|
+
For users who want to describe what they want and have the agent handle the implementation. The agent never uses technical vocabulary -- no TypeScript, no pnpm, no CLI commands shown, no schemas explained. Everything is narrated in plain language.
|
|
90
33
|
|
|
91
34
|
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
35
|
+
Your Tutorial
|
|
36
|
+
==============
|
|
37
|
+
1 Welcome -- what this place does for you [ ]
|
|
38
|
+
2 How to talk to me [ ]
|
|
39
|
+
3 Your business profile [ ]
|
|
40
|
+
4 Your first automation [ ]
|
|
41
|
+
5 Your dashboard -- where everything lives [ ]
|
|
42
|
+
6 Your approval queue -- signing off on things [ ]
|
|
43
|
+
7 Changing things later [ ]
|
|
44
|
+
8 When things go wrong [ ]
|
|
45
|
+
|
|
46
|
+
Pick a number to start.
|
|
97
47
|
```
|
|
98
48
|
|
|
99
|
-
|
|
49
|
+
**What each lesson covers:**
|
|
100
50
|
|
|
101
|
-
|
|
51
|
+
- **1. Welcome** -- Plain analogy for the platform. Shows a real automation already running before any building.
|
|
52
|
+
- **2. How to talk to me** -- Conversation patterns for making requests, asking questions, and describing changes. No technical vocabulary introduced.
|
|
53
|
+
- **3. Your business profile** -- Conversational walk through org identity. Agent handles all edits silently; user answers questions.
|
|
54
|
+
- **4. Your first automation** -- User describes what they want. Agent builds, runs, and narrates. User never sees code.
|
|
55
|
+
- **5. Your dashboard** -- Tour of Command Center. Where automations live and how to read the visual map.
|
|
56
|
+
- **6. Your approval queue** -- Show a pending approval, approve it, see the automation continue.
|
|
57
|
+
- **7. Changing things later** -- Plain-language change requests. Agent handles implementation.
|
|
58
|
+
- **8. When things go wrong** -- "Tell me what looks wrong. I'll figure it out and tell you what I did." No error traces shown.
|
|
102
59
|
|
|
103
|
-
|
|
60
|
+
**Vocabulary rules in this track:** The agent never says workflow, schema, deploy, credential, TypeScript, or pnpm. "Automation" replaces all SDK resource terms. "Make it live" replaces "deploy." "Account connection" replaces "credential." "Your approval queue" replaces HITL.
|
|
104
61
|
|
|
105
|
-
|
|
62
|
+
### Technical Track (19 lessons, 5 sections)
|
|
106
63
|
|
|
107
|
-
|
|
64
|
+
For developers who will read and edit code directly. Lessons are code-first. All SDK concepts, CLI commands, and file structures are covered.
|
|
108
65
|
|
|
109
|
-
|
|
66
|
+
```
|
|
67
|
+
SECTION A -- The workspace (3 items)
|
|
68
|
+
1 What is this workspace [ ]
|
|
69
|
+
2 The skill layer -- slash commands you'll use [ ]
|
|
70
|
+
3 The vibe layer -- ambient intent classification [ ]
|
|
71
|
+
|
|
72
|
+
SECTION B -- Build your first thing (5 items)
|
|
73
|
+
4 Echo workflow tour [ ]
|
|
74
|
+
5 Custom workflow with schemas [ ]
|
|
75
|
+
6 Platform tools and credentials [ ]
|
|
76
|
+
7 Multi-step and conditionals [ ]
|
|
77
|
+
8 Going to production [ ]
|
|
78
|
+
|
|
79
|
+
SECTION C -- The Organization Model (3 items)
|
|
80
|
+
9 /knowledge ceremony -- identity, customers, [ ]
|
|
81
|
+
offerings via the layered flow
|
|
82
|
+
10 Features and labels [ ]
|
|
83
|
+
11 Entity extensions -- BaseProject, BaseDeal [ ]
|
|
84
|
+
|
|
85
|
+
SECTION D -- Modules (load on demand) (~6 items)
|
|
86
|
+
12 HITL [ ]
|
|
87
|
+
13 Schedules [ ]
|
|
88
|
+
14 Notifications + integrations [ ]
|
|
89
|
+
15 Error handling [ ]
|
|
90
|
+
16 LLM and agents [ ]
|
|
91
|
+
17 Composition (execution.trigger) [ ]
|
|
92
|
+
|
|
93
|
+
SECTION E -- Power user (2 items)
|
|
94
|
+
18 Rules, memory, scaffold registry [ ]
|
|
95
|
+
19 Template lifecycle and /git-sync [ ]
|
|
96
|
+
```
|
|
110
97
|
|
|
111
|
-
|
|
98
|
+
Section D modules are available any time -- no section order prerequisite. Sections A-C are designed to be completed in order on a first pass, though any item can be picked directly.
|
|
112
99
|
|
|
113
100
|
---
|
|
114
101
|
|
|
115
|
-
##
|
|
116
|
-
|
|
117
|
-
Each lesson: (1) announce title and goal, (2) explain concept per skill level, (3) build or modify something, (4) verify it works, (5) record observations, ask "ready for next?"
|
|
118
|
-
|
|
119
|
-
**Lesson 5 -- Your First Custom Workflow**
|
|
120
|
-
|
|
121
|
-
- `automation: none` -- "A recipe." Agent writes all code. Agent runs `elevasis-sdk exec` and narrates result.
|
|
122
|
-
- `automation: low-code or custom` -- Modify echo workflow. Walk through `config`, `contract`, `steps`, `entryPoint`. Deploy with `elevasis-sdk check` then `elevasis-sdk deploy`.
|
|
123
|
-
|
|
124
|
-
**Lesson 6 -- Understanding Data (Schemas)**
|
|
125
|
-
|
|
126
|
-
- `automation: none` -- "What information does your automation need?" No Zod, no code shown. Agent reads identity.md goals and writes the schema.
|
|
127
|
-
- `automation: low-code` -- "Field mapping like Zapier, but with validation." Show Zod types briefly.
|
|
128
|
-
- `automation: custom` -- Full Zod explanation. `z.infer`. Show how schema fields define CLI input structure.
|
|
129
|
-
|
|
130
|
-
**Lesson 7 -- Using Platform Tools**
|
|
102
|
+
## Track Persistence
|
|
131
103
|
|
|
132
|
-
|
|
133
|
-
- `automation: low-code or custom` -- Explain adapter pattern: `createAttioAdapter('cred')`. Show singleton pattern: `import { scheduler, llm } from '@elevasis/sdk/worker'`.
|
|
104
|
+
The track choice is saved to `.claude/memory/profile.md` on selection. The agent reads this file at session start alongside `agent-start-here.md`. This means:
|
|
134
105
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
- `automation: low-code or custom` -- Chain steps with `StepType.LINEAR`. Show relationship edges in Command View.
|
|
139
|
-
|
|
140
|
-
**Lesson 9 -- Decision Points**
|
|
141
|
-
|
|
142
|
-
- `automation: none` -- "If the customer is VIP, do this -- otherwise, do that." Agent runs both paths. Open Execution Logs.
|
|
143
|
-
- `automation: low-code or custom` -- Conditional routing with `StepType.CONDITIONAL`. Show step trace in Execution Logs.
|
|
144
|
-
|
|
145
|
-
**Lesson 10 -- Going to Production**
|
|
146
|
-
|
|
147
|
-
- `automation: none` -- "Draft vs live." Create Recurring schedule in Task Scheduler.
|
|
148
|
-
- `automation: low-code or custom` -- Change `status: dev` -> `prod`. Cover `try/catch`, `ExecutionError`, `PlatformToolError`. CLI monitoring: `elevasis-sdk executions`.
|
|
106
|
+
- Agent vocabulary and tone adjust for every conversation in the project, not just `/tutorial`
|
|
107
|
+
- The vibe-coder track suppresses all technical surface globally until switched
|
|
108
|
+
- Progress is tracked separately in `.claude/memory/tutorial-progress.md`
|
|
149
109
|
|
|
150
110
|
---
|
|
151
111
|
|
|
152
|
-
##
|
|
153
|
-
|
|
154
|
-
Modules are available any time -- no core path prerequisite. After completing a module the full menu table is shown again.
|
|
112
|
+
## Switching Tracks
|
|
155
113
|
|
|
156
|
-
|
|
157
|
-
| --- | ---------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
158
|
-
| 11 | `hitl` | `command-center.mdx` (Command Queue) | Approval gate with `approval.create()`. Full lifecycle: trigger -> Command Queue -> approve/reject -> resume. | `approval` adapter, pending state, Command Queue UI |
|
|
159
|
-
| 12 | `schedules` | `command-center.mdx` (Task Scheduler) | All three schedule types: Recurring, Relative, Absolute. `scheduler` adapter for in-workflow. | Cron syntax, schedule types, Task Scheduler UI |
|
|
160
|
-
| 13 | `notifications` | `adapters-platform.mdx` (notifications, email) | Notification + email steps. Alerts on completion. | `notifications` singleton, `email` singleton |
|
|
161
|
-
| 14 | `integrations` | `platform-tools/index.mdx` (Credential Security), `adapters-integration.mdx` | Real adapter from `identity.md`. Full end-to-end with OAuth or API key credential. | Adapter pattern, credential scoping, external call error handling |
|
|
162
|
-
| 15 | `error-handling` | `patterns.mdx` (error handling), `troubleshooting.mdx` | Workflow demonstrating all three error types. `try/catch`, `context.logger`, recovery. | `ExecutionError`, `PlatformToolError`, `ToolingError` |
|
|
163
|
-
| 16 | `workflows` | `patterns.mdx` (store, logging, organization) | Refactor with `context.store`, `context.logger`, domain directories. Advanced schema patterns. | `context.store`, `context.logger`, schema depth |
|
|
164
|
-
| 17 | `composition` | `command-center.mdx` (Command View), `patterns.mdx` | Two workflows: first triggers second with `execution.trigger()`. Declare relationship. | `execution.trigger`, relationship declarations, Command View edges |
|
|
165
|
-
| 18 | `llm` | `adapters-platform.mdx` (llm singleton) | `llm.generate()` with structured output. Model selection and temperature. | `llm` singleton, structured output, temperature |
|
|
166
|
-
| 19 | `agents` | `framework/agent.mdx` | Agent definition with tools. LLM tool calling. Agent vs workflow comparison. | Agent definition, tool registration, execution trace |
|
|
114
|
+
Run `/tutorial switch` at any time to flip tracks and restart the menu. Progress from the previous track is preserved in the progress file for reference but the active lesson resets.
|
|
167
115
|
|
|
168
116
|
---
|
|
169
117
|
|
|
170
|
-
##
|
|
118
|
+
## Progress Indicators
|
|
171
119
|
|
|
172
|
-
|
|
120
|
+
The menu uses three states:
|
|
173
121
|
|
|
174
|
-
- `
|
|
175
|
-
- `
|
|
176
|
-
- `
|
|
122
|
+
- `[ ]` -- not started
|
|
123
|
+
- `[>]` -- in progress
|
|
124
|
+
- `[x] YYYY-MM-DD` -- complete
|
|
177
125
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
- `none` -- "SDK releases automatically update your workspace." Explain `/meta fix` as the update command.
|
|
181
|
-
- `low-code` -- Explain MANAGED vs INIT_ONLY file types. Show how `/meta fix` handles conflicts.
|
|
182
|
-
- `custom` -- Full template lifecycle: the external template handles initial project creation. `/meta fix` performs drift repair and SDK upgrade. Conflict resolution merges current files against the template, preserving customizations in INIT_ONLY files.
|
|
126
|
+
Run `/tutorial` with no argument at any time to see the current menu with progress filled in. Run `/tutorial status` for the same view.
|
|
183
127
|
|
|
184
128
|
---
|
|
185
129
|
|
|
186
|
-
##
|
|
187
|
-
|
|
188
|
-
Stored at `.claude/memory/tutorial-progress.md`.
|
|
189
|
-
|
|
190
|
-
```markdown
|
|
191
|
-
# Tutorial Progress
|
|
192
|
-
|
|
193
|
-
Current: <free-form, e.g. "4: /work and /docs" or "M:integrations">
|
|
194
|
-
Started: YYYY-MM-DD
|
|
195
|
-
Last Session: YYYY-MM-DD
|
|
196
|
-
|
|
197
|
-
## Completed Lessons
|
|
198
|
-
|
|
199
|
-
| Item | Title | Completed | Duration |
|
|
200
|
-
| --- | --- | --- | --- |
|
|
201
|
-
| 1 | Welcome & Orientation | 2026-03-01 | 25 min |
|
|
202
|
-
|
|
203
|
-
## Completed Modules
|
|
204
|
-
|
|
205
|
-
| Module | Title | Completed | Duration |
|
|
206
|
-
| --- | --- | --- | --- |
|
|
207
|
-
| hitl | Human-in-the-Loop | 2026-03-03 | 40 min |
|
|
208
|
-
|
|
209
|
-
## Capability Observations
|
|
210
|
-
|
|
211
|
-
| Source | Observation |
|
|
212
|
-
| --- | --- |
|
|
213
|
-
| 1 | Navigated Command View without guidance |
|
|
214
|
-
|
|
215
|
-
## Assessment Notes
|
|
216
|
-
|
|
217
|
-
- Strong automation background, slow on TypeScript syntax
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
---
|
|
130
|
+
## Related Docs
|
|
221
131
|
|
|
222
|
-
|
|
132
|
+
- [SDK Concepts](../concepts.mdx) -- full technical reference for workflows, schemas, adapters, and the org model
|
|
133
|
+
- [Getting Started](../getting-started.mdx) -- scaffold setup and first deploy
|
|
134
|
+
- [CLI Reference](../cli.mdx) -- `elevasis-sdk` commands referenced in the technical track
|
|
135
|
+
- [Framework Overview](index.mdx) -- skill layer, memory system, and interaction guidance
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @elevasis/core/knowledge
|
|
2
|
+
|
|
3
|
+
Pure query layer over the organization graph. Browser-safe (no Node APIs); shared by the SDK CLI, platform CLI, and the `@elevasis/ui/knowledge` browser.
|
|
4
|
+
|
|
5
|
+
## Surface
|
|
6
|
+
|
|
7
|
+
| Export | Purpose |
|
|
8
|
+
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `byFeature(graph, featureId, knowledgeNodes)` | Knowledge nodes that govern the given feature. |
|
|
10
|
+
| `byKind(graph, kind, knowledgeNodes)` | Filter knowledge nodes by `OrgKnowledgeKind`. |
|
|
11
|
+
| `byOwner(graph, ownerId, knowledgeNodes)` | Knowledge nodes whose `ownerIds` includes the given owner. |
|
|
12
|
+
| `governs(graph, nodeId)` | Outgoing `governs` targets (governed-feature ids) from a knowledge node. |
|
|
13
|
+
| `governedBy(graph, nodeId)` | Incoming `governs` sources (governing knowledge-node ids) into a feature. |
|
|
14
|
+
| `parsePath(pathString)` | Parse `/by-feature/$id`, `/by-kind/$kind`, `/by-owner/$id`, `/graph/$id/{governs,governed-by}`, or `/$id`. Throws on invalid input. |
|
|
15
|
+
| `formatText`, `formatJson`, `formatIdsOnly` | Output formatters used by the `knowledge:*` CLI subcommands. |
|
|
16
|
+
|
|
17
|
+
## Path syntax
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/by-feature/<featureId>
|
|
21
|
+
/by-kind/<playbook|strategy|reference>
|
|
22
|
+
/by-owner/<ownerId>
|
|
23
|
+
/graph/<nodeId>/governs
|
|
24
|
+
/graph/<nodeId>/governed-by
|
|
25
|
+
/<nodeId>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## JSON envelope
|
|
29
|
+
|
|
30
|
+
`formatJson` returns `{ path, mount, args, results }` — the same wrapped envelope used by `pnpm exec elevasis knowledge:ls --json` and `pnpm exec elevasis-sdk knowledge:ls --json`.
|
|
31
|
+
|
|
32
|
+
`governs` and `governedBy` accept either bare or graph-namespaced ids (`knowledge.foo` or `knowledge:knowledge.foo`).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @elevasis/ui/knowledge
|
|
2
|
+
|
|
3
|
+
Read-only browser primitives for the Organization Model knowledge graph.
|
|
4
|
+
|
|
5
|
+
## Surface
|
|
6
|
+
|
|
7
|
+
| Export | Purpose |
|
|
8
|
+
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
9
|
+
| `KnowledgeBrowser` | Selected-node detail pane. Tree/search now live in the feature sidebar. |
|
|
10
|
+
| `KnowledgeTree` | By-feature primary tree with hierarchical features and multi-governance duplication. |
|
|
11
|
+
| `KnowledgeNodeList` | Legacy flat list of node summary cards; exported for compatibility. |
|
|
12
|
+
| `KnowledgeNodeView` | Single knowledge-node detail view using `NodeDescribeShell` and relationship groups. |
|
|
13
|
+
| `KnowledgeSearchBar` | Client-side search over `_generated/knowledge-search-index.json`. |
|
|
14
|
+
| `KnowledgeSidebarMiddle` | Deprecated legacy sidebar middle section; active sidebar lives under `features/knowledge/sidebar`. |
|
|
15
|
+
| `KNOWLEDGE_ITEMS` | Deprecated default sidebar nav items retained for compatibility. |
|
|
16
|
+
| `KnowledgeMDXProvider`, `useKnowledgeAllowlist`, `KNOWLEDGE_ALLOWLIST` | MDX runtime allowlist (`Card`, `Cards`, `Step`, `Steps`, `Callout`, `Tab`, `Tabs`). |
|
|
17
|
+
| `KNOWLEDGE_BODIES` | Build-time-compiled MDX components keyed by node id. |
|
|
18
|
+
|
|
19
|
+
## Customization tiers
|
|
20
|
+
|
|
21
|
+
1. **Default** — mount `knowledgeManifest` from `@elevasis/ui/features/knowledge`.
|
|
22
|
+
2. **Extend** — pass `extraComponents` to `KnowledgeMDXProvider` or compose around the feature sidebar primitives.
|
|
23
|
+
3. **Replace** — call `@elevasis/core/knowledge` queries directly from project-owned routes.
|
|
24
|
+
|
|
25
|
+
## Codegen
|
|
26
|
+
|
|
27
|
+
`KNOWLEDGE_BODIES` and the search index are regenerated by `pnpm scaffold:sync` (or `pnpm knowledge:generate` to run only the knowledge step). Source: `canonicalOrganizationModel.knowledge.nodes` from `@repo/elevasis-core`.
|
|
28
|
+
|
|
29
|
+
The Vite plugin at `@elevasis/ui/vite-plugin-knowledge` re-runs codegen on `buildStart` and watches the OM source dir for HMR.
|
|
30
|
+
|
|
31
|
+
Phase 1 is read-only. Phase 2 will move bodies into Supabase and ship via `mdx-bundler`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Theme Presets
|
|
2
|
+
|
|
3
|
+
Re-exports the canonical theme-preset SSOT from `@repo/core`. This subpath exists so that consumers can import preset metadata without pulling in the full theme runtime surface.
|
|
4
|
+
|
|
5
|
+
## Exports
|
|
6
|
+
|
|
7
|
+
- `THEME_PRESETS` — `as const` tuple of preset names; the single source of truth.
|
|
8
|
+
- `ThemePresetName` — union type derived from `THEME_PRESETS`.
|
|
9
|
+
- `ThemePresetEnum` — Zod enum derived from `THEME_PRESETS`.
|
|
10
|
+
|
|
11
|
+
## Use When
|
|
12
|
+
|
|
13
|
+
- You need a Zod-validated preset name (form schemas, API request/response validation).
|
|
14
|
+
- You need the union type for component props or Zustand state.
|
|
15
|
+
- You're adding a new preset and want to ensure it propagates everywhere via the canonical tuple.
|
|
16
|
+
|
|
17
|
+
## Source Of Truth
|
|
18
|
+
|
|
19
|
+
`packages/core/src/auth/multi-tenancy/theme-presets.ts`. This subpath is a thin re-export. The `ui → core` dependency stays one-directional; the runtime preset catalog (`presets`, `getPreset`) lives at `@repo/ui/theme` and consumes the names declared in core.
|