@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
@@ -1,195 +1,195 @@
1
- ---
2
- title: Development Framework
3
- description: The SDK scaffolds a complete development environment for Claude Code -- project instructions, slash commands, cross-session memory, template versioning, and resource documentation
4
- loadWhen: "Understanding the agent framework structure"
5
- ---
6
-
7
- `elevasis-sdk init` scaffolds more than code. It builds a development environment designed around Claude Code as the primary interface. Most external SDK developers are non-technical -- they write workflows through conversation, not by reading API docs. The framework gives the agent everything it needs to guide those users effectively from the first session onward.
8
-
9
- The framework lives entirely in `.claude/`. It is never deployed and never touches the `docs/` directory, which ships to the platform.
10
-
11
- ## What Gets Scaffolded
12
-
13
- Running `elevasis-sdk init my-project` produces the following agent infrastructure alongside your source files:
14
-
15
- ```
16
- .claude/
17
- ├── settings.json # Hook registrations (PostToolUse, PostToolUseFailure)
18
- ├── hooks/
19
- │ ├── post-edit-validate.mjs # Formatting/type-check hook (after Write/Edit/MultiEdit)
20
- │ └── tool-failure-recovery.mjs # Error recovery hook (after Bash failures)
21
- ├── skills/
22
- │ ├── work/SKILL.md # Task tracking across sessions
23
- │ ├── elevasis/SKILL.md # SDK operations (check, deploy, exec)
24
- │ ├── deploy/skill.md # Deploy pipeline
25
- │ ├── setup/SKILL.md # First-time project setup
26
- │ ├── status/SKILL.md # Project health check
27
- │ └── ... # Additional skills (dsp, continue, project, sync, explore, save)
28
- ├── scripts/
29
- │ └── statusline-command.js # Status line command
30
- └── rules/
31
- ├── sdk-patterns.md # SDK patterns (auto-loaded for src/ files)
32
- ├── docs-authoring.md # MDX conventions (auto-loaded for docs/ files)
33
- ├── task-tracking.md # Task tracking conventions (auto-loaded)
34
- ├── platform.md # Platform tool patterns
35
- ├── error-handling.md # Error handling patterns
36
- └── workspace-patterns.md # Project-specific patterns (grows over time)
37
- ```
38
-
39
- The `memory/` directory is gitignored -- it is personal to each developer and not shared with collaborators. Everything else in `.claude/` is committed.
40
-
41
- CLAUDE.md is scaffolded with an `<!-- initialized: false -->` HTML comment at the very top. When the agent reads this flag on session start and finds it false, it automatically runs the `/meta init` flow -- no slash command knowledge required from the user. After initialization completes the agent changes the flag to `<!-- initialized: true -->`, so subsequent sessions proceed normally.
42
-
43
- ## Why It Works This Way
44
-
45
- The agent needs three things to guide a non-technical developer well:
46
-
47
- - **Who the user is** -- their TypeScript experience, automation background, and project goals, stored in `.claude/memory/profile/` as markdown files and created during `/meta init`
48
- - **What has happened in this project** -- deployment state, credentials, errors encountered, and architectural decisions, stored in `.claude/memory/` and loaded on demand
49
- - **How to behave** -- adaptive guidance rules in `CLAUDE.md` that translate experience levels into concrete behaviors: complete code examples for beginners, concise fixes for advanced users
50
-
51
- The agent reads `memory/index.md` at session start and drills into `memory/profile/skills.md` for adaptive behavior. It adjusts its tone, explanation depth, and proactivity based on what it finds. This happens silently -- the developer sees a helpful response, not a loading message.
52
-
53
- ## The Framework Components
54
-
55
- ### Agent System
56
-
57
- The `CLAUDE.md` file drives all agent behavior. It contains the session initialization instructions, adaptive guidance tiers, memory maintenance rules, and slash command definitions. No hooks, no code enforcement -- everything is instruction-driven so non-technical users never need to configure anything.
58
-
59
- The `/meta` command manages the project lifecycle: `/meta init` for guided setup, `/meta fix` for SDK upgrades, drift repair, and documentation verification, `/meta deploy` for deployments, `/meta health` for debugging executions. `/docs` browses, creates, and verifies permanent documentation in `docs/`. `/work` tracks tasks across sessions, and `/tutorial` guides new developers through a menu-driven multi-track learning path. A `creds` skill auto-triggers when credential setup is needed.
60
-
61
- See [Agent System](agent.mdx) for CLAUDE.md sections, slash command reference, developer profile, and adaptive guidance tiers.
62
-
63
- ### Memory System
64
-
65
- The `memory/` directory follows a hierarchical index tree pattern: a root `index.md` maps to topic files and subdirectories, each subdirectory has its own index. The agent reads only the root index at session start and drills into detail files on demand. The `memory/profile/` subdirectory is seeded by `/meta init` during guided setup; other topics are created by the agent as needed.
66
-
67
- Topics include developer profile (identity, skills, preferences), deployment state, environment credentials, architectural decisions, and error patterns. Error tracking starts as a subdirectory because it naturally spans multiple categories. Other topics start as flat files and split when they outgrow a single document.
68
-
69
- See [Memory System](memory.mdx) for architecture, error tracking format, scaling rules, and maintenance guidelines.
70
-
71
- ### Project Structure
72
-
73
- The scaffolded project separates concerns clearly: `operations/` for executable resources, `core/` for shared contracts and Organization Model configuration, `ui/` for the shell, `docs/` for platform documentation, and `.claude/` for agent infrastructure. Understanding which files are gitignored, which are committed, and why matters for collaborating on projects.
74
-
75
- See [Project Structure](project-structure.mdx) for a file-by-file walkthrough of the scaffolded project.
76
-
77
- ## Adaptive Guidance
78
-
79
- The agent adapts its communication based on four independent skill dimensions stored in `memory/profile/skills.md`:
80
-
81
- | Dimension | Levels | Assessment |
82
- | ------------------- | ----------------------------- | -------------------------------- |
83
- | Platform Navigation | none / oriented / comfortable | Direct question |
84
- | API & Integration | none / basic / proficient | Inferred from automation + tools |
85
- | Automation Concepts | none / low-code / custom | Direct question |
86
- | Domain Expertise | high / low | Inferred from identity answers |
87
-
88
- Each dimension has its own adaptation rules in the [Interaction Guidance](interaction-guidance.mdx) reference. A user who has deep Zapier experience (automation: low-code) but has never called an API directly (apiIntegration: none) will get credential walkthroughs every time while having automation concepts treated as familiar ground.
89
-
90
- `/tutorial` runs the assessment via a single gate question on first invocation: are you here to build automations by describing what you want, or are you a developer who edits code directly. The choice persists to `.claude/memory/profile.md` and shapes the agent's tone, vocabulary, and tool-call visibility for the entire project, not just inside `/tutorial`. Within the chosen track, lessons adapt further -- senior devs in the technical track can mark Section A items complete to skip them.
91
-
92
- See [Agent System](agent.mdx) for the full assessment question set, dimensional interaction rules, and communication principles.
93
-
94
- ### Skills Auto-Update
95
-
96
- The Growth Log in `memory/profile/skills.md` keeps approximately 20 recent entries. The agent adds an entry whenever it observes the user performing something they previously needed help with. When a consistent pattern of growth is observed -- typically after several independent successes -- the agent promotes the observation to a level change in the relevant dimension.
97
-
98
- ---
99
-
100
- ## Resource Documentation
101
-
102
- `elevasis-sdk deploy` ships your code and your documentation atomically -- one command, no version drift. Documentation files live in a `docs/` directory at your project root and render in the Elevasis platform UI for operators using your resources.
103
-
104
- ### Directory Structure
105
-
106
- Create `.mdx` files inside a `docs/` directory at your project root. `elevasis-sdk init` scaffolds a starter structure:
107
-
108
- ```
109
- my-project/
110
- ├── docs/
111
- │ └── index.mdx # Resource overview (scaffolded by init)
112
- ├── src/
113
- │ └── index.ts # Resource definitions
114
- └── elevasis.config.ts
115
- ```
116
-
117
- A missing `docs/` directory is silently ignored -- documentation is optional. If the directory exists, its contents are included in the deploy payload alongside resource schemas.
118
-
119
- ### Frontmatter Schema
120
-
121
- ```yaml
122
- ---
123
- title: string # Page title (required)
124
- description: string # Short description (optional)
125
- order: number # Sort order within directory (optional, default: 0)
126
- ---
127
- ```
128
-
129
- ### Naming Conventions
130
-
131
- - `docs/index.md` is the root page and is always rendered first
132
- - Nested directories create sections: `docs/guides/getting-started.mdx`
133
- - File names become URL slugs: `setup-guide.mdx` renders at `/docs/setup-guide`
134
- - Arbitrary nesting is supported -- no depth limit
135
-
136
- ### Size Limits
137
-
138
- - 100KB per file
139
- - 1MB total across all files in a deployment
140
-
141
- These limits are enforced by the CLI before the deploy request is sent. Validation errors include the file name and size.
142
-
143
- ### Deploy Behavior
144
-
145
- When you run `elevasis-sdk deploy`:
146
-
147
- 1. The CLI scans `docs/` recursively for `.mdx` files
148
- 2. Each file's frontmatter (title, description, order) is parsed and stripped from the content
149
- 3. Total size is validated against the 1MB limit and individual files against 100KB
150
- 4. The documentation array is included in the deploy metadata alongside your resource schemas
151
-
152
- Documentation and code ship in the same transaction. There is no separate upload step and no way for documentation to drift out of sync with the deployed version.
153
-
154
- ### The /docs Command
155
-
156
- The `/docs` command manages the permanent `docs/` tree in your project. It operates on everything in `docs/` except `docs/in-progress/` (owned by `/work`) and auto-generated files (`project-map.mdx`, `resource-map.mdx`).
157
-
158
- **Browse (default):** Running `/docs` with no arguments scans `docs/` recursively and presents a numbered list of user-maintained docs. Pick a number to read and discuss the doc, or say "create" or "verify."
159
-
160
- **Create:** `/docs create [description]` runs an interview-driven flow. It asks what you want to document, determines placement, scans `src/` to pre-populate from code, and creates the file with appropriate sections.
161
-
162
- Section templates by doc type:
163
-
164
- - **Resource guide:** Overview, Input/Output, How It Works, Platform Tools Used, Configuration
165
- - **Integration guide:** Overview, Setup (credentials), Data Model, Usage Patterns, Troubleshooting
166
- - **Architecture notes:** Context, Decision, Consequences, Alternatives Considered
167
- - **Process doc:** Purpose, Prerequisites, Steps, Recovery
168
-
169
- **Verify:** `/docs verify [file?]` checks docs against current code interactively. Without an argument, it scans all user-maintained docs, cross-references resource IDs, schema fields, and platform tools against `src/`, and offers to fix or create docs for undocumented resources.
170
-
171
- **Command Routing Reference:**
172
-
173
- | Scenario | Command |
174
- | --------------------------------------- | ----------------------------------------------------- |
175
- | Starting new work | `/work` (auto-detects new work from your description) |
176
- | Resuming yesterday's work | `/work` (auto-resumes if one task is in-progress) |
177
- | Browsing what docs exist | `/docs` |
178
- | Creating a reference doc (not a task) | `/docs create` |
179
- | Checking if docs match current code | `/docs verify` |
180
- | Full maintenance pipeline (8 steps) | `/meta fix` |
181
- | Deploying code and auto-generating maps | `/meta deploy` |
182
-
183
- ---
184
-
185
- ## Documentation
186
-
187
- - [Project Structure](project-structure.mdx) - File-by-file walkthrough of every scaffolded file and its purpose
188
- - [Agent System](agent.mdx) - CLAUDE.md sections, slash commands, developer profile, and adaptive guidance tiers
189
- - [Memory System](memory.mdx) - Architecture, error tracking format, scaling rules, and maintenance guidelines
190
- - [Interaction Guidance](interaction-guidance.mdx) - Dimensional adaptation rules per skill axis with growth tracking protocol
191
- - [Tutorial System](tutorial-system.mdx) - 21-item tutorial menu, skill-adaptive lesson variants, and progress tracking
192
-
193
- ---
194
-
195
- **Last Updated:** 2026-03-06
1
+ ---
2
+ title: Development Framework
3
+ description: The SDK scaffolds a complete development environment for Claude Code -- project instructions, slash commands, cross-session memory, template versioning, and resource documentation
4
+ loadWhen: "Understanding the agent framework structure"
5
+ ---
6
+
7
+ `elevasis-sdk init` scaffolds more than code. It builds a development environment designed around Claude Code as the primary interface. Most external SDK developers are non-technical -- they write workflows through conversation, not by reading API docs. The framework gives the agent everything it needs to guide those users effectively from the first session onward.
8
+
9
+ The framework lives entirely in `.claude/`. It is never deployed and never touches the `docs/` directory, which ships to the platform.
10
+
11
+ ## What Gets Scaffolded
12
+
13
+ Running `elevasis-sdk init my-project` produces the following agent infrastructure alongside your source files:
14
+
15
+ ```
16
+ .claude/
17
+ ├── settings.json # Hook registrations (PostToolUse, PostToolUseFailure)
18
+ ├── hooks/
19
+ │ ├── post-edit-validate.mjs # Formatting/type-check hook (after Write/Edit/MultiEdit)
20
+ │ └── tool-failure-recovery.mjs # Error recovery hook (after Bash failures)
21
+ ├── skills/
22
+ │ ├── work/SKILL.md # Task tracking across sessions
23
+ │ ├── elevasis/SKILL.md # SDK operations (check, deploy, exec)
24
+ │ ├── deploy/skill.md # Deploy pipeline
25
+ │ ├── setup/SKILL.md # First-time project setup
26
+ │ ├── status/SKILL.md # Project health check
27
+ │ └── ... # Additional skills (dsp, continue, project, sync, explore, save)
28
+ ├── scripts/
29
+ │ └── statusline-command.js # Status line command
30
+ └── rules/
31
+ ├── sdk-patterns.md # SDK patterns (auto-loaded for src/ files)
32
+ ├── docs-authoring.md # MDX conventions (auto-loaded for docs/ files)
33
+ ├── task-tracking.md # Task tracking conventions (auto-loaded)
34
+ ├── platform.md # Platform tool patterns
35
+ ├── error-handling.md # Error handling patterns
36
+ └── workspace-patterns.md # Project-specific patterns (grows over time)
37
+ ```
38
+
39
+ The `memory/` directory is gitignored -- it is personal to each developer and not shared with collaborators. Everything else in `.claude/` is committed.
40
+
41
+ CLAUDE.md is scaffolded with an `<!-- initialized: false -->` HTML comment at the very top. When the agent reads this flag on session start and finds it false, it automatically runs the `/meta init` flow -- no slash command knowledge required from the user. After initialization completes the agent changes the flag to `<!-- initialized: true -->`, so subsequent sessions proceed normally.
42
+
43
+ ## Why It Works This Way
44
+
45
+ The agent needs three things to guide a non-technical developer well:
46
+
47
+ - **Who the user is** -- their TypeScript experience, automation background, and project goals, stored in `.claude/memory/profile/` as markdown files and created during `/meta init`
48
+ - **What has happened in this project** -- deployment state, credentials, errors encountered, and architectural decisions, stored in `.claude/memory/` and loaded on demand
49
+ - **How to behave** -- adaptive guidance rules in `CLAUDE.md` that translate experience levels into concrete behaviors: complete code examples for beginners, concise fixes for advanced users
50
+
51
+ The agent reads `memory/index.md` at session start and drills into `memory/profile/skills.md` for adaptive behavior. It adjusts its tone, explanation depth, and proactivity based on what it finds. This happens silently -- the developer sees a helpful response, not a loading message.
52
+
53
+ ## The Framework Components
54
+
55
+ ### Agent System
56
+
57
+ The `CLAUDE.md` file drives all agent behavior. It contains the session initialization instructions, adaptive guidance tiers, memory maintenance rules, and slash command definitions. No hooks, no code enforcement -- everything is instruction-driven so non-technical users never need to configure anything.
58
+
59
+ The `/meta` command manages the project lifecycle: `/meta init` for guided setup, `/meta fix` for SDK upgrades, drift repair, and documentation verification, `/meta deploy` for deployments, `/meta health` for debugging executions. `/docs` browses, creates, and verifies permanent documentation in `docs/`. `/work` tracks tasks across sessions, and `/tutorial` guides new developers through a menu-driven multi-track learning path. A `creds` skill auto-triggers when credential setup is needed.
60
+
61
+ See [Agent System](agent.mdx) for CLAUDE.md sections, slash command reference, developer profile, and adaptive guidance tiers.
62
+
63
+ ### Memory System
64
+
65
+ The `memory/` directory follows a hierarchical index tree pattern: a root `index.md` maps to topic files and subdirectories, each subdirectory has its own index. The agent reads only the root index at session start and drills into detail files on demand. The `memory/profile/` subdirectory is seeded by `/meta init` during guided setup; other topics are created by the agent as needed.
66
+
67
+ Topics include developer profile (identity, skills, preferences), deployment state, environment credentials, architectural decisions, and error patterns. Error tracking starts as a subdirectory because it naturally spans multiple categories. Other topics start as flat files and split when they outgrow a single document.
68
+
69
+ See [Memory System](memory.mdx) for architecture, error tracking format, scaling rules, and maintenance guidelines.
70
+
71
+ ### Project Structure
72
+
73
+ The scaffolded project separates concerns clearly: `operations/` for executable resources, `core/` for shared contracts and Organization Model configuration, `ui/` for the shell, `docs/` for platform documentation, and `.claude/` for agent infrastructure. Understanding which files are gitignored, which are committed, and why matters for collaborating on projects.
74
+
75
+ See [Project Structure](project-structure.mdx) for a file-by-file walkthrough of the scaffolded project.
76
+
77
+ ## Adaptive Guidance
78
+
79
+ The agent adapts its communication based on four independent skill dimensions stored in `memory/profile/skills.md`:
80
+
81
+ | Dimension | Levels | Assessment |
82
+ | ------------------- | ----------------------------- | -------------------------------- |
83
+ | Platform Navigation | none / oriented / comfortable | Direct question |
84
+ | API & Integration | none / basic / proficient | Inferred from automation + tools |
85
+ | Automation Concepts | none / low-code / custom | Direct question |
86
+ | Domain Expertise | high / low | Inferred from identity answers |
87
+
88
+ Each dimension has its own adaptation rules in the [Interaction Guidance](interaction-guidance.mdx) reference. A user who has deep Zapier experience (automation: low-code) but has never called an API directly (apiIntegration: none) will get credential walkthroughs every time while having automation concepts treated as familiar ground.
89
+
90
+ `/tutorial` runs the assessment via a single gate question on first invocation: are you here to build automations by describing what you want, or are you a developer who edits code directly. The choice persists to `.claude/memory/profile.md` and shapes the agent's tone, vocabulary, and tool-call visibility for the entire project, not just inside `/tutorial`. Within the chosen track, lessons adapt further -- senior devs in the technical track can mark Section A items complete to skip them.
91
+
92
+ See [Agent System](agent.mdx) for the full assessment question set, dimensional interaction rules, and communication principles.
93
+
94
+ ### Skills Auto-Update
95
+
96
+ The Growth Log in `memory/profile/skills.md` keeps approximately 20 recent entries. The agent adds an entry whenever it observes the user performing something they previously needed help with. When a consistent pattern of growth is observed -- typically after several independent successes -- the agent promotes the observation to a level change in the relevant dimension.
97
+
98
+ ---
99
+
100
+ ## Resource Documentation
101
+
102
+ `elevasis-sdk deploy` ships your code and your documentation atomically -- one command, no version drift. Documentation files live in a `docs/` directory at your project root and render in the Elevasis platform UI for operators using your resources.
103
+
104
+ ### Directory Structure
105
+
106
+ Create `.mdx` files inside a `docs/` directory at your project root. `elevasis-sdk init` scaffolds a starter structure:
107
+
108
+ ```
109
+ my-project/
110
+ ├── docs/
111
+ │ └── index.mdx # Resource overview (scaffolded by init)
112
+ ├── src/
113
+ │ └── index.ts # Resource definitions
114
+ └── elevasis.config.ts
115
+ ```
116
+
117
+ A missing `docs/` directory is silently ignored -- documentation is optional. If the directory exists, its contents are included in the deploy payload alongside resource schemas.
118
+
119
+ ### Frontmatter Schema
120
+
121
+ ```yaml
122
+ ---
123
+ title: string # Page title (required)
124
+ description: string # Short description (optional)
125
+ order: number # Sort order within directory (optional, default: 0)
126
+ ---
127
+ ```
128
+
129
+ ### Naming Conventions
130
+
131
+ - `docs/index.md` is the root page and is always rendered first
132
+ - Nested directories create sections: `docs/guides/getting-started.mdx`
133
+ - File names become URL slugs: `setup-guide.mdx` renders at `/docs/setup-guide`
134
+ - Arbitrary nesting is supported -- no depth limit
135
+
136
+ ### Size Limits
137
+
138
+ - 100KB per file
139
+ - 1MB total across all files in a deployment
140
+
141
+ These limits are enforced by the CLI before the deploy request is sent. Validation errors include the file name and size.
142
+
143
+ ### Deploy Behavior
144
+
145
+ When you run `elevasis-sdk deploy`:
146
+
147
+ 1. The CLI scans `docs/` recursively for `.mdx` files
148
+ 2. Each file's frontmatter (title, description, order) is parsed and stripped from the content
149
+ 3. Total size is validated against the 1MB limit and individual files against 100KB
150
+ 4. The documentation array is included in the deploy metadata alongside your resource schemas
151
+
152
+ Documentation and code ship in the same transaction. There is no separate upload step and no way for documentation to drift out of sync with the deployed version.
153
+
154
+ ### The /docs Command
155
+
156
+ The `/docs` command manages the permanent `docs/` tree in your project. It operates on everything in `docs/` except `docs/in-progress/` (owned by `/work`) and auto-generated files (`project-map.mdx`, `resource-map.mdx`).
157
+
158
+ **Browse (default):** Running `/docs` with no arguments scans `docs/` recursively and presents a numbered list of user-maintained docs. Pick a number to read and discuss the doc, or say "create" or "verify."
159
+
160
+ **Create:** `/docs create [description]` runs an interview-driven flow. It asks what you want to document, determines placement, scans `src/` to pre-populate from code, and creates the file with appropriate sections.
161
+
162
+ Section templates by doc type:
163
+
164
+ - **Resource guide:** Overview, Input/Output, How It Works, Platform Tools Used, Configuration
165
+ - **Integration guide:** Overview, Setup (credentials), Data Model, Usage Patterns, Troubleshooting
166
+ - **Architecture notes:** Context, Decision, Consequences, Alternatives Considered
167
+ - **Process doc:** Purpose, Prerequisites, Steps, Recovery
168
+
169
+ **Verify:** `/docs verify [file?]` checks docs against current code interactively. Without an argument, it scans all user-maintained docs, cross-references resource IDs, schema fields, and platform tools against `src/`, and offers to fix or create docs for undocumented resources.
170
+
171
+ **Command Routing Reference:**
172
+
173
+ | Scenario | Command |
174
+ | --------------------------------------- | ----------------------------------------------------- |
175
+ | Starting new work | `/work` (auto-detects new work from your description) |
176
+ | Resuming yesterday's work | `/work` (auto-resumes if one task is in-progress) |
177
+ | Browsing what docs exist | `/docs` |
178
+ | Creating a reference doc (not a task) | `/docs create` |
179
+ | Checking if docs match current code | `/docs verify` |
180
+ | Full maintenance pipeline (8 steps) | `/meta fix` |
181
+ | Deploying code and auto-generating maps | `/meta deploy` |
182
+
183
+ ---
184
+
185
+ ## Documentation
186
+
187
+ - [Project Structure](project-structure.mdx) - File-by-file walkthrough of every scaffolded file and its purpose
188
+ - [Agent System](agent.mdx) - CLAUDE.md sections, slash commands, developer profile, and adaptive guidance tiers
189
+ - [Memory System](memory.mdx) - Architecture, error tracking format, scaling rules, and maintenance guidelines
190
+ - [Interaction Guidance](interaction-guidance.mdx) - Dimensional adaptation rules per skill axis with growth tracking protocol
191
+ - [Tutorial System](tutorial-system.mdx) - 21-item tutorial menu, skill-adaptive lesson variants, and progress tracking
192
+
193
+ ---
194
+
195
+ **Last Updated:** 2026-03-06