@elevasis/sdk 1.21.0 → 1.22.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 (160) hide show
  1. package/dist/cli.cjs +951 -171
  2. package/dist/index.d.ts +632 -341
  3. package/dist/index.js +3102 -142
  4. package/dist/node/index.d.ts +1 -0
  5. package/dist/node/index.js +19 -1
  6. package/dist/test-utils/index.d.ts +313 -4
  7. package/dist/test-utils/index.js +3246 -281
  8. package/dist/worker/index.js +3041 -80
  9. package/package.json +3 -3
  10. package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
  11. package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
  12. package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
  13. package/reference/claude-config/registries/graph-skills.json +4 -4
  14. package/reference/claude-config/registries/knowledge-flags.json +0 -2
  15. package/reference/claude-config/rules/active-change-index.md +80 -80
  16. package/reference/claude-config/rules/agent-start-here.md +277 -277
  17. package/reference/claude-config/rules/deployment.md +57 -57
  18. package/reference/claude-config/rules/error-handling.md +56 -56
  19. package/reference/claude-config/rules/execution.md +40 -40
  20. package/reference/claude-config/rules/frontend.md +4 -4
  21. package/reference/claude-config/rules/observability.md +31 -31
  22. package/reference/claude-config/rules/operations.md +29 -17
  23. package/reference/claude-config/rules/organization-model.md +110 -84
  24. package/reference/claude-config/rules/organization-os.md +115 -113
  25. package/reference/claude-config/rules/package-taxonomy.md +33 -33
  26. package/reference/claude-config/rules/platform.md +42 -42
  27. package/reference/claude-config/rules/shared-types.md +49 -46
  28. package/reference/claude-config/rules/task-tracking.md +47 -47
  29. package/reference/claude-config/rules/ui.md +200 -200
  30. package/reference/claude-config/rules/vibe.md +235 -235
  31. package/reference/claude-config/scripts/statusline-command.js +18 -18
  32. package/reference/claude-config/settings.json +34 -34
  33. package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
  34. package/reference/claude-config/skills/dsp/SKILL.md +66 -66
  35. package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
  36. package/reference/claude-config/skills/explore/SKILL.md +6 -6
  37. package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
  38. package/reference/claude-config/skills/knowledge/SKILL.md +314 -299
  39. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
  40. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -159
  41. package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
  42. package/reference/claude-config/skills/knowledge/operations/features.md +76 -76
  43. package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
  44. package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
  45. package/reference/claude-config/skills/knowledge/operations/labels.md +94 -94
  46. package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
  47. package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
  48. package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
  49. package/reference/claude-config/skills/project/SKILL.md +1088 -1088
  50. package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
  51. package/reference/claude-config/skills/save/SKILL.md +3 -3
  52. package/reference/claude-config/skills/setup/SKILL.md +275 -275
  53. package/reference/claude-config/skills/status/SKILL.md +59 -59
  54. package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
  55. package/reference/claude-config/skills/sync/SKILL.md +47 -47
  56. package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
  57. package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
  58. package/reference/claude-config/skills/tutorial/technical.md +1303 -1303
  59. package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
  60. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
  61. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
  62. package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
  63. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
  64. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
  65. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
  66. package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
  67. package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
  68. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
  69. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
  70. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
  71. package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
  72. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
  73. package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
  74. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
  75. package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
  76. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
  77. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
  78. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
  79. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
  80. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
  81. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -30
  82. package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +42 -0
  83. package/reference/claude-config/sync-notes/README.md +43 -43
  84. package/reference/cli.mdx +808 -808
  85. package/reference/concepts.mdx +146 -146
  86. package/reference/deployment/api.mdx +297 -297
  87. package/reference/deployment/command-center.mdx +209 -209
  88. package/reference/deployment/index.mdx +195 -195
  89. package/reference/deployment/provided-features.mdx +107 -107
  90. package/reference/deployment/ui-execution.mdx +250 -250
  91. package/reference/examples/organization-model.ts +146 -83
  92. package/reference/framework/agent.mdx +156 -156
  93. package/reference/framework/index.mdx +195 -195
  94. package/reference/framework/interaction-guidance.mdx +182 -182
  95. package/reference/framework/memory.mdx +326 -326
  96. package/reference/framework/project-structure.mdx +282 -282
  97. package/reference/framework/tutorial-system.mdx +135 -135
  98. package/reference/getting-started.mdx +142 -142
  99. package/reference/index.mdx +106 -106
  100. package/reference/packages/core/src/README.md +14 -14
  101. package/reference/packages/core/src/business/README.md +2 -2
  102. package/reference/packages/core/src/knowledge/README.md +32 -32
  103. package/reference/packages/core/src/organization-model/README.md +149 -149
  104. package/reference/packages/core/src/test-utils/README.md +37 -37
  105. package/reference/packages/ui/src/api/README.md +18 -18
  106. package/reference/packages/ui/src/app/README.md +24 -24
  107. package/reference/packages/ui/src/auth/README.md +18 -18
  108. package/reference/packages/ui/src/components/README.md +24 -24
  109. package/reference/packages/ui/src/execution/README.md +16 -16
  110. package/reference/packages/ui/src/features/README.md +28 -28
  111. package/reference/packages/ui/src/graph/README.md +16 -16
  112. package/reference/packages/ui/src/hooks/README.md +23 -23
  113. package/reference/packages/ui/src/initialization/README.md +19 -19
  114. package/reference/packages/ui/src/knowledge/README.md +31 -31
  115. package/reference/packages/ui/src/organization/README.md +18 -18
  116. package/reference/packages/ui/src/profile/README.md +19 -19
  117. package/reference/packages/ui/src/provider/README.md +32 -32
  118. package/reference/packages/ui/src/router/README.md +18 -18
  119. package/reference/packages/ui/src/sse/README.md +13 -13
  120. package/reference/packages/ui/src/test-utils/README.md +7 -7
  121. package/reference/packages/ui/src/theme/README.md +23 -23
  122. package/reference/packages/ui/src/theme/presets/README.md +19 -19
  123. package/reference/packages/ui/src/types/README.md +16 -16
  124. package/reference/packages/ui/src/utils/README.md +18 -18
  125. package/reference/packages/ui/src/zustand/README.md +18 -18
  126. package/reference/platform-tools/adapters-integration.mdx +301 -301
  127. package/reference/platform-tools/adapters-platform.mdx +553 -553
  128. package/reference/platform-tools/index.mdx +217 -217
  129. package/reference/platform-tools/type-safety.mdx +82 -82
  130. package/reference/resources/index.mdx +349 -349
  131. package/reference/resources/patterns.mdx +449 -449
  132. package/reference/resources/types.mdx +116 -116
  133. package/reference/roadmap.mdx +165 -165
  134. package/reference/runtime.mdx +173 -173
  135. package/reference/scaffold/core/organization-graph.mdx +110 -90
  136. package/reference/scaffold/core/organization-model.mdx +226 -219
  137. package/reference/scaffold/index.mdx +67 -67
  138. package/reference/scaffold/operations/propagation-pipeline.md +77 -77
  139. package/reference/scaffold/operations/scaffold-maintenance.md +12 -12
  140. package/reference/scaffold/operations/workflow-recipes.md +138 -138
  141. package/reference/scaffold/recipes/add-a-feature.md +308 -88
  142. package/reference/scaffold/recipes/add-a-resource.md +134 -110
  143. package/reference/scaffold/recipes/customize-knowledge-browser.md +5 -5
  144. package/reference/scaffold/recipes/customize-organization-model.md +273 -138
  145. package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
  146. package/reference/scaffold/recipes/extend-crm.md +3 -3
  147. package/reference/scaffold/recipes/extend-lead-gen.md +400 -400
  148. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -118
  149. package/reference/scaffold/recipes/index.md +46 -46
  150. package/reference/scaffold/recipes/query-the-knowledge-graph.md +197 -170
  151. package/reference/scaffold/reference/contracts.md +2101 -2096
  152. package/reference/scaffold/reference/glossary.md +76 -76
  153. package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
  154. package/reference/scaffold/ui/customization.md +243 -243
  155. package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
  156. package/reference/scaffold/ui/feature-shell.mdx +72 -72
  157. package/reference/scaffold/ui/recipes.md +221 -214
  158. package/reference/spine/spine-primer.md +96 -96
  159. package/reference/templates/index.mdx +47 -47
  160. package/reference/troubleshooting.mdx +223 -223
@@ -18,89 +18,135 @@ export const brandingOverrideExample = defineOrganizationModel({
18
18
  })
19
19
 
20
20
  // ---------------------------------------------------------------------------
21
- // Flat feature hierarchy
21
+ // System hierarchy, system-local config, ontology scopes, and sidebar navigation
22
22
  // ---------------------------------------------------------------------------
23
- export const featureTreeExample = defineOrganizationModel({
24
- features: [
25
- {
26
- id: 'dashboard',
27
- label: 'Dashboard',
28
- enabled: true,
29
- path: '/',
30
- icon: 'dashboard',
31
- uiPosition: 'sidebar-primary'
32
- },
33
- {
23
+ export const systemNavigationExample = defineOrganizationModel({
24
+ ontology: {
25
+ valueTypes: {
26
+ 'global:value-type/text': {
27
+ id: 'global:value-type/text',
28
+ label: 'Text'
29
+ }
30
+ }
31
+ },
32
+ systems: {
33
+ sales: {
34
34
  id: 'sales',
35
35
  label: 'Sales',
36
- enabled: true,
37
- icon: 'briefcase',
38
- uiPosition: 'sidebar-primary'
39
- },
40
- {
41
- id: 'sales.crm',
42
- label: 'CRM',
43
- enabled: true,
44
- path: '/crm'
45
- },
46
- {
47
- id: 'sales.lead-gen',
48
- label: 'Lead Gen',
49
- enabled: true,
50
- path: '/lead-gen'
51
- },
52
- {
53
- id: 'admin',
54
- label: 'Admin',
55
- enabled: true,
56
- path: '/admin',
57
- icon: 'shield',
58
- uiPosition: 'sidebar-bottom',
59
- requiresAdmin: true
60
- }
61
- ]
62
- })
63
-
64
- // ---------------------------------------------------------------------------
65
- // Sales customization
66
- // ---------------------------------------------------------------------------
67
- export const salesCustomizationExample = defineOrganizationModel({
68
- sales: {
69
- entityId: 'crm.deal',
70
- defaultPipelineId: 'sales',
71
- pipelines: [
72
- {
73
- id: 'sales',
74
- label: 'Sales Pipeline',
75
- entityId: 'crm.deal',
76
- stages: [
77
- { id: 'qualified', label: 'Qualified', color: 'blue', order: 1, semanticClass: 'open' },
78
- { id: 'negotiating', label: 'Negotiating', color: 'yellow', order: 2, semanticClass: 'active' },
79
- { id: 'won', label: 'Won', color: 'green', order: 3, semanticClass: 'closed_won' }
80
- ]
36
+ order: 20,
37
+ lifecycle: 'active',
38
+ systems: {
39
+ crm: {
40
+ id: 'sales.crm',
41
+ label: 'CRM',
42
+ order: 10,
43
+ lifecycle: 'active',
44
+ parentSystemId: 'sales',
45
+ config: {
46
+ defaultPipelineId: 'sales.crm:catalog/pipeline',
47
+ kanban: {
48
+ groupBy: 'stage',
49
+ showProbability: true
50
+ }
51
+ },
52
+ ontology: {
53
+ objectTypes: {
54
+ 'sales.crm:object/deal': {
55
+ id: 'sales.crm:object/deal',
56
+ label: 'Deal',
57
+ ownerSystemId: 'sales.crm'
58
+ }
59
+ },
60
+ actionTypes: {
61
+ 'sales.crm:action/deal.update-stage': {
62
+ id: 'sales.crm:action/deal.update-stage',
63
+ label: 'Update Deal Stage',
64
+ ownerSystemId: 'sales.crm',
65
+ actsOn: ['sales.crm:object/deal']
66
+ }
67
+ },
68
+ catalogTypes: {
69
+ 'sales.crm:catalog/pipeline': {
70
+ id: 'sales.crm:catalog/pipeline',
71
+ label: 'Sales Pipeline',
72
+ ownerSystemId: 'sales.crm',
73
+ kind: 'pipeline',
74
+ appliesTo: 'sales.crm:object/deal',
75
+ entries: {
76
+ qualified: { label: 'Qualified', color: 'blue', order: 10, semanticClass: 'open' },
77
+ negotiating: { label: 'Negotiating', color: 'yellow', order: 20, semanticClass: 'active' },
78
+ won: { label: 'Won', color: 'green', order: 30, semanticClass: 'closed_won' }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ },
84
+ leadGen: {
85
+ id: 'sales.lead-gen',
86
+ label: 'Lead Gen',
87
+ order: 20,
88
+ lifecycle: 'active',
89
+ parentSystemId: 'sales'
90
+ }
81
91
  }
82
- ]
92
+ }
93
+ },
94
+ navigation: {
95
+ sidebar: {
96
+ primary: {
97
+ dashboard: {
98
+ type: 'surface',
99
+ order: 10,
100
+ label: 'Dashboard',
101
+ path: '/',
102
+ surfaceType: 'dashboard',
103
+ targets: { systems: [] }
104
+ },
105
+ sales: {
106
+ type: 'group',
107
+ order: 20,
108
+ label: 'Sales',
109
+ children: {
110
+ crm: {
111
+ type: 'surface',
112
+ order: 10,
113
+ label: 'CRM',
114
+ path: '/crm',
115
+ surfaceType: 'page',
116
+ targets: { systems: ['sales.crm'] }
117
+ },
118
+ leadGen: {
119
+ type: 'surface',
120
+ order: 20,
121
+ label: 'Lead Gen',
122
+ path: '/lead-gen',
123
+ surfaceType: 'list',
124
+ targets: { systems: ['sales.lead-gen'] }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ bottom: {}
130
+ }
83
131
  }
84
132
  })
85
133
 
86
134
  // ---------------------------------------------------------------------------
87
- // Prospecting customization
135
+ // System-local settings
88
136
  // ---------------------------------------------------------------------------
89
- export const prospectingCustomizationExample = defineOrganizationModel({
90
- prospecting: {
91
- listEntityId: 'leadgen.list',
92
- companyEntityId: 'leadgen.company',
93
- contactEntityId: 'leadgen.contact',
94
- companyStages: [
95
- { id: 'scraped', label: 'Scraped', order: 1 },
96
- { id: 'enriched', label: 'Enriched', order: 2 },
97
- { id: 'approved', label: 'Approved', order: 3 }
98
- ],
99
- contactStages: [
100
- { id: 'found', label: 'Found', order: 1 },
101
- { id: 'verified', label: 'Verified', order: 2 },
102
- { id: 'ready', label: 'Ready', order: 3 }
103
- ]
137
+ export const systemConfigExample = defineOrganizationModel({
138
+ systems: {
139
+ projects: {
140
+ id: 'projects',
141
+ label: 'Projects',
142
+ order: 40,
143
+ lifecycle: 'active',
144
+ config: {
145
+ defaultPriority: 'normal',
146
+ reviewCadenceDays: 7,
147
+ requiresOwner: true
148
+ }
149
+ }
104
150
  }
105
151
  })
106
152
 
@@ -172,10 +218,24 @@ export const workflowResourceDescriptorsExample = defineResources({
172
218
  leadEnrichment: {
173
219
  id: 'lead-enrichment-workflow',
174
220
  kind: 'workflow',
175
- systemId: 'sys.prospecting',
221
+ systemPath: 'sales.lead-gen',
176
222
  ownerRoleId: 'role-ops-lead',
177
223
  actionKey: 'prospecting.lead-enrichment',
178
- status: 'active' as const
224
+ status: 'active' as const,
225
+ ontology: {
226
+ implements: ['sales.lead-gen:action/lead.enrich'],
227
+ reads: ['sales.lead-gen:object/lead'],
228
+ writes: ['sales.crm:object/deal'],
229
+ usesCatalogs: ['sales.crm:catalog/pipeline'],
230
+ emits: ['sales.lead-gen:event/lead-enriched']
231
+ },
232
+ codeRefs: [
233
+ {
234
+ path: 'operations/src/lead-enrichment/index.ts',
235
+ role: 'entrypoint',
236
+ symbol: 'leadEnrichmentWorkflow'
237
+ }
238
+ ]
179
239
  }
180
240
  })
181
241
 
@@ -186,11 +246,14 @@ export const workflowResourceRuntimeMetadataExample = {
186
246
  type: workflowResourceDescriptorsExample.leadEnrichment.kind,
187
247
  version: '1.0.0',
188
248
  status: 'prod' as const,
249
+ category: 'production' as const
250
+ }
251
+
252
+ export const compatibilityGraphLinksExample = {
189
253
  links: [
190
- { nodeId: 'feature:sales.lead-gen', kind: 'operates-on' as const },
254
+ { nodeId: 'system:sales.lead-gen', kind: 'operates-on' as const },
191
255
  { nodeId: 'integration:instantly', kind: 'uses' as const }
192
- ],
193
- category: 'production' as const
256
+ ]
194
257
  }
195
258
 
196
259
  // ---------------------------------------------------------------------------
@@ -247,7 +310,7 @@ export const knowledgeExample = defineOrganizationModel({
247
310
  title: 'Example Outreach Playbook',
248
311
  summary: 'Step-by-step runbook for launching a cold outreach campaign.',
249
312
  body: '## Overview\n\nThis playbook walks through prospect sourcing, message templates, scheduling, and reply triage.\n\n## Steps\n\n1. Source prospects from the lead-gen list.\n2. Personalize the cold email template.\n3. Schedule the sending campaign.\n4. Triage replies in the CRM.',
250
- links: [{ nodeId: 'feature:sales.crm' }, { nodeId: 'feature:sales.lead-gen' }],
313
+ links: [{ nodeId: 'system:sales.crm' }, { nodeId: 'system:sales.lead-gen' }],
251
314
  ownerIds: [],
252
315
  updatedAt: '2026-05-01'
253
316
  },
@@ -257,7 +320,7 @@ export const knowledgeExample = defineOrganizationModel({
257
320
  title: 'Example ICP Strategy',
258
321
  summary: 'Describes the ideal customer profile and qualification thresholds.',
259
322
  body: '## ICP Profile\n\n- **Industry:** SMB marketing agencies\n- **Size:** 5-50 employees\n- **Region:** North America\n\nProspects scoring \\<60 are excluded from outreach.',
260
- links: [{ nodeId: 'feature:sales' }],
323
+ links: [{ nodeId: 'system:sales' }],
261
324
  ownerIds: [],
262
325
  updatedAt: '2026-05-01'
263
326
  },
@@ -265,8 +328,8 @@ export const knowledgeExample = defineOrganizationModel({
265
328
  id: 'knowledge.example-org-model-reference',
266
329
  kind: 'reference',
267
330
  title: 'Example Organization Model Reference',
268
- summary: 'Glossary of OM domains and how they relate to features and resources.',
269
- body: '## Domains\n\nThe organization model splits configuration into typed domains: identity, customers, offerings, roles, goals, techStack, features, statuses, operations, knowledge.',
331
+ summary: 'Glossary of OM domains and how they relate to systems and resources.',
332
+ body: '## Domains\n\nThe organization model separates semantic contracts in ontology, system-local settings in config, executable governance in resources, and explanatory material in knowledge. Secrets and runtime state stay outside the Organization Model.',
270
333
  links: [],
271
334
  ownerIds: [],
272
335
  updatedAt: '2026-05-01'
@@ -1,156 +1,156 @@
1
- ---
2
- title: Agent System
3
- description: CLAUDE.md drives all agent behavior -- project instructions, slash commands, memory-based developer profile, and three-tier adaptive guidance
4
- loadWhen: "Configuring agent behavior or capabilities"
5
- ---
6
-
7
- The agent system is the set of files that shape how Claude Code behaves in your SDK project. It consists of four parts: `CLAUDE.md` (the instruction file), slash commands (structured task entry points), the developer profile stored in `memory/profile/`, and the adaptive guidance rules that translate profile data into concrete agent behavior.
8
-
9
- Nothing here requires configuration. The agent reads these files at session start and adapts automatically.
10
-
11
- ## CLAUDE.md
12
-
13
- `CLAUDE.md` is the project instruction file for Claude Code. It is read at the start of every session and governs all agent behavior. In an Elevasis SDK project, it is generated by `elevasis-sdk init` and lives at the project root.
14
-
15
- The file is instruction-driven by design. Non-technical developers should never need to edit it. When the agent learns a new rule worth preserving -- such as an error pattern that recurs three times -- it promotes that rule into `CLAUDE.md` automatically.
16
-
17
- ### Sections
18
-
19
- The generated `CLAUDE.md` contains these sections:
20
-
21
- - **Session Initialization** -- Checks the `<!-- initialized: false -->` auto-init flag; if false, runs `/meta init` automatically. Otherwise reads `memory/profile/skills.md` for adaptive behavior, reads `memory/index.md` for project context, checks if the template version is current, and suggests `/tutorial` for users with no Platform Navigation experience.
22
- - **Identity** -- Project orientation: what an Elevasis SDK project is, the developer's role, and how to adapt to non-technical users.
23
- - **Navigation** -- A table mapping concepts to file paths with load conditions (when to load each file). Includes SDK reference docs, credential model, error history, `docs/project-map.mdx`, and `docs/priorities.mdx`.
24
- - **Rules** -- Points to auto-loaded rule files in `.claude/rules/`. SDK patterns load automatically; project-specific patterns live in `workspace-patterns.md`. Includes error handling protocol.
25
- - **Interaction Guidance** -- Per-dimension behavior rules derived from `memory/profile/skills.md`. Covers vocabulary, code completeness, explanation depth, and growth logging.
26
- - **Commands** -- Table of the 4 slash commands (`/meta`, `/docs`, `/work`, `/tutorial`) with one-line purpose descriptions.
27
- - **Skills** -- Auto-trigger conditions for the `creds` skill.
28
- - **Maintaining Memory** -- Hierarchical structure, pruning rules, and what belongs in memory vs. `docs/` vs. `.claude/rules/`.
29
-
30
- ### Session Initialization
31
-
32
- At the start of every session the agent runs these steps silently before responding:
33
-
34
- 0. Check the `<!-- initialized: ... -->` flag at the top of `CLAUDE.md`. If `false`, run the `/meta init` flow automatically. If `true`, proceed with steps below.
35
- 1. Read `.claude/memory/profile/skills.md` -- adapt all responses to the user's assessed skill levels (see Interaction Guidance below).
36
- 2. Read `.claude/memory/index.md` if it exists -- drill into relevant topic files as needed, balancing context relevance against token usage.
37
- 3. Check the installed `@elevasis/sdk` template version against `templateVersion` in `elevasis.config.ts`. If the SDK has a newer version, notify the user and suggest running `/meta fix`.
38
- 4. If `.claude/memory/` does not exist, suggest running `/meta init` to set up the project.
39
- 5. If the user's Platform Navigation level is none (from skills.md) and `.claude/memory/tutorial-progress.md` does not exist, suggest `/tutorial`.
40
-
41
- ## Slash Commands
42
-
43
- Skills are Markdown instruction files in `.claude/skills/`. When you type `/skill-name` in a Claude Code session, the agent reads the corresponding `SKILL.md` and follows its instructions.
44
-
45
- The following skills are scaffolded by `elevasis-sdk init` and committed to version control so collaborators get the same experience:
46
-
47
- | Skill | File | Purpose |
48
- | ----------- | -------------------------- | -------------------------------------------------------- |
49
- | `/work` | `skills/work/SKILL.md` | Task tracking -- list, create, save, resume, complete |
50
- | `/elevasis` | `skills/elevasis/SKILL.md` | SDK operations -- check, deploy, exec |
51
- | `/deploy` | `skills/deploy/skill.md` | Full deploy pipeline (test, build, commit, push) |
52
- | `/setup` | `skills/setup/SKILL.md` | First-time project setup (placeholder replacement, deps) |
53
- | `/status` | `skills/status/SKILL.md` | Quick project health check |
54
- | `/continue` | `skills/continue/SKILL.md` | Resume in-progress work from docs |
55
- | `/project` | `skills/project/SKILL.md` | Route project management to `elevasis-sdk project:*` |
56
- | `/sync` | `skills/sync/SKILL.md` | Pull latest, wipe caches, fresh reinstall |
57
- | `/explore` | `skills/explore/SKILL.md` | Codebase exploration anchored to docs |
58
- | `/save` | `skills/save/SKILL.md` | Auto-manage docs from conversation context |
59
- | `/dsp` | `skills/dsp/SKILL.md` | Parallel agent dispatch for implementation tasks |
60
-
61
- ### Key Skills
62
-
63
- **`/setup`** -- First-time project setup. Replaces template placeholders, installs dependencies, configures `.env`, verifies the project, and optionally runs a first deploy.
64
-
65
- **`/deploy`** -- Full deploy pipeline: type-check, validate resources, commit, deploy (auto-regenerates `docs/index.md` and `docs/resources.md`), verify platform, and optionally push.
66
-
67
- **`/elevasis`** -- SDK operations entry point: `check` validates resource definitions, `deploy` bundles and uploads, `exec` runs a resource with input.
68
-
69
- **`/work`** -- File-based task lifecycle. Creates, resumes, saves, and completes task docs in `docs/in-progress/`. It tracks in-progress work state, not project records.
70
-
71
- **`/status`** -- Quick project health check: shows SDK version, deployed resources, last deploy date, and environment status.
72
-
73
- **`/save`** -- Auto-manages docs from conversation context: writes or updates docs based on what was discussed in the session.
74
-
75
- **`/explore`** -- Codebase exploration anchored to `docs/`. Reads the doc map first, then drills into source as needed.
76
-
77
- **`/continue`** -- Resumes in-progress work by reading `docs/in-progress/` and picking up where the last session left off.
78
-
79
- **`/project`** -- Project-management routing for milestones, tasks, notes, and status. It should call the canonical `elevasis-sdk project:*` CLI surface rather than inventing a parallel workflow.
80
-
81
- That routing is interface-first, not a separate semantic model. `/project` should treat the SDK CLI as the operational entrypoint for the Organization OS delivery/projects contract: `deliveryManifest` in the shared UI, `featureId: 'projects'` in the organization model, and `organizationModel.delivery` for project/milestone/task status semantics.
82
-
83
- When these command families overlap conceptually, use this boundary:
84
-
85
- - `/project` -- update or inspect project data in the shared Projects system
86
- - `/work` -- capture implementation progress and resume context in docs
87
- - `/adev` -- build, debug, test, or execute resources
88
-
89
- **`/dsp`** -- Dispatches subagents in parallel for implementation tasks that can run concurrently.
90
-
91
- **`/sync`** -- Pulls latest changes, wipes all `node_modules` and caches, and runs a fresh reinstall.
92
-
93
- ## Developer Profile
94
-
95
- The developer profile is stored in `.claude/memory/profile/` as a set of markdown files. It is gitignored -- personal to each developer, not shared with collaborators. Profile data lives in the memory system alongside error patterns, deployment state, and decisions.
96
-
97
- ### Onboarding Flow
98
-
99
- Profile data is created during `/meta init`. The command runs a 6-question assessment and writes the responses to `memory/profile/`:
100
-
101
- - **Identity & Goals (3 questions):** What the business does, what to automate, which tools are already in use.
102
- - **Competency (2 questions):** Command Center familiarity (maps to `platformNavigation`), automation tool familiarity (maps to `automation`). Two additional dimensions (`apiIntegration`, `domainExpertise`) are inferred from these answers.
103
- - **Communication (1 question):** Step-by-step explanations vs. concise answers.
104
-
105
- ### Profile Structure
106
-
107
- ```
108
- .claude/memory/profile/
109
- ├── index.md # Profile summary with links to sub-files
110
- ├── identity.md # Organization, industry, goals, integrations
111
- ├── skills.md # Skill dimensions (platformNavigation, apiIntegration, automation, domainExpertise)
112
- └── preferences.md # Verbosity, guidance style, interaction patterns
113
- ```
114
-
115
- `identity.md` records the organization name, industry, size, project goals, and known tool integrations. `skills.md` stores four skill dimensions as structured values (`platformNavigation`, `apiIntegration`, `automation`, `domainExpertise`) along with a Growth Log table. See [Interaction Guidance](interaction-guidance.mdx) for the full set of per-dimension adaptation rules. `preferences.md` stores verbosity (`detailed / concise`) and proactive guidance preference.
116
-
117
- ### Auto-Update Triggers
118
-
119
- The agent updates `memory/profile/` files when it observes:
120
-
121
- - The user successfully completes an advanced task (level upgrade candidate in `skills.md`)
122
- - The user mentions new tools or integrations not in `identity.md`
123
- - The user explicitly asks to change preferences
124
-
125
- The agent does not prompt for confirmation on minor updates. Major changes (level upgrades) are surfaced to the user before writing.
126
-
127
- ## Rules System
128
-
129
- Ten rule files are scaffolded in `.claude/rules/`. Rule files are auto-injected by Claude Code when their path patterns match the current file being edited -- no manual loading needed.
130
-
131
- Rules injected for operations source files (`operations/src/`):
132
-
133
- - **`platform.md`** -- SDK adapter patterns, typed adapters, platform tool usage.
134
- - **`error-handling.md`** -- Error types (`ExecutionError`, `PlatformToolError`), retry behavior.
135
- - **`execution.md`** -- Worker thread model, timeouts, concurrency, org isolation.
136
- - **`observability.md`** -- Logging with `context.logger`, step-level auto-logging, debugging.
137
- - **`deployment.md`** -- Deploy commands, dev vs prod, version bumping, common errors.
138
-
139
- Rules injected for docs files (`docs/`):
140
-
141
- - **`docs.md`** -- Documentation structure, frontmatter conventions, auto-generated files.
142
- - **`task-tracking.md`** -- Task doc conventions, injected for in-progress files.
143
-
144
- Additional contextual rules:
145
-
146
- - **`frontend.md`** -- React/Mantine patterns, injected for UI source files.
147
- - **`shared-types.md`** -- Cross-runtime type conventions, injected for foundations files.
148
- - **`organization-os.md`** -- Organization model and feature shell conventions.
149
-
150
- ## Interaction Guidance
151
-
152
- The `CLAUDE.md` Interaction Guidance section translates skill dimensions from `memory/profile/skills.md` into concrete behavior rules -- adapting vocabulary, code completeness, explanation depth, and growth logging per dimension. For the full set of per-dimension adaptation rules, see [Interaction Guidance](interaction-guidance.mdx).
153
-
154
- ---
155
-
156
- **Last Updated:** 2026-04-17
1
+ ---
2
+ title: Agent System
3
+ description: CLAUDE.md drives all agent behavior -- project instructions, slash commands, memory-based developer profile, and three-tier adaptive guidance
4
+ loadWhen: "Configuring agent behavior or capabilities"
5
+ ---
6
+
7
+ The agent system is the set of files that shape how Claude Code behaves in your SDK project. It consists of four parts: `CLAUDE.md` (the instruction file), slash commands (structured task entry points), the developer profile stored in `memory/profile/`, and the adaptive guidance rules that translate profile data into concrete agent behavior.
8
+
9
+ Nothing here requires configuration. The agent reads these files at session start and adapts automatically.
10
+
11
+ ## CLAUDE.md
12
+
13
+ `CLAUDE.md` is the project instruction file for Claude Code. It is read at the start of every session and governs all agent behavior. In an Elevasis SDK project, it is generated by `elevasis-sdk init` and lives at the project root.
14
+
15
+ The file is instruction-driven by design. Non-technical developers should never need to edit it. When the agent learns a new rule worth preserving -- such as an error pattern that recurs three times -- it promotes that rule into `CLAUDE.md` automatically.
16
+
17
+ ### Sections
18
+
19
+ The generated `CLAUDE.md` contains these sections:
20
+
21
+ - **Session Initialization** -- Checks the `<!-- initialized: false -->` auto-init flag; if false, runs `/meta init` automatically. Otherwise reads `memory/profile/skills.md` for adaptive behavior, reads `memory/index.md` for project context, checks if the template version is current, and suggests `/tutorial` for users with no Platform Navigation experience.
22
+ - **Identity** -- Project orientation: what an Elevasis SDK project is, the developer's role, and how to adapt to non-technical users.
23
+ - **Navigation** -- A table mapping concepts to file paths with load conditions (when to load each file). Includes SDK reference docs, credential model, error history, `docs/project-map.mdx`, and `docs/priorities.mdx`.
24
+ - **Rules** -- Points to auto-loaded rule files in `.claude/rules/`. SDK patterns load automatically; project-specific patterns live in `workspace-patterns.md`. Includes error handling protocol.
25
+ - **Interaction Guidance** -- Per-dimension behavior rules derived from `memory/profile/skills.md`. Covers vocabulary, code completeness, explanation depth, and growth logging.
26
+ - **Commands** -- Table of the 4 slash commands (`/meta`, `/docs`, `/work`, `/tutorial`) with one-line purpose descriptions.
27
+ - **Skills** -- Auto-trigger conditions for the `creds` skill.
28
+ - **Maintaining Memory** -- Hierarchical structure, pruning rules, and what belongs in memory vs. `docs/` vs. `.claude/rules/`.
29
+
30
+ ### Session Initialization
31
+
32
+ At the start of every session the agent runs these steps silently before responding:
33
+
34
+ 0. Check the `<!-- initialized: ... -->` flag at the top of `CLAUDE.md`. If `false`, run the `/meta init` flow automatically. If `true`, proceed with steps below.
35
+ 1. Read `.claude/memory/profile/skills.md` -- adapt all responses to the user's assessed skill levels (see Interaction Guidance below).
36
+ 2. Read `.claude/memory/index.md` if it exists -- drill into relevant topic files as needed, balancing context relevance against token usage.
37
+ 3. Check the installed `@elevasis/sdk` template version against `templateVersion` in `elevasis.config.ts`. If the SDK has a newer version, notify the user and suggest running `/meta fix`.
38
+ 4. If `.claude/memory/` does not exist, suggest running `/meta init` to set up the project.
39
+ 5. If the user's Platform Navigation level is none (from skills.md) and `.claude/memory/tutorial-progress.md` does not exist, suggest `/tutorial`.
40
+
41
+ ## Slash Commands
42
+
43
+ Skills are Markdown instruction files in `.claude/skills/`. When you type `/skill-name` in a Claude Code session, the agent reads the corresponding `SKILL.md` and follows its instructions.
44
+
45
+ The following skills are scaffolded by `elevasis-sdk init` and committed to version control so collaborators get the same experience:
46
+
47
+ | Skill | File | Purpose |
48
+ | ----------- | -------------------------- | -------------------------------------------------------- |
49
+ | `/work` | `skills/work/SKILL.md` | Task tracking -- list, create, save, resume, complete |
50
+ | `/elevasis` | `skills/elevasis/SKILL.md` | SDK operations -- check, deploy, exec |
51
+ | `/deploy` | `skills/deploy/skill.md` | Full deploy pipeline (test, build, commit, push) |
52
+ | `/setup` | `skills/setup/SKILL.md` | First-time project setup (placeholder replacement, deps) |
53
+ | `/status` | `skills/status/SKILL.md` | Quick project health check |
54
+ | `/continue` | `skills/continue/SKILL.md` | Resume in-progress work from docs |
55
+ | `/project` | `skills/project/SKILL.md` | Route project management to `elevasis-sdk project:*` |
56
+ | `/sync` | `skills/sync/SKILL.md` | Pull latest, wipe caches, fresh reinstall |
57
+ | `/explore` | `skills/explore/SKILL.md` | Codebase exploration anchored to docs |
58
+ | `/save` | `skills/save/SKILL.md` | Auto-manage docs from conversation context |
59
+ | `/dsp` | `skills/dsp/SKILL.md` | Parallel agent dispatch for implementation tasks |
60
+
61
+ ### Key Skills
62
+
63
+ **`/setup`** -- First-time project setup. Replaces template placeholders, installs dependencies, configures `.env`, verifies the project, and optionally runs a first deploy.
64
+
65
+ **`/deploy`** -- Full deploy pipeline: type-check, validate resources, commit, deploy (auto-regenerates `docs/index.md` and `docs/resources.md`), verify platform, and optionally push.
66
+
67
+ **`/elevasis`** -- SDK operations entry point: `check` validates resource definitions, `deploy` bundles and uploads, `exec` runs a resource with input.
68
+
69
+ **`/work`** -- File-based task lifecycle. Creates, resumes, saves, and completes task docs in `docs/in-progress/`. It tracks in-progress work state, not project records.
70
+
71
+ **`/status`** -- Quick project health check: shows SDK version, deployed resources, last deploy date, and environment status.
72
+
73
+ **`/save`** -- Auto-manages docs from conversation context: writes or updates docs based on what was discussed in the session.
74
+
75
+ **`/explore`** -- Codebase exploration anchored to `docs/`. Reads the doc map first, then drills into source as needed.
76
+
77
+ **`/continue`** -- Resumes in-progress work by reading `docs/in-progress/` and picking up where the last session left off.
78
+
79
+ **`/project`** -- Project-management routing for milestones, tasks, notes, and status. It should call the canonical `elevasis-sdk project:*` CLI surface rather than inventing a parallel workflow.
80
+
81
+ That routing is interface-first, not a separate semantic model. `/project` should treat the SDK CLI as the operational entrypoint for the Organization OS delivery/projects contract: `deliveryManifest` in the shared UI, `featureId: 'projects'` in the organization model, and `organizationModel.delivery` for project/milestone/task status semantics.
82
+
83
+ When these command families overlap conceptually, use this boundary:
84
+
85
+ - `/project` -- update or inspect project data in the shared Projects system
86
+ - `/work` -- capture implementation progress and resume context in docs
87
+ - `/adev` -- build, debug, test, or execute resources
88
+
89
+ **`/dsp`** -- Dispatches subagents in parallel for implementation tasks that can run concurrently.
90
+
91
+ **`/sync`** -- Pulls latest changes, wipes all `node_modules` and caches, and runs a fresh reinstall.
92
+
93
+ ## Developer Profile
94
+
95
+ The developer profile is stored in `.claude/memory/profile/` as a set of markdown files. It is gitignored -- personal to each developer, not shared with collaborators. Profile data lives in the memory system alongside error patterns, deployment state, and decisions.
96
+
97
+ ### Onboarding Flow
98
+
99
+ Profile data is created during `/meta init`. The command runs a 6-question assessment and writes the responses to `memory/profile/`:
100
+
101
+ - **Identity & Goals (3 questions):** What the business does, what to automate, which tools are already in use.
102
+ - **Competency (2 questions):** Command Center familiarity (maps to `platformNavigation`), automation tool familiarity (maps to `automation`). Two additional dimensions (`apiIntegration`, `domainExpertise`) are inferred from these answers.
103
+ - **Communication (1 question):** Step-by-step explanations vs. concise answers.
104
+
105
+ ### Profile Structure
106
+
107
+ ```
108
+ .claude/memory/profile/
109
+ ├── index.md # Profile summary with links to sub-files
110
+ ├── identity.md # Organization, industry, goals, integrations
111
+ ├── skills.md # Skill dimensions (platformNavigation, apiIntegration, automation, domainExpertise)
112
+ └── preferences.md # Verbosity, guidance style, interaction patterns
113
+ ```
114
+
115
+ `identity.md` records the organization name, industry, size, project goals, and known tool integrations. `skills.md` stores four skill dimensions as structured values (`platformNavigation`, `apiIntegration`, `automation`, `domainExpertise`) along with a Growth Log table. See [Interaction Guidance](interaction-guidance.mdx) for the full set of per-dimension adaptation rules. `preferences.md` stores verbosity (`detailed / concise`) and proactive guidance preference.
116
+
117
+ ### Auto-Update Triggers
118
+
119
+ The agent updates `memory/profile/` files when it observes:
120
+
121
+ - The user successfully completes an advanced task (level upgrade candidate in `skills.md`)
122
+ - The user mentions new tools or integrations not in `identity.md`
123
+ - The user explicitly asks to change preferences
124
+
125
+ The agent does not prompt for confirmation on minor updates. Major changes (level upgrades) are surfaced to the user before writing.
126
+
127
+ ## Rules System
128
+
129
+ Ten rule files are scaffolded in `.claude/rules/`. Rule files are auto-injected by Claude Code when their path patterns match the current file being edited -- no manual loading needed.
130
+
131
+ Rules injected for operations source files (`operations/src/`):
132
+
133
+ - **`platform.md`** -- SDK adapter patterns, typed adapters, platform tool usage.
134
+ - **`error-handling.md`** -- Error types (`ExecutionError`, `PlatformToolError`), retry behavior.
135
+ - **`execution.md`** -- Worker thread model, timeouts, concurrency, org isolation.
136
+ - **`observability.md`** -- Logging with `context.logger`, step-level auto-logging, debugging.
137
+ - **`deployment.md`** -- Deploy commands, dev vs prod, version bumping, common errors.
138
+
139
+ Rules injected for docs files (`docs/`):
140
+
141
+ - **`docs.md`** -- Documentation structure, frontmatter conventions, auto-generated files.
142
+ - **`task-tracking.md`** -- Task doc conventions, injected for in-progress files.
143
+
144
+ Additional contextual rules:
145
+
146
+ - **`frontend.md`** -- React/Mantine patterns, injected for UI source files.
147
+ - **`shared-types.md`** -- Cross-runtime type conventions, injected for foundations files.
148
+ - **`organization-os.md`** -- Organization model and feature shell conventions.
149
+
150
+ ## Interaction Guidance
151
+
152
+ The `CLAUDE.md` Interaction Guidance section translates skill dimensions from `memory/profile/skills.md` into concrete behavior rules -- adapting vocabulary, code completeness, explanation depth, and growth logging per dimension. For the full set of per-dimension adaptation rules, see [Interaction Guidance](interaction-guidance.mdx).
153
+
154
+ ---
155
+
156
+ **Last Updated:** 2026-04-17