@elevasis/sdk 1.18.0 → 1.20.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/dist/cli.cjs +1915 -70
- package/dist/index.d.ts +825 -16
- package/dist/index.js +714 -63
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +213 -2
- package/dist/test-utils/index.d.ts +479 -14
- package/dist/test-utils/index.js +660 -54
- package/dist/worker/index.js +516 -54
- package/package.json +4 -4
- package/reference/_navigation.md +2 -1
- package/reference/_reference-manifest.json +14 -0
- package/reference/claude-config/registries/graph-skills.json +4 -0
- package/reference/claude-config/rules/agent-start-here.md +5 -5
- package/reference/claude-config/rules/deployment.md +4 -3
- package/reference/claude-config/rules/frontend.md +2 -2
- package/reference/claude-config/rules/operations.md +17 -13
- package/reference/claude-config/rules/organization-model.md +7 -5
- package/reference/claude-config/rules/organization-os.md +13 -11
- package/reference/claude-config/rules/ui.md +3 -3
- package/reference/claude-config/rules/vibe.md +4 -4
- package/reference/claude-config/skills/explore/SKILL.md +4 -4
- package/reference/claude-config/skills/knowledge/SKILL.md +17 -16
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +7 -7
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +13 -13
- package/reference/claude-config/skills/knowledge/operations/customers.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/goals.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/identity.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/offerings.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/roles.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/techStack.md +19 -91
- package/reference/claude-config/skills/project/SKILL.md +73 -13
- package/reference/claude-config/skills/save/SKILL.md +5 -5
- package/reference/claude-config/skills/tutorial/technical.md +11 -14
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -0
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -0
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -0
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -0
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -0
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -0
- package/reference/examples/organization-model.ts +17 -5
- package/reference/framework/index.mdx +1 -1
- package/reference/framework/project-structure.mdx +10 -8
- package/reference/packages/core/src/business/README.md +2 -2
- package/reference/packages/core/src/organization-model/README.md +10 -3
- package/reference/resources/index.mdx +27 -17
- package/reference/scaffold/core/organization-model.mdx +33 -14
- package/reference/scaffold/operations/workflow-recipes.md +35 -29
- package/reference/scaffold/recipes/add-a-feature.md +18 -3
- package/reference/scaffold/recipes/add-a-resource.md +50 -10
- package/reference/scaffold/recipes/customize-crm-actions.md +12 -6
- package/reference/scaffold/recipes/customize-organization-model.md +18 -3
- package/reference/scaffold/recipes/extend-crm.md +17 -19
- package/reference/scaffold/recipes/extend-lead-gen.md +31 -31
- package/reference/scaffold/recipes/index.md +1 -1
- package/reference/scaffold/reference/contracts.md +512 -307
- package/reference/scaffold/reference/feature-registry.md +1 -1
- package/reference/scaffold/reference/glossary.md +8 -3
- package/reference/scaffold/ui/recipes.md +21 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Codify Pipeline: Level B (New Extension TypeScript Files)
|
|
2
2
|
|
|
3
3
|
Level B is the codify pipeline for changes that require creating a new TypeScript file under
|
|
4
|
-
`
|
|
4
|
+
`core/config/extensions/`. This pipeline is used when the user wants to add a custom
|
|
5
5
|
feature, a custom entity type, or any structural addition that cannot be expressed as a simple
|
|
6
|
-
field override in `
|
|
6
|
+
field override in `core/config/organization-model.ts`.
|
|
7
7
|
|
|
8
8
|
Level B is **only offered when the user explicitly asks** for something that requires a new file.
|
|
9
9
|
Never silently escalate from Level A to Level B. If Level A is sufficient, use it.
|
|
@@ -29,20 +29,20 @@ and for confirming the intent with the user before invoking this pipeline.
|
|
|
29
29
|
|
|
30
30
|
Before any write, read and snapshot:
|
|
31
31
|
|
|
32
|
-
1. `
|
|
32
|
+
1. `core/config/organization-model.ts` (always touched for wiring)
|
|
33
33
|
2. The target extension file path (if it already exists -- confirm overwrite with user)
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
Read("
|
|
37
|
-
Read("
|
|
36
|
+
Read("core/config/organization-model.ts") -- store as ROLLBACK_ADAPTER
|
|
37
|
+
Read("core/config/extensions/{target}.ts") -- store as ROLLBACK_EXTENSION (if exists)
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
The target extension file path follows the naming convention:
|
|
41
|
-
`
|
|
41
|
+
`core/config/extensions/{kebab-case-feature-id}.ts`
|
|
42
42
|
|
|
43
43
|
### Step 2: Scaffold the extension file
|
|
44
44
|
|
|
45
|
-
Create `
|
|
45
|
+
Create `core/config/extensions/{id}.ts` using the Write tool.
|
|
46
46
|
|
|
47
47
|
The file shape depends on the extension type:
|
|
48
48
|
|
|
@@ -51,7 +51,7 @@ The file shape depends on the extension type:
|
|
|
51
51
|
```typescript
|
|
52
52
|
/**
|
|
53
53
|
* {Feature label} feature extension.
|
|
54
|
-
* Registered in
|
|
54
|
+
* Registered in core/config/organization-model.ts.
|
|
55
55
|
*/
|
|
56
56
|
import type { OrganizationModelFeature } from '@elevasis/core/organization-model'
|
|
57
57
|
|
|
@@ -74,7 +74,7 @@ The caller provides the exact field values based on what the user confirmed.
|
|
|
74
74
|
|
|
75
75
|
### Step 3: Wire the extension into the adapter
|
|
76
76
|
|
|
77
|
-
Edit `
|
|
77
|
+
Edit `core/config/organization-model.ts` to:
|
|
78
78
|
|
|
79
79
|
1. Import the new constant from the extension file.
|
|
80
80
|
2. Add it to the `features` array in the `defineOrganizationModel({...})` call.
|
|
@@ -114,7 +114,7 @@ If either check fails, proceed to Step 6 (rollback).
|
|
|
114
114
|
|
|
115
115
|
If Step 4 or Step 5 failed:
|
|
116
116
|
|
|
117
|
-
1. Restore `
|
|
117
|
+
1. Restore `core/config/organization-model.ts` from ROLLBACK_ADAPTER.
|
|
118
118
|
2. If the extension file did not previously exist, delete it. If it previously existed, restore
|
|
119
119
|
from ROLLBACK_EXTENSION.
|
|
120
120
|
3. Re-run `pnpm -C operations check-types` to confirm the restore is clean. If the restore
|
|
@@ -139,7 +139,7 @@ The caller formats and presents the final report to the user.
|
|
|
139
139
|
|
|
140
140
|
Callers must provide before invoking this pipeline:
|
|
141
141
|
|
|
142
|
-
- **Extension file path:** `
|
|
142
|
+
- **Extension file path:** `core/config/extensions/{id}.ts`
|
|
143
143
|
- **Extension file content:** the full TypeScript content for the new file
|
|
144
144
|
- **Adapter changes:** the exact import line and features-array addition to write into the adapter
|
|
145
145
|
- **Confirmed:** the user has already said yes to the proposed change and explicitly requested
|
|
@@ -152,7 +152,7 @@ happen in the domain operation before this pipeline is invoked.
|
|
|
152
152
|
|
|
153
153
|
## Constraint: Extension files are Tier 3 (never synced)
|
|
154
154
|
|
|
155
|
-
Files under `
|
|
155
|
+
Files under `core/config/extensions/` are Tier 3 -- project-specific, never overwritten
|
|
156
156
|
by `/external sync`. This means custom features and entity extensions survive template upgrades
|
|
157
157
|
automatically. Do not put platform-default overrides in extension files; those belong directly in
|
|
158
|
-
`
|
|
158
|
+
`core/config/organization-model.ts` (Tier 2, merge-aware).
|
|
@@ -89,7 +89,7 @@ customers: {
|
|
|
89
89
|
|
|
90
90
|
## Where it lives in the adapter
|
|
91
91
|
|
|
92
|
-
`
|
|
92
|
+
`core/config/organization-model.ts` under the `customers` key of
|
|
93
93
|
`defineOrganizationModel({...})`.
|
|
94
94
|
|
|
95
95
|
To read current segments: open the adapter file and inspect the `customers.segments` array, or
|
|
@@ -98,7 +98,7 @@ goals: {
|
|
|
98
98
|
|
|
99
99
|
## Where it lives in the adapter
|
|
100
100
|
|
|
101
|
-
`
|
|
101
|
+
`core/config/organization-model.ts` under the `goals` key of
|
|
102
102
|
`defineOrganizationModel({...})`.
|
|
103
103
|
|
|
104
104
|
To read current goals: open the adapter file and inspect the `goals.objectives` array, or use
|
|
@@ -74,7 +74,7 @@ identity: {
|
|
|
74
74
|
|
|
75
75
|
## Where it lives in the adapter
|
|
76
76
|
|
|
77
|
-
`
|
|
77
|
+
`core/config/organization-model.ts` under the `identity` key of
|
|
78
78
|
`defineOrganizationModel({...})`.
|
|
79
79
|
|
|
80
80
|
To read the current values: open the adapter file and inspect the `identity` block directly, or
|
|
@@ -88,7 +88,7 @@ offerings: {
|
|
|
88
88
|
|
|
89
89
|
## Where it lives in the adapter
|
|
90
90
|
|
|
91
|
-
`
|
|
91
|
+
`core/config/organization-model.ts` under the `offerings` key of
|
|
92
92
|
`defineOrganizationModel({...})`.
|
|
93
93
|
|
|
94
94
|
To read current products: open the adapter file and inspect the `offerings.products` array, or
|
|
@@ -78,7 +78,7 @@ roles: {
|
|
|
78
78
|
|
|
79
79
|
## Where it lives in the adapter
|
|
80
80
|
|
|
81
|
-
`
|
|
81
|
+
`core/config/organization-model.ts` under the `roles` key of
|
|
82
82
|
`defineOrganizationModel({...})`.
|
|
83
83
|
|
|
84
84
|
To read the current role chart: open the adapter file and inspect the `roles.roles` array, or
|
|
@@ -1,102 +1,30 @@
|
|
|
1
|
-
# TechStack
|
|
1
|
+
# TechStack Context
|
|
2
2
|
|
|
3
|
-
Tech stack information is
|
|
4
|
-
extension field on individual `ResourceMapping` entries in the organization model. This keeps all
|
|
5
|
-
integration metadata co-located with the resource mapping that represents it, while adding fields
|
|
6
|
-
that agents need for cross-integration automation and system-of-record resolution.
|
|
3
|
+
Tech stack information is no longer modeled through `resourceMappings`. Resource identity and governance metadata live in OM Resources descriptors under `organizationModel.resources.entries`; external platform context belongs on the relevant integration descriptor or in project knowledge when the descriptor schema does not expose a dedicated field yet.
|
|
7
4
|
|
|
8
|
-
##
|
|
5
|
+
## Current Resource-Governance Contract
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
- Resource IDs are authored once in `core/config/organization-model.ts`.
|
|
8
|
+
- Runtime workflows, agents, and integrations derive `resourceId` / `type` from OM descriptors during deployment assembly.
|
|
9
|
+
- `DeploymentSpec` remains the runtime/deploy bundle, not an independent identity catalog.
|
|
10
|
+
- `pnpm -C operations check` validates descriptor/code alignment before deploy.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
TechStackEntrySchema = z.object({
|
|
14
|
-
platform: z.string().trim().min(1).max(200),
|
|
15
|
-
purpose: z.string().trim().min(1).max(500),
|
|
16
|
-
credentialStatus: z.enum(['configured', 'pending', 'expired', 'missing']),
|
|
17
|
-
isSystemOfRecord: z.boolean().default(false)
|
|
18
|
-
})
|
|
19
|
-
```
|
|
12
|
+
## Where To Look
|
|
20
13
|
|
|
21
|
-
`
|
|
22
|
-
|
|
14
|
+
- `core/config/organization-model.ts` -- Systems and Resources descriptors.
|
|
15
|
+
- `operations/src/index.ts` -- deployment assembly that binds executable behavior to descriptors.
|
|
16
|
+
- `pnpm elevasis-sdk project:list --pretty` -- live deployed resource surface.
|
|
17
|
+
- Project knowledge nodes -- narrative details such as credential owner, setup notes, and system-of-record rationale when they do not fit the descriptor shape.
|
|
23
18
|
|
|
24
|
-
##
|
|
19
|
+
## Write Path
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
| ------------------ | ------- | ---------------------------------------------------------------------- |
|
|
28
|
-
| `platform` | string | Name of the external platform; e.g. `"HubSpot"`, `"Stripe"`, `"Apify"` |
|
|
29
|
-
| `purpose` | string | Free-form description of what this integration is used for |
|
|
30
|
-
| `credentialStatus` | enum | `configured`, `pending`, `expired`, or `missing` |
|
|
31
|
-
| `isSystemOfRecord` | boolean | `true` if this integration is the authoritative source for its domain |
|
|
21
|
+
When the user wants to document or change integration ownership, credential status, or system-of-record context:
|
|
32
22
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- `isSystemOfRecord` defaults to `false`; only one integration per domain should be `true`,
|
|
38
|
-
though the schema does not enforce uniqueness — agents should surface conflicts
|
|
39
|
-
- `techStack` applies only to resource mappings with `resourceType: 'integration'` or
|
|
40
|
-
`'external'`; adding it to other resource types is valid at schema level but semantically
|
|
41
|
-
incorrect
|
|
42
|
-
|
|
43
|
-
`credentialStatus` semantics:
|
|
44
|
-
|
|
45
|
-
- `configured` -- credential present and active
|
|
46
|
-
- `pending` -- integration planned but not yet set up
|
|
47
|
-
- `expired` -- credential previously configured but has lapsed
|
|
48
|
-
- `missing` -- expected to be configured but not present
|
|
49
|
-
|
|
50
|
-
## Examples
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
// Inside resourceMappings array in defineOrganizationModel({...})
|
|
54
|
-
resourceMappings: [
|
|
55
|
-
{
|
|
56
|
-
id: "rm-hubspot",
|
|
57
|
-
label: "HubSpot CRM Integration",
|
|
58
|
-
resourceType: "integration",
|
|
59
|
-
techStack: {
|
|
60
|
-
platform: "HubSpot",
|
|
61
|
-
purpose: "CRM for contacts, companies, and deal pipeline",
|
|
62
|
-
credentialStatus: "configured",
|
|
63
|
-
isSystemOfRecord: true
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: "rm-apify",
|
|
68
|
-
label: "Apify Web Scraping",
|
|
69
|
-
resourceType: "integration",
|
|
70
|
-
techStack: {
|
|
71
|
-
platform: "Apify",
|
|
72
|
-
purpose: "Web scraping and data extraction for lead enrichment",
|
|
73
|
-
credentialStatus: "pending",
|
|
74
|
-
isSystemOfRecord: false
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Where it lives in the adapter
|
|
81
|
-
|
|
82
|
-
`foundations/config/organization-model.ts` inside the `resourceMappings` array of
|
|
83
|
-
`defineOrganizationModel({...})`. The `techStack` field is set on the matching `ResourceMapping`
|
|
84
|
-
object by `id`.
|
|
85
|
-
|
|
86
|
-
To read current tech stack entries: open the adapter file and inspect the `resourceMappings`
|
|
87
|
-
array, filtering to entries with a `techStack` field, or use
|
|
88
|
-
`pnpm exec elevasis-sdk knowledge:cat techStack` (external project).
|
|
89
|
-
|
|
90
|
-
## Write path
|
|
91
|
-
|
|
92
|
-
To add or update `techStack` metadata on a resource mapping, the `/knowledge` skill runs the
|
|
93
|
-
codify ceremony (`operations/codify-level-a.md`): snapshot → propose → confirm → write →
|
|
94
|
-
typecheck → Zod parse → rollback on failure. Only the targeted `resourceMappings` entry (matched
|
|
95
|
-
by `id`) is modified; all other entries are left unchanged. If the user only wants to update
|
|
96
|
-
`credentialStatus`, a targeted edit to that single field is preferred.
|
|
23
|
+
1. Inspect `core/config/organization-model.ts` for the relevant integration Resource descriptor.
|
|
24
|
+
2. If the descriptor identity, System membership, owner role, or status is wrong, update the descriptor through the `/knowledge` ceremony where possible.
|
|
25
|
+
3. If the requested detail is operational narrative rather than descriptor schema, capture it in a knowledge node or project documentation instead of recreating `resourceMappings`.
|
|
26
|
+
4. Run `pnpm -C operations check` after descriptor or deployment assembly changes.
|
|
97
27
|
|
|
98
28
|
---
|
|
99
29
|
|
|
100
|
-
**Read via `/knowledge`**
|
|
101
|
-
"is HubSpot our system of record for contacts?" route to this domain via the skill's intent
|
|
102
|
-
classifier.
|
|
30
|
+
**Read via `/knowledge`** -- natural-language queries like "what integrations are configured?" or "is HubSpot our system of record for contacts?" route here for inspection and recommendation.
|
|
@@ -41,11 +41,11 @@ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
|
41
41
|
|
|
42
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
43
|
|
|
44
|
-
| Vibe intent
|
|
45
|
-
|
|
46
|
-
| **Capture**
|
|
47
|
-
| **Transition** | "done", "stuck", "blocked", "finished"
|
|
48
|
-
| **Navigate**
|
|
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
49
|
|
|
50
50
|
**The full continuity loop** — how work flows across sessions:
|
|
51
51
|
|
|
@@ -316,7 +316,8 @@ To clear a checklist: `--checklist '[]'`.
|
|
|
316
316
|
- `prj_notes.task_id` → `prj_tasks.id` (SET NULL)
|
|
317
317
|
- `prj_notes.milestone_id` → `prj_milestones.id` (SET NULL)
|
|
318
318
|
- `prj_projects.deal_id` → `acq_deals.id` (SET NULL)
|
|
319
|
-
- `prj_projects.
|
|
319
|
+
- `prj_projects.client_id` → `clients.id` (SET NULL) — clients-hub link; set via `--client`
|
|
320
|
+
- `prj_projects.client_company_id` → `acq_companies.id` (SET NULL) — legacy direct-company link; set via `--client-company-id`
|
|
320
321
|
|
|
321
322
|
---
|
|
322
323
|
|
|
@@ -328,6 +329,9 @@ For a plain project table without resume context or next-action suggestions (use
|
|
|
328
329
|
|
|
329
330
|
```bash
|
|
330
331
|
pnpm elevasis-sdk project:list --kind client_engagement --pretty
|
|
332
|
+
|
|
333
|
+
# Filter by client (accepts the client's name or UUID)
|
|
334
|
+
pnpm elevasis-sdk project:list --client "Acme" --pretty
|
|
331
335
|
```
|
|
332
336
|
|
|
333
337
|
Present as:
|
|
@@ -540,11 +544,15 @@ Create everything in sequence using the CLI:
|
|
|
540
544
|
|
|
541
545
|
```bash
|
|
542
546
|
# 1. Create project
|
|
547
|
+
# If the user mentioned a client by name, resolve it first:
|
|
548
|
+
# pnpm elevasis-sdk client:resolve "<client name>"
|
|
549
|
+
# Then pass the name (or UUID) via --client
|
|
543
550
|
pnpm elevasis-sdk project:create \
|
|
544
551
|
--name "<name>" \
|
|
545
552
|
--kind client_engagement \
|
|
546
553
|
--status active \
|
|
547
|
-
--description "<desc>"
|
|
554
|
+
--description "<desc>" \
|
|
555
|
+
--client "<client-name-or-uuid>"
|
|
548
556
|
|
|
549
557
|
# 2. Create milestones
|
|
550
558
|
pnpm elevasis-sdk project:milestone:create \
|
|
@@ -563,12 +571,16 @@ pnpm elevasis-sdk project:note:create \
|
|
|
563
571
|
If `--company` or `--deal` linking was confirmed, use `project:update` after creation:
|
|
564
572
|
|
|
565
573
|
```bash
|
|
566
|
-
pnpm elevasis-sdk project:update <project-id> --
|
|
574
|
+
pnpm elevasis-sdk project:update <project-id> --client "<client-name-or-uuid>"
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
To remove a client link later:
|
|
578
|
+
|
|
579
|
+
```bash
|
|
580
|
+
pnpm elevasis-sdk project:update <project-id> --clear-client
|
|
567
581
|
```
|
|
568
582
|
|
|
569
|
-
|
|
570
|
-
doesn't expose `--client-company-id` or `--deal-id` directly, document the project ID and
|
|
571
|
-
advise the user to link via the Command Center UI.)
|
|
583
|
+
Do NOT pass `--client ""` to clear — an empty string is rejected as ambiguous. Use `--clear-client` instead.
|
|
572
584
|
|
|
573
585
|
**Step 7: Summary**
|
|
574
586
|
|
|
@@ -618,7 +630,7 @@ pnpm elevasis-sdk project:create \
|
|
|
618
630
|
|
|
619
631
|
### `update <client> [options]` — Update Project
|
|
620
632
|
|
|
621
|
-
**Options:** `--status`, `--name`, `--description
|
|
633
|
+
**Options:** `--status`, `--name`, `--description`, `--client <id-or-name>`, `--clear-client`, `--client-company-id <uuid>`
|
|
622
634
|
|
|
623
635
|
First resolve the client (see Client Inference below), then:
|
|
624
636
|
|
|
@@ -1005,6 +1017,54 @@ source .env && psql "$SUPABASE_READONLY_URL" -c \
|
|
|
1005
1017
|
|
|
1006
1018
|
---
|
|
1007
1019
|
|
|
1020
|
+
## Client Linking
|
|
1021
|
+
|
|
1022
|
+
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.
|
|
1023
|
+
|
|
1024
|
+
### Two linking flags, two different columns
|
|
1025
|
+
|
|
1026
|
+
- `--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.
|
|
1027
|
+
- `--client-company-id <uuid>` — legacy direct-company linkage (`prj_projects.client_company_id`); kept for back-compat. UUID only.
|
|
1028
|
+
|
|
1029
|
+
These are independent. Do not use `--client-company-id` when you mean `--client`.
|
|
1030
|
+
|
|
1031
|
+
### When the user mentions a client by name
|
|
1032
|
+
|
|
1033
|
+
1. Resolve the client name to a UUID first (optional but gives an explicit confirmation step):
|
|
1034
|
+
```bash
|
|
1035
|
+
pnpm elevasis-sdk client:resolve "Acme"
|
|
1036
|
+
```
|
|
1037
|
+
2. Pass the name or UUID to `--client` — the CLI fuzzy-resolves names automatically:
|
|
1038
|
+
```bash
|
|
1039
|
+
pnpm elevasis-sdk project:create --name "Acme Automation" --kind client_engagement --client "Acme"
|
|
1040
|
+
pnpm elevasis-sdk project:update <project-id> --client "Acme"
|
|
1041
|
+
```
|
|
1042
|
+
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.
|
|
1043
|
+
|
|
1044
|
+
### Filtering projects by client
|
|
1045
|
+
|
|
1046
|
+
```bash
|
|
1047
|
+
pnpm elevasis-sdk project:list --client "Acme" --pretty
|
|
1048
|
+
```
|
|
1049
|
+
|
|
1050
|
+
### Removing a client link
|
|
1051
|
+
|
|
1052
|
+
```bash
|
|
1053
|
+
pnpm elevasis-sdk project:update <project-id> --clear-client
|
|
1054
|
+
```
|
|
1055
|
+
|
|
1056
|
+
`--client` and `--clear-client` are mutually exclusive on the same command call.
|
|
1057
|
+
|
|
1058
|
+
### Soft recommendation for client engagement projects
|
|
1059
|
+
|
|
1060
|
+
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.
|
|
1061
|
+
|
|
1062
|
+
### Client command reference
|
|
1063
|
+
|
|
1064
|
+
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.
|
|
1065
|
+
|
|
1066
|
+
---
|
|
1067
|
+
|
|
1008
1068
|
## Safety Rules
|
|
1009
1069
|
|
|
1010
1070
|
1. **Always confirm deletes** — show what will be cascade-deleted before executing
|
|
@@ -1025,4 +1085,4 @@ source .env && psql "$SUPABASE_READONLY_URL" -c \
|
|
|
1025
1085
|
|
|
1026
1086
|
---
|
|
1027
1087
|
|
|
1028
|
-
**Last Updated:** 2026-
|
|
1088
|
+
**Last Updated:** 2026-05-08
|
|
@@ -45,18 +45,18 @@ Review the current conversation to identify:
|
|
|
45
45
|
3. **Stale docs** -- information in existing docs that is now outdated
|
|
46
46
|
4. **Signal events** -- blocker hit, status update worth recording, issue uncovered, call outcome
|
|
47
47
|
5. **OS contract paths touched** -- scan files read/written/edited for any of these signals:
|
|
48
|
-
- `
|
|
49
|
-
- `
|
|
48
|
+
- `core/config/organization-model.ts` -> Foundations layer, Organization Model
|
|
49
|
+
- `core/types/index.ts` -> Foundations layer, Workflow Contracts
|
|
50
50
|
- `ui/src/routes/__root.tsx` -> UI Shell Runtime composition
|
|
51
51
|
- `ui/src/features/**/manifest.ts` or any file defining a `FeatureModule` -> Features layer
|
|
52
|
-
- `operations/src/index.ts` or `operations/elevasis.config.ts` ->
|
|
52
|
+
- `operations/src/index.ts` or `operations/elevasis.config.ts` -> core/Deployment (DeploymentSpec)
|
|
53
53
|
- Any file inside `ui/src/features/<feature>/` combined with manifest, nav, or sidebar changes -> Features + Toolkit layers
|
|
54
54
|
|
|
55
55
|
Record which OS layers were touched: `foundations`, `features`, `shell-runtime`, `toolkit`, `deployment`. If none matched, OS awareness stays dormant for the rest of this run.
|
|
56
56
|
|
|
57
57
|
### Step 3: Update Knowledge Docs
|
|
58
58
|
|
|
59
|
-
Scan for unindexed or stale knowledge docs and draft creates / updates / moves. This template does not have a `docs/` tree — look for any local knowledge files (`.claude/rules/`, `operations/src/README.md`, `
|
|
59
|
+
Scan for unindexed or stale knowledge docs and draft creates / updates / moves. This template does not have a `docs/` tree — look for any local knowledge files (`.claude/rules/`, `operations/src/README.md`, `core/`, or project-specific docs the user has created). All edits are on knowledge/architecture/feature docs -- NOT on task resume state (that flows to the DB in Step 4).
|
|
60
60
|
|
|
61
61
|
Determine what needs to happen:
|
|
62
62
|
|
|
@@ -115,7 +115,7 @@ pnpm elevasis-sdk project:task:save <task-uuid> \
|
|
|
115
115
|
--current-state "<concise prose summary of where we are>" \
|
|
116
116
|
--next-steps "<concise prose of the next concrete action>" \
|
|
117
117
|
--files-modified '["path/one.ts","path/two.tsx"]' \
|
|
118
|
-
--key-docs '["operations/
|
|
118
|
+
--key-docs '["operations/src/foo/index.ts","core/config/organization-model.ts"]' \
|
|
119
119
|
--tools '["project:task:save","project:note:create"]'
|
|
120
120
|
```
|
|
121
121
|
|
|
@@ -570,12 +570,12 @@ the user what happens if they omit the `default` route (runtime failure for unma
|
|
|
570
570
|
|
|
571
571
|
### Item 8: Going to production
|
|
572
572
|
|
|
573
|
-
**Goal:** The user knows the dev/prod split, version bumping flags, and the
|
|
574
|
-
|
|
573
|
+
**Goal:** The user knows the dev/prod split, version bumping flags, and the SDK CLI CWD
|
|
574
|
+
guidance in the deployment rule.
|
|
575
575
|
|
|
576
576
|
**Estimated time:** 15 min
|
|
577
577
|
|
|
578
|
-
**Files referenced:** `.claude/rules/deployment.md
|
|
578
|
+
**Files referenced:** `.claude/rules/deployment.md`
|
|
579
579
|
|
|
580
580
|
**Commands:** `pnpm -C operations deploy:prod`
|
|
581
581
|
|
|
@@ -606,19 +606,17 @@ pnpm elevasis-sdk deploy --prod --major # 1.0.0 -> 2.0.0
|
|
|
606
606
|
Bump rules: `--patch` for bug fixes, `--minor` for new features (no breaking schema changes),
|
|
607
607
|
`--major` for breaking input/output schema changes.
|
|
608
608
|
|
|
609
|
-
**
|
|
609
|
+
**SDK CLI CWD guidance.** Read `.claude/rules/deployment.md`. Two critical rules:
|
|
610
610
|
|
|
611
|
-
1. The `--prod` flag
|
|
611
|
+
1. The `--prod` flag belongs to the `deploy` command:
|
|
612
612
|
|
|
613
613
|
```bash
|
|
614
614
|
# Correct
|
|
615
|
-
pnpm elevasis-sdk --prod deploy
|
|
616
|
-
# Wrong -- --prod after deploy is silently ignored
|
|
617
615
|
pnpm elevasis-sdk deploy --prod
|
|
618
616
|
```
|
|
619
617
|
|
|
620
618
|
The `pnpm -C operations deploy:prod` script in `package.json` handles this correctly.
|
|
621
|
-
Prefer the script over a raw CLI call
|
|
619
|
+
Prefer the script over a raw CLI call for production deploys.
|
|
622
620
|
|
|
623
621
|
2. Never use bare `cd <dir> && elevasis-sdk ...` -- use a subshell `(cd <dir> && ...)` or
|
|
624
622
|
`pnpm -C <dir> ...` to avoid CWD drift that causes env resolution failures.
|
|
@@ -688,7 +686,7 @@ Or target a specific domain:
|
|
|
688
686
|
- `/knowledge offerings` -- products and services with pricing model and segment references
|
|
689
687
|
- `/knowledge roles` -- role chart with responsibilities and reporting lines
|
|
690
688
|
- `/knowledge goals` -- organizational goals with period and measurable outcomes
|
|
691
|
-
- `/knowledge techStack` -- external SaaS integration
|
|
689
|
+
- `/knowledge techStack` -- external SaaS and integration context tied to OM Resources descriptors or knowledge nodes
|
|
692
690
|
|
|
693
691
|
**Demo.** Ask the user to run `/knowledge identity`. Walk through the ceremony together -- read
|
|
694
692
|
the current state, propose an edit, confirm, watch it validate.
|
|
@@ -759,7 +757,7 @@ how to add project-specific metadata fields to base entities.
|
|
|
759
757
|
**Estimated time:** 20 min
|
|
760
758
|
|
|
761
759
|
**Files referenced:** `core/types/entities.ts`, `core/config/organization-model.ts`
|
|
762
|
-
(for the
|
|
760
|
+
(for the OM Resources descriptor context)
|
|
763
761
|
|
|
764
762
|
**Flow:**
|
|
765
763
|
|
|
@@ -955,10 +953,9 @@ await email.send({
|
|
|
955
953
|
})
|
|
956
954
|
```
|
|
957
955
|
|
|
958
|
-
**Real adapter integration.** Read `core/config/organization-model.ts` and find the
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
Use the credential name from there as the constructor argument:
|
|
956
|
+
**Real adapter integration.** Read `core/config/organization-model.ts` and find the relevant
|
|
957
|
+
OM Resources descriptor or project knowledge node for the integration. Use the documented
|
|
958
|
+
credential name as the constructor argument:
|
|
962
959
|
|
|
963
960
|
```typescript
|
|
964
961
|
import { createAttioAdapter } from '@elevasis/sdk/worker'
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# 2026-05-06 -- CRM OM Spine Migration
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
The CRM deal vocabulary (`stage_key`, `state_key`, `pipeline_key`) is now a fully-realized OM Spine matching the lead-gen list-builder pattern. `CRM_PIPELINE_DEFINITION` becomes the single source of truth: `@elevasis/core` derives `CrmStageKeySchema` and `CrmStateKeySchema` from the catalog, the catalog gains optional `color?` metadata on each stage, and `@elevasis/sdk` re-exports both schemas plus the catalog so external SDK consumers see the same vocabulary as monorepo callers. `@elevasis/ui` rewires the CRM page helpers (`DEAL_STAGE_COLORS`, `DEAL_STAGE_OPTIONS`, `formatDealStageLabel`, `formatDealStateLabel`) to read from the catalog instead of hardcoded maps -- public exports are preserved, behavior is now catalog-driven.
|
|
6
|
+
|
|
7
|
+
The platform side also closed a long-standing data drift: `pipeline_key='default'` in `acq_deals` is gone; live writers now use `pipeline_key='crm'` matching the catalog's `pipelineKey: 'crm'`. The Elevasis backfill applied directly to prod and dev on 2026-05-06; tenant deal rows are not affected by that backfill and continue to use whatever value tenant code wrote.
|
|
8
|
+
|
|
9
|
+
## Applies to
|
|
10
|
+
|
|
11
|
+
- All template-derived projects that consume `@elevasis/core`, `@elevasis/ui`, or `@elevasis/sdk`.
|
|
12
|
+
- Projects that customize CRM stages or states in `core/config/organization-model.ts` under the `sales` domain.
|
|
13
|
+
- Projects that read or write CRM transitions through `@elevasis/sdk` worker adapters (`acqDb.transitionDeal`, `acqDb.transitionItem`).
|
|
14
|
+
- Projects that render CRM pipeline UI from `@elevasis/ui/features/crm`.
|
|
15
|
+
|
|
16
|
+
## Required actions
|
|
17
|
+
|
|
18
|
+
1. Pull synced template package baselines through `/git-sync`:
|
|
19
|
+
- `core/package.json`: `@elevasis/core` -> 0.20.0
|
|
20
|
+
- `ui/package.json`: `@elevasis/ui` -> 2.29.0
|
|
21
|
+
- `operations/package.json`: `@elevasis/core` -> 0.20.0 and `@elevasis/sdk` -> 1.19.0
|
|
22
|
+
|
|
23
|
+
2. Run `pnpm install` and rebuild the project:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm install
|
|
27
|
+
pnpm -C ui build
|
|
28
|
+
pnpm -C ui exec tsc --noEmit
|
|
29
|
+
pnpm -C operations exec tsc --noEmit
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. **Optional: adopt `color?` on customized CRM stages.** If `core/config/organization-model.ts` overrides `sales.stages` with custom labels, you may now add an optional `color` field per stage (any Mantine palette key: `blue`, `yellow`, `orange`, `green`, `red`, `grape`, etc.). The shipped `DEAL_STAGE_COLORS` map and CRM kanban UI will read it. Stages without a `color` fall back to the platform default mapping in the catalog.
|
|
33
|
+
|
|
34
|
+
4. **Optional: tighten project-owned CRM workflow inputs.** New schemas are available from `@elevasis/sdk`:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { CrmStageKeySchema, CrmStateKeySchema, CRM_PIPELINE_DEFINITION } from '@elevasis/sdk'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Project-authored CRM action workflows that previously used `z.string()` for `toStage` / `toState` can now validate against the catalog-derived enum. The `transitionItem` / `transitionDeal` worker adapters still accept strings, but unknown stage/state keys are rejected at the platform writer layer for `pipelineKey: 'crm'` writers.
|
|
41
|
+
|
|
42
|
+
5. **No tenant data backfill required.** The `pipeline_key='default'` -> `'crm'` backfill was applied to Elevasis databases only. Tenant `acq_deals` rows are unaffected. If tenant code writes `pipelineKey: 'default'` to `acqDb.transitionDeal`, that behavior is unchanged; only the published catalog declares `'crm'` as canonical and the published schemas validate `'crm'` exclusively for CRM-shaped transitions.
|
|
43
|
+
|
|
44
|
+
## Verification
|
|
45
|
+
|
|
46
|
+
After applying the actions above:
|
|
47
|
+
|
|
48
|
+
- `pnpm -C ui check-types`
|
|
49
|
+
- `pnpm -C ui build`
|
|
50
|
+
- `pnpm -C ui test`
|
|
51
|
+
- `pnpm -C operations check`
|
|
52
|
+
- `pnpm -C operations check-types`
|
|
53
|
+
- `pnpm -C operations test`
|
|
54
|
+
- Browser smoke: open `/crm/pipeline` (or the project's CRM kanban surface) and verify stage labels and column colors render from the catalog. Custom-labeled stages should show the override label; default stages show the platform palette.
|
|
55
|
+
|
|
56
|
+
## Not handled by /git-sync
|
|
57
|
+
|
|
58
|
+
- **Tenant CRM action workflows.** If a project authored its own CRM action workflows in `operations/` that import `transitionDeal` / `syncDealStateKeyToDb` directly (rather than `emitCrmTransition`), `/git-sync` does NOT refactor them. The platform-side `emitCrmTransition` factory is internal to `@repo/elevasis-operations` (workspace-internal) and is not part of the published SDK surface. Project-owned workflows continue to call the worker adapters directly; the new validation guard rejects unknown stage/state keys but does not require migration.
|
|
59
|
+
- **Customized stage colors.** Existing tenant overrides under `sales.stages[].label` and `sales.stages[].states[]` continue to work unchanged. Adopting the new optional `color` field is a project-by-project decision; `/git-sync` will not infer colors for custom stages.
|
|
60
|
+
- **`pipeline_key` data in tenant databases.** If a project has historic `acq_deals` rows with `pipeline_key='default'` and wants to align with the new canonical `'crm'` identity, that is a tenant-managed migration -- not part of this train.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# 2026-05-07 -- SDK Changes Release Train
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
This train coordinates the DTC list-builder overhaul (Apollo/Apify/ClickUp credential plumbing, live build-status panel, useInFlightExecutions hook) and the right-panel reusability refactor (theme tokens, compact chart sizing, plain chat message variant) into one published `@elevasis/core` + `@elevasis/ui` release plus a coordinated SDK resource deploy and external sync.
|
|
6
|
+
|
|
7
|
+
## Applies to
|
|
8
|
+
|
|
9
|
+
- Template-derived projects consuming `@elevasis/core` or `@elevasis/ui`.
|
|
10
|
+
- Projects using the lead-gen list-builder UI (selectors, records views, live status panel) or the shared chat/chart primitives.
|
|
11
|
+
- Projects that mount Command Center-style right-panel composition (only the shared `@elevasis/ui` surfaces moved; the panel host itself stays app-local to Command Center).
|
|
12
|
+
|
|
13
|
+
## Required actions
|
|
14
|
+
|
|
15
|
+
1. Pull the synced template changes through `/git-sync`.
|
|
16
|
+
2. Accept the package baseline bumps published by this train:
|
|
17
|
+
- `core/package.json`: `@elevasis/core` patch bump (Apify/Apollo/ClickUp adapter updates + Apollo `credentialRequirements` on prospecting Steps 1 and 5).
|
|
18
|
+
- `ui/package.json`: `@elevasis/ui` minor bump (additive: `useInFlightExecutions` hook, `useListProgress` accepts `{ enabled, refetchInterval }`, `--right-panel-background` theme token, compact `CombinedTrendChart` sizing, plain `ChatInterface` message variant, card-based `MessageBubble` styling).
|
|
19
|
+
3. If a project pins integration credentials by provider name, verify generic API-key credentials named like `apify`, `apollo`, or `clickup` continue to verify after the adapter alias normalization.
|
|
20
|
+
4. If a project consumed the shared chat/chart primitives, review compact-variant render output against existing layouts.
|
|
21
|
+
|
|
22
|
+
## Verification
|
|
23
|
+
|
|
24
|
+
- `pnpm -C ui check-types`
|
|
25
|
+
- `pnpm -C ui build`
|
|
26
|
+
- `pnpm -C ui test`
|
|
27
|
+
- `pnpm -C operations check`
|
|
28
|
+
- `pnpm -C operations check-types`
|
|
29
|
+
|
|
30
|
+
## Not handled by /git-sync
|
|
31
|
+
|
|
32
|
+
- Project-authored right-panel registries remain project-owned code; the host generalization is app-local to Command Center and does not propagate to template projects.
|
|
33
|
+
- ClickUp List ID destination configuration is per-project and is not synced.
|
|
34
|
+
- The Apollo plan-gated `403 API_INACCESSIBLE` for `mixed_companies/search` is tracked separately in the Elevasis monorepo and is not a tenant migration concern.
|
package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Resource Governance Scaffold Guidance
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
The template guidance now treats OM Resources descriptors as the source of truth for resource identity and governance metadata. Operations code should import descriptors from `core/config/organization-model.ts`, derive runtime `resourceId` / `type` from them, and use `DeploymentSpec` only as the deployment assembly artifact.
|
|
6
|
+
|
|
7
|
+
This also removes stale references to legacy `resourceMappings`, `organization-model.examples.ts`, `foundations/`, and `operations/resources/**` paths in the template agent guidance.
|
|
8
|
+
|
|
9
|
+
## Applies to
|
|
10
|
+
|
|
11
|
+
Template-derived projects that author workflows, agents, integrations, or project-local agent guidance from the SDK scaffold reference.
|
|
12
|
+
|
|
13
|
+
## Required actions
|
|
14
|
+
|
|
15
|
+
- When adding a workflow, agent, or integration, author the descriptor first in `core/config/organization-model.ts` under `resources.entries`.
|
|
16
|
+
- Update operations code to derive deployed runtime IDs from descriptors rather than duplicating raw string IDs.
|
|
17
|
+
- Treat existing `resourceMappings` mentions in project-local notes as stale migration history.
|
|
18
|
+
- Keep runtime invocation calls honest: `/execute`, scheduler targets, and nested execution still call deployed resource IDs.
|
|
19
|
+
|
|
20
|
+
## Verification
|
|
21
|
+
|
|
22
|
+
Run these after reconciling local project guidance or resource authoring:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm -C core test
|
|
26
|
+
pnpm -C operations check
|
|
27
|
+
pnpm -C operations check-types
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For UI surfaces that execute resources, also run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm -C ui check-types
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Not handled by /git-sync
|
|
37
|
+
|
|
38
|
+
`/git-sync` pulls the updated guidance and template-owned files, but it does not rewrite project-owned workflow definitions or decide System ownership for real tenant resources. Maintainers must review existing project resources and migrate any duplicated raw IDs to descriptor-backed authoring intentionally.
|