@elevasis/sdk 1.20.2 → 1.21.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 (58) hide show
  1. package/dist/cli.cjs +3386 -1529
  2. package/dist/index.d.ts +412 -149
  3. package/dist/index.js +955 -721
  4. package/dist/node/index.d.ts +0 -3
  5. package/dist/node/index.js +21 -48
  6. package/dist/test-utils/index.d.ts +395 -128
  7. package/dist/test-utils/index.js +599 -368
  8. package/dist/worker/index.js +536 -323
  9. package/package.json +2 -2
  10. package/reference/_navigation.md +9 -7
  11. package/reference/_reference-manifest.json +1 -1
  12. package/reference/claude-config/rules/agent-start-here.md +4 -0
  13. package/reference/claude-config/rules/frontend.md +2 -2
  14. package/reference/claude-config/rules/organization-model.md +44 -2
  15. package/reference/claude-config/rules/organization-os.md +12 -12
  16. package/reference/claude-config/rules/ui.md +14 -14
  17. package/reference/claude-config/rules/vibe.md +37 -33
  18. package/reference/claude-config/skills/explore/SKILL.md +6 -6
  19. package/reference/claude-config/skills/knowledge/SKILL.md +73 -29
  20. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +1 -1
  21. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +25 -24
  22. package/reference/claude-config/skills/knowledge/operations/features.md +56 -93
  23. package/reference/claude-config/skills/knowledge/operations/labels.md +19 -14
  24. package/reference/claude-config/skills/knowledge/operations/offerings.md +6 -6
  25. package/reference/claude-config/skills/save/SKILL.md +2 -2
  26. package/reference/claude-config/skills/setup/SKILL.md +1 -1
  27. package/reference/claude-config/skills/tutorial/technical.md +23 -26
  28. package/reference/claude-config/skills/tutorial/vibe-coder.md +9 -9
  29. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
  30. package/reference/cli.mdx +140 -0
  31. package/reference/deployment/provided-features.mdx +29 -15
  32. package/reference/examples/organization-model.ts +1 -1
  33. package/reference/packages/core/src/knowledge/README.md +8 -7
  34. package/reference/packages/core/src/organization-model/README.md +66 -26
  35. package/reference/packages/ui/src/provider/README.md +5 -5
  36. package/reference/scaffold/core/organization-graph.mdx +16 -15
  37. package/reference/scaffold/core/organization-model.mdx +89 -41
  38. package/reference/scaffold/index.mdx +9 -9
  39. package/reference/scaffold/operations/propagation-pipeline.md +3 -3
  40. package/reference/scaffold/operations/scaffold-maintenance.md +11 -11
  41. package/reference/scaffold/recipes/add-a-feature.md +26 -24
  42. package/reference/scaffold/recipes/add-a-resource.md +10 -14
  43. package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
  44. package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
  45. package/reference/scaffold/recipes/customize-organization-model.md +72 -44
  46. package/reference/scaffold/recipes/extend-crm.md +40 -39
  47. package/reference/scaffold/recipes/extend-lead-gen.md +15 -16
  48. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +34 -30
  49. package/reference/scaffold/recipes/index.md +13 -12
  50. package/reference/scaffold/recipes/query-the-knowledge-graph.md +200 -0
  51. package/reference/scaffold/reference/contracts.md +362 -99
  52. package/reference/scaffold/reference/feature-registry.md +9 -20
  53. package/reference/scaffold/reference/glossary.md +18 -18
  54. package/reference/scaffold/ui/composition-extensibility.mdx +23 -23
  55. package/reference/scaffold/ui/customization.md +11 -11
  56. package/reference/scaffold/ui/feature-flags-and-gating.md +8 -8
  57. package/reference/scaffold/ui/feature-shell.mdx +19 -19
  58. package/reference/scaffold/ui/recipes.md +29 -28
@@ -48,11 +48,11 @@ Review the current conversation to identify:
48
48
  - `core/config/organization-model.ts` -> Foundations layer, Organization Model
49
49
  - `core/types/index.ts` -> Foundations layer, Workflow Contracts
50
50
  - `ui/src/routes/__root.tsx` -> UI Shell Runtime composition
51
- - `ui/src/features/**/manifest.ts` or any file defining a `FeatureModule` -> Features layer
51
+ - `ui/src/features/**/manifest.ts` or any file defining a `SystemModule` -> Systems layer
52
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
- 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.
55
+ Record which OS layers were touched: `foundations`, `systems`, `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
 
@@ -272,4 +272,4 @@ Running `/setup` more than once is safe:
272
272
  4. Installs dependencies and verifies the build
273
273
  5. Hands off to `/knowledge` for full org-model configuration
274
274
 
275
- `/knowledge` owns all other structural org-model editing (identity fields beyond clientBrief, customers, offerings, roles, goals, techStack, features, labels). It is idempotent, confirm-before-overwrite, and includes a runtime validation gate. Re-run `/knowledge` any time organizational reality changes — no need to re-run `/setup`.
275
+ `/knowledge` owns all other structural org-model editing (identity fields beyond clientBrief, customers, offerings, roles, goals, techStack, systems, actions, labels, and legacy feature compatibility). It is idempotent, confirm-before-overwrite, and includes a runtime validation gate. Re-run `/knowledge` any time organizational reality changes — no need to re-run `/setup`.
@@ -31,7 +31,7 @@ SECTION B -- Build your first thing (5 items)
31
31
  SECTION C -- The Organization Model (3 items)
32
32
  9 /knowledge ceremony -- identity, customers, [ ]
33
33
  offerings via the layered flow
34
- 10 Features and labels [ ]
34
+ 10 Systems, actions, and labels [ ]
35
35
  11 Entity extensions -- BaseProject, BaseDeal [ ]
36
36
 
37
37
  SECTION D -- Modules (load on demand) (6 items)
@@ -103,7 +103,7 @@ every session and uses it to route task classes, resolve boundaries, and choose
103
103
  **SDK reference scaffold.** After `pnpm install`, the entry point
104
104
  `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` gives access to canonical recipes, UI
105
105
  patterns, the gating model, contracts, and a glossary. Whenever the user wants the authoritative
106
- answer on a scaffold surface (how to add a feature, extend an entity, wire a workflow), that
106
+ answer on a scaffold surface (how to add a System or UI feature, extend an entity, wire a workflow), that
107
107
  index is the starting point.
108
108
 
109
109
  **Verification:** Ask the user: "Where does the agent look first when entering a session?" (Answer:
@@ -137,7 +137,7 @@ If the user skips, mark complete and move on.
137
137
  Otherwise, read the Slash Commands table in `CLAUDE.md` aloud. Then explain the skill system:
138
138
 
139
139
  **Invocation pattern.** Every slash command is a skill. Type `/<name>` (optionally with args,
140
- e.g., `/knowledge features`). The agent reads `.claude/skills/<name>/SKILL.md` and follows its
140
+ e.g., `/knowledge systems`). The agent reads `.claude/skills/<name>/SKILL.md` and follows its
141
141
  instructions. Skills may be context-forked (they run in a subagent) or inline. The frontmatter
142
142
  `context: fork` means a subagent handles it.
143
143
 
@@ -219,7 +219,7 @@ never sees the classification.
219
219
  - **Navigate** -- "Let's focus on the onboarding flow." Agent updates scope, narrates the shift.
220
220
  - **Codify** -- "We track deals by Shopify platform." Agent detects new organizational reality
221
221
  and delegates to `/knowledge`.
222
- - **Toggle** -- "Turn on the lead-gen feature." Agent delegates to `/knowledge features`.
222
+ - **Toggle** -- "Turn on the lead-gen system." Agent delegates to `/knowledge systems`.
223
223
 
224
224
  **Important behavioral rules.** Codify and Toggle delegate immediately to `/knowledge` -- the
225
225
  vibe layer detects intent but does NOT run the ceremony itself. The ceremony (snapshot, propose,
@@ -235,7 +235,7 @@ working inside the monorepo (`apps/`, `packages/`, etc.), vibe does not fire.
235
235
  the rule file.
236
236
 
237
237
  **Verification:** Ask "What happens when you type 'turn on SEO'?" Answer: Vibe classifies it as
238
- Toggle intent and delegates to `/knowledge features` without running the ceremony itself.
238
+ Toggle intent and delegates to `/knowledge systems` without running the ceremony itself.
239
239
 
240
240
  **Completion signal:** Mark `[ ] 3 The vibe layer` as `[x] YYYY-MM-DD` in
241
241
  `.claude/memory/tutorial-progress.md`.
@@ -660,7 +660,7 @@ Tell the user:
660
660
  **Why direct edits are blocked.** Read `core/config/organization-model.ts`. The file calls
661
661
  `resolveOrganizationModel()` which runs Zod cross-reference validation: every customer segment
662
662
  referenced in offerings must exist in `customers`, every resource mapping must reference a valid
663
- feature ID, and so on. A direct edit that passes TypeScript can still fail the cross-ref check,
663
+ system ID, and so on. A direct edit that passes TypeScript can still fail the cross-ref check,
664
664
  leaving the project in a broken state. The `/knowledge` ceremony runs both checks and rolls back
665
665
  on failure.
666
666
 
@@ -699,33 +699,31 @@ rollback step exists.
699
699
 
700
700
  ---
701
701
 
702
- ### Item 10: Features and labels
702
+ ### Item 10: Systems, actions, and labels
703
703
 
704
- **Goal:** The user can enable/disable a feature via `/knowledge features` and rename a display
705
- label via `/knowledge labels`.
704
+ **Goal:** The user can enable/disable a System via `/knowledge systems`, understand Actions as
705
+ invokable operations, and rename a display label via `/knowledge labels`.
706
706
 
707
707
  **Estimated time:** 15 min
708
708
 
709
- **Files referenced:** `.claude/skills/knowledge/operations/features.md`,
709
+ **Files referenced:** `.claude/skills/knowledge/operations/features.md` (legacy compatibility),
710
710
  `.claude/skills/knowledge/operations/labels.md`, `core/config/organization-model.ts`
711
711
 
712
712
  **Flow:**
713
713
 
714
- **Features.** The org model has a `features` domain that controls which platform features are
715
- active for this project. Toggle by running:
714
+ **Systems.** The org model uses Systems for availability, routing, ownership, navigation
715
+ grouping, and knowledge mounts. Toggle availability by running:
716
716
 
717
717
  ```
718
- /knowledge features
718
+ /knowledge systems
719
719
  ```
720
720
 
721
721
  The ceremony proposes the change (e.g., `seo: false -> true`), asks for confirmation, writes,
722
- and validates. The TypeScript constant names are stable (`CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`,
723
- `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`,
724
- `SEO_FEATURE_ID`) -- use these constants instead of magic strings when writing workflow code that
725
- references feature IDs.
722
+ and validates. Older scaffold recipes and UI packages may still say "feature"; translate that to
723
+ System when discussing Organization OS availability or routing.
726
724
 
727
- Feature toggles affect the UI shell: a disabled feature removes its nav entry and routes from
728
- the shell. The org model is the single gate for all feature visibility.
725
+ System toggles affect the UI shell: a disabled System removes its nav entry and routes from
726
+ the shell. Actions are the invokable operations owned or exposed by a System.
729
727
 
730
728
  **Labels.** The `labels` domain controls display strings on enum entries -- CRM pipeline stages,
731
729
  lead-gen lifecycle statuses, project statuses, and so on. Rename by running:
@@ -740,11 +738,11 @@ should not change -- it maps to semantic behavior like `blocked`, `in_progress`,
740
738
 
741
739
  Show an example: renaming the `discovery` CRM stage to `qualification`.
742
740
 
743
- **Verification:** Ask: "What is the difference between a feature toggle and a label rename?"
741
+ **Verification:** Ask: "What is the difference between a System toggle and a label rename?"
744
742
  (Toggle controls visibility/routing. Label rename changes display text on an existing enum
745
743
  entry without changing its semantic ID or behavior.)
746
744
 
747
- **Completion signal:** Mark `[ ] 10 Features and labels` as `[x] YYYY-MM-DD` in
745
+ **Completion signal:** Mark `[ ] 10 Systems, actions, and labels` as `[x] YYYY-MM-DD` in
748
746
  `.claude/memory/tutorial-progress.md`.
749
747
 
750
748
  ---
@@ -804,9 +802,8 @@ shape. This ensures the workflow contract stays in sync with the entity definiti
804
802
 
805
803
  **Domain rename note.** In `core/config/organization-model.ts`, the domain config fields were
806
804
  renamed in the 2026-04-20 expansion: `crm` -> `sales`, `leadGen` -> `prospecting`,
807
- `delivery` -> `projects`. The feature ID constants (`CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`,
808
- `PROJECTS_FEATURE_ID`) are unchanged -- use the constants, not the field names, when referencing
809
- features in code.
805
+ `delivery` -> `projects`. Older feature ID constants may still appear in UI package code and
806
+ scaffold recipes; treat them as implementation constants, not live Organization OS primitives.
810
807
 
811
808
  **Verification:** The user can explain when to use Pattern 1 vs Pattern 2 and name two base
812
809
  entity types they could extend.
@@ -1185,7 +1182,7 @@ auto-load). Key files:
1185
1182
  - `agent-start-here.md` -- always-loaded canonical first-read; task-class routing and boundary
1186
1183
  resolution
1187
1184
  - `vibe.md` -- always-loaded ambient intent classifier
1188
- - `organization-os.md` -- loaded when touching org model, feature access, or entity work
1185
+ - `organization-os.md` -- loaded when touching org model, System access, Action routing, or entity work
1189
1186
  - `deployment.md` -- loaded when deploying resources
1190
1187
  - `error-handling.md` -- loaded when authoring handlers with error concerns
1191
1188
  - `execution.md` -- loaded when reasoning about the runtime model
@@ -1294,7 +1291,7 @@ following closing script:
1294
1291
  > LLM integration, error handling, and composition. Start with the domain most relevant to your
1295
1292
  > project and use `/project create` to track the work.
1296
1293
  > - **SDK reference scaffold.** `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` is the
1297
- > canonical recipe index for anything you want to build: adding a feature, extending lead-gen,
1294
+ > canonical recipe index for anything you want to build: adding a System or UI feature, extending lead-gen,
1298
1295
  > customizing CRM actions, authoring agents. Read it whenever you are starting something new.
1299
1296
  > - **Explore the codebase.** `/explore` is your tool for open-ended questions about how things
1300
1297
  > are wired. Use it before making changes in unfamiliar parts of the project.
@@ -197,7 +197,7 @@ Say:
197
197
  Say:
198
198
 
199
199
  > "If you want me to explain what something is or what it does, tell me. 'Tell me about
200
- > the lead follow-up automation.' 'What does the CRM feature do?' 'Where am I in this
200
+ > the lead follow-up automation.' 'What does the CRM system do?' 'Where am I in this
201
201
  > project?' -- those all work. I'll describe it in plain language, not technical terms."
202
202
 
203
203
  ---
@@ -251,8 +251,8 @@ end of the lesson as a follow-up.
251
251
  Say:
252
252
 
253
253
  > "Some things in your setup can be switched on or off. If you don't use a particular
254
- > feature, you can say 'Turn off the SEO tools' and I'll take care of it. Or 'Enable
255
- > the lead-gen feature.' You'll see what's changing and confirm before it's done."
254
+ > system, you can say 'Turn off the SEO tools' and I'll take care of it. Or 'Enable
255
+ > the lead-gen system.' You'll see what's changing and confirm before it's done."
256
256
 
257
257
  ---
258
258
 
@@ -508,10 +508,10 @@ Say:
508
508
 
509
509
  **Step 1 -- Orient to the main sections.**
510
510
 
511
- [Hidden action]: Read `core/config/organization-model.ts` to identify which features
511
+ [Hidden action]: Read `core/config/organization-model.ts` to identify which Systems
512
512
  are enabled, so you can tailor the tour to what's actually visible.
513
513
 
514
- Describe the dashboard in plain terms, based on the features that are on:
514
+ Describe the dashboard in plain terms, based on the Systems that are on:
515
515
 
516
516
  > "When you open your dashboard, you'll see a few main areas. Your automations live
517
517
  > in one section -- that's where you can see which ones are active, when they last
@@ -553,8 +553,8 @@ Describe the dashboard in plain terms, based on the features that are on:
553
553
 
554
554
  ### Hidden actions summary
555
555
 
556
- - Read org model features section to determine which dashboard sections are visible.
557
- - Tailor the tour to only mention visible/enabled features.
556
+ - Read org model Systems section to determine which dashboard sections are visible.
557
+ - Tailor the tour to only mention visible/enabled Systems.
558
558
 
559
559
  ### Completion signal
560
560
 
@@ -712,8 +712,8 @@ ceremony silently. Confirm with the user before writing.
712
712
 
713
713
  **Step 5 -- Teach the toggle pattern.**
714
714
 
715
- > "And if you want to turn a whole feature on or off -- say you're not using the
716
- > lead-gen tools right now -- just tell me: 'Turn off the lead-gen feature for now.'
715
+ > "And if you want to turn a whole system on or off -- say you're not using the
716
+ > lead-gen tools right now -- just tell me: 'Turn off the lead-gen system for now.'
717
717
  > Done. Turn it back on anytime the same way."
718
718
 
719
719
  **Step 6 -- Reassure about iteration.**
@@ -0,0 +1,30 @@
1
+ # SDK Ready Release Train
2
+
3
+ ## Why this note exists
4
+
5
+ This release train carries SDK CLI, Organization OS/Knowledge scaffold, shared UI, and external template guidance changes from the monorepo into template-derived projects. Downstream projects need an operative sync note because the train includes `external/_template/.claude/**`, package baseline cascades, and generated/reference surfaces that are not handled by ordinary git merge alone.
6
+
7
+ ## Applies to
8
+
9
+ - Template-derived external projects, including `external/ZentaraHQ` when its local worktree is ready for reconciliation.
10
+ - Managed Claude skill/rule/registry surfaces under `.claude/**`.
11
+ - Package dependency baselines for `@elevasis/core`, `@elevasis/ui`, and `@elevasis/sdk` after the publish stages complete.
12
+
13
+ ## Required actions
14
+
15
+ - Run the prepared `/external sync --all` scope from `_external-sync-prep.json` after `/sdk ship` completes publish and deploy stages.
16
+ - Preserve project-owned files such as tenant `CLAUDE.md`, operations runtime code, and knowledge nodes unless the sync manifest marks a path as managed.
17
+ - Reconcile dirty tenant worktrees before applying managed `.claude` skill/rule writes.
18
+
19
+ ## Verification
20
+
21
+ - Run the external sync planner/verify flow for each target project before applying writes.
22
+ - Confirm queue, schedule, note, Knowledge, and Organization OS guidance renders in the downstream `.claude` command/skill surfaces.
23
+ - Regenerate downstream knowledge/scaffold artifacts where the sync report requires generated freshness.
24
+
25
+ ## Not handled by /git-sync
26
+
27
+ - Publishing `@elevasis/core`, `@elevasis/ui`, or `@elevasis/sdk`.
28
+ - Deploying the SDK resources bundle.
29
+ - Tenant-specific conflict resolution in dirty external project repositories.
30
+ - Manual review of project-owned `CLAUDE.md`, operations source, and knowledge content.
package/reference/cli.mdx CHANGED
@@ -625,6 +625,146 @@ For exact required flags and accepted enum values, see the command source under
625
625
 
626
626
  ---
627
627
 
628
+ ## elevasis-sdk note:\*
629
+
630
+ `elevasis-sdk note:*` is the agent-facing surface for pushing and reading personal user notes. Workflows and agents use it to surface information -- such as "deal X stalled" or "review run completed" -- directly into a user's Notes panel in the Command Center, without sending an email or notification.
631
+
632
+ Notes are personal to the target user and scoped to the calling organization. The external API surface exposes `GET + POST` only; `note:update` and `note:delete` are not yet available via SDK CLI. Users edit and delete notes through the right-panel view in the Command Center.
633
+
634
+ ### note:create
635
+
636
+ Create a personal note for a user.
637
+
638
+ **Synopsis:**
639
+
640
+ ```
641
+ elevasis-sdk note:create --content <text>
642
+ [--user <email>]
643
+ [--title <text>]
644
+ [--priority low|normal|high|urgent]
645
+ [--pinned]
646
+ [--source <id>]
647
+ [--api-url <url>] [--pretty]
648
+ ```
649
+
650
+ **Flags:**
651
+
652
+ | Flag | Description |
653
+ | ------------------------- | ----------------------------------------------------------------------------------------- |
654
+ | `--content <text>` | Required. The note body text |
655
+ | `--user <email>` | Target user email. Defaults to the API key owner when omitted |
656
+ | `--title <text>` | Optional note title |
657
+ | `--priority <priority>` | Priority level: `low`, `normal` (default), `high`, or `urgent` |
658
+ | `--pinned` | Pin the note to the top of the panel |
659
+ | `--source <id>` | Source identifier -- set this to the workflow or agent ID when calling from agent runtime |
660
+ | `--api-url <url>` | Override the API base URL |
661
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
662
+
663
+ **Behavior:**
664
+
665
+ - Posts to `POST /api/external/user-notes`
666
+ - When `--user` is omitted the note is created for the identity bound to the API key (the caller)
667
+ - When `--user` is provided the platform resolves the email to a Supabase user UUID and verifies the resolved user is an active member of the calling organization before writing
668
+ - The `--source` flag is recorded as the `source` column in `user_notes`; agent runtimes should pass their resource ID here so users can see which workflow created the note
669
+ - Priority `normal` produces no badge in the UI; `high` renders orange, `urgent` renders red, `low` renders dimmed gray
670
+
671
+ **Examples:**
672
+
673
+ ```bash
674
+ # Create a note for the API key owner
675
+ elevasis-sdk note:create --content "Deal X has stalled -- follow up needed"
676
+
677
+ # Create a high-priority pinned note for a specific user
678
+ elevasis-sdk note:create \
679
+ --content "Review run completed for batch_abc123" \
680
+ --user ops@acme.com \
681
+ --priority high \
682
+ --pinned \
683
+ --source "report-review-workflow" \
684
+ --pretty
685
+ ```
686
+
687
+ ```
688
+ Note created
689
+ ID: note_550e8400-...
690
+ Priority: high
691
+ ```
692
+
693
+ ---
694
+
695
+ ### note:list
696
+
697
+ List notes for a user.
698
+
699
+ **Synopsis:**
700
+
701
+ ```
702
+ elevasis-sdk note:list --user <email>
703
+ [--priority <p>] [--pinned]
704
+ [--limit <n>] [--offset <n>]
705
+ [--api-url <url>] [--pretty]
706
+ ```
707
+
708
+ **Flags:**
709
+
710
+ | Flag | Description |
711
+ | ------------------------- | -------------------------------------------------------- |
712
+ | `--user <email>` | Required. The user whose notes to retrieve |
713
+ | `--priority <priority>` | Filter by priority: `low`, `normal`, `high`, or `urgent` |
714
+ | `--pinned` | Return only pinned notes |
715
+ | `--limit <n>` | Maximum number of results to return |
716
+ | `--offset <n>` | Pagination offset |
717
+ | `--api-url <url>` | Override the API base URL |
718
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
719
+
720
+ **Behavior:**
721
+
722
+ - Queries `GET /api/external/user-notes?user_email=<email>`
723
+ - `--user` is required -- the external GET endpoint requires an explicit user target
724
+ - Results are sorted by the platform: pinned first, then by priority (`urgent` > `high` > `normal` > `low`), then by most recently updated
725
+ - Organization scope is derived from the API key -- only notes belonging to users in the calling organization are returned
726
+
727
+ **Examples:**
728
+
729
+ ```bash
730
+ # List all notes for a user
731
+ elevasis-sdk note:list --user ops@acme.com
732
+
733
+ # List only high-priority pinned notes, human-readable
734
+ elevasis-sdk note:list --user ops@acme.com --priority high --pinned --pretty
735
+ ```
736
+
737
+ ```
738
+ Notes (2):
739
+
740
+ (no title) [pinned] [high]
741
+ ID: note_abc001
742
+ Review run completed for batch_abc123
743
+
744
+ Deal X stalled [pinned] [high]
745
+ ID: note_abc002
746
+ Deal X has stalled -- follow up needed
747
+ ```
748
+
749
+ ---
750
+
751
+ ### Shared Flags
752
+
753
+ | Flag | Description |
754
+ | ------------------- | -------------------------------------------------- |
755
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
756
+ | `--api-url <url>` | Override the API base URL |
757
+
758
+ ### Command Boundary
759
+
760
+ - `note:create` and `note:list` operate on the **personal notes** surface -- not project notes. For project-scoped notes use `project:note:*`.
761
+ - `note:update` and `note:delete` are not yet available via SDK CLI. Edit and delete notes using the Notes panel in the Command Center.
762
+ - The Notes panel view (`NotesPanelView`) is registered in the right-panel registry alongside Overview, Recent Executions, and Notifications.
763
+
764
+ **Implementation:** `packages/sdk/src/cli/commands/notes.ts` -- delegates to `POST /api/external/user-notes` and `GET /api/external/user-notes`
765
+
766
+ ---
767
+
628
768
  ## elevasis-sdk ui:use-local / ui:use-published
629
769
 
630
770
  Switch the `@elevasis/ui` dependency in an external project between a local tarball build and the published npm package.
@@ -4,15 +4,15 @@ description: Shared UI and API surfaces for packaged business systems like Lead
4
4
  loadWhen: "Building against packaged app features, list-oriented lead gen, CRM, or project-management surfaces"
5
5
  ---
6
6
 
7
- The SDK includes more than workflow execution. The published `@elevasis/ui` package provides feature manifests, pages, hooks, and headless provider exports for building shell-aware applications.
7
+ The SDK includes more than workflow execution. The published `@elevasis/ui` package provides system manifests, pages, hooks, and headless provider exports for building shell-aware applications.
8
8
 
9
9
  ## Shared Shell Contract
10
10
 
11
- `ElevasisFeaturesProvider` reads a flat `OrganizationModel.features` list and exposes a shell model with feature-tree helpers. Feature manifests provide implementation hooks such as icons and sidebars; they do not own structural navigation.
11
+ `ElevasisSystemsProvider` reads the canonical `OrganizationModel`, including `navigation.sidebar`, and exposes a shell model plus sidebar projection helpers. System manifests provide implementation hooks such as icons and subshell sidebars; they do not own structural navigation.
12
12
 
13
13
  ```tsx
14
14
  import { Outlet } from '@tanstack/react-router'
15
- import { ElevasisFeaturesProvider, FeatureShell } from '@elevasis/ui/provider'
15
+ import { ElevasisSystemsProvider, FeatureShell } from '@elevasis/ui/provider'
16
16
  import { leadGenManifest } from '@elevasis/ui/features/lead-gen'
17
17
  import { crmManifest } from '@elevasis/ui/features/crm'
18
18
  import { deliveryManifest } from '@elevasis/ui/features/delivery'
@@ -30,11 +30,11 @@ const features = [
30
30
 
31
31
  export function AppShell() {
32
32
  return (
33
- <ElevasisFeaturesProvider features={features} organizationModel={canonicalOrganizationModel}>
33
+ <ElevasisSystemsProvider systems={features} organizationModel={canonicalOrganizationModel}>
34
34
  <FeatureShell>
35
35
  <Outlet />
36
36
  </FeatureShell>
37
- </ElevasisFeaturesProvider>
37
+ </ElevasisSystemsProvider>
38
38
  )
39
39
  }
40
40
  ```
@@ -47,7 +47,7 @@ Host apps still own TanStack route registration, topbar behavior, branding, auth
47
47
  | --- | --- | --- |
48
48
  | Manifest-backed shared subshell features | Feature manifest plus shared sidebar/pages, mounted through `@elevasis/ui/provider` | Lead Gen, CRM, Projects, Operations |
49
49
  | Shared feature pages and hooks | Pages, hooks, and helpers that can be composed inside host routes | Monitoring, Settings, Dashboard widgets |
50
- | Headless provider contract | Provider, hooks, and shell model helpers | `ElevasisFeaturesProvider`, `useElevasisFeatures`, `FeatureShell` |
50
+ | Headless provider contract | Provider, hooks, and shell model helpers | `ElevasisSystemsProvider`, `useElevasisSystems`, `FeatureShell` |
51
51
  | Compatibility barrel | Existing imports remain available while newer integrations prefer feature/provider subpaths | `@elevasis/ui/components` |
52
52
 
53
53
  ## System Map
@@ -64,22 +64,36 @@ Host apps still own TanStack route registration, topbar behavior, branding, auth
64
64
 
65
65
  ## Organization Model Alignment
66
66
 
67
- Feature IDs in manifests must match Organization Model feature IDs:
67
+ Manifest `systemId` values must match Organization Model System IDs. Sidebar placement is authored separately under `navigation.sidebar`:
68
68
 
69
69
  ```ts
70
- features: [
71
- { id: 'dashboard', label: 'Dashboard', enabled: true, path: '/', uiPosition: 'sidebar-primary' },
72
- { id: 'sales', label: 'Sales', enabled: true, uiPosition: 'sidebar-primary' },
73
- { id: 'sales.crm', label: 'CRM', enabled: true, path: '/crm' },
74
- { id: 'operations.resources', label: 'Resources', enabled: true, path: '/operations/resources' }
75
- ]
70
+ systems: {
71
+ dashboard: { id: 'dashboard', order: 10, label: 'Dashboard', lifecycle: 'active' },
72
+ clients: { id: 'clients', order: 20, label: 'Clients', lifecycle: 'active' }
73
+ },
74
+ navigation: {
75
+ sidebar: {
76
+ primary: {
77
+ dashboard: { type: 'surface', order: 10, label: 'Dashboard', path: '/', surfaceType: 'dashboard', targets: { systems: ['dashboard'] } },
78
+ business: {
79
+ type: 'group',
80
+ order: 20,
81
+ label: 'Business',
82
+ children: {
83
+ clients: { type: 'surface', order: 20, label: 'Clients', path: '/clients', surfaceType: 'list', targets: { systems: ['clients'] } }
84
+ }
85
+ }
86
+ },
87
+ bottom: {}
88
+ }
89
+ }
76
90
  ```
77
91
 
78
- Sidebar hierarchy is derived from dotted IDs. Containers omit `path`; leaves provide `path`.
92
+ Dashboard appears before Business in the primary sidebar. Business is a navigation group only; `/clients` is the canonical client route.
79
93
 
80
94
  ## Choosing The Right Surface
81
95
 
82
- - Need packaged sidebar/page composition? Use `ElevasisFeaturesProvider`, `FeatureShell`, and manifests from `@elevasis/ui/features/*`.
96
+ - Need packaged sidebar/page composition? Use `ElevasisSystemsProvider`, `FeatureShell`, and manifests from `@elevasis/ui/features/*`.
83
97
  - Need a root dashboard? Keep that route host-owned and compose dashboard components.
84
98
  - Need list-scoped lead-gen runtime behavior? Use the `list` adapter, then `acqDb` for broader acquisition CRUD.
85
99
  - Need project/task automation? Use `elevasis-sdk project:*`.
@@ -174,7 +174,7 @@ export const workflowResourceDescriptorsExample = defineResources({
174
174
  kind: 'workflow',
175
175
  systemId: 'sys.prospecting',
176
176
  ownerRoleId: 'role-ops-lead',
177
- capabilityKey: 'prospecting.lead-enrichment',
177
+ actionKey: 'prospecting.lead-enrichment',
178
178
  status: 'active' as const
179
179
  }
180
180
  })
@@ -1,4 +1,4 @@
1
- # @elevasis/core/knowledge
1
+ # @elevasis/core/knowledge
2
2
 
3
3
  Pure query layer over the organization graph. Browser-safe (no Node APIs); shared by the SDK CLI, platform CLI, and the `@elevasis/ui/knowledge` browser.
4
4
 
@@ -6,18 +6,18 @@ Pure query layer over the organization graph. Browser-safe (no Node APIs); share
6
6
 
7
7
  | Export | Purpose |
8
8
  | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
9
- | `byFeature(graph, featureId, knowledgeNodes)` | Knowledge nodes that govern the given feature. |
9
+ | `bySystem(graph, systemId, knowledgeNodes)` | Knowledge nodes that govern the given system. |
10
10
  | `byKind(graph, kind, knowledgeNodes)` | Filter knowledge nodes by `OrgKnowledgeKind`. |
11
11
  | `byOwner(graph, ownerId, knowledgeNodes)` | Knowledge nodes whose `ownerIds` includes the given owner. |
12
- | `governs(graph, nodeId)` | Outgoing `governs` targets (governed-feature ids) from a knowledge node. |
13
- | `governedBy(graph, nodeId)` | Incoming `governs` sources (governing knowledge-node ids) into a feature. |
14
- | `parsePath(pathString)` | Parse `/by-feature/$id`, `/by-kind/$kind`, `/by-owner/$id`, `/graph/$id/{governs,governed-by}`, or `/$id`. Throws on invalid input. |
12
+ | `governs(graph, nodeId)` | Outgoing `governs` targets (governed-system ids) from a knowledge node. |
13
+ | `governedBy(graph, nodeId)` | Incoming `governs` sources (governing knowledge-node ids) into a system. |
14
+ | `parsePath(pathString)` | Parse `/by-system/$id`, `/by-kind/$kind`, `/by-owner/$id`, `/graph/$id/{governs,governed-by}`, or `/$id`. Throws on invalid input. |
15
15
  | `formatText`, `formatJson`, `formatIdsOnly` | Output formatters used by the `knowledge:*` CLI subcommands. |
16
16
 
17
17
  ## Path syntax
18
18
 
19
19
  ```
20
- /by-feature/<featureId>
20
+ /by-system/<systemId>
21
21
  /by-kind/<playbook|strategy|reference>
22
22
  /by-owner/<ownerId>
23
23
  /graph/<nodeId>/governs
@@ -27,6 +27,7 @@ Pure query layer over the organization graph. Browser-safe (no Node APIs); share
27
27
 
28
28
  ## JSON envelope
29
29
 
30
- `formatJson` returns `{ path, mount, args, results }` the same wrapped envelope used by `pnpm exec elevasis knowledge:ls --json` and `pnpm exec elevasis-sdk knowledge:ls --json`.
30
+ `formatJson` returns `{ path, mount, args, results }` — the same wrapped envelope used by `pnpm exec elevasis knowledge:ls --json` and `pnpm exec elevasis-sdk knowledge:ls --json`.
31
31
 
32
32
  `governs` and `governedBy` accept either bare or graph-namespaced ids (`knowledge.foo` or `knowledge:knowledge.foo`).
33
+