@elevasis/sdk 1.20.2 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/cli.cjs +4220 -1583
  2. package/dist/index.d.ts +1035 -481
  3. package/dist/index.js +7381 -4187
  4. package/dist/node/index.d.ts +1 -3
  5. package/dist/node/index.js +40 -49
  6. package/dist/test-utils/index.d.ts +699 -123
  7. package/dist/test-utils/index.js +3826 -630
  8. package/dist/worker/index.js +3616 -442
  9. package/package.json +3 -3
  10. package/reference/_navigation.md +9 -7
  11. package/reference/_reference-manifest.json +1 -1
  12. package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
  13. package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
  14. package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
  15. package/reference/claude-config/registries/graph-skills.json +4 -4
  16. package/reference/claude-config/registries/knowledge-flags.json +0 -2
  17. package/reference/claude-config/rules/active-change-index.md +80 -80
  18. package/reference/claude-config/rules/agent-start-here.md +277 -273
  19. package/reference/claude-config/rules/deployment.md +57 -57
  20. package/reference/claude-config/rules/error-handling.md +56 -56
  21. package/reference/claude-config/rules/execution.md +40 -40
  22. package/reference/claude-config/rules/frontend.md +4 -4
  23. package/reference/claude-config/rules/observability.md +31 -31
  24. package/reference/claude-config/rules/operations.md +29 -17
  25. package/reference/claude-config/rules/organization-model.md +108 -40
  26. package/reference/claude-config/rules/organization-os.md +115 -113
  27. package/reference/claude-config/rules/package-taxonomy.md +33 -33
  28. package/reference/claude-config/rules/platform.md +42 -42
  29. package/reference/claude-config/rules/shared-types.md +49 -46
  30. package/reference/claude-config/rules/task-tracking.md +47 -47
  31. package/reference/claude-config/rules/ui.md +200 -200
  32. package/reference/claude-config/rules/vibe.md +235 -231
  33. package/reference/claude-config/scripts/statusline-command.js +18 -18
  34. package/reference/claude-config/settings.json +34 -34
  35. package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
  36. package/reference/claude-config/skills/dsp/SKILL.md +66 -66
  37. package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
  38. package/reference/claude-config/skills/explore/SKILL.md +6 -6
  39. package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
  40. package/reference/claude-config/skills/knowledge/SKILL.md +330 -271
  41. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
  42. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -158
  43. package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
  44. package/reference/claude-config/skills/knowledge/operations/features.md +76 -113
  45. package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
  46. package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
  47. package/reference/claude-config/skills/knowledge/operations/labels.md +94 -89
  48. package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
  49. package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
  50. package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
  51. package/reference/claude-config/skills/project/SKILL.md +1088 -1088
  52. package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
  53. package/reference/claude-config/skills/save/SKILL.md +3 -3
  54. package/reference/claude-config/skills/setup/SKILL.md +275 -275
  55. package/reference/claude-config/skills/status/SKILL.md +59 -59
  56. package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
  57. package/reference/claude-config/skills/sync/SKILL.md +47 -47
  58. package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
  59. package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
  60. package/reference/claude-config/skills/tutorial/technical.md +1303 -1306
  61. package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
  62. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
  63. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
  64. package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
  65. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
  66. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
  67. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
  68. package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
  69. package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
  70. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
  71. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
  72. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
  73. package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
  74. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
  75. package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
  76. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
  77. package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
  78. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
  79. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
  80. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
  81. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
  82. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
  83. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
  84. package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +42 -0
  85. package/reference/claude-config/sync-notes/README.md +43 -43
  86. package/reference/cli.mdx +808 -668
  87. package/reference/concepts.mdx +146 -146
  88. package/reference/deployment/api.mdx +297 -297
  89. package/reference/deployment/command-center.mdx +209 -209
  90. package/reference/deployment/index.mdx +195 -195
  91. package/reference/deployment/provided-features.mdx +107 -93
  92. package/reference/deployment/ui-execution.mdx +250 -250
  93. package/reference/examples/organization-model.ts +147 -84
  94. package/reference/framework/agent.mdx +156 -156
  95. package/reference/framework/index.mdx +195 -195
  96. package/reference/framework/interaction-guidance.mdx +182 -182
  97. package/reference/framework/memory.mdx +326 -326
  98. package/reference/framework/project-structure.mdx +282 -282
  99. package/reference/framework/tutorial-system.mdx +135 -135
  100. package/reference/getting-started.mdx +142 -142
  101. package/reference/index.mdx +106 -106
  102. package/reference/packages/core/src/README.md +14 -14
  103. package/reference/packages/core/src/business/README.md +2 -2
  104. package/reference/packages/core/src/knowledge/README.md +33 -32
  105. package/reference/packages/core/src/organization-model/README.md +149 -109
  106. package/reference/packages/core/src/test-utils/README.md +37 -37
  107. package/reference/packages/ui/src/api/README.md +18 -18
  108. package/reference/packages/ui/src/app/README.md +24 -24
  109. package/reference/packages/ui/src/auth/README.md +18 -18
  110. package/reference/packages/ui/src/components/README.md +24 -24
  111. package/reference/packages/ui/src/execution/README.md +16 -16
  112. package/reference/packages/ui/src/features/README.md +28 -28
  113. package/reference/packages/ui/src/graph/README.md +16 -16
  114. package/reference/packages/ui/src/hooks/README.md +23 -23
  115. package/reference/packages/ui/src/initialization/README.md +19 -19
  116. package/reference/packages/ui/src/knowledge/README.md +31 -31
  117. package/reference/packages/ui/src/organization/README.md +18 -18
  118. package/reference/packages/ui/src/profile/README.md +19 -19
  119. package/reference/packages/ui/src/provider/README.md +32 -32
  120. package/reference/packages/ui/src/router/README.md +18 -18
  121. package/reference/packages/ui/src/sse/README.md +13 -13
  122. package/reference/packages/ui/src/test-utils/README.md +7 -7
  123. package/reference/packages/ui/src/theme/README.md +23 -23
  124. package/reference/packages/ui/src/theme/presets/README.md +19 -19
  125. package/reference/packages/ui/src/types/README.md +16 -16
  126. package/reference/packages/ui/src/utils/README.md +18 -18
  127. package/reference/packages/ui/src/zustand/README.md +18 -18
  128. package/reference/platform-tools/adapters-integration.mdx +301 -301
  129. package/reference/platform-tools/adapters-platform.mdx +553 -553
  130. package/reference/platform-tools/index.mdx +217 -217
  131. package/reference/platform-tools/type-safety.mdx +82 -82
  132. package/reference/resources/index.mdx +349 -349
  133. package/reference/resources/patterns.mdx +449 -449
  134. package/reference/resources/types.mdx +116 -116
  135. package/reference/roadmap.mdx +165 -165
  136. package/reference/runtime.mdx +173 -173
  137. package/reference/scaffold/core/organization-graph.mdx +110 -89
  138. package/reference/scaffold/core/organization-model.mdx +226 -171
  139. package/reference/scaffold/index.mdx +67 -67
  140. package/reference/scaffold/operations/propagation-pipeline.md +77 -77
  141. package/reference/scaffold/operations/scaffold-maintenance.md +10 -10
  142. package/reference/scaffold/operations/workflow-recipes.md +138 -138
  143. package/reference/scaffold/recipes/add-a-feature.md +310 -88
  144. package/reference/scaffold/recipes/add-a-resource.md +137 -117
  145. package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
  146. package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
  147. package/reference/scaffold/recipes/customize-organization-model.md +281 -118
  148. package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
  149. package/reference/scaffold/recipes/extend-crm.md +40 -39
  150. package/reference/scaffold/recipes/extend-lead-gen.md +400 -401
  151. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -114
  152. package/reference/scaffold/recipes/index.md +47 -46
  153. package/reference/scaffold/recipes/query-the-knowledge-graph.md +227 -0
  154. package/reference/scaffold/reference/contracts.md +2389 -2121
  155. package/reference/scaffold/reference/feature-registry.md +9 -20
  156. package/reference/scaffold/reference/glossary.md +76 -76
  157. package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
  158. package/reference/scaffold/ui/customization.md +243 -243
  159. package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
  160. package/reference/scaffold/ui/feature-shell.mdx +72 -72
  161. package/reference/scaffold/ui/recipes.md +221 -213
  162. package/reference/spine/spine-primer.md +96 -96
  163. package/reference/templates/index.mdx +47 -47
  164. package/reference/troubleshooting.mdx +223 -223
@@ -1,231 +1,235 @@
1
- ---
2
- description: Ambient intent classifier -- routes natural-language input to 7 intent buckets without a slash command; Codify and Toggle delegate to /knowledge
3
- paths:
4
- - "**/*"
5
- ---
6
-
7
- # Vibe Layer
8
-
9
- Vibe is an **ambient, always-on** intent classifier. It activates automatically whenever the user speaks in plain language -- no slash command, no activation phrase, no special syntax. Every natural-language message passes through vibe classification before the agent acts.
10
-
11
- This rule applies to all sessions inside external projects. It does NOT apply in the monorepo (ambient routing is off there by default).
12
-
13
- ## What Vibe Is
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
- | "Track this conversation as a deal note" | Explicit "track" with a described artifact |
34
-
35
- **Agent action:** draft the capture in plain language, confirm with the user, then execute via `elevasis-sdk project:*` commands. Never write without confirmation.
36
-
37
- ### 2. Query
38
-
39
- The user wants to know something about current state -- task priorities, what is pending, what is running, what failed.
40
-
41
- **Recognize by:** questions about the current list, status, or queue of things. Includes both static-model queries ("what features are on?") and runtime-entity queries ("what's pending in the queue?"). Route Query to static-model sources (org model, features config) or runtime sources (operations domain) based on the referenced entity.
42
-
43
- **Fixture examples:**
44
-
45
- | Input | Why it's Query |
46
- | --------------------------------------------- | ------------------------------------------- |
47
- | "What should I work on next?" | Asking for prioritized task list |
48
- | "What's pending in the HITL queue?" | Runtime-entity query about operations state |
49
- | "What features are enabled for this project?" | Static-model query about features config |
50
-
51
- **Agent action:** read the relevant source (org model, `prj_tasks`, operations domain as available) and narrate the answer in plain language. No writes.
52
-
53
- ### 3. Describe
54
-
55
- The user wants the agent to explain something -- a scope, an entity, a concept within the project.
56
-
57
- **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.
58
-
59
- **Fixture examples:**
60
-
61
- | Input | Why it's Describe |
62
- | ------------------------------------------ | ----------------------------------------------------- |
63
- | "What's going on with the ZentaraHQ deal?" | Asking for a plain-language description of an entity |
64
- | "Tell me about the CRM feature" | Asking the agent to narrate what a model element does |
65
- | "Where am I in this project?" | Asking for current scope narration |
66
-
67
- **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, Features, and Foundations layers only.
68
-
69
- **Stage/state/catalog sub-routing:** when the noun being described is a stage, state, status
70
- bucket, catalog entry, progress step, pipeline column, or similarly closed business vocabulary,
71
- also show the cross-system impact before the normal description:
72
-
73
- 1. Read `node_modules/@elevasis/sdk/reference/spine/spine-primer.md` for the layering pattern.
74
- 2. Read the relevant domain in `core/config/organization-model.ts`.
75
- 3. Explain the impact in vibe-coder language only: the business profile entry, the saved progress
76
- on each record, the automations that produce updates, and the dashboard or reports that read it.
77
- 4. Route follow-up changes through `/knowledge <domain>`. Do not mention the technical pattern name
78
- unless the user explicitly asks for internals.
79
-
80
- ### 4. Transition
81
-
82
- The user wants to change the status of a task or entity.
83
-
84
- **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.
85
-
86
- **Fixture examples:**
87
-
88
- | Input | Why it's Transition |
89
- | --------------------------------------------- | ------------------------------------------- |
90
- | "Done with the proposal draft" | "Done" + named artifact = status transition |
91
- | "Stuck -- blocked waiting on client feedback" | "Stuck" + reason = blocked transition |
92
- | "Mark the onboarding task as complete" | Explicit status-change vocabulary |
93
-
94
- **Agent action:** identify the task or entity being transitioned, confirm the new status with the user, then apply the transition via `elevasis-sdk project:task:save` or equivalent. Never auto-transition without confirmation if the target entity is ambiguous.
95
-
96
- ### 5. Navigate
97
-
98
- The user wants to shift focus -- to a different task, project, feature, or layer of the model.
99
-
100
- **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.
101
-
102
- **Fixture examples:**
103
-
104
- | Input | Why it's Navigate |
105
- | -------------------------------------------- | --------------------------------------------------- |
106
- | "Let's focus on the onboarding flow for now" | "Focus on" + scope target |
107
- | "Switch to the Shopify integration project" | "Switch to" = navigate to a different project scope |
108
- | "Back to the CRM tasks" | "Back to" = return to a prior scope |
109
-
110
- **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.
111
-
112
- ### 6. Codify
113
-
114
- The user describes organizational reality that is not yet expressed in the model -- industry type, entity kinds, custom attributes, renamed stages, domain vocabulary.
115
-
116
- **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.
117
-
118
- **Fixture examples:**
119
-
120
- | Input | Why it's Codify |
121
- | -------------------------------------------------------------------------------- | -------------------------------------------------------- |
122
- | "We're an e-commerce company -- all our deals come from Shopify or Amazon" | Declares industry + platform attributes not yet in model |
123
- | "We track deal stage as discovery, scoping, proposal, closed" | Describes custom CRM stages that should replace defaults |
124
- | "Add a project type called 'retainer' with monthly billing and a contract field" | Explicit request to add a new entity extension |
125
-
126
- **Agent action:** delegate immediately to `/knowledge`. Do not attempt the ceremony yourself. Invoke with the relevant domain: `/knowledge crm` for deal/contact changes, `/knowledge projects` for project types, `/knowledge features` for feature toggles. Plain-language summary of what was detected is acceptable before delegating, but the actual draft-confirm-write ceremony belongs to `/knowledge`.
127
-
128
- **Stage/state/catalog impact preview:** if the Codify intent adds, renames, removes, reorders, or
129
- re-scopes a stage, state, status bucket, catalog member, pipeline step, or progress vocabulary,
130
- preview the cross-system impact before delegating:
131
-
132
- - Which business-profile entry changes.
133
- - Which saved record progress keys may already exist.
134
- - Which automations or templates reference the key.
135
- - Which dashboard, report, queue, or API reads may display or filter by it.
136
-
137
- Then delegate to `/knowledge <domain>` with that preview as context. Vibe does not write the
138
- change and does not expose monorepo-only commands.
139
-
140
- This routing applies to both codify levels (decision #21 -- Codify ceremony delegated to `/knowledge`):
141
-
142
- - **Level A** (config-only edits to `organization-model.ts`, feature toggles, label renames): delegate to `/knowledge <domain>` immediately.
143
- - **Level B** (new Zod extension files in `core/config/extensions/`): also delegate to `/knowledge <domain>`; `/knowledge` gates Level B to explicit user asks before scaffolding a new TS file.
144
-
145
- Vibe detects the intent and delegates in both cases. It does not run either pipeline itself.
146
-
147
- 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.
148
-
149
- 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.
150
-
151
- 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.
152
-
153
- Heuristics for when to propose codification (passed to `/knowledge` as context):
154
-
155
- - First mention of a new attribute: note to `resume_context`, do not propose yet
156
- - Second mention OR explicit declaration ("we're ecom"): propose extension
157
- - Explicit ask ("track ecom deals separately"): propose immediately with fuller scope
158
- - Attribute appearing across 3+ tasks: propose adding field to existing extension
159
-
160
- ### 7. Toggle
161
-
162
- The user wants to enable or disable a feature.
163
-
164
- **Recognize by:** feature-control vocabulary -- "turn on", "enable", "disable", "turn off", "activate", "deactivate" -- followed by a feature name or description.
165
-
166
- **Fixture examples:**
167
-
168
- | Input | Why it's Toggle |
169
- | ------------------------------- | --------------------------------------------- |
170
- | "Turn on the lead-gen feature" | Explicit "turn on" + feature name |
171
- | "Disable monitoring for now" | "Disable" + feature reference |
172
- | "We don't use SEO, turn it off" | Declarative + "turn it off" = feature disable |
173
-
174
- **Agent action:** delegate to `/knowledge features`. The ceremony (confirm + edit `core/config/organization-model.ts` + typecheck) belongs to `/knowledge`, not to the ambient rule.
175
-
176
- ## Quick Reference Table
177
-
178
- | Intent | Trigger signal | Routed to |
179
- | ---------- | --------------------------------------------------------------- | ------------------------------------------ |
180
- | Capture | "add", "remember", "track", "log" + a thing | Agent -- draft + confirm + `project:*` CLI |
181
- | Query | "what's next", "what's pending", "what failed", "what features" | Agent -- read + narrate |
182
- | Describe | "what is", "tell me about", "explain", "where am I" | Agent -- narrate from org model labels |
183
- | Transition | "done", "stuck", "blocked", "finished", "complete" | Agent -- confirm + `project:task:save` |
184
- | Navigate | "focus on", "switch to", "back to", "look at" | Agent -- update scope + narrate |
185
- | Codify | "we are X", "we track Y", repeated attribute, "add type/field" | Delegate to `/knowledge \<domain>` |
186
- | Toggle | "enable", "disable", "turn on/off" + feature | Delegate to `/knowledge features` |
187
-
188
- ## Source of Truth for Plain Language
189
-
190
- 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.
191
-
192
- The unified manifest (delivered via `@elevasis/core/organization-model`) is the canonical vocabulary surface. Vibe classifies against it -- capabilities, features, statuses, operations entities, and resource kinds are all discoverable from the manifest without hardcoding.
193
-
194
- ## Ambiguous Intent
195
-
196
- 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.
197
-
198
- Format: a single neutral question that presents the two (or three) plausible intents as options and asks which the user means.
199
-
200
- Example: "That could be a note to capture or a status update on the current task -- which did you mean?"
201
-
202
- 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.
203
-
204
- ## Classifier Threshold
205
-
206
- Default threshold: `balanced`.
207
-
208
- The threshold controls how aggressively the classifier proposes codification from ambiguous signals:
209
-
210
- - `strict` -- only explicit declarations or repeat mentions trigger codify proposals
211
- - `balanced` -- second mention OR explicit declaration triggers; default
212
- - `loose` -- first strong signal triggers a proposal
213
-
214
- 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.
215
-
216
- ## Phase-1 Scope
217
-
218
- This rule covers Phase 1 of the vibe layer rollout. The layers the ambient classifier can narrate and codify in Phase 1 are:
219
-
220
- - Layer 1 (Model): narrate schema shape, propose codification edits via `/knowledge`
221
- - Layer 4 (Features): describe which features are on/off, propose enabling one via `/knowledge`
222
- - Layer 7 (Foundations): explain and edit `organization-model.ts` and `extensions/` via `/knowledge`
223
-
224
- 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.
225
-
226
- ## What Vibe Is Not
227
-
228
- - Vibe is not a slash command. There is no `/vibe` invocation (decision #19 -- ambient rule, not a skill or command).
229
- - Vibe is not a skill. It lives in this rule file + CLAUDE.md + the PreToolUse hook -- not in `.claude/skills/`.
230
- - Vibe does not own the codify ceremony. `/knowledge` owns draft, confirm, write, and typecheck for both Level A and Level B codify pipelines (decision #21 -- Codify ceremony delegated to `/knowledge`). Vibe detects intent and hands off.
231
- - Vibe is not active in the monorepo. If working inside the monorepo (not an `external/` project), this ambient routing does not apply.
1
+ ---
2
+ description: Ambient intent classifier -- routes natural-language input to 7 intent buckets without a slash command; Codify and Toggle delegate to /knowledge
3
+ paths:
4
+ - "**/*"
5
+ ---
6
+
7
+ # Vibe Layer
8
+
9
+ Vibe is an **ambient, always-on** intent classifier. It activates automatically whenever the user speaks in plain language -- no slash command, no activation phrase, no special syntax. Every natural-language message passes through vibe classification before the agent acts.
10
+
11
+ This rule applies to all sessions inside external projects. It does NOT apply in the monorepo (ambient routing is off there by default).
12
+
13
+ ## What Vibe Is
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 `/knowledge <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 `/knowledge`. Do not attempt the ceremony yourself. Invoke with the relevant domain: `/knowledge sales` for deal/contact changes, `/knowledge projects` for project types, `/knowledge systems` for availability/routing toggles, and `/knowledge 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 `/knowledge`.
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 `/knowledge <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 `/knowledge`):
145
+
146
+ - **Level A** (config-only edits to `organization-model.ts`, System availability/routing toggles, label renames): delegate to `/knowledge <domain>` immediately.
147
+ - **Level B** (new Zod extension files in `core/config/extensions/`): also delegate to `/knowledge <domain>`; `/knowledge` 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 `/knowledge` 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 `/knowledge systems`. The ceremony (confirm + edit `core/config/organization-model.ts` + typecheck) belongs to `/knowledge`, 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 `/knowledge \<domain>` |
190
+ | Toggle | "enable", "disable", "turn on/off" + system | Delegate to `/knowledge 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 `/knowledge`
225
+ - Layer 4 (Systems/Actions): describe which Systems are on/off, propose enabling one via `/knowledge`
226
+ - Layer 7 (Foundations): explain and edit `organization-model.ts` and `extensions/` via `/knowledge`
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. `/knowledge` owns draft, confirm, write, and typecheck for both Level A and Level B codify pipelines (decision #21 -- Codify ceremony delegated to `/knowledge`). 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.
@@ -1,18 +1,18 @@
1
- #!/usr/bin/env node
2
- let input = ''
3
- process.stdin.on('data', (chunk) => (input += chunk))
4
- process.stdin.on('end', () => {
5
- const data = JSON.parse(input)
6
- const model = data.model?.display_name || '?'
7
- const pct = Math.floor(data.context_window?.used_percentage || 0)
8
-
9
- const DIM = '\x1b[90m',
10
- RESET = '\x1b[0m'
11
-
12
- const ctxSize = data.context_window?.context_window_size || 0
13
- const usedTokens = Math.round((ctxSize * pct) / 100)
14
- const rounded = Math.round(usedTokens / 100) * 100
15
- const tokenStr = rounded >= 1000 ? (rounded / 1000).toFixed(1).replace(/\.0$/, '') + 'k' : String(rounded)
16
-
17
- console.log(`${DIM}[${RESET}${model}${DIM}]${RESET} ${tokenStr} Tokens`)
18
- })
1
+ #!/usr/bin/env node
2
+ let input = ''
3
+ process.stdin.on('data', (chunk) => (input += chunk))
4
+ process.stdin.on('end', () => {
5
+ const data = JSON.parse(input)
6
+ const model = data.model?.display_name || '?'
7
+ const pct = Math.floor(data.context_window?.used_percentage || 0)
8
+
9
+ const DIM = '\x1b[90m',
10
+ RESET = '\x1b[0m'
11
+
12
+ const ctxSize = data.context_window?.context_window_size || 0
13
+ const usedTokens = Math.round((ctxSize * pct) / 100)
14
+ const rounded = Math.round(usedTokens / 100) * 100
15
+ const tokenStr = rounded >= 1000 ? (rounded / 1000).toFixed(1).replace(/\.0$/, '') + 'k' : String(rounded)
16
+
17
+ console.log(`${DIM}[${RESET}${model}${DIM}]${RESET} ${tokenStr} Tokens`)
18
+ })