@elevasis/sdk 1.32.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.32.0",
3
+ "version": "1.33.0",
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.42.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