@elevasis/sdk 1.23.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +5927 -6985
- package/dist/index.d.ts +4893 -4759
- package/dist/index.js +1444 -3870
- package/dist/node/index.d.ts +3059 -2
- package/dist/node/index.js +163 -1
- package/dist/test-utils/index.d.ts +4413 -4439
- package/dist/test-utils/index.js +1766 -4753
- package/dist/types/worker/index.d.ts +5 -2
- package/dist/types/worker/platform.d.ts +2 -2
- package/dist/types/worker/utils.d.ts +9 -0
- package/dist/worker/index.js +427 -3708
- package/package.json +5 -4
- package/reference/_navigation.md +1 -0
- package/reference/claude-config/rules/active-change-index.md +11 -80
- package/reference/claude-config/rules/agent-start-here.md +11 -277
- package/reference/claude-config/rules/deployment.md +11 -57
- package/reference/claude-config/rules/error-handling.md +11 -56
- package/reference/claude-config/rules/execution.md +11 -40
- package/reference/claude-config/rules/frontend.md +11 -43
- package/reference/claude-config/rules/observability.md +11 -31
- package/reference/claude-config/rules/operations.md +11 -80
- package/reference/claude-config/rules/organization-model.md +5 -110
- package/reference/claude-config/rules/organization-os.md +7 -111
- package/reference/claude-config/rules/package-taxonomy.md +11 -33
- package/reference/claude-config/rules/platform.md +11 -42
- package/reference/claude-config/rules/shared-types.md +10 -48
- package/reference/claude-config/rules/task-tracking.md +11 -47
- package/reference/claude-config/rules/ui.md +11 -200
- package/reference/claude-config/rules/vibe.md +5 -229
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +2 -2
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +33 -0
- package/reference/cli.mdx +1107 -808
- package/reference/rules/active-change-index.md +83 -0
- package/reference/rules/agent-start-here.md +280 -0
- package/reference/rules/deployment.md +60 -0
- package/reference/rules/error-handling.md +59 -0
- package/reference/rules/execution.md +43 -0
- package/reference/rules/frontend.md +46 -0
- package/reference/rules/observability.md +34 -0
- package/reference/rules/operations.md +85 -0
- package/reference/rules/organization-model.md +119 -0
- package/reference/rules/organization-os.md +118 -0
- package/reference/rules/package-taxonomy.md +36 -0
- package/reference/rules/platform.md +45 -0
- package/reference/rules/shared-types.md +52 -0
- package/reference/rules/task-tracking.md +50 -0
- package/reference/rules/ui.md +203 -0
- package/reference/rules/vibe.md +238 -0
- package/reference/scaffold/core/organization-graph.mdx +4 -5
- package/reference/scaffold/core/organization-model.mdx +1 -1
- package/reference/scaffold/recipes/customize-crm-actions.md +45 -46
- package/reference/scaffold/recipes/extend-crm.md +253 -255
- package/reference/scaffold/recipes/index.md +43 -44
- package/reference/scaffold/reference/contracts.md +990 -1065
|
@@ -1,47 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Task Tracking
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Frontmatter: `title`, `description`, `status` only -- nothing else belongs in task-doc frontmatter; `resume_context` is DB-canonical on `prj_tasks`
|
|
14
|
-
- Sections: Objective, Plan, Progress, Resume Context
|
|
15
|
-
- Progress subsections use markers: `### Step N: Title -- PENDING`, `-- IN PROGRESS`, `-- COMPLETE`
|
|
16
|
-
|
|
17
|
-
## Auto-Update Behavior
|
|
18
|
-
|
|
19
|
-
- When working on a tracked task, update the Progress section when a plan step transitions:
|
|
20
|
-
- PENDING -> IN PROGRESS (starting work on a step)
|
|
21
|
-
- IN PROGRESS -> COMPLETE (finishing a step)
|
|
22
|
-
- Do NOT update on every action -- only on step transitions
|
|
23
|
-
|
|
24
|
-
## Auto-Save Behavior
|
|
25
|
-
|
|
26
|
-
The agent auto-saves progress (no user action needed) when:
|
|
27
|
-
|
|
28
|
-
- The conversation context is getting heavy (many tool calls, large file reads)
|
|
29
|
-
- The user appears to be wrapping up (thanks, goodbye, switching topics)
|
|
30
|
-
- Significant progress has been made (2+ steps completed without saving)
|
|
31
|
-
- Before a context reset
|
|
32
|
-
|
|
33
|
-
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` -- the CLI writes through to `prj_tasks.resume_context` (JSONB) so another agent can resume without re-deriving intent.
|
|
34
|
-
|
|
35
|
-
## Completion Suggestions
|
|
36
|
-
|
|
37
|
-
When all plan steps are marked COMPLETE, **suggest** completing the task -- never auto-invoke. Ask: "All steps for '{task}' look done. Want me to finalize it?"
|
|
38
|
-
|
|
39
|
-
## Where Tasks Live
|
|
40
|
-
|
|
41
|
-
Project tasks for this template live in the `prj_tasks` Supabase table, not in repo-local files. Operate on them via the SDK CLI:
|
|
42
|
-
|
|
43
|
-
- `pnpm elevasis-sdk project:work` -- entrypoint for task work (resume / new intent detection)
|
|
44
|
-
- `pnpm elevasis-sdk project:list` -- portfolio / task listing
|
|
45
|
-
- `pnpm elevasis-sdk project:task:save` -- persist progress + `resume_context` to the DB
|
|
46
|
-
|
|
47
|
-
The monorepo-side `/work` slash command still exists for monorepo task docs under `apps/docs/content/docs/in-progress/**`; that flow is unchanged. What went away is the external template's own `/work` skill and its `docs/in-progress/` directory -- external projects now route through the DB-backed `project:*` surface above.
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Task Tracking rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Task Tracking
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/task-tracking.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,200 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
The template frontend is a React 19 + TanStack Router app that composes a local dashboard shell with published System modules from `@elevasis/ui`.
|
|
14
|
-
|
|
15
|
-
The main join points are:
|
|
16
|
-
|
|
17
|
-
- `ui/src/main.tsx` -- boots the app with `ElevasisUIProvider`, query client, theme config, WorkOS AuthKit, notifications, and the generated route tree
|
|
18
|
-
- `ui/src/routes/__root.tsx` -- composes the authenticated shell with `ElevasisSystemsProvider`, published System modules, app-local dashboard nav, shell runtime dependencies, and `SystemShell`
|
|
19
|
-
- `ui/src/config/nav-items.ts` -- keeps the host-local dashboard entry separate from the published feature manifests
|
|
20
|
-
- `core/config/organization-model.ts` -- is the template's semantic source of truth, adapting `@elevasis/core/organization-model` into the preserved branding, dashboard label, quick-access, System labels, resource descriptors, and shell helpers
|
|
21
|
-
|
|
22
|
-
Published System modules mounted by the template shell:
|
|
23
|
-
|
|
24
|
-
- `lead-gen`
|
|
25
|
-
- `crm`
|
|
26
|
-
- `delivery` at `/projects`
|
|
27
|
-
- `operations`
|
|
28
|
-
- `monitoring`
|
|
29
|
-
- `settings`
|
|
30
|
-
|
|
31
|
-
Important distinction:
|
|
32
|
-
|
|
33
|
-
- shared modules gate on current org-model System keys such as `sales.lead-gen` and `projects`
|
|
34
|
-
- template routes and local nav may still use legacy aliases such as `crm`, `lead-gen`, and `projects`
|
|
35
|
-
- `core/config/organization-model.ts` and `ui/src/lib/hooks/useFeatureAccess.ts` are the bridge between those two vocabularies
|
|
36
|
-
|
|
37
|
-
Dashboard remains a host-local route at `/`, not a shared feature manifest.
|
|
38
|
-
|
|
39
|
-
This template should be treated as the downstream reference implementation for this composition:
|
|
40
|
-
|
|
41
|
-
- `core/config/organization-model.ts` owns the organization/runtime semantics
|
|
42
|
-
- `ui/src/config/nav-items.ts` preserves the host-local dashboard entry instead of pushing that concern into shared manifests
|
|
43
|
-
- `ui/src/routes/__root.tsx` threads `canonicalOrganizationModel` from `@core/config/organization-model` into `ElevasisSystemsProvider` so the shared shell/runtime uses the same semantic source of truth as the local template helpers
|
|
44
|
-
- host-local customizations still stay local: dashboard remains app-owned nav, branding stays in app config, and quick-access/dashboard UX stays in the template app
|
|
45
|
-
|
|
46
|
-
## Auth and Initialization
|
|
47
|
-
|
|
48
|
-
The app uses WorkOS AuthKit through `ElevasisUIProvider`. Authentication is enforced by the local `ProtectedRoute` wrapper in `ui/src/features/auth/ProtectedRoute.tsx`.
|
|
49
|
-
|
|
50
|
-
**Sign-in flow:**
|
|
51
|
-
|
|
52
|
-
1. Unauthenticated user hits a protected route -- `ProtectedRoute` redirects to `/login?returnTo=<path>`
|
|
53
|
-
2. `/login` renders a sign-in card; user clicks Sign In, triggering `signIn({ returnTo })` from `useAuth()`
|
|
54
|
-
3. User authenticates on the WorkOS-hosted sign-in page
|
|
55
|
-
4. WorkOS redirects back to `/auth-redirect` -- `ui/src/routes/auth-redirect.tsx` waits for auth to complete, then navigates to the requested path or `/`
|
|
56
|
-
5. User lands on the home page, fully authenticated
|
|
57
|
-
|
|
58
|
-
**Route protection:**
|
|
59
|
-
|
|
60
|
-
Wrap protected route components with the local `ProtectedRoute` from `@/features/auth`, which adds the full-screen loader and delegates to the shared guard from `@elevasis/ui/auth`:
|
|
61
|
-
|
|
62
|
-
```tsx
|
|
63
|
-
import { ProtectedRoute } from '@/features/auth'
|
|
64
|
-
|
|
65
|
-
function HomePageGuarded() {
|
|
66
|
-
return (
|
|
67
|
-
<ProtectedRoute>
|
|
68
|
-
<HomePage />
|
|
69
|
-
</ProtectedRoute>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
**Initialization state:**
|
|
75
|
-
|
|
76
|
-
Use `useInitialization()` from `@elevasis/ui/initialization` anywhere inside the app to read aggregated auth + org readiness:
|
|
77
|
-
|
|
78
|
-
```ts
|
|
79
|
-
const { allReady, userReady, isInitializing, error, retry, profile } = useInitialization()
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**Organization context:**
|
|
83
|
-
|
|
84
|
-
Use `useOrganization()` from `@elevasis/ui/organization` to access org-scoped IDs and memberships:
|
|
85
|
-
|
|
86
|
-
```ts
|
|
87
|
-
const { currentWorkOSOrganizationId, currentSupabaseOrganizationId, memberships, switchOrganization } = useOrganization()
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## API and Streaming
|
|
91
|
-
|
|
92
|
-
Use `useApiClient()` from `@/lib/hooks/useApiClient` in route components and feature hooks:
|
|
93
|
-
|
|
94
|
-
```ts
|
|
95
|
-
const { apiRequest, isOrganizationReady } = useApiClient()
|
|
96
|
-
const data = await apiRequest('/executions', { method: 'GET' })
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
The template also re-exports `useApiClientContext()` and the shared API client types from `@/lib/hooks/useApiClient`.
|
|
100
|
-
|
|
101
|
-
For real-time updates, feature surfaces use the local singleton wrapper:
|
|
102
|
-
|
|
103
|
-
```ts
|
|
104
|
-
import { sseConnectionManager } from '@/lib/sse/SSEConnectionManager'
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**WorkOS config:**
|
|
108
|
-
|
|
109
|
-
WorkOS `clientId`, `redirectUri`, and `signoutUri` are hardcoded in `ui/src/config/workos.ts` -- no UI env vars are required to run the template. Edit that file if a fork needs a different WorkOS client. The dev server runs on port `4300` with Vite `strictPort: true`, so a second `pnpm -C ui dev` on the same machine fails fast instead of drifting.
|
|
110
|
-
|
|
111
|
-
The API URL is centralized in `ui/src/lib/constants/api.ts`. In the current template it is hard-coded to `https://api.elevasis.io`, so if the bootstrap is repointed to another API target, that file is the source of truth.
|
|
112
|
-
|
|
113
|
-
## Route Structure
|
|
114
|
-
|
|
115
|
-
Current top-level app sections:
|
|
116
|
-
|
|
117
|
-
- `/` -- host-local dashboard entrypoint with quick links derived from `organizationModel.navigation.quickAccessSurfaceIds`
|
|
118
|
-
- `/lead-gen/*` -- lead generation pages (`lists`, `companies`, `contacts`)
|
|
119
|
-
- `/crm/*` -- CRM overview, pipeline, and deals
|
|
120
|
-
- `/projects/*` -- delivery feature pages (projects, milestones, tasks, notes)
|
|
121
|
-
- `/operations/*` -- operations overview, resources, command queue, command view, sessions, task scheduler
|
|
122
|
-
- `/monitoring/*` -- execution logs, execution health, activity log, cost analytics, notifications
|
|
123
|
-
- `/settings/*` -- account, organization, credentials, API keys, deployments, webhooks, and appearance
|
|
124
|
-
- `/login` and `/auth-redirect` -- auth entry/callback routes
|
|
125
|
-
|
|
126
|
-
Section guards currently follow this pattern:
|
|
127
|
-
|
|
128
|
-
- `ProtectedRoute` for all authenticated sections
|
|
129
|
-
- `SystemGuard` on sections that should hard-stop when a System is disabled: `crm`, `lead-gen`, `projects`, `operations`, and `monitoring`
|
|
130
|
-
- provider-level shell gating for shared System nav and sub-shell behavior
|
|
131
|
-
|
|
132
|
-
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.
|
|
133
|
-
|
|
134
|
-
## Dashboard and Feature Areas
|
|
135
|
-
|
|
136
|
-
**Dashboard**
|
|
137
|
-
|
|
138
|
-
`ui/src/features/dashboard/components/Dashboard.tsx` is intentionally lightweight. It acts as the host-owned landing page and renders quick access cards for the most important organization surfaces instead of duplicating the shared operations overview.
|
|
139
|
-
|
|
140
|
-
**Operations**
|
|
141
|
-
|
|
142
|
-
The operations area is the richest shared shell in the template. It includes:
|
|
143
|
-
|
|
144
|
-
- resource inventory and detail pages
|
|
145
|
-
- command queue and command view
|
|
146
|
-
- sessions screens
|
|
147
|
-
- the shared operations overview at `/operations/`
|
|
148
|
-
|
|
149
|
-
**Monitoring**
|
|
150
|
-
|
|
151
|
-
Monitoring is scaffolded as a shared feature area with route files for:
|
|
152
|
-
|
|
153
|
-
- activity log
|
|
154
|
-
- cost analytics
|
|
155
|
-
- execution health
|
|
156
|
-
- execution logs
|
|
157
|
-
- notifications
|
|
158
|
-
|
|
159
|
-
## Customization Points
|
|
160
|
-
|
|
161
|
-
The main template-owned customization surfaces are:
|
|
162
|
-
|
|
163
|
-
- `ui/src/config/app-config.ts` -- brand name, logos, and app version
|
|
164
|
-
- `ui/src/config/theme.ts` -- theme presets and defaults
|
|
165
|
-
- `ui/src/config/background.tsx` -- shared background treatment
|
|
166
|
-
- `ui/src/config/loader.tsx` -- global loader element
|
|
167
|
-
- `ui/src/config/nav-items.ts` -- app-local nav entries, including the preserved dashboard/home entry
|
|
168
|
-
- `core/config/organization-model.ts` -- product labels, System availability, resource descriptors, semantic surfaces, canonical-to-legacy surface aliases, and quick-access behavior
|
|
169
|
-
- `ui/src/config/README.md` -- the deeper guide for those config files
|
|
170
|
-
|
|
171
|
-
## Customizing System Sidebars
|
|
172
|
-
|
|
173
|
-
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.
|
|
174
|
-
|
|
175
|
-
Two customization layers are available for every shared System sidebar:
|
|
176
|
-
|
|
177
|
-
1. **Nav-item shortcut (`items` prop)** -- when you just need to swap or extend the nav array, spread the published items constant and pass the result to `*SidebarMiddle`. The template's CRM customization uses this path.
|
|
178
|
-
|
|
179
|
-
```tsx
|
|
180
|
-
import { crmManifest, CrmSidebar, CrmSidebarMiddle, CRM_ITEMS } from '@elevasis/ui/features/crm'
|
|
181
|
-
import type { NavItem } from '@elevasis/ui/layout'
|
|
182
|
-
|
|
183
|
-
const customItems: NavItem[] = [...CRM_ITEMS, { label: 'Reports', to: '/crm/reports', icon: IconFileText, exact: false }]
|
|
184
|
-
const CustomCrmSidebar = () => <CrmSidebar><CrmSidebarMiddle items={customItems} /></CrmSidebar>
|
|
185
|
-
const customCrmManifest = { ...crmManifest, sidebar: CustomCrmSidebar }
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
2. **Compose-primitives (structural changes)** -- when you need to inject panels, reorder sections, or add a new section, drop down to `CrmSidebarTop` + `SubshellNavList` + `SubshellSidebarSection` + published panels (`MyTasksPanel`, `QuickCreateActions`) and compose your own Middle.
|
|
189
|
-
|
|
190
|
-
`manifest.sidebar` accepts any component, so arbitrary customization is always available. The `items` prop is an abstraction barrier for the common case, not a limit.
|
|
191
|
-
|
|
192
|
-
See `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` for the decision tree, page-wrapping pattern, and delivery's three-section variant. For broader CRM extension work across pages, hooks, actions, workflows, and org-model boundaries, start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md`. For broader lead-gen extension work across pages, hooks, list/member state, artifacts, workflows, and org-model boundaries, start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md`. See `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` for `NavItem`, `SystemModule`, CRM platform primitives, Lead Gen platform primitives, and related TypeScript shapes.
|
|
193
|
-
|
|
194
|
-
For CRM deal action buttons, read `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.
|
|
195
|
-
|
|
196
|
-
## Notes
|
|
197
|
-
|
|
198
|
-
- `ui/src/routeTree.gen.ts` is generated by TanStack Router tooling. Do not hand-edit it.
|
|
199
|
-
- 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.
|
|
200
|
-
- For package-export discovery, glob `node_modules/@elevasis/sdk/reference/` or `node_modules/@repo/ui/dist/` for the current SDK/UI package surface.
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility pointer for the canonical Ui rule bundled with @elevasis/sdk
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Ui
|
|
6
|
+
|
|
7
|
+
Canonical rule source:
|
|
8
|
+
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/ui.md`
|
|
10
|
+
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|
|
@@ -1,235 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
paths:
|
|
4
|
-
- "**/*"
|
|
2
|
+
description: Compatibility pointer for the canonical Vibe rule bundled with @elevasis/sdk
|
|
5
3
|
---
|
|
6
4
|
|
|
7
|
-
# Vibe
|
|
5
|
+
# Vibe
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
Canonical rule source:
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
`node_modules/@elevasis/sdk/reference/rules/vibe.md`
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
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 of the seven intent types the message represents. The agent then routes to the right behavior without the user ever knowing the classification happened.
|
|
16
|
-
|
|
17
|
-
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.
|
|
18
|
-
|
|
19
|
-
## The Seven Intent Types
|
|
20
|
-
|
|
21
|
-
### 1. Capture
|
|
22
|
-
|
|
23
|
-
The user wants to record something new -- a task, a note, a piece of information that should persist.
|
|
24
|
-
|
|
25
|
-
**Recognize by:** action verbs like "add", "create", "remember", "track", "log", "note down", "write down", combined with a thing to record.
|
|
26
|
-
|
|
27
|
-
**Fixture examples:**
|
|
28
|
-
|
|
29
|
-
| Input | Why it's Capture |
|
|
30
|
-
| ------------------------------------------------- | ------------------------------------------- |
|
|
31
|
-
| "Add a task to follow up with the Shopify client" | Explicit "add a task" with a described item |
|
|
32
|
-
| "Remember to run the campaign report on Friday" | "Remember to" signals something to persist |
|
|
33
|
-
| "Run the campaign report every Friday at 9am" | Repeating schedule vocabulary to persist |
|
|
34
|
-
| "Track this conversation as a deal note" | Explicit "track" with a described artifact |
|
|
35
|
-
|
|
36
|
-
**Agent action:** draft the capture in plain language, confirm with the user, then execute via `elevasis-sdk project:*` commands for project records or `elevasis-sdk schedule:create` for recurring automation. 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 ZentaraHQ 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 `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
|
-
**Fixture examples:**
|
|
123
|
-
|
|
124
|
-
| Input | Why it's Codify |
|
|
125
|
-
| -------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
126
|
-
| "We're an e-commerce company -- all our deals come from Shopify or Amazon" | Declares industry + platform attributes not yet in model |
|
|
127
|
-
| "We track deal stage as discovery, scoping, proposal, closed" | Describes custom CRM stages that should replace defaults |
|
|
128
|
-
| "Add a project type called 'retainer' with monthly billing and a contract field" | Explicit request to add a new entity extension |
|
|
129
|
-
|
|
130
|
-
**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`.
|
|
131
|
-
|
|
132
|
-
**Stage/state/catalog impact preview:** if the Codify intent adds, renames, removes, reorders, or
|
|
133
|
-
re-scopes a stage, state, status bucket, catalog member, pipeline step, or progress vocabulary,
|
|
134
|
-
preview the cross-system impact before delegating:
|
|
135
|
-
|
|
136
|
-
- Which business-profile entry changes.
|
|
137
|
-
- Which saved record progress keys may already exist.
|
|
138
|
-
- Which automations or templates reference the key.
|
|
139
|
-
- Which dashboard, report, queue, or API reads may display or filter by it.
|
|
140
|
-
|
|
141
|
-
Then delegate to `/om <domain>` with that preview as context. Vibe does not write the
|
|
142
|
-
change and does not expose monorepo-only commands.
|
|
143
|
-
|
|
144
|
-
This routing applies to both codify levels (decision #21 -- Codify ceremony delegated to `/om`):
|
|
145
|
-
|
|
146
|
-
- **Level A** (config-only edits to `organization-model.ts`, System availability/routing toggles, label renames): delegate to `/om <domain>` immediately.
|
|
147
|
-
- **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.
|
|
148
|
-
|
|
149
|
-
Vibe detects the intent and delegates in both cases. It does not run either pipeline itself.
|
|
150
|
-
|
|
151
|
-
For "build/extend the CRM" asks, classify the structural org-model portion as Codify, then read `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.
|
|
152
|
-
|
|
153
|
-
For "build/extend lead gen" / "campaign creator" / "outbound list state" asks, classify the structural org-model portion as Codify, then read `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.
|
|
154
|
-
|
|
155
|
-
For "add a custom CRM action" / "Send Quote button" asks, classify as Codify, then read `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.
|
|
156
|
-
|
|
157
|
-
Heuristics for when to propose codification (passed to `/om` as context):
|
|
158
|
-
|
|
159
|
-
- First mention of a new attribute: note to `resume_context`, do not propose yet
|
|
160
|
-
- Second mention OR explicit declaration ("we're ecom"): propose extension
|
|
161
|
-
- Explicit ask ("track ecom deals separately"): propose immediately with fuller scope
|
|
162
|
-
- Attribute appearing across 3+ tasks: propose adding field to existing extension
|
|
163
|
-
|
|
164
|
-
### 7. Toggle
|
|
165
|
-
|
|
166
|
-
The user wants to enable or disable a System.
|
|
167
|
-
|
|
168
|
-
**Recognize by:** system-control vocabulary -- "turn on", "enable", "disable", "turn off", "activate", "deactivate" -- followed by a System name or description.
|
|
169
|
-
|
|
170
|
-
**Fixture examples:**
|
|
171
|
-
|
|
172
|
-
| Input | Why it's Toggle |
|
|
173
|
-
| ------------------------------- | -------------------------------------------- |
|
|
174
|
-
| "Turn on the lead-gen system" | Explicit "turn on" + System name |
|
|
175
|
-
| "Disable monitoring for now" | "Disable" + System reference |
|
|
176
|
-
| "We don't use SEO, turn it off" | Declarative + "turn it off" = System disable |
|
|
177
|
-
|
|
178
|
-
**Agent action:** delegate to `/om systems`. The ceremony (confirm + edit `core/config/organization-model.ts` + typecheck) belongs to `/om`, not to the ambient rule.
|
|
179
|
-
|
|
180
|
-
## Quick Reference Table
|
|
181
|
-
|
|
182
|
-
| Intent | Trigger signal | Routed to |
|
|
183
|
-
| ---------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
184
|
-
| Capture | "add", "remember", "track", "log" + a thing | Agent -- draft + confirm + `project:*` or `schedule:create` CLI |
|
|
185
|
-
| Query | "what's next", "what's pending", "what failed", "what systems" | Agent -- read with `project:*`, `queue:*`, or `schedule:*` + narrate |
|
|
186
|
-
| Describe | "what is", "tell me about", "explain", "where am I" | Agent -- narrate from org model labels |
|
|
187
|
-
| Transition | "done", "stuck", "blocked", "finished", "complete", "approve", "pause" | Agent -- confirm + `project:task:save`, `queue:select`, or `schedule:*` |
|
|
188
|
-
| Navigate | "focus on", "switch to", "back to", "look at" | Agent -- update scope + narrate |
|
|
189
|
-
| Codify | "we are X", "we track Y", repeated attribute, "add type/field" | Delegate to `/om \<domain>` |
|
|
190
|
-
| Toggle | "enable", "disable", "turn on/off" + system | Delegate to `/om systems` |
|
|
191
|
-
|
|
192
|
-
## Source of Truth for Plain Language
|
|
193
|
-
|
|
194
|
-
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.
|
|
195
|
-
|
|
196
|
-
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.
|
|
197
|
-
|
|
198
|
-
## Ambiguous Intent
|
|
199
|
-
|
|
200
|
-
When the user's input does not clearly map to one of the seven types, ask one clarifying question. Do not guess. Do not apply a precedence rule. Do not route to the "closest" intent.
|
|
201
|
-
|
|
202
|
-
Format: a single neutral question that presents the two (or three) plausible intents as options and asks which the user means.
|
|
203
|
-
|
|
204
|
-
Example: "That could be a note to capture or a status update on the current task -- which did you mean?"
|
|
205
|
-
|
|
206
|
-
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.
|
|
207
|
-
|
|
208
|
-
## Classifier Threshold
|
|
209
|
-
|
|
210
|
-
Default threshold: `balanced`.
|
|
211
|
-
|
|
212
|
-
The threshold controls how aggressively the classifier proposes codification from ambiguous signals:
|
|
213
|
-
|
|
214
|
-
- `strict` -- only explicit declarations or repeat mentions trigger codify proposals
|
|
215
|
-
- `balanced` -- second mention OR explicit declaration triggers; default
|
|
216
|
-
- `loose` -- first strong signal triggers a proposal
|
|
217
|
-
|
|
218
|
-
Override per project in `core/config/organization-model.ts` under `vibe.classifierThreshold`. The override is merge-aware (Tier 2 sync) and will not be overwritten by template sync operations.
|
|
219
|
-
|
|
220
|
-
## Phase-1 Scope
|
|
221
|
-
|
|
222
|
-
This rule covers Phase 1 of the vibe layer rollout. The layers the ambient classifier can narrate and codify in Phase 1 are:
|
|
223
|
-
|
|
224
|
-
- Layer 1 (Model): narrate schema shape, propose codification edits via `/om`
|
|
225
|
-
- Layer 4 (Systems/Actions): describe which Systems are on/off, propose enabling one via `/om`
|
|
226
|
-
- Layer 7 (Foundations): explain and edit `organization-model.ts` and `extensions/` via `/om`
|
|
227
|
-
|
|
228
|
-
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.
|
|
229
|
-
|
|
230
|
-
## What Vibe Is Not
|
|
231
|
-
|
|
232
|
-
- Vibe is not a slash command. There is no `/vibe` invocation (decision #19 -- ambient rule, not a skill or command).
|
|
233
|
-
- Vibe is not a skill. It lives in this rule file + CLAUDE.md + the PreToolUse hook -- not in `.claude/skills/`.
|
|
234
|
-
- Vibe does not own the codify ceremony. `/om` owns draft, confirm, write, and typecheck for both Level A and Level B codify pipelines (decision #21 -- Codify ceremony delegated to `/om`). Vibe detects intent and hands off.
|
|
235
|
-
- Vibe is not active in the monorepo. If working inside the monorepo (not an `external/` project), this ambient routing does not apply.
|
|
11
|
+
Read that bundled rule before applying this rule. This local file is intentionally kept as a thin compatibility pointer for existing local rule references in skills, sync notes, and older prompts.
|