@elevasis/sdk 1.44.2 → 1.45.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 +1001 -652
- package/dist/index.d.ts +1045 -509
- package/dist/index.js +748 -690
- package/dist/node/index.d.ts +105 -97
- package/dist/test-utils/index.d.ts +42 -28
- package/dist/test-utils/index.js +549 -732
- package/dist/worker/index.d.ts +12112 -0
- package/dist/worker/index.js +211 -186
- package/package.json +6 -9
- package/reference/_navigation.md +151 -21
- package/reference/_reference-manifest.json +186 -4
- package/reference/claude-config.md +8 -0
- package/reference/core/index.mdx +3 -3
- package/reference/examples/organization-model.ts +117 -111
- package/reference/index.mdx +4 -4
- package/reference/rules/active-change-index.md +40 -54
- package/reference/rules/agent-runtime.md +81 -0
- package/reference/rules/agent-start-here.md +71 -163
- package/reference/rules/deployment.md +33 -10
- package/reference/rules/error-handling.md +26 -0
- package/reference/rules/execution.md +13 -0
- package/reference/rules/frontend.md +10 -3
- package/reference/rules/observability.md +9 -1
- package/reference/rules/operations.md +26 -17
- package/reference/rules/organization-model.md +74 -88
- package/reference/rules/organization-os.md +71 -88
- package/reference/rules/package-taxonomy.md +11 -2
- package/reference/rules/platform.md +13 -7
- package/reference/rules/shared-types.md +15 -0
- package/reference/rules/task-tracking.md +30 -5
- package/reference/rules/ui.md +145 -3
- package/reference/rules/vibe-intents.md +271 -0
- package/reference/rules/vibe.md +17 -243
- package/reference/scaffold/core/organization-graph.mdx +111 -97
- package/reference/scaffold/core/organization-model.mdx +234 -214
- package/reference/scaffold/operations/propagation-pipeline.md +1 -1
- package/reference/scaffold/operations/scaffold-maintenance.md +19 -18
- package/reference/scaffold/operations/workflow-recipes.md +71 -19
- package/reference/scaffold/recipes/add-a-feature.md +156 -146
- package/reference/scaffold/recipes/add-a-resource.md +123 -117
- package/reference/scaffold/recipes/customize-crm-actions.md +25 -10
- package/reference/scaffold/recipes/customize-knowledge-browser.md +52 -117
- package/reference/scaffold/recipes/customize-organization-model.md +161 -149
- package/reference/scaffold/recipes/extend-a-base-entity.md +156 -140
- package/reference/scaffold/recipes/extend-crm.md +16 -11
- package/reference/scaffold/recipes/extend-lead-gen.md +25 -7
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
- package/reference/scaffold/recipes/index.md +2 -2
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
- package/reference/scaffold/reference/contracts.md +12 -1
- package/reference/scaffold/reference/glossary.md +3 -3
- package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
- package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
- package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
- package/reference/scaffold/ui/feature-shell.mdx +279 -62
- package/reference/scaffold/ui/recipes.md +229 -197
- package/reference/sdk/cli-management.mdx +77 -29
- package/reference/sdk/concepts.mdx +2 -0
- package/reference/sdk/define-builders.mdx +76 -0
- package/reference/sdk/deployment/command-center.mdx +6 -2
- package/reference/sdk/deployment/execution-reference.mdx +64 -186
- package/reference/sdk/deployment/index.mdx +2 -0
- package/reference/sdk/exports.mdx +4 -4
- package/reference/sdk/framework/agent.mdx +49 -119
- package/reference/sdk/framework/index.mdx +46 -65
- package/reference/sdk/framework/project-structure.mdx +150 -205
- package/reference/sdk/framework/tutorial-system.mdx +2 -2
- package/reference/sdk/human-in-the-loop.mdx +152 -0
- package/reference/sdk/index.mdx +6 -7
- package/reference/sdk/platform-tools/index.mdx +12 -0
- package/reference/sdk/platform-tools/type-safety.mdx +4 -0
- package/reference/sdk/project-deployment-spec.mdx +131 -0
- package/reference/sdk/resources/index.mdx +23 -7
- package/reference/sdk/resources/patterns.mdx +54 -24
- package/reference/sdk/resources/types.mdx +7 -4
- package/reference/sdk/templates/data-enrichment.mdx +7 -3
- package/reference/sdk/templates/email-sender.mdx +139 -135
- package/reference/sdk/templates/lead-scorer.mdx +5 -1
- package/reference/sdk/templates/pdf-generator.mdx +155 -151
- package/reference/sdk/templates/recurring-job.mdx +195 -189
- package/reference/sdk/templates/text-classifier.mdx +4 -0
- package/reference/sdk/templates/web-scraper.mdx +139 -135
- package/reference/spine/spine-primer.md +135 -96
- package/reference/ui/index.mdx +14 -7
- package/dist/types/worker/adapters/anymailfinder.d.ts +0 -14
- package/dist/types/worker/adapters/apify.d.ts +0 -14
- package/dist/types/worker/adapters/approval.d.ts +0 -23
- package/dist/types/worker/adapters/attio.d.ts +0 -22
- package/dist/types/worker/adapters/clickup.d.ts +0 -22
- package/dist/types/worker/adapters/create-adapter.d.ts +0 -41
- package/dist/types/worker/adapters/crm.d.ts +0 -20
- package/dist/types/worker/adapters/dropbox.d.ts +0 -14
- package/dist/types/worker/adapters/email.d.ts +0 -25
- package/dist/types/worker/adapters/execution.d.ts +0 -22
- package/dist/types/worker/adapters/gmail.d.ts +0 -14
- package/dist/types/worker/adapters/google-sheets.d.ts +0 -14
- package/dist/types/worker/adapters/index.d.ts +0 -33
- package/dist/types/worker/adapters/instantly.d.ts +0 -14
- package/dist/types/worker/adapters/lead.d.ts +0 -28
- package/dist/types/worker/adapters/list.d.ts +0 -9
- package/dist/types/worker/adapters/llm.d.ts +0 -45
- package/dist/types/worker/adapters/millionverifier.d.ts +0 -14
- package/dist/types/worker/adapters/notification.d.ts +0 -28
- package/dist/types/worker/adapters/pdf.d.ts +0 -22
- package/dist/types/worker/adapters/projects.d.ts +0 -20
- package/dist/types/worker/adapters/resend.d.ts +0 -14
- package/dist/types/worker/adapters/scheduler.d.ts +0 -25
- package/dist/types/worker/adapters/signature-api.d.ts +0 -14
- package/dist/types/worker/adapters/storage.d.ts +0 -33
- package/dist/types/worker/adapters/stripe.d.ts +0 -14
- package/dist/types/worker/adapters/tomba.d.ts +0 -14
- package/dist/types/worker/index.d.ts +0 -60
- package/dist/types/worker/platform.d.ts +0 -90
- package/dist/types/worker/utils.d.ts +0 -9
- package/reference/claude-config/Overview.md +0 -230
- package/reference/claude-config/hooks/post-edit-validate.mjs +0 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +0 -187
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +0 -73
- package/reference/claude-config/registries/graph-skills.json +0 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -154
- package/reference/claude-config/registries/skill-coverage.json +0 -20
- package/reference/claude-config/rules/active-change-index.md +0 -22
- package/reference/claude-config/rules/agent-start-here.md +0 -22
- package/reference/claude-config/rules/deployment.md +0 -22
- package/reference/claude-config/rules/error-handling.md +0 -22
- package/reference/claude-config/rules/execution.md +0 -22
- package/reference/claude-config/rules/frontend.md +0 -22
- package/reference/claude-config/rules/observability.md +0 -22
- package/reference/claude-config/rules/operations.md +0 -22
- package/reference/claude-config/rules/organization-model.md +0 -22
- package/reference/claude-config/rules/organization-os.md +0 -22
- package/reference/claude-config/rules/package-taxonomy.md +0 -22
- package/reference/claude-config/rules/platform.md +0 -22
- package/reference/claude-config/rules/shared-types.md +0 -22
- package/reference/claude-config/rules/task-tracking.md +0 -22
- package/reference/claude-config/rules/topbar-actions.md +0 -70
- package/reference/claude-config/rules/ui.md +0 -22
- package/reference/claude-config/rules/vibe.md +0 -22
- package/reference/claude-config/scripts/statusline-command.js +0 -18
- package/reference/claude-config/settings.json +0 -30
- package/reference/claude-config/skills/client/SKILL.md +0 -201
- package/reference/claude-config/skills/deploy/SKILL.md +0 -159
- package/reference/claude-config/skills/dsp/SKILL.md +0 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +0 -251
- package/reference/claude-config/skills/explore/SKILL.md +0 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +0 -166
- package/reference/claude-config/skills/om/SKILL.md +0 -475
- package/reference/claude-config/skills/om/operations/build.md +0 -237
- package/reference/claude-config/skills/om/operations/codify-level-a.md +0 -109
- package/reference/claude-config/skills/om/operations/codify-level-b.md +0 -159
- package/reference/claude-config/skills/om/operations/customers.md +0 -114
- package/reference/claude-config/skills/om/operations/features.md +0 -88
- package/reference/claude-config/skills/om/operations/goals.md +0 -123
- package/reference/claude-config/skills/om/operations/identity.md +0 -97
- package/reference/claude-config/skills/om/operations/labels.md +0 -110
- package/reference/claude-config/skills/om/operations/offerings.md +0 -114
- package/reference/claude-config/skills/om/operations/roles.md +0 -104
- package/reference/claude-config/skills/om/operations/scaffold.md +0 -163
- package/reference/claude-config/skills/om/operations/techStack.md +0 -38
- package/reference/claude-config/skills/project/SKILL.md +0 -1114
- package/reference/claude-config/skills/run-ui/SKILL.md +0 -73
- package/reference/claude-config/skills/save/SKILL.md +0 -183
- package/reference/claude-config/skills/setup/SKILL.md +0 -290
- package/reference/claude-config/skills/status/SKILL.md +0 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +0 -180
- package/reference/claude-config/skills/sync/SKILL.md +0 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +0 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +0 -74
- package/reference/claude-config/skills/tutorial/technical.md +0 -1303
- package/reference/claude-config/skills/tutorial/vibe-coder.md +0 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +0 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +0 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +0 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +0 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +0 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +0 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +0 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +0 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +0 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +0 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +0 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +0 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +0 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +0 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +0 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +0 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +0 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +0 -30
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +0 -45
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +0 -52
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +0 -40
- package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +0 -61
- package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +0 -31
- package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +0 -28
- package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +0 -26
- package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +0 -35
- package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +0 -47
- package/reference/claude-config/sync-notes/2026-05-28-om-snapshot-sdk-workflow-config.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-30-client-source-and-om-profiles.md +0 -39
- package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +0 -27
- package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +0 -45
- package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-04-scaffold-registry-lane-severity.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-05-appearance-app-mode-decouple.md +0 -29
- package/reference/claude-config/sync-notes/2026-06-05-ontology-endpoint-rename-and-knowledge-browser-ui.md +0 -86
- package/reference/claude-config/sync-notes/2026-06-06-om-build-systems-scaffold.md +0 -47
- package/reference/claude-config/sync-notes/2026-06-06-om-item-copy-references.md +0 -50
- package/reference/claude-config/sync-notes/2026-06-08-knowledge-base-page-not-found-fix.md +0 -76
- package/reference/claude-config/sync-notes/2026-06-09-agent-sessions-public-agent-chat-route.md +0 -75
- package/reference/claude-config/sync-notes/2026-06-09-sdk-cli-load-org-model-resolution.md +0 -42
- package/reference/claude-config/sync-notes/2026-06-12-agent-grants-visualizer-operations.md +0 -30
- package/reference/claude-config/sync-notes/2026-06-14-session-ux-and-project-cli-json.md +0 -33
- package/reference/claude-config/sync-notes/2026-06-14-shared-session-conversation-view.md +0 -26
- package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +0 -46
- package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +0 -52
- package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +0 -47
- package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +0 -75
- package/reference/claude-config/sync-notes/2026-07-23-agent-session-memory.md +0 -49
- package/reference/claude-config/sync-notes/2026-07-23-workos-org-marker.md +0 -50
- package/reference/claude-config/sync-notes/2026-07-24-claude-5-models-and-session-surface-fixes.md +0 -116
- package/reference/claude-config/sync-notes/2026-07-27-agent-strict-output-and-turn-drift.md +0 -73
- package/reference/claude-config/sync-notes/2026-07-28-agent-reply-is-its-own-field.md +0 -84
- package/reference/claude-config/sync-notes/2026-07-30-login-screen-and-member-provisioning-state.md +0 -114
- package/reference/claude-config/sync-notes/2026-08-02-auth-guard-defaults-and-truncation-fix.md +0 -122
- package/reference/claude-config/sync-notes/2026-08-03-cli-gateway-errors-and-request-timeout.md +0 -120
- package/reference/claude-config/sync-notes/README.md +0 -43
- package/reference/sdk/framework/interaction-guidance.mdx +0 -182
- package/reference/sdk/framework/memory.mdx +0 -326
- package/reference/sdk/framework/resource-documentation.mdx +0 -90
- package/reference/sdk/roadmap.mdx +0 -164
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: In-progress task conventions -- doc format, status values, auto-save behavior
|
|
2
|
+
description: In-progress task conventions -- doc format, status values, resume_context ownership, auto-save behavior
|
|
3
3
|
---
|
|
4
4
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
5
5
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
@@ -13,10 +13,26 @@ Exactly three values for frontmatter `status`: `planned`, `in-progress`, `comple
|
|
|
13
13
|
|
|
14
14
|
## Doc Format
|
|
15
15
|
|
|
16
|
-
- Frontmatter: `title`, `description`, `status`
|
|
16
|
+
- Frontmatter: `title`, `description`, `status` -- and nothing else
|
|
17
17
|
- Sections: Objective, Plan, Progress, Resume Context
|
|
18
18
|
- Progress subsections use markers: `### Step N: Title -- PENDING`, `-- IN PROGRESS`, `-- COMPLETE`
|
|
19
19
|
|
|
20
|
+
## Resume Context Is DB-Canonical
|
|
21
|
+
|
|
22
|
+
**This rule owns the `resume_context` prohibition.**
|
|
23
|
+
|
|
24
|
+
`resume_context` lives in the `prj_tasks` table in the database. Never put it in task-doc frontmatter.
|
|
25
|
+
|
|
26
|
+
The reason: Command Center reads the DB row. A frontmatter copy is never read by the UI, is never updated when the row changes, and silently diverges from it -- so the next agent that trusts the doc resumes from stale intent while the human looking at Command Center sees something else. There is no sync between the two, and no warning when they disagree.
|
|
27
|
+
|
|
28
|
+
One source of truth, three access paths:
|
|
29
|
+
|
|
30
|
+
- **Humans write** via the inline resume-context editor on the Project Detail page in Command Center.
|
|
31
|
+
- **Agents and the CLI write** via `pnpm elevasis-sdk project:task:save <task-id> --current-state ... --next-steps ... --files-modified ...`, which writes through to `prj_tasks.resume_context` (JSONB).
|
|
32
|
+
- **Readers** consume it via `pnpm elevasis-sdk project:work <query>` or `pnpm elevasis-sdk project:task:resume <id>`.
|
|
33
|
+
|
|
34
|
+
A task doc may still carry a human-readable **Resume Context section in its body** for narrative continuity. That is prose, not the record -- the DB row remains canonical, and the body section must never be promoted into frontmatter.
|
|
35
|
+
|
|
20
36
|
## Auto-Update Behavior
|
|
21
37
|
|
|
22
38
|
- When working on a tracked task, update the Progress section when a plan step transitions:
|
|
@@ -33,7 +49,7 @@ The agent auto-saves progress (no user action needed) when:
|
|
|
33
49
|
- Significant progress has been made (2+ steps completed without saving)
|
|
34
50
|
- Before a context reset
|
|
35
51
|
|
|
36
|
-
Auto-save updates the task doc's Progress and Resume Context sections silently, then briefly confirms. The canonical persistence path is `pnpm elevasis-sdk project:task:save`
|
|
52
|
+
Auto-save updates the task doc's Progress and Resume Context sections silently, then briefly confirms. The canonical persistence path is `pnpm elevasis-sdk project:task:save` so another agent can resume without re-deriving intent.
|
|
37
53
|
|
|
38
54
|
## Completion Suggestions
|
|
39
55
|
|
|
@@ -41,10 +57,19 @@ When all plan steps are marked COMPLETE, **suggest** completing the task -- neve
|
|
|
41
57
|
|
|
42
58
|
## Where Tasks Live
|
|
43
59
|
|
|
44
|
-
Project tasks
|
|
60
|
+
Project tasks live in the `prj_tasks` Supabase table, not in repo-local files. This project has no `docs/in-progress/` directory and no `/work` skill; everything routes through the SDK CLI:
|
|
45
61
|
|
|
46
62
|
- `pnpm elevasis-sdk project:work` -- entrypoint for task work (resume / new intent detection)
|
|
47
63
|
- `pnpm elevasis-sdk project:list` -- portfolio / task listing
|
|
48
64
|
- `pnpm elevasis-sdk project:task:save` -- persist progress + `resume_context` to the DB
|
|
49
65
|
|
|
50
|
-
|
|
66
|
+
## Related Rules
|
|
67
|
+
|
|
68
|
+
- `operations/node_modules/@elevasis/sdk/reference/rules/agent-start-here.md` -- session bootstrap and the first-action flow that reads resume context
|
|
69
|
+
- `operations/node_modules/@elevasis/sdk/reference/rules/vibe.md` -- narrating scope changes back to the user
|
|
70
|
+
- `operations/node_modules/@elevasis/sdk/reference/rules/observability.md` -- inspecting executions started from a task
|
|
71
|
+
|
|
72
|
+
## References
|
|
73
|
+
|
|
74
|
+
- `operations/node_modules/@elevasis/sdk/reference/sdk/cli-management.mdx` -- full `project:*` CLI surface
|
|
75
|
+
- `operations/node_modules/@elevasis/sdk/reference/sdk/cli.mdx` -- CLI invocation basics
|
package/reference/rules/ui.md
CHANGED
|
@@ -35,7 +35,7 @@ Important distinction:
|
|
|
35
35
|
|
|
36
36
|
- shared modules gate on current org-model System keys such as `sales.lead-gen` and `projects`
|
|
37
37
|
- template routes and local nav may still use legacy aliases such as `crm`, `lead-gen`, and `projects`
|
|
38
|
-
- `core/config/organization-model.ts` and
|
|
38
|
+
- `core/config/organization-model.ts` and access gating through `useAccess()` (`@elevasis/ui/hooks`) are the bridge between those two vocabularies -- the template ships no local `useFeatureAccess.ts`, and there is no hook factory; `useAccess()` reads the resolved organization model straight from the provider (see "Access gating" under Auth and Initialization)
|
|
39
39
|
|
|
40
40
|
Dashboard remains a host-local route at `/`, not a shared feature manifest.
|
|
41
41
|
|
|
@@ -74,10 +74,60 @@ function HomePageGuarded() {
|
|
|
74
74
|
}
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
**Access gating:**
|
|
78
|
+
|
|
79
|
+
Access is resolved by the unified Access Model -- System lifecycle from the organization model, role permissions, diagnostic allowlists, membership scope, and platform-admin bypass -- through two published symbols. There is no `createFeatureAccessHook` and no `SystemGuard`; both are retired and must not be reintroduced.
|
|
80
|
+
|
|
81
|
+
`AccessGuard` from `@elevasis/ui/auth` wraps a subtree:
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import { AccessGuard, AccessKeys, ProtectedRoute } from '@elevasis/ui/auth'
|
|
85
|
+
|
|
86
|
+
<ProtectedRoute>
|
|
87
|
+
<AccessGuard accessKey="sales.crm">
|
|
88
|
+
<Outlet />
|
|
89
|
+
</AccessGuard>
|
|
90
|
+
</ProtectedRoute>
|
|
91
|
+
|
|
92
|
+
<ProtectedRoute>
|
|
93
|
+
<AccessGuard accessKey={AccessKeys.operationsRead}>
|
|
94
|
+
<Outlet />
|
|
95
|
+
</AccessGuard>
|
|
96
|
+
</ProtectedRoute>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
<!-- doc-snippet:skip: shape excerpt for AccessGuardProps -- AccessKeyInput, UseAccessResult, and ReactNode are shown unimported here for readability -->
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
interface AccessGuardProps {
|
|
103
|
+
accessKey: AccessKeyInput
|
|
104
|
+
children: ReactNode
|
|
105
|
+
fallback?: ReactNode | ((answer: UseAccessResult) => ReactNode)
|
|
106
|
+
loadingFallback?: ReactNode
|
|
107
|
+
redirectTo?: string | null
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
While access is still resolving it renders `loadingFallback`; when denied it renders `fallback` (a function receives the full answer) and, if `redirectTo` is set, navigates there once.
|
|
112
|
+
|
|
113
|
+
`useAccess()` from `@elevasis/ui/hooks` is the headless form for conditional rendering inside a page:
|
|
114
|
+
|
|
115
|
+
<!-- doc-snippet:skip: `./hooks` is a real published @elevasis/ui subpath (verified in ui/node_modules/@elevasis/ui package.json exports), but this rule documents the ui/ project and the doc-snippet check project (external/_template/operations) does not depend on @elevasis/ui -->
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
import { useAccess } from '@elevasis/ui/hooks'
|
|
119
|
+
|
|
120
|
+
const { allowed, isReady, restrictedBy, reason, isPlatformAdmin, permissions } = useAccess('sales.crm')
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`AccessKeyInput` is either a System path string (`'sales.crm'`, `'sales.lead-gen'`, `'platform.projects'`) or a structured `{ systemPath, action }` object; the action defaults to read. `AccessKeys`, re-exported from both `@elevasis/ui/auth` and `@elevasis/ui/hooks`, carries the named permission-backed and diagnostic constants -- `platformAdmin`, `organizationManage`, `membersManage`, `rolesManage`, `operationsRead`, `leadGenManage`, `operationsOverview`, and others. Prefer a constant over a hand-written `permission.*` or `diagnostic.*` string, and use the same System path in `accessKey` as in the matching `SystemModule.systemId`.
|
|
124
|
+
|
|
77
125
|
**Initialization state:**
|
|
78
126
|
|
|
79
127
|
Use `useInitialization()` from `@elevasis/ui/initialization` anywhere inside the app to read aggregated auth + org readiness:
|
|
80
128
|
|
|
129
|
+
<!-- doc-snippet:skip: continues from the useInitialization() import described in the prose above -- destructure shown without its import, not a standalone compilable file -->
|
|
130
|
+
|
|
81
131
|
```ts
|
|
82
132
|
const { allReady, userReady, isInitializing, error, retry, profile } = useInitialization()
|
|
83
133
|
```
|
|
@@ -86,6 +136,8 @@ const { allReady, userReady, isInitializing, error, retry, profile } = useInitia
|
|
|
86
136
|
|
|
87
137
|
Use `useOrganization()` from `@elevasis/ui/organization` to access org-scoped IDs and memberships:
|
|
88
138
|
|
|
139
|
+
<!-- doc-snippet:skip: continues from the useOrganization() import described in the prose above -- destructure shown without its import, not a standalone compilable file -->
|
|
140
|
+
|
|
89
141
|
```ts
|
|
90
142
|
const { currentWorkOSOrganizationId, currentSupabaseOrganizationId, memberships, switchOrganization } = useOrganization()
|
|
91
143
|
```
|
|
@@ -94,6 +146,8 @@ const { currentWorkOSOrganizationId, currentSupabaseOrganizationId, memberships,
|
|
|
94
146
|
|
|
95
147
|
Use `useApiClient()` from `@elevasis/ui/api` in route components and feature hooks. It takes the API base URL as an argument -- pass `API_URL` from `@/lib/constants/api`:
|
|
96
148
|
|
|
149
|
+
<!-- doc-snippet:skip: `./api` is a real published @elevasis/ui subpath (verified in ui/node_modules/@elevasis/ui package.json exports); `@/lib/constants/api` is the ui/ project's own path alias. Neither resolves in the doc-snippet check project (external/_template/operations), which is not the ui/ project and does not depend on @elevasis/ui -->
|
|
150
|
+
|
|
97
151
|
```ts
|
|
98
152
|
import { useApiClient } from '@elevasis/ui/api'
|
|
99
153
|
import { API_URL } from '@/lib/constants/api'
|
|
@@ -106,13 +160,33 @@ There is no `ui/src/lib/hooks/` directory in the template -- the API client come
|
|
|
106
160
|
|
|
107
161
|
For real-time updates, feature surfaces use the local singleton in `ui/src/lib/sse.ts`, which wraps `SSEConnectionManager` from `@elevasis/ui/sse`:
|
|
108
162
|
|
|
163
|
+
<!-- doc-snippet:skip: `@/lib/sse` is the ui/ project's own local singleton module, not a published package -- not a standalone compilable file in the check project -->
|
|
164
|
+
|
|
109
165
|
```ts
|
|
110
166
|
import { sseConnectionManager } from '@/lib/sse'
|
|
111
167
|
```
|
|
112
168
|
|
|
113
169
|
**WorkOS config:**
|
|
114
170
|
|
|
115
|
-
WorkOS
|
|
171
|
+
The WorkOS client ID is centralized in `@elevasis/ui`, not configured per project. `WORKOS_CLIENT_ID` and the resolver `resolveWorkosClientId()` live in `packages/ui/src/config/workos.ts`; `createElevasisApp` (`packages/ui/src/app/createElevasisApp.tsx`) calls `resolveWorkosClientId(config.auth.clientId)` on every render and passes the result as `clientId` to `ElevasisUIProvider`. There is no `ui/src/config/workos.ts` for a consumer project to create or edit.
|
|
172
|
+
|
|
173
|
+
`auth.clientId` on `createElevasisApp` is optional -- the minimal template setup (see `ui/src/main.tsx`) passes no `clientId` at all. Only set `auth.clientId`, or the `VITE_WORKOS_CLIENT_ID` env var, to point the app at a different WorkOS environment -- e.g. Command Center's local `.env` uses a staging client ID this way.
|
|
174
|
+
|
|
175
|
+
`resolveWorkosClientId` resolves in this order:
|
|
176
|
+
|
|
177
|
+
1. An explicit `auth.clientId` value
|
|
178
|
+
2. `VITE_WORKOS_CLIENT_ID` from the environment
|
|
179
|
+
3. The shared `WORKOS_CLIENT_ID` constant
|
|
180
|
+
|
|
181
|
+
An empty string at either of the first two steps is falsy, so it falls through to the next step instead of being treated as a set value. The resolved value is then validated against `/^client_[A-Za-z0-9]+$/`; a malformed value -- for example a typo'd env assignment like `VITE_WORKOS_CLIENT_ID==client_...`, which evaluates to the truthy string `=client_...` -- throws instead of silently falling back. The throw happens during render, inside `createElevasisApp`'s `AppErrorBoundary`, so it surfaces as `CrashErrorFallback` rather than a blank page.
|
|
182
|
+
|
|
183
|
+
The client ID identifies the WorkOS Application and environment, not a tenant organization -- every tenant authenticating through that application shares the same ID.
|
|
184
|
+
|
|
185
|
+
`@elevasis/ui` has no default for `redirectUri` -- `createElevasisApp` forwards `auth.redirectUri` straight to WorkOS AuthKit, which falls back to a dashboard-configured default rather than deriving one from the app origin. The template derives it locally in `ui/src/main.tsx` from `VITE_APP_ORIGIN` (or `window.location.origin` when unset) as `` `${appOrigin}/auth-redirect` `` so the auth callback keeps landing on the app's own route.
|
|
186
|
+
|
|
187
|
+
Sign-out return-to is likewise derived locally rather than centrally defaulted: `ElevasisAuthenticatedShell` defaults its own `signOutReturnTo` prop to `` `${window.location.origin}/login` ``, and `ui/src/routes/__root.tsx`'s forced sign-out path (the single-org guard) derives the same URL locally so both flows land in the same place.
|
|
188
|
+
|
|
189
|
+
For deployed apps, allow the exact redirect and sign-out URLs in the WorkOS application dashboard:
|
|
116
190
|
|
|
117
191
|
- Redirect URI: `https://your-production-domain/auth-redirect`
|
|
118
192
|
- Sign-out redirect: `https://your-production-domain/login`
|
|
@@ -142,7 +216,7 @@ Public routes use the `/public/` prefix and must render outside the authenticate
|
|
|
142
216
|
Section guards currently follow this pattern:
|
|
143
217
|
|
|
144
218
|
- `ProtectedRoute` for all authenticated sections
|
|
145
|
-
- `
|
|
219
|
+
- `AccessGuard` on sections that should hard-stop when the backing System is disabled or the role lacks the permission -- `/crm` uses `accessKey="sales.crm"`, `/lead-gen` uses `"sales.lead-gen"`, `/projects` uses `"platform.projects"`, and `/operations` and `/monitoring` both use `AccessKeys.operationsRead`
|
|
146
220
|
- provider-level shell gating for shared System nav and sub-shell behavior
|
|
147
221
|
|
|
148
222
|
The app shell in `__root.tsx` derives visible nav from `shellModel.systems` and `getSidebarLinks()`, filters admin-only entries locally using the signed-in profile, and passes `canonicalOrganizationModel` into `ElevasisSystemsProvider` so shared nav labels, paths, and graph runtime behavior resolve from the same organization-model semantic source.
|
|
@@ -184,6 +258,16 @@ The main template-owned customization surfaces are:
|
|
|
184
258
|
- `core/config/organization-model.ts` -- product labels, System availability, resource descriptors, semantic surfaces, canonical-to-legacy surface aliases, and quick-access behavior
|
|
185
259
|
- `ui/src/config/README.md` -- the deeper guide for those config files
|
|
186
260
|
|
|
261
|
+
## Customizing a Shared Full-Height Page (never wrap it)
|
|
262
|
+
|
|
263
|
+
Shared full-height pages -- `LeadGenListDetailPage`, the CRM, delivery, and clients detail pages -- are rooted in `SubshellContentContainer`, a `flex: 1` / `overflowY: auto` / `minHeight: 0` scroll container. **It only bounds correctly as a direct flex child of the shell's height-bounded region.**
|
|
264
|
+
|
|
265
|
+
Wrapping one of these pages in a layout element to bolt on extra UI breaks the height chain. A Mantine `<Stack>` is the usual culprit: it is `flex: 0 1 auto` with no `min-height: 0`, so the page balloons to content height and its internal scroll never engages. The bottom of the page becomes unreachable, and nothing errors.
|
|
266
|
+
|
|
267
|
+
**Pass extra UI through the page's slot props instead** -- `headerActions`, `tabs`, `footer`. The template's `lead-gen/lists.$listId.tsx` is the canonical reference: it injects a `ListExportButton` through `headerActions` rather than through a wrapper.
|
|
268
|
+
|
|
269
|
+
`@elevasis/ui` ships a dev-only runtime guard that logs a console warning when it detects an unbounded `SubshellContentContainer`, so the mistake surfaces while you author the route rather than after it ships. It is a no-op in production. Do not silence it.
|
|
270
|
+
|
|
187
271
|
## Customizing System Sidebars
|
|
188
272
|
|
|
189
273
|
The template demonstrates one override pattern in `ui/src/routes/__root.tsx`: it extends `CRM_ITEMS` with a template-owned Reports link and replaces `crmManifest` with `customCrmManifest` in the System module array. The backing route lives at `ui/src/routes/crm/reports.tsx` -- delete both the nav item and the route if you don't need them.
|
|
@@ -209,8 +293,66 @@ See `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/customization.m
|
|
|
209
293
|
|
|
210
294
|
For CRM deal action buttons, read `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` before changing `crmActions`, `DealDetailPage`, `DealDrawer`, or custom workflow buttons. Start with the shared `crmActions` provider path for action visibility, labels, ordering, and render-time configuration. In v1, platform-known/default action endpoint behavior is server-constrained; use project-owned UI that calls the workflow directly when a custom key sits outside that server-dispatched set.
|
|
211
295
|
|
|
296
|
+
## Topbar Actions
|
|
297
|
+
|
|
298
|
+
`navigation.topbar` is the organization-model region for topbar action items. Topbar actions are a **distinct node type**, not navigation surfaces: they trigger behavior (open a modal, open docs) rather than route somewhere, so they have no `path` and no nesting, and the `surfaceType` enum (`page | dashboard | list | detail | graph | settings`) does not apply to them. Like sidebar surfaces, they are toggled and reordered through `/org-os manage`.
|
|
299
|
+
|
|
300
|
+
Author them in `core/config/organization-model/navigation.ts`, keyed by action id:
|
|
301
|
+
|
|
302
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
navigation: {
|
|
306
|
+
topbar: {
|
|
307
|
+
request: {
|
|
308
|
+
id: 'request',
|
|
309
|
+
label: 'Request a feature or report an issue',
|
|
310
|
+
tooltip: 'Request a feature or report an issue',
|
|
311
|
+
icon: 'message-plus',
|
|
312
|
+
order: 10,
|
|
313
|
+
enabled: true
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Optional per-node fields are `devOnly`, `requiresAdmin`, and `targets`.
|
|
320
|
+
|
|
321
|
+
The organization model owns data and visibility; behavior is bound by the `TOPBAR_ACTION_MANIFESTS` registry in `@elevasis/ui`, which maps each key to a render function. The `request` key resolves to a manifest that renders `RequestActionIcon` -- it owns its own icon, tooltip, disclosure state, and modal, so there is nothing to wire at the call site. A key with no matching manifest renders nothing.
|
|
322
|
+
|
|
323
|
+
Render the projected set with `TopbarActions` from `@elevasis/ui/layout`, inside an `AppTopbar` that sits under `ElevasisSystemsProvider`:
|
|
324
|
+
|
|
325
|
+
```tsx
|
|
326
|
+
import { Topbar, TopbarActions } from '@elevasis/ui/layout'
|
|
327
|
+
|
|
328
|
+
<TopbarActions isDev={import.meta.env.DEV} />
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
`TopbarActions` takes optional `isPlatformAdmin` and `isDev` flags, which it applies against each node's `requiresAdmin` and `devOnly` gates. Unlike `systems`, the provider defaults `topbarActions` to `TOPBAR_ACTION_MANIFESTS` -- declaring the organization-model node is the only wiring the shell needs; you pass a `topbarActions` prop only to override or extend the built-in set.
|
|
332
|
+
|
|
333
|
+
If a topbar action opens a surface that also needs its own page (the requests list, for example), that page is an ordinary app-owned route -- add it under `ui/src/routes/` once the surface is present in your navigation.
|
|
334
|
+
|
|
212
335
|
## Notes
|
|
213
336
|
|
|
214
337
|
- `ui/src/routeTree.gen.ts` is generated by TanStack Router tooling. Do not hand-edit it.
|
|
215
338
|
- The template ships a broad route surface so downstream projects can trim or reshape features without having to re-derive the shared shell contract from scratch.
|
|
216
339
|
- For package-export discovery, glob `operations/node_modules/@elevasis/sdk/reference/` for the current SDK package surface or `ui/node_modules/@elevasis/ui/dist/` for the current UI package surface. `@repo/ui` is the monorepo-internal workspace name and is never installed in a tenant project -- the published package is `@elevasis/ui`, and it lives under `ui/node_modules/`, not the project root.
|
|
340
|
+
|
|
341
|
+
## Related Rules
|
|
342
|
+
|
|
343
|
+
- **frontend.md** -- React, routing, state, styling, and testing conventions for the same `ui/src/**` files this rule scopes
|
|
344
|
+
- **organization-model.md** -- the authoring ceremony for `core/config/organization-model.ts` and its split siblings, including `navigation.sidebar` and `navigation.topbar`
|
|
345
|
+
- **organization-os.md** -- Systems, ontology, resources, and navigation surfaces as a semantic contract, and how this project consumes them from published packages
|
|
346
|
+
- **shared-types.md** -- the `core/types/**` boundary that `ui/` and `operations/` both import from
|
|
347
|
+
|
|
348
|
+
Each resolves at `operations/node_modules/@elevasis/sdk/reference/rules/<name>`.
|
|
349
|
+
|
|
350
|
+
## References
|
|
351
|
+
|
|
352
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- `AccessGuard` and `useAccess` recipes, structured action keys, and how System lifecycle maps to an access answer
|
|
353
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/gate-by-feature-or-admin.md` -- the walkthrough for adding a new gated section end to end
|
|
354
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar customization decision tree, page-wrapping pattern, and delivery's three-section variant
|
|
355
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/ui/feature-shell.mdx` -- `SystemModule` manifests, the provider runtime, and route resolution
|
|
356
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` -- `NavItem`, `SystemModule`, and the other published TypeScript shapes
|
|
357
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md` -- term disambiguation, including which vocabulary is retired
|
|
358
|
+
- `ui/src/config/README.md` -- the deeper guide to this project's own config files
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Vibe intent detail -- per-intent recognition signals, fixture examples, agent actions, ambiguity handling, classifier threshold, and phase scope
|
|
3
|
+
---
|
|
4
|
+
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
5
|
+
<!-- Regenerate: pnpm scaffold:sync -->
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Vibe Intents (Detail)
|
|
9
|
+
|
|
10
|
+
Drill-down body for the Vibe Layer. The always-on card -- what the layer is, the safety boundaries, and the Quick Reference Table -- lives in `operations/node_modules/@elevasis/sdk/reference/rules/vibe.md`. Open this file when a message is hard to classify or a route needs its exact ceremony.
|
|
11
|
+
|
|
12
|
+
## What Vibe Is
|
|
13
|
+
|
|
14
|
+
Vibe is the translation layer between the user's natural language and the correct agent action. The user describes reality -- "we track deals by Shopify platform", "I'm stuck on this task", "what should I work on next" -- and vibe determines which intent the message represents. The agent then routes to the right behavior without the user ever knowing the classification happened.
|
|
15
|
+
|
|
16
|
+
Vibe coders (non-technical builders) are the primary audience. They build by describing. They never memorize commands, IDs, or schema. The ambient layer closes the gap between what they say and what the system can act on.
|
|
17
|
+
|
|
18
|
+
## Intent Types
|
|
19
|
+
|
|
20
|
+
### 1. Capture
|
|
21
|
+
|
|
22
|
+
The user wants to record something new -- a task, a note, a piece of information that should persist.
|
|
23
|
+
|
|
24
|
+
**Recognize by:** action verbs like "add", "create", "remember", "track", "log", "note down", "write down", combined with a thing to record.
|
|
25
|
+
|
|
26
|
+
**Fixture examples:**
|
|
27
|
+
|
|
28
|
+
| Input | Why it's Capture |
|
|
29
|
+
| --------------------------------------------------- | -------------------------------------------- |
|
|
30
|
+
| "Add a task to follow up with the Shopify client" | Explicit "add a task" with a described item |
|
|
31
|
+
| "Remember to run the campaign report on Friday" | "Remember to" signals something to persist |
|
|
32
|
+
| "Run the campaign report every Friday at 9am" | Repeating schedule vocabulary to persist |
|
|
33
|
+
| "Track this conversation as a deal note" | Explicit "track" with a described artifact |
|
|
34
|
+
| "Note for myself: the client prefers morning calls" | "Note for myself" = personal note to persist |
|
|
35
|
+
|
|
36
|
+
**Agent action:** draft the capture in plain language, confirm with the user, then execute via `elevasis-sdk project:*` commands for project records, `elevasis-sdk note:create` for personal user notes (the Command Center right panel), or `elevasis-sdk schedule:create` for recurring automation. Disambiguate note scope: a note tied to a deal/task/project is `project:note:create` (a `project:*` record); a standalone personal note is `note:create`. Use repetition vocabulary ("every", "daily", "weekly", "monthly") for schedules; one-shot future reminders stay project tasks with due dates. Never write without confirmation.
|
|
37
|
+
|
|
38
|
+
### 2. Query
|
|
39
|
+
|
|
40
|
+
The user wants to know something about current state -- task priorities, what is pending, what is running, what failed.
|
|
41
|
+
|
|
42
|
+
**Recognize by:** questions about the current list, status, or queue of things. Includes both static-model queries ("what systems are on?") and runtime-entity queries ("what's pending in the queue?"). Route Query to static-model sources (org model, Systems/Actions config) or runtime sources (operations domain) based on the referenced entity.
|
|
43
|
+
|
|
44
|
+
**Fixture examples:**
|
|
45
|
+
|
|
46
|
+
| Input | Why it's Query |
|
|
47
|
+
| -------------------------------------------- | ------------------------------------------- |
|
|
48
|
+
| "What should I work on next?" | Asking for prioritized task list |
|
|
49
|
+
| "What's pending in the HITL queue?" | Runtime-entity query about operations state |
|
|
50
|
+
| "What runs this week?" | Runtime query about upcoming schedules |
|
|
51
|
+
| "What systems are enabled for this project?" | Static-model query about Systems config |
|
|
52
|
+
|
|
53
|
+
**Agent action:** read the relevant source and narrate the answer in plain language. Use org model or `project:*` for project state, `elevasis-sdk queue:list --status pending --pretty` and `queue:status --pretty` for HITL queue state, and `elevasis-sdk schedule:list --status active --pretty` for upcoming recurring automation. No writes.
|
|
54
|
+
|
|
55
|
+
### 3. Describe
|
|
56
|
+
|
|
57
|
+
The user wants the agent to explain something -- a scope, an entity, a concept within the project.
|
|
58
|
+
|
|
59
|
+
**Recognize by:** "what is", "what does", "tell me about", "explain", "where am I", "what's going on", "describe", "show me" without an action intent attached.
|
|
60
|
+
|
|
61
|
+
**Fixture examples:**
|
|
62
|
+
|
|
63
|
+
| Input | Why it's Describe |
|
|
64
|
+
| ------------------------------------------ | ----------------------------------------------------- |
|
|
65
|
+
| "What's going on with the Northwind deal?" | Asking for a plain-language description of an entity |
|
|
66
|
+
| "Tell me about the CRM system" | Asking the agent to narrate what a model element does |
|
|
67
|
+
| "Where am I in this project?" | Asking for current scope narration |
|
|
68
|
+
|
|
69
|
+
**Agent action:** read the relevant org-model label, entity, or scope. Narrate in plain language using label fields from the model -- never invent vocabulary not present in the model. Phase-1 scope covers Model, Systems/Actions, and Foundations layers only.
|
|
70
|
+
|
|
71
|
+
**Stage/state/catalog sub-routing:** when the noun being described is a stage, state, status
|
|
72
|
+
bucket, catalog entry, progress step, pipeline column, or similarly closed business vocabulary,
|
|
73
|
+
also show the cross-system impact before the normal description:
|
|
74
|
+
|
|
75
|
+
1. Read `operations/node_modules/@elevasis/sdk/reference/spine/spine-primer.md` for the layering pattern.
|
|
76
|
+
2. Read the relevant domain in `core/config/organization-model.ts`.
|
|
77
|
+
3. Explain the impact in vibe-coder language only: the business profile entry, the saved progress
|
|
78
|
+
on each record, the automations that produce updates, and the dashboard or reports that read it.
|
|
79
|
+
4. Route follow-up changes through `/om <domain>`. Do not mention the technical pattern name
|
|
80
|
+
unless the user explicitly asks for internals.
|
|
81
|
+
|
|
82
|
+
### 4. Transition
|
|
83
|
+
|
|
84
|
+
The user wants to change the status of a task or entity.
|
|
85
|
+
|
|
86
|
+
**Recognize by:** single-word or short-phrase state signals -- "done", "finished", "complete", "blocked", "stuck", "waiting", "in review", "cancelled" -- applied to a current task or named entity.
|
|
87
|
+
|
|
88
|
+
**Fixture examples:**
|
|
89
|
+
|
|
90
|
+
| Input | Why it's Transition |
|
|
91
|
+
| --------------------------------------------- | ------------------------------------------- |
|
|
92
|
+
| "Done with the proposal draft" | "Done" + named artifact = status transition |
|
|
93
|
+
| "Stuck -- blocked waiting on client feedback" | "Stuck" + reason = blocked transition |
|
|
94
|
+
| "Mark the onboarding task as complete" | Explicit status-change vocabulary |
|
|
95
|
+
| "Approve the pending checkpoint" | Selects an action from the HITL queue |
|
|
96
|
+
| "Pause the Friday report" | Changes schedule state |
|
|
97
|
+
|
|
98
|
+
**Agent action:** identify the task, queue item, schedule, or entity being transitioned, confirm the new status/action with the user, then apply it via `elevasis-sdk project:task:save`, `elevasis-sdk queue:select <id> --action-id <id>`, `elevasis-sdk queue:expire <id>`, `elevasis-sdk schedule:pause <id>`, `schedule:resume <id>`, or `schedule:cancel <id>` as appropriate. Never auto-transition without confirmation if the target entity is ambiguous.
|
|
99
|
+
|
|
100
|
+
### 5. Navigate
|
|
101
|
+
|
|
102
|
+
The user wants to shift focus -- to a different task, project, System, Action, or layer of the model.
|
|
103
|
+
|
|
104
|
+
**Recognize by:** focus-shift vocabulary -- "focus on", "let's look at", "switch to", "back to", "move to", "open", "go to" -- followed by a scope target.
|
|
105
|
+
|
|
106
|
+
**Fixture examples:**
|
|
107
|
+
|
|
108
|
+
| Input | Why it's Navigate |
|
|
109
|
+
| -------------------------------------------- | --------------------------------------------------- |
|
|
110
|
+
| "Let's focus on the onboarding flow for now" | "Focus on" + scope target |
|
|
111
|
+
| "Switch to the Shopify integration project" | "Switch to" = navigate to a different project scope |
|
|
112
|
+
| "Back to the CRM tasks" | "Back to" = return to a prior scope |
|
|
113
|
+
|
|
114
|
+
**Agent action:** update the active scope in `prj_tasks.resume_context` (current project + task pointer), then narrate the new scope in plain language so the user knows where they are.
|
|
115
|
+
|
|
116
|
+
### 6. Codify
|
|
117
|
+
|
|
118
|
+
The user describes organizational reality that is not yet expressed in the model -- industry type, entity kinds, custom attributes, renamed stages, domain vocabulary.
|
|
119
|
+
|
|
120
|
+
**Recognize by:** declarative "we are" / "we use" / "we track" statements, repeated attribute mentions (second time the same attribute appears), or explicit "add a type / add a field / model X as Y" requests.
|
|
121
|
+
|
|
122
|
+
**NOT Codify — do not over-propose on questions.** "What systems are on?", "tell me about deals", "explain the lead-gen Action" are Describe, not Codify. The discriminator is _asking about_ versus _asking to change_ the model. Read-shaped inputs ("what", "tell me", "explain", "show me", "where am I") stay in Describe even when they reference the same vocabulary Codify edits — narrate, do not propose codification. Only propose codification when the user declares new structure ("we're an X company", "we track Y as Z") or explicitly asks for a model change ("add a field…", "rename stage…").
|
|
123
|
+
|
|
124
|
+
**Fixture examples:**
|
|
125
|
+
|
|
126
|
+
| Input | Why it's Codify |
|
|
127
|
+
| -------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
128
|
+
| "We're an e-commerce company -- all our deals come from Shopify or Amazon" | Declares industry + platform attributes not yet in model |
|
|
129
|
+
| "We track deal stage as discovery, scoping, proposal, closed" | Describes custom CRM stages that should replace defaults |
|
|
130
|
+
| "Add a project type called 'retainer' with monthly billing and a contract field" | Explicit request to add a new entity extension |
|
|
131
|
+
|
|
132
|
+
**Agent action:** delegate immediately to `/om`. Do not attempt the ceremony yourself. Invoke with the relevant domain: `/om sales` for deal/contact changes, `/om projects` for project types, `/om systems` for availability/routing toggles, and `/om actions` for invokable operation changes. Plain-language summary of what was detected is acceptable before delegating, but the actual draft-confirm-write ceremony belongs to `/om`.
|
|
133
|
+
|
|
134
|
+
**Stage/state/catalog impact preview:** if the Codify intent adds, renames, removes, reorders, or
|
|
135
|
+
re-scopes a stage, state, status bucket, catalog member, pipeline step, or progress vocabulary,
|
|
136
|
+
preview the cross-system impact before delegating:
|
|
137
|
+
|
|
138
|
+
- Which business-profile entry changes.
|
|
139
|
+
- Which saved record progress keys may already exist.
|
|
140
|
+
- Which automations or templates reference the key.
|
|
141
|
+
- Which dashboard, report, queue, or API reads may display or filter by it.
|
|
142
|
+
|
|
143
|
+
Then delegate to `/om <domain>` with that preview as context. Vibe does not write the
|
|
144
|
+
change and does not expose commands that only exist inside the Elevasis platform repo.
|
|
145
|
+
|
|
146
|
+
This routing applies to both codify levels:
|
|
147
|
+
|
|
148
|
+
- **Level A** (config-only edits to `organization-model.ts`, System availability/routing toggles, label renames): delegate to `/om <domain>` immediately.
|
|
149
|
+
- **Level B** (new Zod extension files in `core/config/extensions/`): also delegate to `/om <domain>`; `/om` gates Level B to explicit user asks before scaffolding a new TS file.
|
|
150
|
+
|
|
151
|
+
Vibe detects the intent and delegates in both cases. It does not run either pipeline itself.
|
|
152
|
+
|
|
153
|
+
For "build/extend the CRM" asks, classify the structural org-model portion as Codify, then read `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` before editing. CRM work often spans org-model sales semantics, shared UI routes, hooks, workflow adapters, and deal actions; do not reduce it to only `sales` config or only UI.
|
|
154
|
+
|
|
155
|
+
For "build/extend lead gen" / "campaign creator" / "outbound list state" asks, classify the structural org-model portion as Codify, then read `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` before editing. Lead-gen work often spans org-model prospecting semantics, shared UI routes, hooks, list/member state, artifacts, and workflow adapters; do not reduce it to only `prospecting` config or only UI.
|
|
156
|
+
|
|
157
|
+
For "add a custom CRM action" / "Send Quote button" asks, classify as Codify, then read `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` before editing. Start with the shared `crmActions` provider path for action visibility, labels, ordering, and render-time configuration. In v1, platform-known/default action endpoint behavior is server-constrained; use project-owned UI that calls the workflow directly when a custom key sits outside that server-dispatched set.
|
|
158
|
+
|
|
159
|
+
Heuristics for when to propose codification (passed to `/om` as context):
|
|
160
|
+
|
|
161
|
+
- First mention of a new attribute: note to `resume_context`, do not propose yet
|
|
162
|
+
- Second mention OR explicit declaration ("we're ecom"): propose extension
|
|
163
|
+
- Explicit ask ("track ecom deals separately"): propose immediately with fuller scope
|
|
164
|
+
- Attribute appearing across 3+ tasks: propose adding field to existing extension
|
|
165
|
+
|
|
166
|
+
### 7. Toggle
|
|
167
|
+
|
|
168
|
+
The user wants to enable or disable a System.
|
|
169
|
+
|
|
170
|
+
**Recognize by:** system-control vocabulary -- "turn on", "enable", "disable", "turn off", "activate", "deactivate" -- followed by a System name or description.
|
|
171
|
+
|
|
172
|
+
**Fixture examples:**
|
|
173
|
+
|
|
174
|
+
| Input | Why it's Toggle |
|
|
175
|
+
| ------------------------------- | -------------------------------------------- |
|
|
176
|
+
| "Turn on the lead-gen system" | Explicit "turn on" + System name |
|
|
177
|
+
| "Disable monitoring for now" | "Disable" + System reference |
|
|
178
|
+
| "We don't use SEO, turn it off" | Declarative + "turn it off" = System disable |
|
|
179
|
+
|
|
180
|
+
**Agent action:** delegate to `/om systems`. The ceremony (confirm + edit `core/config/organization-model.ts` + typecheck) belongs to `/om`, not to the ambient rule.
|
|
181
|
+
|
|
182
|
+
**Tenant-local only.** Toggle operates on this project's own `core/config/organization-model.ts` — the project's own Systems. The Elevasis platform's own Systems are not in scope; this project cannot toggle them and vibe must not pretend it can. If a user names a platform-only System, surface the boundary in plain language rather than attempting a toggle.
|
|
183
|
+
|
|
184
|
+
### 8. Operate
|
|
185
|
+
|
|
186
|
+
The user wants to run an already-deployed workflow or agent against the platform — kick off an execution, not change configuration.
|
|
187
|
+
|
|
188
|
+
**Recognize by:** action verbs "run", "execute", "launch", "trigger", "kick off", "start" combined with a named deployed resource (a workflow id, agent name, or named pipeline). Distinguish from:
|
|
189
|
+
|
|
190
|
+
- **Capture** — "remember to run X" is a persisted reminder/schedule, not an immediate execution.
|
|
191
|
+
- **Transition** — "the run is done" is a status change on an existing execution, not a new run.
|
|
192
|
+
- **Codify** — "add a workflow called X" is a model change, not an execution of an existing one.
|
|
193
|
+
|
|
194
|
+
**Fixture examples:**
|
|
195
|
+
|
|
196
|
+
| Input | Why it's Operate |
|
|
197
|
+
| ------------------------------------------------ | ---------------------------------------------- |
|
|
198
|
+
| "Run the daily-digest workflow" | "Run" + named deployed resource |
|
|
199
|
+
| "Kick off the lead-gen pipeline for Northwind" | "Kick off" + named resource + named scope |
|
|
200
|
+
| "Execute the campaign builder against this list" | "Execute" + deployed workflow + concrete input |
|
|
201
|
+
| "Launch the apify-init agent now" | "Launch" + named deployed agent |
|
|
202
|
+
|
|
203
|
+
**Agent action:** delegate to `/elevasis`. The describe-then-exec ceremony belongs to that skill, not to the ambient rule:
|
|
204
|
+
|
|
205
|
+
1. `elevasis-sdk describe <resourceId>` to fetch the deployed resource's input contract.
|
|
206
|
+
2. Draft the input payload from the user's natural-language phrasing.
|
|
207
|
+
3. Confirm with the user (plain-language summary of payload + target).
|
|
208
|
+
4. `elevasis-sdk exec <resourceId> --input '{…}'` to run it.
|
|
209
|
+
|
|
210
|
+
**Runs already-deployed resources only.** Operate never deploys, never creates, never edits the workflow source. If the named resource is not deployed, surface that in plain language and offer to route to Codify (define it) or Capture (record a follow-up) — do not attempt to deploy from the ambient rule.
|
|
211
|
+
|
|
212
|
+
## Source of Truth for Plain Language
|
|
213
|
+
|
|
214
|
+
All plain-language labels come from the OrganizationModel itself -- never from hardcoded strings in this rule file. Every status, entity kind, and layer name in the model carries an inline `label` field (e.g., `{ id: 'revision_requested', label: 'changes needed', semanticClass: 'blocked' }`). When narrating state or confirming an action, read the label from the model and use it verbatim. Do not invent synonyms or fallback vocabulary.
|
|
215
|
+
|
|
216
|
+
The unified manifest (delivered via `@elevasis/core/organization-model`) is the canonical vocabulary surface. Vibe classifies against it -- Systems, Actions, statuses, operations entities, and resource kinds are all discoverable from the manifest without hardcoding.
|
|
217
|
+
|
|
218
|
+
## Ambiguous Intent
|
|
219
|
+
|
|
220
|
+
When the user's input does not clearly map to one of the intent types, ask one clarifying question. Do not guess. Do not apply a precedence rule. Do not route to the "closest" intent.
|
|
221
|
+
|
|
222
|
+
Format: a single neutral question that presents the two (or three) plausible intents as options and asks which the user means.
|
|
223
|
+
|
|
224
|
+
Example: "That could be a note to capture or a status update on the current task -- which did you mean?"
|
|
225
|
+
|
|
226
|
+
Never ask more than one question per ambiguous input. If the user's reply is still ambiguous, ask once more, then surface the options explicitly.
|
|
227
|
+
|
|
228
|
+
## Classifier Threshold
|
|
229
|
+
|
|
230
|
+
Default threshold: `balanced`.
|
|
231
|
+
|
|
232
|
+
The threshold controls how aggressively the classifier proposes codification from ambiguous signals:
|
|
233
|
+
|
|
234
|
+
- `strict` -- only explicit declarations or repeat mentions trigger codify proposals
|
|
235
|
+
- `balanced` -- second mention OR explicit declaration triggers; default
|
|
236
|
+
- `loose` -- first strong signal triggers a proposal
|
|
237
|
+
|
|
238
|
+
Override per project in `core/config/organization-model.ts` under `vibe.classifierThreshold`. The override is merge-aware and will not be overwritten by template sync operations.
|
|
239
|
+
|
|
240
|
+
## Phase-1 Scope
|
|
241
|
+
|
|
242
|
+
This rule covers Phase 1 of the vibe layer rollout. The layers the ambient classifier can narrate and codify in Phase 1 are:
|
|
243
|
+
|
|
244
|
+
- Layer 1 (Model): narrate schema shape, propose codification edits via `/om`
|
|
245
|
+
- Layer 4 (Systems/Actions): describe which Systems are on/off, propose enabling one via `/om`
|
|
246
|
+
- Layer 7 (Foundations): explain and edit `organization-model.ts` and `extensions/` via `/om`
|
|
247
|
+
|
|
248
|
+
Layers 2 (Public API), 3 (UI Shell Runtime), 5 (Toolkit), and 6 (Graph) require runtime read APIs that are not yet available. Do not attempt to narrate or classify against those layers in Phase 1. If the user's input clearly references one of those layers, acknowledge the scope and explain that full support arrives in a later phase.
|
|
249
|
+
|
|
250
|
+
## What Vibe Is Not
|
|
251
|
+
|
|
252
|
+
- Vibe is not a slash command. There is no `/vibe` invocation -- it is an ambient rule, not a skill or command.
|
|
253
|
+
- Vibe is not a skill. It lives in the rule files + `CLAUDE.md` + the PreToolUse hook -- not in `.claude/skills/`.
|
|
254
|
+
- Vibe does not own the codify ceremony. `/om` owns draft, confirm, write, and typecheck for both Level A and Level B codify pipelines. Vibe detects intent and hands off.
|
|
255
|
+
- Vibe does not flip public agent exposure. See the safety boundaries in `vibe.md`; that non-route is deliberate.
|
|
256
|
+
|
|
257
|
+
## Related Rules
|
|
258
|
+
|
|
259
|
+
- **vibe.md** -- the always-on card: safety boundaries, the Quick Reference Table, and when to open this file
|
|
260
|
+
- **organization-model.md** -- the `/om` entry point Codify and Toggle delegate to
|
|
261
|
+
- **organization-os.md** -- Systems, Actions, ontology, and resource vocabulary the classifier matches against
|
|
262
|
+
- **task-tracking.md** -- status values and doc conventions Capture and Transition write into
|
|
263
|
+
|
|
264
|
+
## References
|
|
265
|
+
|
|
266
|
+
- `operations/node_modules/@elevasis/sdk/reference/rules/vibe.md` -- the resident card
|
|
267
|
+
- `operations/node_modules/@elevasis/sdk/reference/spine/spine-primer.md` -- layering pattern for stage/state/catalog sub-routing
|
|
268
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- CRM build/extend scope
|
|
269
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead-gen build/extend scope
|
|
270
|
+
- `operations/node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- custom CRM action keys and the `crmActions` provider
|
|
271
|
+
- `core/config/organization-model.ts` -- label vocabulary, System availability, and the `vibe.classifierThreshold` override
|