@elevasis/sdk 1.32.0 → 1.33.1

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 (30) hide show
  1. package/dist/cli.cjs +617 -376
  2. package/dist/index.d.ts +3 -4
  3. package/dist/index.js +15 -3
  4. package/dist/node/index.d.ts +1 -2
  5. package/dist/test-utils/index.d.ts +0 -1
  6. package/dist/test-utils/index.js +14 -2
  7. package/package.json +3 -3
  8. package/reference/claude-config/Overview.md +123 -0
  9. package/reference/claude-config/registries/skill-coverage.json +19 -0
  10. package/reference/claude-config/skills/client/SKILL.md +201 -0
  11. package/reference/claude-config/skills/elevasis/SKILL.md +244 -235
  12. package/reference/claude-config/skills/om/SKILL.md +56 -5
  13. package/reference/claude-config/skills/om/operations/features.md +12 -5
  14. package/reference/claude-config/skills/om/operations/scaffold.md +10 -0
  15. package/reference/claude-config/skills/setup/SKILL.md +9 -0
  16. package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +27 -0
  17. package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +45 -0
  18. package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +34 -0
  19. package/reference/claude-config/sync-notes/2026-06-04-scaffold-registry-lane-severity.md +34 -0
  20. package/reference/rules/agent-start-here.md +8 -2
  21. package/reference/rules/organization-os.md +11 -7
  22. package/reference/rules/package-taxonomy.md +4 -0
  23. package/reference/scaffold/core/organization-graph.mdx +9 -8
  24. package/reference/scaffold/operations/propagation-pipeline.md +13 -9
  25. package/reference/scaffold/operations/scaffold-maintenance.md +8 -7
  26. package/reference/scaffold/recipes/customize-knowledge-browser.md +23 -26
  27. package/reference/scaffold/reference/feature-registry.md +1 -1
  28. package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
  29. package/reference/sdk/cli-management.mdx +2 -2
  30. package/reference/sdk/framework/agent.mdx +1 -1
package/dist/index.d.ts CHANGED
@@ -6728,7 +6728,6 @@ interface SystemEntry {
6728
6728
  status?: 'active' | 'deprecated' | 'archived';
6729
6729
  path?: string;
6730
6730
  icon?: string;
6731
- color?: string;
6732
6731
  uiPosition?: 'sidebar-primary' | 'sidebar-bottom';
6733
6732
  enabled?: boolean;
6734
6733
  devOnly?: boolean;
@@ -12224,7 +12223,7 @@ declare const ResourceOntologyBindingSchema = z
12224
12223
  /**
12225
12224
  * Optional typed contract binding for this resource's workflow I/O.
12226
12225
  * Each ref is a `package/subpath#ExportName` string that resolves to a
12227
- * Zod schema in `@repo/elevasis-core` (or the consumer's equivalent package).
12226
+ * Zod schema in the tenant-owned organization model package.
12228
12227
  *
12229
12228
  * Absence of this field preserves all existing behavior — it is additive + optional.
12230
12229
  * Tier-1 validation (schema.ts): ref-string shape only (browser-safe, no imports).
@@ -12476,7 +12475,7 @@ declare const ActionSchema = z.object({
12476
12475
  })
12477
12476
  type Action = z.infer<typeof ActionSchema>
12478
12477
 
12479
- // CRM stage/state catalogs are model-owned (authored in @repo/elevasis-core
12478
+ // CRM stage/state catalogs are model-owned (authored in the tenant-owned organization model package
12480
12479
  // canonicalOrganizationModel). The published core schema validates only the
12481
12480
  // transport shape; closed-catalog membership is enforced by the caller/API
12482
12481
  // layer via model-injected validators (mirrors LeadGenStageKeySchema).
@@ -12517,7 +12516,7 @@ declare function projectDeploymentSpec(options: ProjectDeploymentSpecOptions): D
12517
12516
  /**
12518
12517
  * Browser-safe generic workflow config helper.
12519
12518
  *
12520
- * Promoted from @repo/elevasis-core so any workflow family (lead-gen, CRM, etc.)
12519
+ * Promoted from the tenant-owned organization model layer so any workflow family (lead-gen, CRM, etc.)
12521
12520
  * can derive resourceId, actions, primaryAction, name, and description from
12522
12521
  * the canonical OM Resource descriptor without duplicating validation logic.
12523
12522
  *
package/dist/index.js CHANGED
@@ -682,8 +682,6 @@ var SystemEntrySchema = z.object({
682
682
  path: PathSchema.optional(),
683
683
  /** @deprecated Use ui.icon. Kept for one-cycle Feature compatibility. */
684
684
  icon: IconNameSchema.optional(),
685
- /** @deprecated Feature color token, retained for one-cycle compatibility. */
686
- color: ColorTokenSchema.optional(),
687
685
  /** @deprecated UI placement hint, retained for one-cycle compatibility. */
688
686
  uiPosition: UiPositionSchema.optional(),
689
687
  /** @deprecated Use lifecycle. */
@@ -779,7 +777,7 @@ var ResourceOntologyBindingSchema = z.object({
779
777
  /**
780
778
  * Optional typed contract binding for this resource's workflow I/O.
781
779
  * Each ref is a `package/subpath#ExportName` string that resolves to a
782
- * Zod schema in `@repo/elevasis-core` (or the consumer's equivalent package).
780
+ * Zod schema in the tenant-owned organization model package.
783
781
  *
784
782
  * Absence of this field preserves all existing behavior — it is additive + optional.
785
783
  * Tier-1 validation (schema.ts): ref-string shape only (browser-safe, no imports).
@@ -2526,6 +2524,20 @@ function validateDeclaredSystemInterfaceReadiness(orgName, organizationModel) {
2526
2524
  for (const { path, system } of listAllSystems(model)) {
2527
2525
  if (system.apiInterface === void 0) continue;
2528
2526
  const interfaceKey = "api";
2527
+ const resourceIds = system.apiInterface.resourceIds ?? [];
2528
+ if (resourceIds.length === 0) {
2529
+ const readinessProfile = system.apiInterface.readinessProfile;
2530
+ if (readinessProfile !== void 0 && !SYSTEM_INTERFACE_PROFILES.some((profile) => profile.readinessProfile === readinessProfile)) {
2531
+ addSystemInterfaceIssue(issues, orgName, path, interfaceKey, {
2532
+ family: "SYSTEM_INTERFACE_INVALID",
2533
+ code: "unknown-readiness-profile",
2534
+ path: `systems.${path}.apiInterface.readinessProfile`,
2535
+ ref: readinessProfile,
2536
+ message: `System Interface "${path}/${interfaceKey}" references unknown readiness profile "${readinessProfile}".`
2537
+ });
2538
+ }
2539
+ continue;
2540
+ }
2529
2541
  const result = computeInterfaceReadiness(model, { systemPath: path, interfaceKey });
2530
2542
  for (const issue of result.issues) {
2531
2543
  addSystemInterfaceIssue(issues, orgName, path, interfaceKey, issue);
@@ -1436,7 +1436,6 @@ interface SystemEntry {
1436
1436
  status?: 'active' | 'deprecated' | 'archived';
1437
1437
  path?: string;
1438
1438
  icon?: string;
1439
- color?: string;
1440
1439
  uiPosition?: 'sidebar-primary' | 'sidebar-bottom';
1441
1440
  enabled?: boolean;
1442
1441
  devOnly?: boolean;
@@ -3222,7 +3221,7 @@ declare const ResourceOntologyBindingSchema = z
3222
3221
  /**
3223
3222
  * Optional typed contract binding for this resource's workflow I/O.
3224
3223
  * Each ref is a `package/subpath#ExportName` string that resolves to a
3225
- * Zod schema in `@repo/elevasis-core` (or the consumer's equivalent package).
3224
+ * Zod schema in the tenant-owned organization model package.
3226
3225
  *
3227
3226
  * Absence of this field preserves all existing behavior — it is additive + optional.
3228
3227
  * Tier-1 validation (schema.ts): ref-string shape only (browser-safe, no imports).
@@ -5923,7 +5923,6 @@ interface SystemEntry {
5923
5923
  status?: 'active' | 'deprecated' | 'archived';
5924
5924
  path?: string;
5925
5925
  icon?: string;
5926
- color?: string;
5927
5926
  uiPosition?: 'sidebar-primary' | 'sidebar-bottom';
5928
5927
  enabled?: boolean;
5929
5928
  devOnly?: boolean;
@@ -8735,8 +8735,6 @@ var SystemEntrySchema = z.object({
8735
8735
  path: PathSchema.optional(),
8736
8736
  /** @deprecated Use ui.icon. Kept for one-cycle Feature compatibility. */
8737
8737
  icon: IconNameSchema.optional(),
8738
- /** @deprecated Feature color token, retained for one-cycle compatibility. */
8739
- color: ColorTokenSchema.optional(),
8740
8738
  /** @deprecated UI placement hint, retained for one-cycle compatibility. */
8741
8739
  uiPosition: UiPositionSchema.optional(),
8742
8740
  /** @deprecated Use lifecycle. */
@@ -9660,6 +9658,20 @@ function validateDeclaredSystemInterfaceReadiness(orgName, organizationModel) {
9660
9658
  for (const { path, system } of listAllSystems(model)) {
9661
9659
  if (system.apiInterface === void 0) continue;
9662
9660
  const interfaceKey = "api";
9661
+ const resourceIds = system.apiInterface.resourceIds ?? [];
9662
+ if (resourceIds.length === 0) {
9663
+ const readinessProfile = system.apiInterface.readinessProfile;
9664
+ if (readinessProfile !== void 0 && !SYSTEM_INTERFACE_PROFILES.some((profile) => profile.readinessProfile === readinessProfile)) {
9665
+ addSystemInterfaceIssue(issues, orgName, path, interfaceKey, {
9666
+ family: "SYSTEM_INTERFACE_INVALID",
9667
+ code: "unknown-readiness-profile",
9668
+ path: `systems.${path}.apiInterface.readinessProfile`,
9669
+ ref: readinessProfile,
9670
+ message: `System Interface "${path}/${interfaceKey}" references unknown readiness profile "${readinessProfile}".`
9671
+ });
9672
+ }
9673
+ continue;
9674
+ }
9663
9675
  const result = computeInterfaceReadiness(model, { systemPath: path, interfaceKey });
9664
9676
  for (const issue of result.issues) {
9665
9677
  addSystemInterfaceIssue(issues, orgName, path, interfaceKey, issue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.32.0",
3
+ "version": "1.33.1",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,13 +58,13 @@
58
58
  "tsup": "^8.0.0",
59
59
  "typescript": "5.9.2",
60
60
  "zod": "^4.1.0",
61
- "@repo/core": "0.41.0",
61
+ "@repo/core": "0.43.0",
62
62
  "@repo/eslint-config": "0.0.0",
63
63
  "@repo/typescript-config": "0.0.0"
64
64
  },
65
65
  "scripts": {
66
66
  "lint": "eslint src --max-warnings 0",
67
- "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --banner:js=\"#!/usr/bin/env node\" && node scripts/copy-reference-docs.mjs && node ../../scripts/monorepo/generate-reference-artifacts.js",
67
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --banner:js=\"#!/usr/bin/env node\" && node scripts/verify-skill-coverage.mjs && node scripts/copy-reference-docs.mjs && node ../../scripts/monorepo/generate-reference-artifacts.js",
68
68
  "type-check": "tsc --noEmit",
69
69
  "check-types": "pnpm type-check",
70
70
  "test": "pnpm build && node ../../scripts/monorepo/validate-reference-artifacts.js && vitest run --config vitest.bundle.config.ts",
@@ -0,0 +1,123 @@
1
+ # Claude Code Configuration Overview
2
+
3
+ Start here when working with the Claude agent scaffold for this project.
4
+ This file is a routing map for the skill and rule inventories. For live CLI capability, run `elevasis-sdk cli`.
5
+
6
+ ---
7
+
8
+ ## What Lives Here
9
+
10
+ | Surface | Purpose | Source of truth |
11
+ | ------- | ----------------------------- | ---------------------------------------------- |
12
+ | Skills | Slash-command entry points | `.claude/skills/*/SKILL.md` |
13
+ | Rules | Path-scoped operating context | `node_modules/@elevasis/sdk/reference/rules/` |
14
+ | Hooks | Claude lifecycle automation | `.claude/hooks/*.mjs`, `.claude/settings.json` |
15
+ | CLI | Live command + domain surface | `elevasis-sdk cli` (authoritative, run it) |
16
+
17
+ For CLI capability, run `elevasis-sdk cli` — it is the authoritative surface for what commands
18
+ and domains are available. For architecture context, read `CLAUDE.md` first.
19
+
20
+ ---
21
+
22
+ ## Operating Model
23
+
24
+ This project is skill-first with an always-on ambient vibe layer:
25
+
26
+ 1. Load `CLAUDE.md` for project rules, stack, and the Ambient Vibe Layer contract.
27
+ 2. Every natural-language message is silently classified into an intent (Capture, Query, Describe,
28
+ Transition, Navigate, Codify, Toggle, Operate) before the agent responds — no slash command needed.
29
+ 3. For explicit work, match intent to a skill in `.claude/skills/{name}/SKILL.md`.
30
+ 4. Load the relevant bundled rule from `node_modules/@elevasis/sdk/reference/rules/` for the area
31
+ being changed (the local `.claude/rules/*.md` files are thin pointers to these).
32
+ 5. Use `elevasis-sdk cli` for the live command/domain surface — do not answer "what can I do" from memory.
33
+
34
+ ---
35
+
36
+ ## Skills
37
+
38
+ **Location:** `.claude/skills/`
39
+
40
+ Skills are the slash-command surface. Each skill is `.claude/skills/{name}/SKILL.md`:
41
+
42
+ <!-- @generated:start:sync-overview-skills -->
43
+ - **client** -- Client portfolio management -- list, resolve, inspect, and maintain client records and their lineage to companies, contacts, and source deals -- via the elevasis-sdk client:* CLI.
44
+ - **deploy** -- Test, build, fix issues, then commit and push
45
+ - **dsp** -- Dispatch subagents in parallel for implementation tasks
46
+ - **elevasis** -- Elevasis platform operations -- check, deploy, execute, inspect, and debug SDK resources
47
+ - **explore** -- Codebase exploration anchored to project documentation
48
+ - **git-sync** -- Pull latest changes, surface new sync notes, install when needed, and run baseline verification without auto-reconciling template drift
49
+ - **om** -- TRIGGER this skill when any of the following apply: - The user references organization-model entities by name or concept: identity, customers, offerings, roles, goals, techStack, systems, actions, labels, knowledge nodes, governance edges, mounts, playbook, outreach cadence, or any domain in the org model. - The user asks to read, list, find, show, query, navigate, describe, codify, add, edit, update, toggle, enable, or disable any organization-model domain or knowledge node. - The user asks "what governs X?", "what does X control?", "system governs", "what is our identity set to?", "what's our timezone?", "show me all reference docs", "list my roles", "where does outreach-cadence apply?", or similar. - An agent is editing files matching: core/config/organization-model.ts, core/config/organization-model/**, or core/config/knowledge/**. SKIP this skill when the task is purely UI layout, workflow authoring, or infrastructure work with no reference to org-model or knowledge-graph entities.
50
+ - **project** -- Portfolio- and project-level work management -- orientation, intent routing, active projects, milestones, tasks, notes, and resume context -- via the elevasis-sdk project:* CLI.
51
+ - **run-ui** -- Start the project's Vite UI dev server on port 4300 in the background, surfacing the URL once it's ready. Detects port conflicts and asks before killing the holder.
52
+ - **save** -- Auto-manage project documentation and persist task resume context from conversation
53
+ - **setup** -- First-time project setup — detect and replace template placeholders, install dependencies, verify build, then hand off to /om for org-model configuration
54
+ - **status** -- Quick project health check
55
+ - **submit-request** -- Submit a structured request report to the Elevasis platform via CLI — enforces pre-analysis before posting
56
+ - **sync** -- Fresh reinstall and cache reset after local dependency or cache drift
57
+ - **tutorial** -- Persona-aware onboarding tutorial that forks into a vibe-coder track (zero technical vocabulary, agent does all the work) or a technical track (full SDK depth, code-first). On first invocation, asks one gate question to determine the user's track and persists the choice to .claude/memory/profile.md. Subsequent invocations skip the question and display the track menu with current progress markers. Supports /tutorial switch (flip track) and /tutorial status (display-only).
58
+ <!-- @generated:end:sync-overview-skills -->
59
+
60
+ ---
61
+
62
+ ## Rules
63
+
64
+ **Location:** `node_modules/@elevasis/sdk/reference/rules/` (bundled with `@elevasis/sdk`)
65
+
66
+ Path-scoped operating context loaded for substantial work in their areas. The project's local
67
+ `.claude/rules/*.md` files are thin compatibility pointers; the authoritative content ships with
68
+ the SDK and is listed here:
69
+
70
+ <!-- @generated:start:sync-overview-rules -->
71
+ - `node_modules/@elevasis/sdk/reference/rules/active-change-index.md` -- Bridge between stable scaffold docs and higher-volatility in-progress architecture work that may override assumptions for agents working in the template
72
+ - `node_modules/@elevasis/sdk/reference/rules/agent-start-here.md` -- Canonical first-read for agents entering the template scaffold -- project continuity, task-class routing, and boundary resolution
73
+ - `node_modules/@elevasis/sdk/reference/rules/deployment.md` -- Deployment workflow -- check-first, dev vs prod, version bumping, common errors
74
+ - `node_modules/@elevasis/sdk/reference/rules/error-handling.md` -- Error handling -- ExecutionError vs PlatformToolError, retry logic, no auto-retry
75
+ - `node_modules/@elevasis/sdk/reference/rules/execution.md` -- Execution model -- timeouts, memory, concurrency, org isolation, runtime constraints
76
+ - `node_modules/@elevasis/sdk/reference/rules/frontend.md` -- Frontend conventions -- React, routing, state, styling, testing, pages
77
+ - `node_modules/@elevasis/sdk/reference/rules/observability.md` -- Observability -- context.logger API, execution inspection, step-level context
78
+ - `node_modules/@elevasis/sdk/reference/rules/operations.md` -- Platform workflows, agents, resource definitions, and deployment for the operations/ surface
79
+ - `node_modules/@elevasis/sdk/reference/rules/organization-model.md` -- Edits to the canonical organization model go through /om
80
+ - `node_modules/@elevasis/sdk/reference/rules/organization-os.md` -- Organization OS orientation -- the semantic contract layer relating Systems, Actions, ontology, resources, policies, roles, goals, and knowledge; consumed via published @elevasis/core / @elevasis/sdk
81
+ - `node_modules/@elevasis/sdk/reference/rules/package-taxonomy.md` -- Package taxonomy (consumer view) -- external projects consume the published @elevasis/* surface only; workspace-internal @repo/elevasis-* packages are not installable here
82
+ - `node_modules/@elevasis/sdk/reference/rules/platform.md` -- Platform conventions -- SDK workflows, agents, deployment, resource registry
83
+ - `node_modules/@elevasis/sdk/reference/rules/shared-types.md` -- Core type boundary -- what belongs in core/types, import rules, schema conventions
84
+ - `node_modules/@elevasis/sdk/reference/rules/task-tracking.md` -- In-progress task conventions -- doc format, status values, auto-save behavior
85
+ - `node_modules/@elevasis/sdk/reference/rules/ui.md` -- UI shell, route structure, auth flow, API access, and template customization points for the ui/ surface
86
+ - `node_modules/@elevasis/sdk/reference/rules/vibe.md` -- Ambient intent classifier -- routes natural-language input to intent buckets without a slash command; Codify and Toggle delegate to /om, Operate delegates to /elevasis
87
+ <!-- @generated:end:sync-overview-rules -->
88
+
89
+ ---
90
+
91
+ ## Skill Boundaries
92
+
93
+ Use the owning skill instead of guessing from the name alone:
94
+
95
+ | Need | Route |
96
+ | -------------------------------------------------------- | ----------------- |
97
+ | SDK operations (check, deploy, exec, inspect, debug) | `/elevasis` |
98
+ | Project and task lifecycle | `/project` |
99
+ | Client portfolio (list, resolve, inspect, maintain) | `/client` |
100
+ | Organization Model read, codify, or governance | `/om` |
101
+ | First-time project setup (placeholder replacement, deps) | `/setup` |
102
+ | Guided onboarding walkthrough | `/tutorial` |
103
+ | Conversation fanout (notes, task save, blockers) | `/save` |
104
+ | Parallel agent dispatch | `/dsp` |
105
+ | Test, build, commit, push | `/deploy` |
106
+ | Codebase exploration | `/explore` |
107
+ | Pull latest, surface sync notes, baseline verify | `/git-sync` |
108
+ | Project health check | `/status` |
109
+ | Submit a request to the Elevasis team | `/submit-request` |
110
+ | Fresh reinstall / cache reset | `/sync` |
111
+ | Start the Vite dev server on port 4300 | `/run-ui` |
112
+
113
+ ---
114
+
115
+ ## Scaffold Maintenance
116
+
117
+ | Action | Command or file |
118
+ | -------------------------------------- | ------------------------------------------- |
119
+ | Refresh the Skills + Rules lists above | `pnpm gen:overview` (run from the monorepo) |
120
+
121
+ The Skills section is generated from `external/_template/.claude/skills/*/SKILL.md` frontmatter, and
122
+ the Rules section from the bundled rule source `packages/sdk/docs/agent-rules/*.md`, both by
123
+ `.claude/_gen/sync-overview.ts`. Do not hand-edit the generated blocks.
@@ -0,0 +1,19 @@
1
+ {
2
+ "skills": {
3
+ "project": { "domains": ["project"] },
4
+ "elevasis": { "domains": ["platform"] },
5
+ "om": { "domains": ["knowledge", "om"] },
6
+ "submit-request": { "domains": ["request"] },
7
+ "client": { "domains": ["client"] }
8
+ },
9
+ "waived": {
10
+ "acquisition": "read-only, surfaced via lead-gen UI",
11
+ "agent": "operator-facing deployed-agent introspection",
12
+ "session": "operator-facing session introspection",
13
+ "queue": "HITL approval queue — surfaced in the UI",
14
+ "schedule": "operator-facing scheduler control",
15
+ "note": "CLI-only in tenant context; /notes is monorepo-internal, not propagated",
16
+ "ui": "infra-only dev toggle (ui:use-local / ui:use-published)",
17
+ "skill": "SDK meta-tooling (skill:scaffold, skill:check-coverage) — developer-facing build utilities, not agent-facing workflow commands"
18
+ }
19
+ }
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: client
3
+ description: "Client portfolio management -- list, resolve, inspect, and maintain client records and their lineage to companies, contacts, and source deals -- via the elevasis-sdk client:* CLI."
4
+ argument-hint: "[list | status | get | resolve | create | update | delete] [args]"
5
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
+ ---
7
+
8
+ # Client Management
9
+
10
+ `/client` is the entrypoint for all client-portfolio work in the template. It covers:
11
+
12
+ - **Portfolio status** -- bare `/client` or `/client status` gives a portfolio-level overview of all clients.
13
+ - **Lookup and resolution** -- `/client <query>` or `/client resolve <query>` resolves a name or search term to a canonical client ID.
14
+ - **Detail and lineage** -- `/client get <id>` returns full client detail including linked companies, contacts, and source deals.
15
+ - **CRUD surface** -- create, update, and delete client records via `elevasis-sdk client:*`.
16
+
17
+ **Usage:**
18
+
19
+ - `/client` / `/client status` -- Portfolio overview (see "Status Mode" below). Wraps `client:status`.
20
+ - `/client list [--search q] [--status s] [--limit n] [--offset n]` -- Paginated client list. Wraps `client:list`.
21
+ - `/client <query>` / `/client resolve <query>` -- Fuzzy-resolve a client by name, UUID, or search string. Wraps `client:resolve`.
22
+ - `/client get <id>` -- Full client detail: name, status, source, linked company, contact, deals. Wraps `client:get`.
23
+ - `/client create --name "..." [options]` -- Create a new client (confirm ceremony). Wraps `client:create`.
24
+ - `/client update <id> [options]` -- Update client fields (confirm ceremony). Wraps `client:update`.
25
+ - `/client delete <id>` -- Delete a client (destructive -- explicit confirmation required). Wraps `client:delete`.
26
+
27
+ ---
28
+
29
+ ## Ambient Vibe Integration
30
+
31
+ `/client` is the landing point for client-scoped vibe intents. Agents arriving from the ambient layer behave identically to a direct invocation.
32
+
33
+ | Vibe intent | What vibe detected | What to do here |
34
+ | -------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
35
+ | **Describe** | "tell me about Acme", "what's the status of this client" | Resolve the client name via `client:resolve`, then run `client:get <id>` and narrate detail + lineage |
36
+ | **Query** | "which clients are active", "list clients", "client status" | Run `client:list [--status s] [--search q]` or `client:status` and present the results |
37
+ | **Navigate** | "focus on Acme", "switch to Acme", "back to Acme" | Resolve via `client:resolve <query>`, update scope to that client, narrate the new context |
38
+ | **Capture** | "add a new client", "create a client for Beta LLC" | Draft fields from the user's message, confirm with user (Capture ceremony), then `client:create` |
39
+ | **Transition** | "update Acme's status", "mark Acme as active" | Confirm the change with user (Transition ceremony), then `client:update <id> --status <new>` |
40
+
41
+ `client:create`, `client:update`, and `client:delete` MUST route through the standard Capture/Transition confirm step before executing. The destructive `client:delete` requires explicit user confirmation (show what will be deleted and ask "Are you sure?" before proceeding).
42
+
43
+ ---
44
+
45
+ ## Prerequisites
46
+
47
+ **Run from the project root** (the directory containing `.elevasis`). Before issuing any other commands, run:
48
+
49
+ ```bash
50
+ pnpm elevasis-sdk doctor
51
+ ```
52
+
53
+ 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), then re-run `doctor` before proceeding.
54
+
55
+ ---
56
+
57
+ ## Invocation Contract
58
+
59
+ All `elevasis-sdk` commands in this skill use the wrapper script form:
60
+
61
+ ```bash
62
+ pnpm elevasis-sdk <subcommand> [flags]
63
+ ```
64
+
65
+ Available from the **project root** -- the directory that contains the `.elevasis` marker file. The long form `pnpm -C operations exec elevasis-sdk <subcommand>` is equivalent.
66
+
67
+ ---
68
+
69
+ ## Status Mode (bare `/client` or `/client status`)
70
+
71
+ When invoked without a subcommand or with `status`, enter **client portfolio mode**: present a high-level overview and offer next actions.
72
+
73
+ ```bash
74
+ pnpm elevasis-sdk client:status --pretty
75
+ ```
76
+
77
+ Present the result as a compact summary: total clients, breakdown by status, and a suggestion of what to do next (e.g. "3 active clients. Inspect one with `/client get <id>` or list all with `/client list`").
78
+
79
+ ---
80
+
81
+ ## Operations
82
+
83
+ ### `list [options]` -- Client List
84
+
85
+ ```bash
86
+ pnpm elevasis-sdk client:list --pretty
87
+
88
+ # Filter by status
89
+ pnpm elevasis-sdk client:list --status active --pretty
90
+
91
+ # Search by name
92
+ pnpm elevasis-sdk client:list --search "Acme" --pretty
93
+
94
+ # Paginate
95
+ pnpm elevasis-sdk client:list --limit 20 --offset 0 --pretty
96
+ ```
97
+
98
+ **Options:** `--status <status>`, `--search <query>`, `--limit <n>`, `--offset <n>`, `--api-url <url>`, `--pretty`
99
+
100
+ Present as a compact table: name, status, source.
101
+
102
+ ### `resolve <query>` -- Name-to-ID Resolution
103
+
104
+ Resolves a name, UUID, or search string to a canonical client record. This is the primary tool for name-to-ID translation before any `get`, `update`, or `delete` call.
105
+
106
+ ```bash
107
+ pnpm elevasis-sdk client:resolve "Acme" --pretty
108
+ ```
109
+
110
+ If multiple candidates match, the CLI returns candidates -- pick the right one and confirm with the user before proceeding. If zero match, surface the error and suggest `client:list --search "<query>"` to browse.
111
+
112
+ ### `get <id>` -- Client Detail and Lineage
113
+
114
+ ```bash
115
+ pnpm elevasis-sdk client:get <id> --pretty
116
+ ```
117
+
118
+ Returns full client detail: name, status, source, source deal, linked primary company, primary contact, and metadata. Narrate the lineage in plain language (e.g. "Acme Corp -- active client, sourced from deal john@acme.com, linked to Acme Corp (acq_companies)").
119
+
120
+ ### `create` -- Create Client (Confirm Ceremony)
121
+
122
+ **Always confirm before creating.** Collect required and optional fields, draft a summary, and ask the user to confirm before executing.
123
+
124
+ **Required:** `--name <name>`
125
+
126
+ **Optional:** `--status <status>`, `--source <source>`, `--source-deal-id <uuid>`, `--primary-company-id <uuid>`, `--primary-contact-id <uuid>`, `--metadata <json>`
127
+
128
+ ```bash
129
+ pnpm elevasis-sdk client:create \
130
+ --name "Acme Corp" \
131
+ --status active \
132
+ --source deal \
133
+ --source-deal-id <deal-uuid> \
134
+ --pretty
135
+ ```
136
+
137
+ After creation, show the new client ID and suggest `/client get <id>` to verify.
138
+
139
+ ### `update <id>` -- Update Client (Confirm Ceremony)
140
+
141
+ **Always confirm before updating.** Show the current state via `client:get <id>`, draft the proposed changes, and ask the user to confirm before executing.
142
+
143
+ **Options:** `--name <name>`, `--status <status>`, `--source <source>`, `--source-deal-id <uuid>`, `--clear-source-deal`, `--primary-company-id <uuid>`, `--clear-primary-company`, `--primary-contact-id <uuid>`, `--clear-primary-contact`, `--metadata <json>`
144
+
145
+ ```bash
146
+ pnpm elevasis-sdk client:update <id> --status active --pretty
147
+ ```
148
+
149
+ To clear a linked field, use the corresponding `--clear-*` flag (e.g. `--clear-source-deal`, `--clear-primary-company`, `--clear-primary-contact`). Do NOT pass an empty string -- it is rejected. Use the clear flag instead.
150
+
151
+ ### `delete <id>` -- Delete Client (Destructive -- Explicit Confirmation Required)
152
+
153
+ **ALWAYS confirm before deleting.** Show the client record first (via `client:get <id>`), then ask the user explicitly: "Delete client `<name>` (`<id>`)? This cannot be undone." Only proceed after an affirmative confirmation.
154
+
155
+ ```bash
156
+ pnpm elevasis-sdk client:delete <id> --pretty
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Client Inference
162
+
163
+ When the user refers to a client by name rather than ID, resolve using these steps (in priority order):
164
+
165
+ 1. **Exact UUID** -- if the argument looks like a UUID, use it directly with `client:get`
166
+ 2. **`client:resolve`** -- run `client:resolve "<name>"` to fuzzy-match by name; use the returned ID
167
+ 3. **`client:list --search`** -- if `resolve` returns no match, search with `client:list --search "<name>"` and present candidates
168
+ 4. **Context from conversation** -- if a specific client was resolved earlier in this session, prefer it
169
+ 5. **Ambiguous** -- if multiple match or none match, show candidates and ask
170
+
171
+ ---
172
+
173
+ ## Natural Language Mode
174
+
175
+ When args do not match any command pattern, infer intent from natural language:
176
+
177
+ | User says | Inferred operation |
178
+ | ------------------------------------------------- | ----------------------------------------------------------- |
179
+ | "show me Acme" | `resolve "Acme"` then `get <id>` |
180
+ | "who are our active clients" | `list --status active --pretty` |
181
+ | "client overview" / "how many clients do we have" | `status --pretty` |
182
+ | "add a new client: Beta LLC" | `create --name "Beta LLC"` (confirm ceremony) |
183
+ | "update Acme to active" | `resolve "Acme"` then `update <id> --status active` |
184
+ | "delete the Gamma client" | `resolve "Gamma"` then `delete <id>` (explicit confirm) |
185
+ | "link Acme to deal <uuid>" | `resolve "Acme"` then `update <id> --source-deal-id <uuid>` |
186
+ | "remove Acme's source deal" | `resolve "Acme"` then `update <id> --clear-source-deal` |
187
+
188
+ ---
189
+
190
+ ## Safety Rules
191
+
192
+ 1. **Always confirm create/update/delete** -- show proposed changes and ask the user before executing any write operation
193
+ 2. **Explicit confirmation for delete** -- `client:delete` is irreversible; require an affirmative "yes" before running
194
+ 3. **Organization scoping** -- all API calls are automatically org-scoped via `ELEVASIS_PLATFORM_KEY`; no `--org` flag is required
195
+ 4. **Read before write** -- when updating, show current state via `client:get` before applying changes
196
+ 5. **Use `--clear-*` flags to unlink** -- never pass empty strings to clear linked fields; use `--clear-source-deal`, `--clear-primary-company`, or `--clear-primary-contact`
197
+ 6. **Template project assumption** -- the template is a single-organization project; all `/client` operations are scoped by `ELEVASIS_PLATFORM_KEY`; there is no cross-org capability
198
+
199
+ ---
200
+
201
+ **Last Updated:** 2026-06-03