@elevasis/sdk 1.31.0 → 1.33.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 (26) hide show
  1. package/dist/cli.cjs +526 -225
  2. package/dist/index.d.ts +71 -5
  3. package/dist/node/index.d.ts +65 -2
  4. package/dist/test-utils/index.d.ts +71 -5
  5. package/package.json +3 -3
  6. package/reference/claude-config/Overview.md +123 -0
  7. package/reference/claude-config/registries/skill-coverage.json +19 -0
  8. package/reference/claude-config/skills/client/SKILL.md +201 -0
  9. package/reference/claude-config/skills/elevasis/SKILL.md +244 -235
  10. package/reference/claude-config/skills/om/SKILL.md +56 -5
  11. package/reference/claude-config/skills/om/operations/features.md +12 -5
  12. package/reference/claude-config/skills/om/operations/scaffold.md +10 -0
  13. package/reference/claude-config/skills/setup/SKILL.md +9 -0
  14. package/reference/claude-config/sync-notes/2026-05-30-client-source-and-om-profiles.md +39 -0
  15. package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +27 -0
  16. package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +45 -0
  17. package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +34 -0
  18. package/reference/rules/agent-start-here.md +8 -2
  19. package/reference/rules/organization-os.md +11 -7
  20. package/reference/rules/package-taxonomy.md +4 -0
  21. package/reference/scaffold/recipes/customize-knowledge-browser.md +23 -26
  22. package/reference/scaffold/reference/contracts.md +54 -0
  23. package/reference/scaffold/reference/feature-registry.md +1 -1
  24. package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
  25. package/reference/sdk/cli-management.mdx +2 -2
  26. package/reference/sdk/framework/agent.mdx +1 -1
@@ -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