@elevasis/sdk 1.37.0 → 1.39.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 (57) hide show
  1. package/dist/cli.cjs +4 -2
  2. package/dist/index.d.ts +32 -0
  3. package/dist/index.js +3 -1
  4. package/dist/node/index.d.ts +20 -0
  5. package/dist/test-utils/index.d.ts +22 -1
  6. package/dist/test-utils/index.js +73 -33
  7. package/dist/types/worker/index.d.ts +2 -1
  8. package/dist/worker/index.js +70 -32
  9. package/package.json +4 -4
  10. package/reference/claude-config/Overview.md +140 -32
  11. package/reference/claude-config/rules/active-change-index.md +13 -2
  12. package/reference/claude-config/rules/agent-start-here.md +13 -2
  13. package/reference/claude-config/rules/deployment.md +13 -2
  14. package/reference/claude-config/rules/error-handling.md +13 -2
  15. package/reference/claude-config/rules/execution.md +13 -2
  16. package/reference/claude-config/rules/frontend.md +13 -2
  17. package/reference/claude-config/rules/observability.md +13 -2
  18. package/reference/claude-config/rules/operations.md +13 -2
  19. package/reference/claude-config/rules/organization-model.md +1 -1
  20. package/reference/claude-config/rules/organization-os.md +1 -1
  21. package/reference/claude-config/rules/package-taxonomy.md +13 -2
  22. package/reference/claude-config/rules/platform.md +13 -2
  23. package/reference/claude-config/rules/shared-types.md +13 -2
  24. package/reference/claude-config/rules/task-tracking.md +13 -2
  25. package/reference/claude-config/rules/topbar-actions.md +2 -2
  26. package/reference/claude-config/rules/ui.md +13 -2
  27. package/reference/claude-config/rules/vibe.md +13 -2
  28. package/reference/claude-config/settings.json +30 -34
  29. package/reference/claude-config/skills/deploy/SKILL.md +159 -156
  30. package/reference/claude-config/skills/elevasis/SKILL.md +11 -4
  31. package/reference/claude-config/skills/explore/SKILL.md +78 -78
  32. package/reference/claude-config/skills/git-sync/SKILL.md +166 -126
  33. package/reference/claude-config/skills/om/SKILL.md +15 -15
  34. package/reference/claude-config/skills/om/operations/build.md +2 -2
  35. package/reference/claude-config/skills/project/SKILL.md +1 -1
  36. package/reference/claude-config/skills/save/SKILL.md +183 -183
  37. package/reference/claude-config/skills/setup/SKILL.md +9 -3
  38. package/reference/claude-config/skills/status/SKILL.md +59 -59
  39. package/reference/claude-config/skills/sync/SKILL.md +47 -47
  40. package/reference/claude-config/skills/tutorial/SKILL.md +1 -1
  41. package/reference/claude-config/skills/tutorial/technical.md +11 -11
  42. package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +52 -0
  43. package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +47 -0
  44. package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +75 -0
  45. package/reference/claude-config/sync-notes/2026-07-23-agent-session-memory.md +49 -0
  46. package/reference/claude-config/sync-notes/2026-07-23-workos-org-marker.md +50 -0
  47. package/reference/rules/active-change-index.md +5 -5
  48. package/reference/rules/agent-start-here.md +34 -30
  49. package/reference/rules/deployment.md +21 -8
  50. package/reference/rules/frontend.md +4 -4
  51. package/reference/rules/observability.md +1 -1
  52. package/reference/rules/organization-model.md +1 -1
  53. package/reference/rules/organization-os.md +29 -29
  54. package/reference/rules/ui.md +205 -202
  55. package/reference/rules/vibe.md +4 -4
  56. package/reference/scaffold/operations/propagation-pipeline.md +1 -1
  57. package/reference/scaffold/recipes/extend-lead-gen.md +13 -0
@@ -1,126 +1,166 @@
1
- ---
2
- name: git-sync
3
- description: Pull latest changes, surface new sync notes, install when needed, and run baseline verification without auto-reconciling template drift
4
- ---
5
-
6
- # Git Sync
7
-
8
- Pull the latest upstream changes for this project, detect any newly introduced template sync notes, install dependencies when the pull changed package baselines, and run the baseline verification flow.
9
-
10
- **Usage:** `/git-sync`
11
-
12
- Use this when:
13
-
14
- - you just pulled a release-train update from the template repo
15
- - the branch may include dependency or scaffold baseline changes
16
- - you want the current sync-note guidance before making any manual reconciliation edits
17
-
18
- This command is intentionally narrower than template reconciliation. It stops after pull, install, verification, and note surfacing. It never auto-overwrites project-owned files.
19
-
20
- ## Sync Notes Contract
21
-
22
- Downstream release guidance lives in `.claude/sync-notes/`.
23
-
24
- - Operative note files are named `YYYY-MM-DD-<slug>.md`
25
- - `README.md` documents the contract and is ignored by note detection
26
- - Notes are append-only release guidance; do not rewrite old note filenames after they ship
27
- - Every operative note uses these exact headings:
28
- - `## Why this note exists`
29
- - `## Applies to`
30
- - `## Required actions`
31
- - `## Verification`
32
- - `## Not handled by /git-sync`
33
-
34
- ## Process
35
-
36
- ### Step 1: Check for Uncommitted Changes
37
-
38
- ```bash
39
- git status --short
40
- ```
41
-
42
- If the worktree is dirty, stop and tell the user to commit, stash, or discard changes first. Do not pull on top of local edits.
43
-
44
- ### Step 2: Snapshot Current Sync Notes
45
-
46
- Capture the current operative note filenames before pulling:
47
-
48
- ```bash
49
- git ls-files ".claude/sync-notes/*.md"
50
- ```
51
-
52
- Ignore `README.md` when building the pre-pull note set.
53
-
54
- ### Step 3: Pull Latest Changes
55
-
56
- ```bash
57
- git pull --rebase
58
- ```
59
-
60
- If the pull conflicts, stop and report the conflict. Do not attempt auto-resolution.
61
-
62
- ### Step 4: Detect Whether Install Is Required
63
-
64
- If the pull changed any dependency baseline files, run a fresh install:
65
-
66
- ```bash
67
- git diff --name-only HEAD@{1} HEAD -- package.json pnpm-lock.yaml pnpm-workspace.yaml ui/package.json operations/package.json shared/package.json
68
- ```
69
-
70
- If the diff is non-empty:
71
-
72
- ```bash
73
- pnpm install
74
- ```
75
-
76
- If none of those files changed, skip install and report that the dependency baseline was unchanged.
77
-
78
- ### Step 5: Run Baseline Verification
79
-
80
- Run the standard project verification flow:
81
-
82
- ```bash
83
- pnpm -C ui check-types
84
- pnpm -C ui build
85
- pnpm -C operations check
86
- pnpm -C operations check-types
87
- ```
88
-
89
- Stop on the first failure and report it clearly.
90
-
91
- ### Step 6: Surface Newly Introduced Sync Notes
92
-
93
- Build the post-pull operative note set and compare it to the pre-pull set. Any newly added note filename is considered unread guidance for this pull.
94
-
95
- When new notes exist:
96
-
97
- - print each new note filename
98
- - summarize the `## Required actions`, `## Verification`, and `## Not handled by /git-sync` sections
99
- - tell the user exactly which manual follow-up remains
100
-
101
- When no new notes exist, say so explicitly.
102
-
103
- ### Step 7: Stop Before Reconciliation
104
-
105
- `/git-sync` ends after pull, optional install, verification, and note surfacing.
106
-
107
- It does **not**:
108
-
109
- - run registry/template reconciliation
110
- - overwrite project-owned files
111
- - resolve downstream migration conflicts
112
- - treat a passing baseline verify as proof that manual follow-up is complete
113
-
114
- If a sync note or the pulled diff requires project-specific changes, leave those as an explicit next step.
115
-
116
- ## Report
117
-
118
- ```text
119
- Git Sync Complete
120
- =================
121
- Git: pulled (<branch>)
122
- Install: ran | skipped (no dependency baseline changes)
123
- Verify: PASS | FAIL at <step>
124
- Sync notes: none | 2026-04-22-example-change.md
125
- Next step: manual reconciliation required | none
126
- ```
1
+ ---
2
+ name: git-sync
3
+ description: Pull latest changes, surface new sync notes, install when needed, and run baseline verification without auto-reconciling template drift
4
+ ---
5
+
6
+ # Git Sync
7
+
8
+ Pull the latest upstream changes for this project, detect any newly introduced template sync notes, install dependencies when the pull changed package baselines, and run the baseline verification flow.
9
+
10
+ **Usage:** `/git-sync`
11
+
12
+ Use this when:
13
+
14
+ - you just pulled a release-train update from the template repo
15
+ - the branch may include dependency or scaffold baseline changes
16
+ - you want the current sync-note guidance before making any manual reconciliation edits
17
+
18
+ This command is intentionally narrower than template reconciliation. It stops after pull, install, verification, and note surfacing. It never auto-overwrites project-owned files.
19
+
20
+ ## Sync Notes Contract
21
+
22
+ Downstream release guidance lives in `.claude/sync-notes/`.
23
+
24
+ - Operative note files are named `YYYY-MM-DD-<slug>.md`
25
+ - `README.md` documents the contract and is ignored by note detection
26
+ - Notes are append-only release guidance; do not rewrite old note filenames after they ship
27
+ - Every operative note uses these exact headings:
28
+ - `## Why this note exists`
29
+ - `## Applies to`
30
+ - `## Required actions`
31
+ - `## Verification`
32
+ - `## Not handled by /git-sync`
33
+
34
+ ## Process
35
+
36
+ ### Step 1: Check for Uncommitted Changes
37
+
38
+ ```bash
39
+ git status --short
40
+ ```
41
+
42
+ If the worktree is dirty, stop and tell the user to commit, stash, or discard changes first. Do not pull on top of local edits.
43
+
44
+ ### Step 2: Snapshot Current Sync Notes
45
+
46
+ Capture the current operative note filenames before pulling:
47
+
48
+ ```bash
49
+ git ls-files ".claude/sync-notes/*.md"
50
+ ```
51
+
52
+ Ignore `README.md` when building the pre-pull note set.
53
+
54
+ ### Step 3: Pull Latest Changes
55
+
56
+ ```bash
57
+ git pull --rebase
58
+ ```
59
+
60
+ If the pull conflicts, stop and report the conflict. Do not attempt auto-resolution.
61
+
62
+ ### Step 4: Detect Whether Install Is Required
63
+
64
+ If the pull changed any dependency baseline files, run a fresh install:
65
+
66
+ ```bash
67
+ git diff --name-only HEAD@{1} HEAD -- package.json pnpm-lock.yaml pnpm-workspace.yaml ui/package.json operations/package.json core/package.json
68
+ ```
69
+
70
+ If the diff is non-empty:
71
+
72
+ ```bash
73
+ pnpm install
74
+ ```
75
+
76
+ If none of those files changed, skip install and report that the dependency baseline was unchanged.
77
+
78
+ ### Step 5: Verify the Installed SDK Bundle
79
+
80
+ Tenant `.claude/` files (skills, rules pointers, sync notes) arrive via this git pull. The canonical rule bodies those pointers resolve to (`operations/node_modules/@elevasis/sdk/reference/rules/*.md`) arrive on a separate channel: the published npm tarball, pulled in by `pnpm install`. These two channels can silently disagree -- a pull can land new `.claude/` pointers aimed at rule files the installed SDK does not have yet. Check for that gap explicitly:
81
+
82
+ 1. **Confirm the bundle exists:**
83
+
84
+ ```bash
85
+ ls operations/node_modules/@elevasis/sdk/package.json
86
+ ```
87
+
88
+ If missing, the SDK is not installed at all -- run `pnpm install` and re-check before continuing.
89
+
90
+ 2. **Read the installed version:**
91
+
92
+ ```bash
93
+ node -p "require('./operations/node_modules/@elevasis/sdk/package.json').version"
94
+ ```
95
+
96
+ 3. **Read the declared range:**
97
+
98
+ ```bash
99
+ node -p "require('./operations/package.json').dependencies['@elevasis/sdk']"
100
+ ```
101
+
102
+ Compare the installed version against the declared semver range (e.g. `^1.37.0`). If the installed version does not satisfy the declared range -- most commonly because it is behind (older than the range allows) -- the lockfile and `node_modules` are out of sync with the manifest.
103
+
104
+ 4. **Confirm the rules bundle is present and non-empty:**
105
+
106
+ ```bash
107
+ ls operations/node_modules/@elevasis/sdk/reference/rules/
108
+ ```
109
+
110
+ An empty or missing directory means the tenant's `.claude/rules/*.md` compatibility pointers have nothing to resolve to, even if the package itself is present.
111
+
112
+ **If the installed version is behind the declared range, or the rules directory is missing/empty:** run `pnpm install`, then repeat steps 1-4 to confirm the gap is closed. Report the before/after versions.
113
+
114
+ **This step reports and stops -- it does not auto-reconcile template drift.** If after a fresh install the installed version still does not satisfy the declared range (e.g. the range itself needs bumping), or the rules directory is still empty, surface that as an explicit manual-reconciliation item in the final report. Do not attempt to hand-edit `operations/package.json` version ranges here.
115
+
116
+ ### Step 6: Run Baseline Verification
117
+
118
+ Run the standard project verification flow:
119
+
120
+ ```bash
121
+ pnpm -C ui check-types
122
+ pnpm -C ui build
123
+ pnpm -C operations check
124
+ pnpm -C operations check-types
125
+ ```
126
+
127
+ Stop on the first failure and report it clearly.
128
+
129
+ ### Step 7: Surface Newly Introduced Sync Notes
130
+
131
+ Build the post-pull operative note set and compare it to the pre-pull set. Any newly added note filename is considered unread guidance for this pull.
132
+
133
+ When new notes exist:
134
+
135
+ - print each new note filename
136
+ - summarize the `## Required actions`, `## Verification`, and `## Not handled by /git-sync` sections
137
+ - tell the user exactly which manual follow-up remains
138
+
139
+ When no new notes exist, say so explicitly.
140
+
141
+ ### Step 8: Stop Before Reconciliation
142
+
143
+ `/git-sync` ends after pull, optional install, verification, and note surfacing.
144
+
145
+ It does **not**:
146
+
147
+ - run registry/template reconciliation
148
+ - overwrite project-owned files
149
+ - resolve downstream migration conflicts
150
+ - treat a passing baseline verify as proof that manual follow-up is complete
151
+
152
+ If a sync note or the pulled diff requires project-specific changes, leave those as an explicit next step.
153
+
154
+ ## Report
155
+
156
+ ```text
157
+ Git Sync Complete
158
+ =================
159
+ Git: pulled (<branch>)
160
+ Install: ran | skipped (no dependency baseline changes)
161
+ SDK bundle: <installed-version> satisfies <declared-range> | BEHIND (installed <x> < declared <y>) | reinstalled -> now satisfies
162
+ Rules bundle: present (<n> files) | MISSING/EMPTY
163
+ Verify: PASS | FAIL at <step>
164
+ Sync notes: none | 2026-04-22-example-change.md
165
+ Next step: manual reconciliation required | none
166
+ ```
@@ -265,18 +265,18 @@ current task makes it relevant.
265
265
  Use this map whenever the task asks what something is, where it lives, what governs it, or
266
266
  what adjacent context may matter:
267
267
 
268
- | Question | Start here | Then inspect |
269
- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
270
- | What Systems exist? | `om:ls /all-systems` | System IDs, parentage, lifecycle, UI metadata, and content |
271
- | What resources exist? | `om:ls /all-resources` | resource ids, kinds, owning System refs |
272
- | What roles exist? | `om:ls /all-roles` | role ids, titles, responsibilities |
273
- | What governs a System? | `om:describe <system-id>` or `om:ls /by-system/<id>` | system entry, governed knowledge, roles, policies, graph `governs` edges |
274
- | What resources belong to a System? | the id-keyed `organizationModel.resources` map and `getResourcesForSystem(model, systemPath)` | use `{ includeDescendants: true }` only for parent-scope rollups |
275
- | What can a System do? | system action refs and the actions domain | `action.resourceId`, invocation metadata, affected entities, policies |
276
- | What data does it own? | entities domain | owning System refs, state catalogs, entity links, emitted/projected events |
277
- | Is a platform API interface ready? | the System's `apiInterface` marker and `node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md` | matching convention-locked System path, cataloged `readinessProfile`, derived resource ontology bindings, and scoped topology grants |
278
- | What UI surface exposes it? | `navigation.sidebar` plus `SystemModule` manifests | route files, surface targets, route-prefix modules, guards |
279
- | What knowledge applies? | `om:ls /by-system/<id>` plus graph edges | `om:cat`, `om:graph`, `/graph/<id>/governed-by` |
268
+ | Question | Start here | Then inspect |
269
+ | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
270
+ | What Systems exist? | `om:ls /all-systems` | System IDs, parentage, lifecycle, UI metadata, and content |
271
+ | What resources exist? | `om:ls /all-resources` | resource ids, kinds, owning System refs |
272
+ | What roles exist? | `om:ls /all-roles` | role ids, titles, responsibilities |
273
+ | What governs a System? | `om:describe <system-id>` or `om:ls /by-system/<id>` | system entry, governed knowledge, roles, policies, graph `governs` edges |
274
+ | What resources belong to a System? | the id-keyed `organizationModel.resources` map and `getResourcesForSystem(model, systemPath)` | use `{ includeDescendants: true }` only for parent-scope rollups |
275
+ | What can a System do? | system action refs and the actions domain | `action.resourceId`, invocation metadata, affected entities, policies |
276
+ | What data does it own? | entities domain | owning System refs, state catalogs, entity links, emitted/projected events |
277
+ | Is a platform API interface ready? | the System's `apiInterface` marker and `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md` | matching convention-locked System path, cataloged `readinessProfile`, derived resource ontology bindings, and scoped topology grants |
278
+ | What UI surface exposes it? | `navigation.sidebar` plus `SystemModule` manifests | route files, surface targets, route-prefix modules, guards |
279
+ | What knowledge applies? | `om:ls /by-system/<id>` plus graph edges | `om:cat`, `om:graph`, `/graph/<id>/governed-by` |
280
280
 
281
281
  Do not treat any one read as a complete system snapshot. The OM is a set of related domain maps;
282
282
  follow the relationship that matches the work. Prefer structured helpers from
@@ -340,7 +340,7 @@ Current template placement convention:
340
340
 
341
341
  `system.apiInterface` is adopt-only in tenant projects. It declares intent to adopt a platform-provided API capability from the installed `@elevasis/core` / `@elevasis/sdk` version; it is not a tenant extension point.
342
342
 
343
- Use only readiness profiles listed in `node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`. The profile also fixes the required System path, such as `sales.lead-gen` or `sales.crm`. Do not invent a profile, and do not repoint a cataloged profile to a custom System path.
343
+ Use only readiness profiles listed in `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`. The profile also fixes the required System path, such as `sales.lead-gen` or `sales.crm`. Do not invent a profile, and do not repoint a cataloged profile to a custom System path.
344
344
 
345
345
  Readiness is derived, not hand-authored. After the marker is present, the validator checks ontology object/catalog types, scoped resources and their `resource.ontology` bindings, and any required scoped topology `uses` grants. Lead-gen to CRM handoff is represented as a scoped topology relationship under the cross-System boundary invariant, not as an authored bridge object.
346
346
 
@@ -356,7 +356,7 @@ When opening a domain that uses a closed stage, status, or catalog vocabulary --
356
356
  prospecting, CRM, outreach, or another pipeline-like domain -- read the scaffold-shipped primer:
357
357
 
358
358
  ```bash
359
- node_modules/@elevasis/sdk/reference/spine/spine-primer.md
359
+ operations/node_modules/@elevasis/sdk/reference/spine/spine-primer.md
360
360
  ```
361
361
 
362
362
  Use it to emit a short domain layering preview before the normal read, describe, or codify flow:
@@ -466,7 +466,7 @@ classification names a specific domain.
466
466
  - `/configure` -- legacy org-model editor (pre-absorption). Absorbed into this skill; all Codify
467
467
  and Toggle intents now route here. `/configure` vocabulary still works as a domain hint
468
468
  (e.g. "configure identity" is parsed as domain=identity, intent=Describe-or-Codify).
469
- - `node_modules/@elevasis/sdk/reference/spine/spine-primer.md` -- scaffold-shipped layering primer
469
+ - `operations/node_modules/@elevasis/sdk/reference/spine/spine-primer.md` -- scaffold-shipped layering primer
470
470
  for stage/status/catalog vocabularies that coordinate business-profile entries, runtime progress,
471
471
  producers, and consumers in tenant projects.
472
472
 
@@ -183,7 +183,7 @@ path to the relevant sidebar section. Validate after the navigation write.
183
183
  `system.apiInterface` is adopt-only in tenant projects. Only add it when the system adopts a
184
184
  platform-provided API capability from the installed `@elevasis/core` / `@elevasis/sdk` version.
185
185
  Use only readiness profiles listed in
186
- `node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`.
186
+ `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/system-interface-capabilities.md`.
187
187
 
188
188
  The profile also fixes the required System path — do not invent a profile or repoint a cataloged
189
189
  profile to a custom path.
@@ -234,4 +234,4 @@ pnpm elevasis-sdk om:scaffold:fill --gaps .elevasis/conformance-gaps.json --dry-
234
234
  - Codify Level-A ceremony: `.claude/skills/om/operations/codify-level-a.md`
235
235
  - Scaffold (guided new entries): `.claude/skills/om/operations/scaffold.md`
236
236
  - API interface readiness: "API Interface Readiness" section in `.claude/skills/om/SKILL.md`
237
- - Platform narrative guide + worked examples: `node_modules/@elevasis/sdk/reference/guides/building-systems.md` (if present)
237
+ - Platform narrative guide + worked examples: `operations/node_modules/@elevasis/sdk/reference/guides/building-systems.md` (if present)
@@ -442,7 +442,7 @@ Footer shape:
442
442
  Related skill bindings
443
443
  - Domain: <domain>
444
444
  - Read or change business profile: /om <domain>
445
- - Layering primer: node_modules/@elevasis/sdk/reference/spine/spine-primer.md
445
+ - Layering primer: operations/node_modules/@elevasis/sdk/reference/spine/spine-primer.md
446
446
  ```
447
447
 
448
448
  External projects do not expose monorepo-only architecture commands. Never suggest `/org-os`,