@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.
Files changed (245) hide show
  1. package/dist/cli.cjs +1001 -652
  2. package/dist/index.d.ts +1045 -509
  3. package/dist/index.js +748 -690
  4. package/dist/node/index.d.ts +105 -97
  5. package/dist/test-utils/index.d.ts +42 -28
  6. package/dist/test-utils/index.js +549 -732
  7. package/dist/worker/index.d.ts +12112 -0
  8. package/dist/worker/index.js +211 -186
  9. package/package.json +6 -9
  10. package/reference/_navigation.md +151 -21
  11. package/reference/_reference-manifest.json +186 -4
  12. package/reference/claude-config.md +8 -0
  13. package/reference/core/index.mdx +3 -3
  14. package/reference/examples/organization-model.ts +117 -111
  15. package/reference/index.mdx +4 -4
  16. package/reference/rules/active-change-index.md +40 -54
  17. package/reference/rules/agent-runtime.md +81 -0
  18. package/reference/rules/agent-start-here.md +71 -163
  19. package/reference/rules/deployment.md +33 -10
  20. package/reference/rules/error-handling.md +26 -0
  21. package/reference/rules/execution.md +13 -0
  22. package/reference/rules/frontend.md +10 -3
  23. package/reference/rules/observability.md +9 -1
  24. package/reference/rules/operations.md +26 -17
  25. package/reference/rules/organization-model.md +74 -88
  26. package/reference/rules/organization-os.md +71 -88
  27. package/reference/rules/package-taxonomy.md +11 -2
  28. package/reference/rules/platform.md +13 -7
  29. package/reference/rules/shared-types.md +15 -0
  30. package/reference/rules/task-tracking.md +30 -5
  31. package/reference/rules/ui.md +145 -3
  32. package/reference/rules/vibe-intents.md +271 -0
  33. package/reference/rules/vibe.md +17 -243
  34. package/reference/scaffold/core/organization-graph.mdx +111 -97
  35. package/reference/scaffold/core/organization-model.mdx +234 -214
  36. package/reference/scaffold/operations/propagation-pipeline.md +1 -1
  37. package/reference/scaffold/operations/scaffold-maintenance.md +19 -18
  38. package/reference/scaffold/operations/workflow-recipes.md +71 -19
  39. package/reference/scaffold/recipes/add-a-feature.md +156 -146
  40. package/reference/scaffold/recipes/add-a-resource.md +123 -117
  41. package/reference/scaffold/recipes/customize-crm-actions.md +25 -10
  42. package/reference/scaffold/recipes/customize-knowledge-browser.md +52 -117
  43. package/reference/scaffold/recipes/customize-organization-model.md +161 -149
  44. package/reference/scaffold/recipes/extend-a-base-entity.md +156 -140
  45. package/reference/scaffold/recipes/extend-crm.md +16 -11
  46. package/reference/scaffold/recipes/extend-lead-gen.md +25 -7
  47. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
  48. package/reference/scaffold/recipes/index.md +2 -2
  49. package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
  50. package/reference/scaffold/reference/contracts.md +12 -1
  51. package/reference/scaffold/reference/glossary.md +3 -3
  52. package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
  53. package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
  54. package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
  55. package/reference/scaffold/ui/feature-shell.mdx +279 -62
  56. package/reference/scaffold/ui/recipes.md +229 -197
  57. package/reference/sdk/cli-management.mdx +77 -29
  58. package/reference/sdk/concepts.mdx +2 -0
  59. package/reference/sdk/define-builders.mdx +76 -0
  60. package/reference/sdk/deployment/command-center.mdx +6 -2
  61. package/reference/sdk/deployment/execution-reference.mdx +64 -186
  62. package/reference/sdk/deployment/index.mdx +2 -0
  63. package/reference/sdk/exports.mdx +4 -4
  64. package/reference/sdk/framework/agent.mdx +49 -119
  65. package/reference/sdk/framework/index.mdx +46 -65
  66. package/reference/sdk/framework/project-structure.mdx +150 -205
  67. package/reference/sdk/framework/tutorial-system.mdx +2 -2
  68. package/reference/sdk/human-in-the-loop.mdx +152 -0
  69. package/reference/sdk/index.mdx +6 -7
  70. package/reference/sdk/platform-tools/index.mdx +12 -0
  71. package/reference/sdk/platform-tools/type-safety.mdx +4 -0
  72. package/reference/sdk/project-deployment-spec.mdx +131 -0
  73. package/reference/sdk/resources/index.mdx +23 -7
  74. package/reference/sdk/resources/patterns.mdx +54 -24
  75. package/reference/sdk/resources/types.mdx +7 -4
  76. package/reference/sdk/templates/data-enrichment.mdx +7 -3
  77. package/reference/sdk/templates/email-sender.mdx +139 -135
  78. package/reference/sdk/templates/lead-scorer.mdx +5 -1
  79. package/reference/sdk/templates/pdf-generator.mdx +155 -151
  80. package/reference/sdk/templates/recurring-job.mdx +195 -189
  81. package/reference/sdk/templates/text-classifier.mdx +4 -0
  82. package/reference/sdk/templates/web-scraper.mdx +139 -135
  83. package/reference/spine/spine-primer.md +135 -96
  84. package/reference/ui/index.mdx +14 -7
  85. package/dist/types/worker/adapters/anymailfinder.d.ts +0 -14
  86. package/dist/types/worker/adapters/apify.d.ts +0 -14
  87. package/dist/types/worker/adapters/approval.d.ts +0 -23
  88. package/dist/types/worker/adapters/attio.d.ts +0 -22
  89. package/dist/types/worker/adapters/clickup.d.ts +0 -22
  90. package/dist/types/worker/adapters/create-adapter.d.ts +0 -41
  91. package/dist/types/worker/adapters/crm.d.ts +0 -20
  92. package/dist/types/worker/adapters/dropbox.d.ts +0 -14
  93. package/dist/types/worker/adapters/email.d.ts +0 -25
  94. package/dist/types/worker/adapters/execution.d.ts +0 -22
  95. package/dist/types/worker/adapters/gmail.d.ts +0 -14
  96. package/dist/types/worker/adapters/google-sheets.d.ts +0 -14
  97. package/dist/types/worker/adapters/index.d.ts +0 -33
  98. package/dist/types/worker/adapters/instantly.d.ts +0 -14
  99. package/dist/types/worker/adapters/lead.d.ts +0 -28
  100. package/dist/types/worker/adapters/list.d.ts +0 -9
  101. package/dist/types/worker/adapters/llm.d.ts +0 -45
  102. package/dist/types/worker/adapters/millionverifier.d.ts +0 -14
  103. package/dist/types/worker/adapters/notification.d.ts +0 -28
  104. package/dist/types/worker/adapters/pdf.d.ts +0 -22
  105. package/dist/types/worker/adapters/projects.d.ts +0 -20
  106. package/dist/types/worker/adapters/resend.d.ts +0 -14
  107. package/dist/types/worker/adapters/scheduler.d.ts +0 -25
  108. package/dist/types/worker/adapters/signature-api.d.ts +0 -14
  109. package/dist/types/worker/adapters/storage.d.ts +0 -33
  110. package/dist/types/worker/adapters/stripe.d.ts +0 -14
  111. package/dist/types/worker/adapters/tomba.d.ts +0 -14
  112. package/dist/types/worker/index.d.ts +0 -60
  113. package/dist/types/worker/platform.d.ts +0 -90
  114. package/dist/types/worker/utils.d.ts +0 -9
  115. package/reference/claude-config/Overview.md +0 -230
  116. package/reference/claude-config/hooks/post-edit-validate.mjs +0 -98
  117. package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +0 -187
  118. package/reference/claude-config/hooks/tool-failure-recovery.mjs +0 -73
  119. package/reference/claude-config/registries/graph-skills.json +0 -4
  120. package/reference/claude-config/registries/knowledge-flags.json +0 -154
  121. package/reference/claude-config/registries/skill-coverage.json +0 -20
  122. package/reference/claude-config/rules/active-change-index.md +0 -22
  123. package/reference/claude-config/rules/agent-start-here.md +0 -22
  124. package/reference/claude-config/rules/deployment.md +0 -22
  125. package/reference/claude-config/rules/error-handling.md +0 -22
  126. package/reference/claude-config/rules/execution.md +0 -22
  127. package/reference/claude-config/rules/frontend.md +0 -22
  128. package/reference/claude-config/rules/observability.md +0 -22
  129. package/reference/claude-config/rules/operations.md +0 -22
  130. package/reference/claude-config/rules/organization-model.md +0 -22
  131. package/reference/claude-config/rules/organization-os.md +0 -22
  132. package/reference/claude-config/rules/package-taxonomy.md +0 -22
  133. package/reference/claude-config/rules/platform.md +0 -22
  134. package/reference/claude-config/rules/shared-types.md +0 -22
  135. package/reference/claude-config/rules/task-tracking.md +0 -22
  136. package/reference/claude-config/rules/topbar-actions.md +0 -70
  137. package/reference/claude-config/rules/ui.md +0 -22
  138. package/reference/claude-config/rules/vibe.md +0 -22
  139. package/reference/claude-config/scripts/statusline-command.js +0 -18
  140. package/reference/claude-config/settings.json +0 -30
  141. package/reference/claude-config/skills/client/SKILL.md +0 -201
  142. package/reference/claude-config/skills/deploy/SKILL.md +0 -159
  143. package/reference/claude-config/skills/dsp/SKILL.md +0 -66
  144. package/reference/claude-config/skills/elevasis/SKILL.md +0 -251
  145. package/reference/claude-config/skills/explore/SKILL.md +0 -78
  146. package/reference/claude-config/skills/git-sync/SKILL.md +0 -166
  147. package/reference/claude-config/skills/om/SKILL.md +0 -475
  148. package/reference/claude-config/skills/om/operations/build.md +0 -237
  149. package/reference/claude-config/skills/om/operations/codify-level-a.md +0 -109
  150. package/reference/claude-config/skills/om/operations/codify-level-b.md +0 -159
  151. package/reference/claude-config/skills/om/operations/customers.md +0 -114
  152. package/reference/claude-config/skills/om/operations/features.md +0 -88
  153. package/reference/claude-config/skills/om/operations/goals.md +0 -123
  154. package/reference/claude-config/skills/om/operations/identity.md +0 -97
  155. package/reference/claude-config/skills/om/operations/labels.md +0 -110
  156. package/reference/claude-config/skills/om/operations/offerings.md +0 -114
  157. package/reference/claude-config/skills/om/operations/roles.md +0 -104
  158. package/reference/claude-config/skills/om/operations/scaffold.md +0 -163
  159. package/reference/claude-config/skills/om/operations/techStack.md +0 -38
  160. package/reference/claude-config/skills/project/SKILL.md +0 -1114
  161. package/reference/claude-config/skills/run-ui/SKILL.md +0 -73
  162. package/reference/claude-config/skills/save/SKILL.md +0 -183
  163. package/reference/claude-config/skills/setup/SKILL.md +0 -290
  164. package/reference/claude-config/skills/status/SKILL.md +0 -59
  165. package/reference/claude-config/skills/submit-request/SKILL.md +0 -180
  166. package/reference/claude-config/skills/sync/SKILL.md +0 -47
  167. package/reference/claude-config/skills/tutorial/SKILL.md +0 -259
  168. package/reference/claude-config/skills/tutorial/progress-template.md +0 -74
  169. package/reference/claude-config/skills/tutorial/technical.md +0 -1303
  170. package/reference/claude-config/skills/tutorial/vibe-coder.md +0 -890
  171. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +0 -27
  172. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +0 -30
  173. package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +0 -73
  174. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +0 -86
  175. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +0 -55
  176. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +0 -97
  177. package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +0 -112
  178. package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +0 -93
  179. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +0 -58
  180. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +0 -56
  181. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +0 -71
  182. package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +0 -83
  183. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +0 -59
  184. package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +0 -42
  185. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +0 -60
  186. package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +0 -37
  187. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +0 -34
  188. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +0 -38
  189. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +0 -32
  190. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +0 -33
  191. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +0 -69
  192. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +0 -30
  193. package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +0 -45
  194. package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +0 -52
  195. package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +0 -33
  196. package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +0 -32
  197. package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +0 -43
  198. package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +0 -40
  199. package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +0 -61
  200. package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +0 -49
  201. package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +0 -31
  202. package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +0 -42
  203. package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +0 -33
  204. package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +0 -37
  205. package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +0 -28
  206. package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +0 -43
  207. package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +0 -26
  208. package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +0 -33
  209. package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +0 -35
  210. package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +0 -49
  211. package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +0 -47
  212. package/reference/claude-config/sync-notes/2026-05-28-om-snapshot-sdk-workflow-config.md +0 -33
  213. package/reference/claude-config/sync-notes/2026-05-30-client-source-and-om-profiles.md +0 -39
  214. package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +0 -27
  215. package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +0 -45
  216. package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +0 -34
  217. package/reference/claude-config/sync-notes/2026-06-04-scaffold-registry-lane-severity.md +0 -34
  218. package/reference/claude-config/sync-notes/2026-06-05-appearance-app-mode-decouple.md +0 -29
  219. package/reference/claude-config/sync-notes/2026-06-05-ontology-endpoint-rename-and-knowledge-browser-ui.md +0 -86
  220. package/reference/claude-config/sync-notes/2026-06-06-om-build-systems-scaffold.md +0 -47
  221. package/reference/claude-config/sync-notes/2026-06-06-om-item-copy-references.md +0 -50
  222. package/reference/claude-config/sync-notes/2026-06-08-knowledge-base-page-not-found-fix.md +0 -76
  223. package/reference/claude-config/sync-notes/2026-06-09-agent-sessions-public-agent-chat-route.md +0 -75
  224. package/reference/claude-config/sync-notes/2026-06-09-sdk-cli-load-org-model-resolution.md +0 -42
  225. package/reference/claude-config/sync-notes/2026-06-12-agent-grants-visualizer-operations.md +0 -30
  226. package/reference/claude-config/sync-notes/2026-06-14-session-ux-and-project-cli-json.md +0 -33
  227. package/reference/claude-config/sync-notes/2026-06-14-shared-session-conversation-view.md +0 -26
  228. package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +0 -46
  229. package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +0 -34
  230. package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +0 -52
  231. package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +0 -47
  232. package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +0 -75
  233. package/reference/claude-config/sync-notes/2026-07-23-agent-session-memory.md +0 -49
  234. package/reference/claude-config/sync-notes/2026-07-23-workos-org-marker.md +0 -50
  235. package/reference/claude-config/sync-notes/2026-07-24-claude-5-models-and-session-surface-fixes.md +0 -116
  236. package/reference/claude-config/sync-notes/2026-07-27-agent-strict-output-and-turn-drift.md +0 -73
  237. package/reference/claude-config/sync-notes/2026-07-28-agent-reply-is-its-own-field.md +0 -84
  238. package/reference/claude-config/sync-notes/2026-07-30-login-screen-and-member-provisioning-state.md +0 -114
  239. package/reference/claude-config/sync-notes/2026-08-02-auth-guard-defaults-and-truncation-fix.md +0 -122
  240. package/reference/claude-config/sync-notes/2026-08-03-cli-gateway-errors-and-request-timeout.md +0 -120
  241. package/reference/claude-config/sync-notes/README.md +0 -43
  242. package/reference/sdk/framework/interaction-guidance.mdx +0 -182
  243. package/reference/sdk/framework/memory.mdx +0 -326
  244. package/reference/sdk/framework/resource-documentation.mdx +0 -90
  245. package/reference/sdk/roadmap.mdx +0 -164
@@ -1,1114 +0,0 @@
1
- ---
2
- name: project
3
- description: "Portfolio- and project-level work management -- orientation, intent routing, active projects, milestones, tasks, notes, and resume context -- via the elevasis-sdk project:* CLI."
4
- argument-hint: "[create | list | work | add | update | status | note | milestone | task | delete] [args]"
5
- allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
- ---
7
-
8
- # Project Management (Portfolio + Per-Project)
9
-
10
- `/project` is the primary work-tracking entrypoint for the template. It covers:
11
-
12
- - **Portfolio orientation** — bare `/project` invocation shows the landscape of active work and suggests next actions.
13
- - **Intent routing** — on an opening message that reads as "do work", decide new-vs-resume and route accordingly.
14
- - **New-work flow** — when the user starts multi-step work without a project, ask: create project, link existing, or standalone.
15
- - **CRUD surface** — projects, milestones, tasks, notes, checklists via `elevasis-sdk project:*`.
16
-
17
- > **Note:** the template no longer ships a separate `/work` skill. Project tasks are the unit of work; use `/project task:*` operations for task lifecycle. Resume context is canonical in `prj_tasks.resume_context` and written via `project:task:save` (never via task-doc frontmatter).
18
-
19
- **Usage:**
20
-
21
- - `/project` — **Portfolio orientation** (see "Orientation Mode" below). List active/blocked projects, surface most-recently-touched project's `resume_context`, suggest next actions.
22
- - `/project list` — Same as no-args orientation but just the project table, no suggestions.
23
- - `/project work <query>` — Fuzzy-match a project/task and print a resume brief (wraps `project:work`).
24
- - `/project status [<client>]` — Detailed status across all projects, or a single project.
25
- - `/project create` — Guided project creation (QnA walkthrough).
26
- - `/project add "Client Name" [--status active] [--value 5000]` — Quick create (flags only, no QnA).
27
- - `/project update <client> --status on_track` — Update project fields.
28
- - `/project milestone add <client> "Phase 1" [--due 2026-05-01]` — Add milestone.
29
- - `/project milestone update <client> "Phase 1" --status completed` — Update milestone.
30
- - `/project task add <client> "API docs" --milestone "Phase 1" [--type documentation]` — Add task.
31
- - `/project task update <client> "API docs" --status approved` — Update task.
32
- - `/project task save <task> --current-state "..."` — Persist `resume_context` (use this, never task-doc frontmatter).
33
- - `/project note <client> "Kickoff call went well" [--type call_note]` — Add note.
34
- - `/project notes <client>` — List notes for project.
35
- - `/project checklist <client> "<milestone>"` — View checklist for a milestone.
36
- - `/project delete <client>` — Delete project (cascades milestones, tasks, notes).
37
-
38
- ---
39
-
40
- ## Ambient Vibe Integration
41
-
42
- This skill is the landing point for three of the seven vibe intent types. Agents arriving from the ambient layer should behave identically to a direct invocation — vibe is a classifier, not a different code path.
43
-
44
- | Vibe intent | What vibe detected | What to do here |
45
- | -------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------- |
46
- | **Capture** | "add a task", "remember to", "track this" | Draft the task/note, confirm with user, then `project:task:create` or `project:note:create` |
47
- | **Transition** | "done", "stuck", "blocked", "finished" | Resolve current task from session context, confirm status, then `project:task:update --status <new>` |
48
- | **Navigate** | "focus on", "switch to", "back to" | Resolve target via `project:resolve <query>` or `project:work <query>`, update scope, narrate new context |
49
-
50
- **The full continuity loop** — how work flows across sessions:
51
-
52
- ```
53
- vibe (Capture) → /project task:create → task in DB
54
-
55
- work happens
56
-
57
- /save → project:task:save → prj_tasks.resume_context
58
-
59
- next session: /project work <query>
60
-
61
- project:work → resume brief (current state + next steps)
62
-
63
- agent picks up exactly where it left off
64
- ```
65
-
66
- When a session begins with an ambiguous opening, check `project:work` before asking the user to re-explain. The resume brief is the canonical continuity payload — trust it.
67
-
68
- ---
69
-
70
- ## Prerequisites
71
-
72
- **Run from the project root** (the directory containing `.elevasis`). Before issuing any other commands, run:
73
-
74
- ```bash
75
- pnpm elevasis-sdk doctor
76
- ```
77
-
78
- If `doctor` fails, **stop immediately and surface the error** — do not retry other commands. Fix the reported issue first (missing `.env`, bad API key, wrong directory, etc.), then re-run `doctor` before proceeding.
79
-
80
- ---
81
-
82
- ## Invocation Contract
83
-
84
- All `elevasis-sdk` commands in this skill use the wrapper script form:
85
-
86
- ```bash
87
- pnpm elevasis-sdk <subcommand> [flags]
88
- ```
89
-
90
- This form is available from the **project root** — the directory that contains the `.elevasis` marker file. The `.elevasis` file is the project-root anchor: `elevasis-sdk` walks up from its invocation directory until it finds this file, then resolves `.env` and all relative paths from that location. After the project-root refactor, CWD within the project tree matters less — but you must still be somewhere inside the project directory tree.
91
-
92
- The long form `pnpm -C operations exec elevasis-sdk <subcommand>` still works and is equivalent. Use the short wrapper form (`pnpm elevasis-sdk`) in all new automation and agent scripts.
93
-
94
- **If the `.elevasis` marker is missing**, the CLI exits with:
95
-
96
- ```
97
- Not inside an Elevasis project. Run this command from a project directory (an Elevasis project has a .elevasis file at its root).
98
- ```
99
-
100
- If you see this error, confirm you are inside a project that was created from the template and has the `.elevasis` marker at its root.
101
-
102
- ---
103
-
104
- ## Transient Input Files (`tmp/`)
105
-
106
- Agents that need to pass structured JSON to `request:submit` or `exec` should write the file to `<projectRoot>/tmp/` rather than to an arbitrary path. The `tmp/` directory is tracked in git (via `tmp/.gitkeep`) but its contents are gitignored, so transient files never pollute the commit history.
107
-
108
- **Workflow:**
109
-
110
- 1. Write the input payload to `tmp/<descriptive-name>.json` from the project root.
111
- 2. Pass the path to the CLI command using the relative form — it resolves against the project root automatically:
112
-
113
- ```bash
114
- pnpm elevasis-sdk request:submit -f tmp/request-report.json --cleanup-input
115
- pnpm elevasis-sdk exec my-workflow -f tmp/exec-payload.json --cleanup-input
116
- ```
117
-
118
- 3. The `--cleanup-input` flag deletes request/exec input files automatically after a successful command. On failure the file is left intact for inspection.
119
-
120
- **Safety guard:** `--cleanup-input` only deletes files that are under `<projectRoot>/tmp/`. If the resolved path is outside `tmp/`, the CLI prints a warning to stderr and leaves the file untouched. Files passed via inline JSON flags are never affected.
121
-
122
- Checklist commands in the currently published SDK use inline `--checklist` JSON only. In Windows PowerShell 5.1, inline JSON is not reliable; use bash/PowerShell 7 for those updates, or update the checklist through the UI.
123
-
124
- ---
125
-
126
- ## Orientation Mode (bare `/project` invocation)
127
-
128
- When invoked without a subcommand, enter **project mode**: present the portfolio landscape and offer next actions. This is the hub — distinct from `project:work <id>`, which is single-task resume.
129
-
130
- ### Flow
131
-
132
- 1. **List active work** — `--status` accepts exactly one value. Run two calls and merge the results:
133
-
134
- ```bash
135
- pnpm elevasis-sdk project:list --status active --pretty
136
- pnpm elevasis-sdk project:list --status blocked --pretty
137
- ```
138
-
139
- Show a compact table: client, status, last-touched.
140
-
141
- 2. **Surface most-recently-touched project's resume context** — identify the top row (most recent `updated_at`), then print its latest task's `resume_context` (via `project:task:list` → pick most recent in-progress task → `project:task:resume <id> --pretty`). Keep it short: current state + next steps, no files dump.
142
-
143
- 3. **List available operations** — a one-liner reminder of what the user can do from here:
144
-
145
- ```
146
- Available: /project status <client> | /project work <query> | /project task add | /project note | /project create
147
- ```
148
-
149
- 4. **Offer next-action suggestions** — 1-3 concrete follow-ups driven by what's on screen. Examples:
150
- - "3 active projects, 1 blocked (Acme — waiting on credentials). Resume Beta (most recent)?"
151
- - "No active projects. Create one with `/project create`?"
152
- - "Acme's Phase 2 has 2 overdue tasks. Open status?"
153
-
154
- ### Presentation template
155
-
156
- ```
157
- Project Portfolio (2 active, 1 blocked)
158
- =======================================
159
- | Client | Status | Last touched |
160
- |--------------|----------|--------------|
161
- | Beta LLC | on_track | 2h ago |
162
- | Acme Corp | blocked | 1d ago |
163
- | Gamma Inc | active | 4d ago |
164
-
165
- Most recent: Beta LLC — API integration
166
- Current: Endpoint wired, tests passing locally.
167
- Next: Deploy to staging, verify webhook delivery.
168
-
169
- Next? Resume Beta | Status Acme (why blocked?) | Create new project
170
- ```
171
-
172
- ---
173
-
174
- ## Intent Detection (opening-message routing)
175
-
176
- Apply this heuristic on the user's first substantive message of a session, before branching into any other operation. The goal: distinguish **resume existing work** from **start new work**, and confirm before committing.
177
-
178
- ### Signals → classification
179
-
180
- | Signal in opening message | Classify as |
181
- | ----------------------------------------------------------------------------------------------- | ---------------------------------- |
182
- | References a specific file path, PR, commit, or existing task/milestone/project by name | **Resume** |
183
- | "Continue", "pick up", "finish", "the thing we were doing", "yesterday's work" | **Resume** |
184
- | "Let's build X", "new Y", "I want to add Z", "start a new project", "help me with a new client" | **New work** |
185
- | Single-file cosmetic ask: "fix typo in X", "rename Y", "update dep Z" | **Trivial** (skip new-work prompt) |
186
- | Ambiguous / discussion only | Ask before routing |
187
-
188
- ### Routing
189
-
190
- - **Resume** — run `project:work <query>` with the extracted entity (file path stem, project name, task keywords). If one clean match, print the brief and ask "Continue here?". If multiple matches, show top 3 and ask which. If zero matches, fall back to orientation mode with a note ("No match for 'acme webhook'; here's the landscape").
191
- - **New work** — enter the **New-Work Project Decision** flow (next section).
192
- - **Trivial** — proceed directly; do not prompt about projects. Small single-file edits don't need portfolio tracking.
193
- - **Ambiguous** — reply with orientation mode output and ask "Resume something, or start new?"
194
-
195
- **Always confirm before branching.** A misclassified "new" routed as "resume" burns trust faster than a one-line confirmation.
196
-
197
- ---
198
-
199
- ## New-Work Project Decision
200
-
201
- When intent detection classifies the opening ask as **new multi-step work** and the conversation has no established project context, ask this question before writing any code:
202
-
203
- ```
204
- Scope this work under a project?
205
- a) Create new project "<proposed-slug>" (recommended for multi-step work)
206
- b) Link to existing "<closest-match>" (if fuzzy-search finds one)
207
- c) Standalone — no project tracking (one-off / trivial)
208
- ```
209
-
210
- ### Rules
211
-
212
- - **Default to (a)** when the ask is multi-step (multiple files, multiple sessions expected, client-facing deliverable).
213
- - **Offer (b)** only when `project:list` fuzzy-matches produce a plausible candidate (name similarity, shared entity references). If nothing matches, omit the option — do not invent one.
214
- - **Skip the prompt entirely** for trivial single-file edits — intent detection's "Trivial" branch handles this.
215
- - **Propose a slug** by extracting the core noun from the ask. "Build a lead scraper for Acme" → `acme-lead-scraper`. User can override.
216
-
217
- ### After the decision
218
-
219
- - **(a) Create** — invoke the guided `/project create` QnA flow (see below), pre-filling the name/description from the ask.
220
- - **(b) Link** — run `project:resolve <query>` to confirm the match, then add a task to that project for the new work via `project:task:create`.
221
- - **(c) Standalone** — proceed without project tracking. Do not create orphan task docs; standalone work leaves no artifact.
222
-
223
- ---
224
-
225
- ## Connection
226
-
227
- ### Environment
228
-
229
- ```bash
230
- # .env (project root)
231
- ELEVASIS_PLATFORM_KEY=sk_...
232
- ```
233
-
234
- `ELEVASIS_PLATFORM_KEY` is read from the environment automatically. The SDK CLI walks up
235
- directories to find `.env`, so it resolves correctly from both the project root and
236
- `operations/`. `ELEVASIS_API_URL` defaults to `https://api.elevasis.io` (production). Set
237
- `ELEVASIS_API_URL=http://localhost:5170` to target a local API instance, or set
238
- `NODE_ENV=development` if the SDK CLI respects that convention.
239
-
240
- No `--prod` flag is needed — the template targets production by default via `ELEVASIS_API_URL`.
241
-
242
- ### CLI Invocation
243
-
244
- All project operations go through the `elevasis-sdk` CLI. Use the wrapper script form from the
245
- project root:
246
-
247
- ```bash
248
- pnpm elevasis-sdk project:<command> [args]
249
- ```
250
-
251
- The long form `pnpm -C operations exec elevasis-sdk project:<command> [args]` is equivalent and
252
- still works — use it if the wrapper script is not yet available in an older project.
253
-
254
- Organization scoping is handled server-side via `ELEVASIS_PLATFORM_KEY`. No org header or
255
- `--org` flag is required.
256
-
257
- ---
258
-
259
- ## Output Flags
260
-
261
- All `project:*` commands support three output modes via flags:
262
-
263
- | Flag | Behavior | Use when |
264
- | ----------- | -------------------------- | --------------------------------------------------- |
265
- | _(no flag)_ | Raw JSON (legacy default) | Existing scripts that parse default stdout |
266
- | `--json` | Clean JSON via `printJson` | Agent automation — the preferred machine-parse flag |
267
- | `--pretty` | Human-readable text | Interactive / debugging output |
268
-
269
- **Canonical machine-parse recipe:**
270
-
271
- ```bash
272
- pnpm -s elevasis-sdk project:task:list --project <uuid> --json
273
- ```
274
-
275
- The `-s` / `--silent` flag suppresses the pnpm lifecycle preamble (`> project@... elevasis-sdk ...`) so stdout is pure JSON with no wrapper noise. Use `--json` and `-s` together for all agent automation.
276
-
277
- **Defensive parse fallback** (if any wrapper noise remains): slice from the first `{` or `[` to the last `}` or `]` before calling `JSON.parse`.
278
-
279
- ---
280
-
281
- ## Database Schema
282
-
283
- ### Tables
284
-
285
- | Table | Purpose | Key Columns |
286
- | ---------------- | ---------------------------- | --------------------------------------------------------------------- |
287
- | `prj_projects` | Client projects/contracts | name, kind, status, description, contract_value, start/end dates |
288
- | `prj_milestones` | Phases within projects | name, status, due_date, sequence, completed_at, checklist |
289
- | `prj_tasks` | Work items within milestones | name, status, type, due_date, milestone_id, resume_context, checklist |
290
- | `prj_notes` | Meeting notes, updates | type, content, summary, occurred_at, task_id, milestone_id |
291
-
292
- ### Project Kind
293
-
294
- | Kind | Description |
295
- | ------------------- | -------------------------------- |
296
- | `client_engagement` | External client delivery project |
297
- | `internal` | Internal project work |
298
- | `research` | Research and investigation |
299
- | `other` | Catch-all |
300
-
301
- Default filter for `/project` operations is `kind=client_engagement` unless the user's intent
302
- is clearly internal or `--kind` is specified explicitly.
303
-
304
- ### Status Values
305
-
306
- | Entity | Values |
307
- | --------- | ------------------------------------------------------------------------------------------------------------------------ |
308
- | Project | `active`, `on_track`, `at_risk`, `blocked`, `completed`, `paused` |
309
- | Milestone | `upcoming`, `in_progress`, `completed`, `overdue`, `blocked` |
310
- | Task | `planned`, `in_progress`, `blocked`, `completed`, `cancelled`, `submitted`, `approved`, `rejected`, `revision_requested` |
311
- | Note type | `call_note`, `status_update`, `issue`, `blocker`, `agent_learning` |
312
- | Task type | `documentation`, `code`, `report`, `design`, `refactor`, `feature`, `bug`, `research`, `other` |
313
-
314
- ### Checklist Shape
315
-
316
- Both `prj_milestones.checklist` and `prj_tasks.checklist` store a JSONB array of objects with this shape:
317
-
318
- ```json
319
- [
320
- { "id": "uuid", "label": "Item label", "completed": false },
321
- { "id": "uuid", "label": "Another item", "completed": true }
322
- ]
323
- ```
324
-
325
- The CLI `--checklist` flag on `project:task:create`, `project:task:update`, and `project:milestone:update` performs a **full replace** where the command accepts checklist data. The entire array is replaced with the JSON you supply. There are no item-level add/toggle/remove flags. In Windows PowerShell 5.1, inline JSON is not reliable; use bash/PowerShell 7 for checklist CLI updates, or update the checklist through the UI. To mutate a single item:
326
-
327
- 1. Read the current checklist (via psql or `project:task:get` / `project:milestone:list`)
328
- 2. Mutate the array in memory (append, flip `completed`, filter out)
329
- 3. Write the entire array back via `--checklist '<json-array>'`
330
-
331
- To clear a checklist: `--checklist '[]'`.
332
-
333
- ### Foreign Keys
334
-
335
- - `prj_milestones.project_id` → `prj_projects.id` (CASCADE)
336
- - `prj_tasks.project_id` → `prj_projects.id` (CASCADE)
337
- - `prj_tasks.milestone_id` → `prj_milestones.id` (SET NULL)
338
- - `prj_tasks.parent_task_id` → `prj_tasks.id` (SET NULL) — for subtasks
339
- - `prj_notes.project_id` → `prj_projects.id` (CASCADE)
340
- - `prj_notes.task_id` → `prj_tasks.id` (SET NULL)
341
- - `prj_notes.milestone_id` → `prj_milestones.id` (SET NULL)
342
- - `prj_projects.deal_id` → `acq_deals.id` (SET NULL)
343
- - `prj_projects.client_id` → `clients.id` (SET NULL) — clients-hub link; set via `--client`
344
- - `prj_projects.client_company_id` → `acq_companies.id` (SET NULL) — legacy direct-company link; set via `--client-company-id`
345
-
346
- ---
347
-
348
- ## Operations
349
-
350
- ### `list` — Portfolio Table (no orientation extras)
351
-
352
- For a plain project table without resume context or next-action suggestions (use the bare `/project` orientation mode above when the user wants the full hub experience):
353
-
354
- ```bash
355
- pnpm elevasis-sdk project:list --kind client_engagement --pretty
356
-
357
- # Filter by client (accepts the client's name or UUID)
358
- pnpm elevasis-sdk project:list --client "Acme" --pretty
359
- ```
360
-
361
- Present as:
362
-
363
- ```
364
- Project Portfolio
365
- =================
366
- | Client | Status | Kind | Value |
367
- |--------------------|----------|--------------------|---------|
368
- | Acme Corp | on_track | client_engagement | $5,000 |
369
- | Beta LLC | active | client_engagement | $3,500 |
370
- ```
371
-
372
- For progress detail (milestones/tasks), follow up with `project:milestone:list` and
373
- `project:task:list` per project.
374
-
375
- ### `work <query>` — Resume Brief
376
-
377
- Wraps `project:work` for fuzzy-matched resume. Used by intent-detection "resume" classification.
378
-
379
- ```bash
380
- pnpm elevasis-sdk project:work <query>
381
- ```
382
-
383
- Prints the matched project/task brief with current `resume_context`. If multiple matches, show top 3 and ask which.
384
-
385
- ### `status [<client>]` — Detailed Status
386
-
387
- If client specified, show full detail for that project. If not, show all.
388
-
389
- **Resolve the project first** (see Client Inference below), then:
390
-
391
- ```bash
392
- # Get project details
393
- pnpm elevasis-sdk project:get <project-id>
394
-
395
- # Milestones (ordered by sequence)
396
- pnpm elevasis-sdk project:milestone:list --project <project-id> --pretty
397
-
398
- # Tasks (grouped by milestone)
399
- pnpm elevasis-sdk project:task:list --project <project-id> --pretty
400
-
401
- # Recent notes
402
- pnpm elevasis-sdk project:note:list --project <project-id> --pretty
403
- ```
404
-
405
- Present as:
406
-
407
- ```
408
- Acme Corp — On Track
409
- =====================
410
- Description: Automation project for AI-powered workflows
411
- Contract: $5,000 | Started: 2026-04-01 | Target: 2026-06-01
412
-
413
- Milestones (2/4 complete)
414
- [x] Phase 1: Discovery (completed)
415
- [>] Phase 2: Implementation (in_progress, due 2026-05-01)
416
- [ ] Phase 3: Testing (upcoming, due 2026-05-15)
417
- [ ] Phase 4: Launch (upcoming, due 2026-06-01)
418
-
419
- Tasks (3/8 approved)
420
- Phase 2: Implementation
421
- [approved] Requirements doc (documentation)
422
- [in_progress] API integration (code, due 2026-05-01)
423
- [planned] User guide (documentation)
424
-
425
- Recent Notes
426
- 2026-04-05 [call_note] Weekly check-in — on track, API work started
427
- 2026-04-01 [call_note] Kickoff — confirmed scope and timeline
428
- ```
429
-
430
- #### Tenant Skill Bindings Footer
431
-
432
- After the normal status output, append a short footer when the project kind, tags, name,
433
- description, milestones, or active tasks map to a known tenant domain such as `prospecting`,
434
- `crm`, `outreach`, `finance`, or `support`.
435
-
436
- Resolve the best domain from explicit metadata first (`tags`, `kind`, domain fields), then from
437
- project/task text. If no clear domain maps, omit the footer.
438
-
439
- Footer shape:
440
-
441
- ```text
442
- Related skill bindings
443
- - Domain: <domain>
444
- - Read or change business profile: /om <domain>
445
- - Layering primer: operations/node_modules/@elevasis/sdk/reference/spine/spine-primer.md
446
- ```
447
-
448
- External projects do not expose monorepo-only architecture commands. Never suggest `/org-os`,
449
- `/om-spine`, or monorepo paths in this footer.
450
-
451
- ### `create` — Guided Project Creation (QnA Flow)
452
-
453
- Interactive walkthrough that collects project details step by step using `AskUserQuestion`,
454
- then creates the project, milestones, and kickoff note in one go.
455
-
456
- **Step 1: Project basics**
457
-
458
- Ask via `AskUserQuestion` (single question, free-text via "Other"):
459
-
460
- ```
461
- What's the project name and a brief description of the scope?
462
- ```
463
-
464
- The user will reply with something like "Acme Corp automation -- building a lead gen pipeline
465
- with email outreach". Parse the name and description from the response.
466
-
467
- **Step 2: Deal/company linking**
468
-
469
- Search for matching records using read-only psql (the psql role is SELECT-only).
470
-
471
- Note: `SUPABASE_READONLY_URL` must be set in the template `.env` for psql queries. If not
472
- set, skip this step and advise the user to link via the Command Center UI after creation.
473
-
474
- If `SUPABASE_READONLY_URL` is available, query using `<ORG_ID>` from the platform key's
475
- associated organization (you can retrieve it via `project:list` output which includes
476
- `organization_id`):
477
-
478
- ```bash
479
- source .env && psql "$SUPABASE_READONLY_URL" -c \
480
- "SELECT id, name, domain FROM acq_companies WHERE organization_id = '<ORG_ID>' AND name ILIKE '%<parsed_name>%' ORDER BY updated_at DESC LIMIT 5;"
481
-
482
- source .env && psql "$SUPABASE_READONLY_URL" -c \
483
- "SELECT d.id, d.contact_email, d.cached_stage, c.name AS company_name
484
- FROM acq_deals d
485
- LEFT JOIN acq_contacts ct ON ct.id = d.contact_id
486
- LEFT JOIN acq_companies c ON c.id = ct.company_id
487
- WHERE d.organization_id = '<ORG_ID>'
488
- AND (d.contact_email ILIKE '%<parsed_name>%' OR c.name ILIKE '%<parsed_name>%')
489
- ORDER BY d.updated_at DESC LIMIT 5;"
490
- ```
491
-
492
- If matches found, ask via `AskUserQuestion`:
493
-
494
- ```
495
- Found matching records. Link this project?
496
- - [Company: Acme Corp (acme.com)]
497
- - [Deal: john@acme.com (closed_won)]
498
- - No linking
499
- ```
500
-
501
- If no matches, skip silently.
502
-
503
- **Step 3: Contract details**
504
-
505
- Ask via `AskUserQuestion`:
506
-
507
- ```
508
- Contract details?
509
- - Options with previews showing common structures:
510
- - "Fixed project" -- one-time fee
511
- - "Monthly retainer" -- recurring
512
- - "Hourly" -- time & materials
513
- - Other
514
- ```
515
-
516
- Then follow up for the value, start date, and target end date. These can be collected in a
517
- single question:
518
-
519
- ```
520
- What's the contract value, start date, and target end date?
521
- (e.g., "$5000, starting today, targeting June 1")
522
- ```
523
-
524
- Parse natural language dates ("today", "next Monday", "June 1") into ISO format.
525
-
526
- **Step 4: Milestone suggestions**
527
-
528
- Based on the project description from Step 1, suggest 3-5 milestones that fit the scope. Use
529
- your understanding of the project to propose relevant phases.
530
-
531
- **Guidelines for milestone suggestions:**
532
-
533
- - For automation/integration projects: Discovery, Implementation, Testing, Launch
534
- - For content/marketing projects: Strategy, Content Creation, Review, Distribution
535
- - For consulting/advisory: Assessment, Recommendations, Implementation Support
536
- - Always include a Discovery/Kickoff phase first and a Launch/Handoff phase last
537
- - Suggest due dates spaced evenly between start and target end date
538
-
539
- Present via `AskUserQuestion` with previews:
540
-
541
- ```
542
- Suggested milestones for "<project name>". Select which to include:
543
- (multiSelect: true)
544
-
545
- - Discovery (due <start + 2 weeks>)
546
- - Implementation (due <midpoint>)
547
- - Testing (due <end - 2 weeks>)
548
- - Launch (due <end date>)
549
- ```
550
-
551
- The user can select which ones to keep, modify via "Other", or skip entirely.
552
-
553
- **Step 5: Kickoff note**
554
-
555
- Ask via `AskUserQuestion`:
556
-
557
- ```
558
- Add a kickoff note? This captures initial context (scope confirmed, key contacts, etc.)
559
- - Yes, let me type one
560
- - Skip for now
561
- ```
562
-
563
- If yes, collect the note content.
564
-
565
- **Step 6: Execute**
566
-
567
- Create everything in sequence using the CLI:
568
-
569
- ```bash
570
- # 1. Create project
571
- # If the user mentioned a client by name, resolve it first:
572
- # pnpm elevasis-sdk client:resolve "<client name>"
573
- # Then pass the name (or UUID) via --client
574
- pnpm elevasis-sdk project:create \
575
- --name "<name>" \
576
- --kind client_engagement \
577
- --status active \
578
- --description "<desc>" \
579
- --client "<client-name-or-uuid>"
580
-
581
- # 2. Create milestones
582
- pnpm elevasis-sdk project:milestone:create \
583
- --project <project-id> \
584
- --name "<milestone-name>" \
585
- --status upcoming \
586
- --due-date <date>
587
-
588
- # 3. Create kickoff note (if provided)
589
- pnpm elevasis-sdk project:note:create \
590
- --project <project-id> \
591
- --content "<note-content>" \
592
- --type call_note
593
- ```
594
-
595
- If `--company` or `--deal` linking was confirmed, use `project:update` after creation:
596
-
597
- ```bash
598
- pnpm elevasis-sdk project:update <project-id> --client "<client-name-or-uuid>"
599
- ```
600
-
601
- To remove a client link later:
602
-
603
- ```bash
604
- pnpm elevasis-sdk project:update <project-id> --clear-client
605
- ```
606
-
607
- Do NOT pass `--client ""` to clear — an empty string is rejected as ambiguous. Use `--clear-client` instead.
608
-
609
- **Step 7: Summary**
610
-
611
- Show the created project:
612
-
613
- ```
614
- Project Created
615
- ===============
616
- Name: Acme Corp Automation
617
- Kind: client_engagement
618
- Status: active
619
- Timeline: 2026-04-07 → 2026-06-01
620
-
621
- Milestones:
622
- 1. Discovery (upcoming, due 2026-04-21)
623
- 2. Implementation (upcoming, due 2026-05-08)
624
- 3. Testing (upcoming, due 2026-05-22)
625
- 4. Launch (upcoming, due 2026-06-01)
626
-
627
- Kickoff Note: Confirmed scope -- lead gen pipeline with email outreach.
628
-
629
- Next: /project status acme
630
- ```
631
-
632
- ---
633
-
634
- ### `add "<name>" [options]` — Quick Create Project (No QnA)
635
-
636
- **Options:**
637
-
638
- - `--status <status>` (default: `active`)
639
- - `--value <number>` — contract value (informational, stored in description or notes)
640
- - `--start <date>` — start date
641
- - `--end <date>` — target end date
642
- - `--description "<text>"` — scope description
643
- - `--kind <kind>` (default: `client_engagement`)
644
-
645
- ```bash
646
- pnpm elevasis-sdk project:create \
647
- --name "<name>" \
648
- --kind client_engagement \
649
- --status active \
650
- --description "<desc>"
651
- ```
652
-
653
- **After creating:** Show the created project and suggest next steps (add milestones).
654
-
655
- ### `update <client> [options]` — Update Project
656
-
657
- **Options:** `--status`, `--name`, `--description`, `--client <id-or-name>`, `--clear-client`, `--client-company-id <uuid>`
658
-
659
- First resolve the client (see Client Inference below), then:
660
-
661
- ```bash
662
- pnpm elevasis-sdk project:update <project-id> --status <status>
663
- ```
664
-
665
- ### `milestone add <client> "<name>" [options]` — Add Milestone
666
-
667
- **Options:**
668
-
669
- - `--status <status>` (default: `upcoming`)
670
- - `--due <date>` — due date (ISO)
671
- - `--description "<text>"`
672
-
673
- ```bash
674
- pnpm elevasis-sdk project:milestone:create \
675
- --project <project-id> \
676
- --name "<name>" \
677
- --status upcoming \
678
- --due-date <date>
679
- ```
680
-
681
- ### `milestone update <client> "<milestone>" [options]` — Update Milestone
682
-
683
- Resolve milestone by name (see Client Inference for project resolution, then use
684
- `project:milestone:list` to find the milestone ID by partial name match):
685
-
686
- ```bash
687
- # List milestones to find ID
688
- pnpm elevasis-sdk project:milestone:list --project <project-id>
689
-
690
- # Update status
691
- pnpm elevasis-sdk project:milestone:update <milestone-id> --status completed
692
-
693
- # Update checklist (full replace)
694
- pnpm elevasis-sdk project:milestone:update <milestone-id> \
695
- --checklist '[{"id":"1","label":"Review scope doc","completed":false}]'
696
- ```
697
-
698
- If status changes to `completed`, the API auto-sets `completed_at`.
699
-
700
- **Options:** `--status`, `--due-date`, `--name`, `--checklist <json>`
701
-
702
- **Checklist mutations:** The CLI performs a full replace. To add, toggle, or remove an item:
703
-
704
- 1. Read the current checklist via psql or `project:milestone:list`
705
- 2. Mutate the array in memory
706
- 3. Write back the full array via `--checklist '<json-array>'`
707
-
708
- ### `checklist <client> "<milestone>"` — View Checklist
709
-
710
- Resolve the milestone, then read its `checklist` JSONB column via read-only psql.
711
-
712
- Note: Requires `SUPABASE_READONLY_URL` in the template `.env`. If not set, advise the user
713
- to view the checklist via the Command Center UI, or add `SUPABASE_READONLY_URL` to `.env`.
714
-
715
- ```bash
716
- source .env && psql "$SUPABASE_READONLY_URL" -c \
717
- "SELECT m.name, m.checklist
718
- FROM prj_milestones m
719
- WHERE m.project_id = '<project_id>' AND m.name ILIKE '%<name>%'
720
- LIMIT 1;"
721
- ```
722
-
723
- The `checklist` column is a JSONB array of objects:
724
-
725
- ```json
726
- [
727
- { "id": "uuid", "label": "Set up dev environment", "completed": true },
728
- { "id": "uuid", "label": "Draft scope document", "completed": false }
729
- ]
730
- ```
731
-
732
- Present as:
733
-
734
- ```
735
- Onboarding & Scope — Checklist (2/3 complete)
736
- [x] Set up dev environment
737
- [x] Schedule kickoff call
738
- [ ] Draft scope document
739
- ```
740
-
741
- ### `task add <client> "<name>" [options]` — Add Task
742
-
743
- > **Milestone linking guidance:** Task creation SHOULD resolve a milestone and pass `--milestone <milestone-id>`. An unmilestoned task is allowed (the CLI warns when `--milestone` is omitted, and the task saves with `milestone_id = null`), but it will appear under an "Unassigned / No milestone" group in the Project view rather than under its phase — so phase-grouped progress views will not reflect it until it is linked. Resolve the milestone first and link on creation whenever possible.
744
-
745
- **Options:**
746
-
747
- - `--milestone "<name>"` — link to a milestone (resolve by name first)
748
- - `--status <status>` (default: `planned`)
749
- - `--type <type>` (default: `other`)
750
- - `--due <date>`
751
- - `--description "<text>"`
752
- - `--checklist <json>` — initial checklist items
753
-
754
- ```bash
755
- # Resolve milestone ID first if --milestone provided
756
- pnpm elevasis-sdk project:milestone:list --project <project-id>
757
-
758
- # Create task
759
- pnpm elevasis-sdk project:task:create \
760
- --project <project-id> \
761
- --title "<name>" \
762
- --status planned \
763
- --type <type> \
764
- --milestone <milestone-id>
765
-
766
- # Create task with initial checklist
767
- pnpm elevasis-sdk project:task:create \
768
- --project <project-id> \
769
- --title "<name>" \
770
- --checklist '[{"id":"1","label":"Review scope doc","completed":false}]'
771
- ```
772
-
773
- ### `task update <client> "<task>" [options]` — Update Task
774
-
775
- Resolve task by name within the project using `project:task:list`, then update by positional ID:
776
-
777
- ```bash
778
- # Find the task ID
779
- pnpm elevasis-sdk project:task:list --project <project-id>
780
-
781
- # Update status (positional <id> comes first, then flags)
782
- pnpm elevasis-sdk project:task:update <task-id> --status <status>
783
-
784
- # Update checklist (full replace)
785
- pnpm elevasis-sdk project:task:update <task-id> \
786
- --checklist '[{"id":"1","label":"Review scope doc","completed":false}]'
787
-
788
- # Clear checklist
789
- pnpm elevasis-sdk project:task:update <task-id> --checklist '[]'
790
- ```
791
-
792
- **Options:** `--status`, `--title`, `--milestone`, `--description`, `--checklist <json>`
793
-
794
- **Important:** The task ID is a **positional argument** — it comes immediately after `project:task:update`, before any flags. There is no `--task-id` flag.
795
-
796
- If status changes to `approved`, the API auto-sets `completed_at`.
797
-
798
- **Checklist mutations:** Same full-replace semantics as milestones. To add, toggle, or remove an item:
799
-
800
- 1. Read the current task via `project:task:get <task-id>`
801
- 2. Mutate the checklist array in memory
802
- 3. Write back the full array via `project:task:update <task-id> --checklist '<json-array>'`
803
-
804
- ### `note <client> "<content>" [options]` — Add Note
805
-
806
- **Options:**
807
-
808
- - `--type <type>` (default: `call_note`) — see Note Type Selection below
809
- - `--task <task-id>` — attach to a specific task (UUID)
810
- - `--milestone <milestone-id>` — attach to a milestone (UUID)
811
-
812
- ```bash
813
- pnpm elevasis-sdk project:note:create \
814
- --project <project-id> \
815
- --content "<content>" \
816
- --type <type>
817
-
818
- # Attach to a task
819
- pnpm elevasis-sdk project:note:create \
820
- --project <project-id> \
821
- --content "<content>" \
822
- --type agent_learning \
823
- --task <task-id>
824
- ```
825
-
826
- ### `notes <client>` — List Notes
827
-
828
- ```bash
829
- pnpm elevasis-sdk project:note:list --project <project-id> --pretty
830
- ```
831
-
832
- ### `delete <client>` — Delete Project
833
-
834
- **ALWAYS confirm before deleting.** Show what will be deleted (milestone count, task count,
835
- note count) using the list commands, then ask for confirmation.
836
-
837
- ```bash
838
- pnpm elevasis-sdk project:delete <project-id>
839
- ```
840
-
841
- Cascade deletes all milestones, tasks, and notes.
842
-
843
- ---
844
-
845
- ## Notes Management
846
-
847
- Notes (`prj_notes`) are the durable record of project-scoped signals — conversation outcomes, blockers, status updates, and agent-captured learnings. They complement `resume_context` (which is task-scoped, temporal, and agent-facing) by providing a human-readable audit trail.
848
-
849
- ### When to Create a Note vs. Fall Through to Global Auto-Memory
850
-
851
- **Create a project note** when all of the following hold:
852
-
853
- - A specific project and (optionally) task is in scope in the current session
854
- - The content is project-bound — it would only matter to someone working on this project
855
- - The content is durable — it should be visible in future status views, not just the current session
856
-
857
- **Fall through to global auto-memory** when:
858
-
859
- - No active project or task can be resolved from session context (see Project-Scope Resolution below)
860
- - The content is cross-project or platform-wide (e.g., a general TypeScript pattern, a reusable workflow insight)
861
- - The signal is ephemeral and not worth a DB write (e.g., "reminder: run linter before committing")
862
-
863
- When in doubt and no project context is resolvable, global auto-memory is the safe default.
864
-
865
- ### Note Type Selection Guide
866
-
867
- | Type | Use when |
868
- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
869
- | `call_note` | Transcribing or summarizing a live client / stakeholder call. Include key decisions and action items. |
870
- | `status_update` | Milestone-level progress worth flagging to a human operator: phase complete, substantial deliverable, direction change. Don't emit one every session turn. |
871
- | `issue` | Bug, regression, unexpected failure, contract mismatch. Include reproduction context. |
872
- | `blocker` | Work cannot proceed without external action: decision needed, credential missing, upstream fix required. |
873
- | `agent_learning` | Project-bound knowledge the agent discovered: API quirks, client conventions, deploy gotchas, rate limits. Captures "things a future agent resuming this project should know" so it travels with the project instead of living only in global auto-memory. |
874
-
875
- ### Project-Scope Resolution
876
-
877
- Before writing a note, the agent resolves which project (and optionally task) to attach it to:
878
-
879
- 1. **Explicit in session** — a project/task UUID was mentioned or returned by a recent `project:work <id>` or `project:task:*` invocation in this session. Use it directly.
880
- 2. **Implicit from task list** — if step 1 yields nothing, run (`--status` accepts one value; run both calls and merge):
881
-
882
- ```bash
883
- pnpm elevasis-sdk project:list --status active --pretty
884
- pnpm elevasis-sdk project:list --status blocked --pretty
885
- pnpm elevasis-sdk project:task:list --project <top-project-id> --status in_progress
886
- ```
887
-
888
- Use the most-recently-touched project's in-progress task if there is exactly one. If multiple in-progress tasks exist, prefer the one that most closely matches the current conversation topic.
889
-
890
- 3. **Prompt the user** — if steps 1 and 2 are both ambiguous or empty, ask once: "Which project should I attach this note to? (project UUID or slug, or 'skip' to use global auto-memory)."
891
-
892
- 4. **Fall through** — if the user says "skip" or no resolution is possible, write to global auto-memory and continue.
893
-
894
- Resolution is **agent-side at call time** — there is no middleware or automatic routing layer. The agent infers context from the session.
895
-
896
- ### Agent Workflow: Capturing an `agent_learning`
897
-
898
- When the agent recognizes a project-scoped learning (an API quirk, an undocumented constraint, a client convention discovered during implementation):
899
-
900
- 1. Recognize the signal — e.g., "Apify actor X rate-limits at 20 rps", "client requires ISO dates, not timestamps", "staging env needs VPN before webhook delivery works"
901
- 2. Resolve active project and task from session context (see above)
902
- 3. Write the note:
903
-
904
- ```bash
905
- pnpm elevasis-sdk project:note:create \
906
- --project <project-id> \
907
- --type agent_learning \
908
- --task <task-id> \
909
- --content "<concise, factual statement of what was learned>"
910
- ```
911
-
912
- Omit `--task` if no specific task is in scope (e.g., the learning is milestone-level or project-level).
913
-
914
- 4. If no project can be resolved, write the learning to global auto-memory instead.
915
-
916
- **Content style for `agent_learning` notes:** write as a factual assertion another agent could act on — "Apify actor X rate-limits at 20 rps; add a 50ms delay between calls" rather than "I noticed that Apify seems slow." Keep it under 200 characters when possible.
917
-
918
- ---
919
-
920
- ## Status Transitions from Other Skills
921
-
922
- The `/project` skill is the canonical reference for how lifecycle signals from other skills map to `project:task:update` status transitions. The behavioral hooks live in the emitting skills; this section documents the contract.
923
-
924
- ### Transition Map
925
-
926
- | Signal | Source skill | Transition | CLI call |
927
- | ---------------------------------------- | -------------- | -------------------------------------- | -------------------------------------------------- |
928
- | Successful `git push` via `/deploy` | `deploy/` | linked task → `submitted` | `project:task:update <task-id> --status submitted` |
929
- | `/save` catches "I'm stuck" / blocker | `save/` | linked task → `blocked` + blocker note | `project:task:update <task-id> --status blocked` |
930
- | User/agent says "I'm done" / "task done" | `/project` NLM | active task → `completed` | `project:task:update <task-id> --status completed` |
931
-
932
- ### "I'm Done" Recognition (Natural Language Mode)
933
-
934
- When the user or agent says any of the following in the context of a project task, treat it as a `completed` transition signal:
935
-
936
- - "I'm done", "I'm finished", "done with this", "that's done"
937
- - "task complete", "task finished", "mark as complete"
938
- - "wrap this up", "close this task", "finalize this"
939
-
940
- Resolve the active task from session context (see Project-Scope Resolution), confirm once ("Mark `<task name>` as completed?"), then fire:
941
-
942
- ```bash
943
- pnpm elevasis-sdk project:task:update <task-id> --status completed
944
- ```
945
-
946
- If no task resolves, ask the user which task to complete rather than silently skipping.
947
-
948
- ### Transition Rules (All Skills)
949
-
950
- These rules apply to every skill that emits a transition:
951
-
952
- - **Explicit task ID only** — use the UUID resolved from session context. Never guess.
953
- - **Best-effort** — if the CLI returns non-2xx, emit a warning line and continue. Do not block the primary operation.
954
- - **Idempotent** — if the task is already in the target status, the update is a no-op. Fire it anyway.
955
- - **Confirm before `completed`** — always ask once before marking a task done, since this is hard to undo semantically.
956
-
957
- For full implementation details, see the emitting skills: `deploy/SKILL.md` (Step 8) and `save/SKILL.md` (Steps 5, 5a).
958
-
959
- ---
960
-
961
- ## Client Inference
962
-
963
- Resolve which project the user means using these rules (in priority order):
964
-
965
- 1. **Exact ID** — if the argument looks like a UUID, use it directly with `project:get`
966
- 2. **Name match** — list projects filtered by `client_engagement` kind, then match by name:
967
- ```bash
968
- pnpm elevasis-sdk project:list --kind client_engagement
969
- ```
970
- Filter results by partial name match against the user's input (case-insensitive).
971
- 3. **Single active project** — if only one non-completed `client_engagement` project exists,
972
- use it without asking
973
- 4. **Context from conversation** — if the conversation has been discussing a specific client,
974
- use that one
975
- 5. **Ambiguous** — if multiple match or none match, list projects and ask
976
-
977
- ---
978
-
979
- ## Natural Language Mode
980
-
981
- When args don't match any command pattern, infer intent from natural language:
982
-
983
- | User says | Inferred operation |
984
- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
985
- | "how's acme doing" | `status acme` |
986
- | "add a note: weekly call, everything on track" | `note <active-project> "weekly call, everything on track"` |
987
- | "mark phase 2 complete for acme" | `milestone update acme "phase 2" --status completed` |
988
- | "approve the API docs task" | `task update <project> "API docs" --status approved` |
989
- | "new client: Beta LLC, $3500/mo, starting may 1" | `add "Beta LLC" --value 3500 --start 2026-05-01` |
990
- | "what's overdue?" | List milestones where `due_date < now() AND status != 'completed'` |
991
- | "block acme, waiting on client credentials" | `update acme --status blocked` |
992
- | "show checklist for phase 2" | Read and display checklist for milestone "phase 2" via psql or `project:milestone:list` |
993
- | "add 'deploy staging' to task X's checklist" | Read task X's checklist → append `{id: uuid, label: "deploy staging", completed: false}` → `project:task:update <id> --checklist '<json-array>'` |
994
- | "mark 'deploy staging' done on task X" | Read task X's checklist → flip `completed` on matching item → `project:task:update <id> --checklist '<json-array>'` |
995
- | "clear the checklist on task X" | `project:task:update <task-id> --checklist '[]'` |
996
- | "add checklist item to onboarding milestone: review scope doc" | Read milestone checklist → append item → `project:milestone:update <id> --checklist '<json-array>'` |
997
- | "I'm done" / "task complete" / "done with this" | Resolve active task → confirm → `project:task:update <task-id> --status completed` |
998
- | "save: Apify actor X rate-limits at 20rps" | Resolve active project/task → `project:note:create --project <id> --type agent_learning --task <task-id> "Apify actor X rate-limits at 20rps"` |
999
- | "remember: client requires ISO dates, not timestamps" | Resolve active project/task → `project:note:create --project <id> --type agent_learning --task <task-id> "client requires ISO dates, not timestamps"` |
1000
-
1001
- **Checklist note:** all checklist mutations use the read-modify-write pattern. The CLI has no item-level flags (`--add-item`, `--toggle`, `--remove-item` do not exist). Always read the current state, mutate the array, then write the full array back. Use bash/PowerShell 7 for generated checklist JSON; Windows PowerShell 5.1 native argument passing is not reliable for inline JSON.
1002
-
1003
- ---
1004
-
1005
- ## Bulk Operations
1006
-
1007
- ### Add Multiple Milestones
1008
-
1009
- For creating a standard milestone set, run `project:milestone:create` in sequence:
1010
-
1011
- ```bash
1012
- for name in "Discovery" "Implementation" "Testing" "Launch"; do
1013
- pnpm elevasis-sdk project:milestone:create \
1014
- --project <project-id> \
1015
- --name "$name" \
1016
- --status upcoming
1017
- done
1018
- ```
1019
-
1020
- ### Overdue Report
1021
-
1022
- Query via read-only psql for milestones past their due date. Requires `SUPABASE_READONLY_URL`
1023
- in the template `.env`. Replace `<ORG_ID>` with the organization ID associated with your
1024
- `ELEVASIS_PLATFORM_KEY` (visible in `project:list` output as `organization_id`). If
1025
- `SUPABASE_READONLY_URL` is not configured, use `project:milestone:list` per project and filter
1026
- manually.
1027
-
1028
- ```bash
1029
- source .env && psql "$SUPABASE_READONLY_URL" -c \
1030
- "SELECT
1031
- p.name AS project,
1032
- m.name AS milestone,
1033
- m.due_date,
1034
- m.status,
1035
- (CURRENT_DATE - m.due_date::date) AS days_overdue
1036
- FROM prj_milestones m
1037
- JOIN prj_projects p ON p.id = m.project_id
1038
- WHERE p.organization_id = '<ORG_ID>'
1039
- AND m.due_date < CURRENT_DATE
1040
- AND m.status NOT IN ('completed')
1041
- ORDER BY m.due_date;"
1042
- ```
1043
-
1044
- ---
1045
-
1046
- ## Client Linking
1047
-
1048
- Projects can be linked to a client in the clients hub. When a user mentions a client by name, resolve it to an ID and use `--client` to wire the project.
1049
-
1050
- ### Two linking flags, two different columns
1051
-
1052
- - `--client <name-or-uuid>` — links to a clients-hub record (`prj_projects.client_id`). Use this for new client linkage. Accepts a name (the CLI fuzzy-resolves it) or a UUID.
1053
- - `--client-company-id <uuid>` — legacy direct-company linkage (`prj_projects.client_company_id`); kept for back-compat. UUID only.
1054
-
1055
- These are independent. Do not use `--client-company-id` when you mean `--client`.
1056
-
1057
- ### When the user mentions a client by name
1058
-
1059
- 1. Resolve the client name to a UUID first (optional but gives an explicit confirmation step):
1060
- ```bash
1061
- pnpm elevasis-sdk client:resolve "Acme"
1062
- ```
1063
- 2. Pass the name or UUID to `--client` — the CLI fuzzy-resolves names automatically:
1064
- ```bash
1065
- pnpm elevasis-sdk project:create --name "Acme Automation" --kind client_engagement --client "Acme"
1066
- pnpm elevasis-sdk project:update <project-id> --client "Acme"
1067
- ```
1068
- 3. If the client name matches multiple records, the CLI returns an error listing candidates. In that case, run `client:resolve "Acme"` to disambiguate, then pass the UUID directly.
1069
-
1070
- ### Filtering projects by client
1071
-
1072
- ```bash
1073
- pnpm elevasis-sdk project:list --client "Acme" --pretty
1074
- ```
1075
-
1076
- ### Removing a client link
1077
-
1078
- ```bash
1079
- pnpm elevasis-sdk project:update <project-id> --clear-client
1080
- ```
1081
-
1082
- `--client` and `--clear-client` are mutually exclusive on the same command call.
1083
-
1084
- ### Soft recommendation for client engagement projects
1085
-
1086
- When the user creates a `client_engagement` project without mentioning a client, gently note that linking a client is recommended so the project appears in client lineage views. Do not block creation — the flag is optional.
1087
-
1088
- ### Client command reference
1089
-
1090
- The full `client:*` surface (list, get, status, resolve) is available via `elevasis-sdk client:*`. The `client:resolve` command mirrors `project:resolve` in shape and is the canonical tool for name-to-ID translation.
1091
-
1092
- ---
1093
-
1094
- ## Safety Rules
1095
-
1096
- 1. **Always confirm deletes** — show what will be cascade-deleted before executing
1097
- 2. **Organization scoping** — all API calls are automatically org-scoped via
1098
- `ELEVASIS_PLATFORM_KEY`; every direct psql query MUST include an `organization_id` filter
1099
- (use `<ORG_ID>` as a placeholder and confirm the value with the user if unknown)
1100
- 3. **Read before write** — when updating, show current state before applying changes
1101
- 4. **Validate status values** — reject invalid status strings before sending to the CLI
1102
- 5. **Kind default** — default to `--kind client_engagement` when user intent is client
1103
- delivery; use `--kind internal` for internal project work
1104
- 6. **Template project assumption** — the template is a single-organization project. All
1105
- `/project` operations operate within the organization scoped by `ELEVASIS_PLATFORM_KEY`.
1106
- There is no cross-org capability.
1107
- 7. **Checklist full-replace** — `--checklist` replaces the entire array. Always read
1108
- the current checklist before writing to avoid losing existing items.
1109
- 8. **Confirm task completion** — always ask once before marking a task `completed` via "I'm done"
1110
- recognition. This status is semantically significant and warrants a confirmation step.
1111
-
1112
- ---
1113
-
1114
- **Last Updated:** 2026-05-08