@elevasis/sdk 0.5.13 → 0.5.15

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.
@@ -1,298 +1,277 @@
1
- ---
2
- title: Project Structure
3
- description: Each file scaffolded by elevasis-sdk init and its purpose in the development workflow
4
- loadWhen: "Understanding scaffolded files or project layout"
5
- ---
6
-
7
- `elevasis-sdk init` creates a complete workspace structure. This page explains what each file does and when you will interact with it.
8
-
9
- ---
10
-
11
- ## Source Files
12
-
13
- ### `src/index.ts`
14
-
15
- The registry entry point for your workspace. This file aggregates resources from domain barrel files and re-exports them as an `OrganizationResources` default export. It does not contain workflow logic itself -- its sole job is aggregation:
16
-
17
- ```ts
18
- import type { OrganizationResources } from '@elevasis/sdk'
19
- import * as operations from './operations/index.js'
20
- import * as example from './example/index.js'
21
-
22
- const org: OrganizationResources = {
23
- workflows: [
24
- ...operations.workflows,
25
- ...example.workflows,
26
- ],
27
- agents: [
28
- ...operations.agents,
29
- ...example.agents,
30
- ],
31
- }
32
- export default org
33
- ```
34
-
35
- Each domain directory exports `workflows` and `agents` arrays via an `index.ts` barrel. When you add a new domain, import it here and spread its arrays. The `/resource workflow` command updates the appropriate domain barrel automatically.
36
-
37
- ### `src/operations/platform-status.ts`
38
-
39
- A multi-step workflow demonstrating real platform API usage. Calls `platform.call({ tool: 'status', method: 'overview' })` to gather platform status data, then passes it to `platform.call({ tool: 'llm', method: 'generate' })` for a natural language summary. Shows the pattern for workflows that interact with platform tools and chain steps with `StepType.LINEAR`.
40
-
41
- ### `src/example/echo.ts`
42
-
43
- The starter workflow, scaffolded to demonstrate the per-file pattern: one workflow per file with its own Zod input/output schemas, config object, contract, and step handler. Replace this domain with your own when you're ready.
44
-
45
- ### `src/shared/`
46
-
47
- Cross-domain shared types and utilities. This directory starts empty (`.gitkeep`). Place code here when two or more domains share the same utility -- for example, formatters, shared types, or notification helpers. Domain-specific shared code goes in `<domain>/shared/` instead.
48
-
49
- ### `elevasis.config.ts`
50
-
51
- Project-level configuration. The scaffolded file includes `templateVersion`, which tracks which template generation your project uses, plus commented-out options (`defaultStatus`, `dev.port`) so you can discover available settings without looking them up:
52
-
53
- ```ts
54
- import type { ElevasConfig } from '@elevasis/sdk'
55
-
56
- export default {
57
- templateVersion: 14,
58
- // defaultStatus: 'dev', // Default status for new resources ('dev' | 'production')
59
- // dev: { port: 5170 }, // Local API port (internal development only)
60
- } satisfies ElevasConfig
61
- ```
62
-
63
- Leave this file minimal -- the platform provides sensible defaults. Do not remove `templateVersion`; it is read by `elevasis-sdk update` to determine which template changes need to be applied to your project.
64
-
65
- ---
66
-
67
- ## Documentation
68
-
69
- ### `docs/index.mdx`
70
-
71
- The entry point for your workspace's documentation. Documentation files in `docs/` are deployed alongside your code during `elevasis-sdk deploy` and rendered in the Elevasis platform UI.
72
-
73
- Use MDX frontmatter to set page metadata:
74
-
75
- ```yaml
76
- ---
77
- title: Overview
78
- description: Documentation for this project
79
- order: 0
80
- ---
81
- ```
82
-
83
- Add more pages by creating additional `.mdx` files in `docs/`. Nested directories create sections: `docs/guides/setup.mdx` becomes a `guides/setup` page under your deployment's documentation.
84
-
85
- ### `docs/project-map.mdx`
86
-
87
- Auto-generated by `elevasis-sdk deploy` on every deploy and by `/meta fix` step 8. Contains a full project snapshot: organization, SDK version, template version, last deploy date, source domains, resource tables (workflows and agents), documentation index, SDK reference summary, commands/rules/skills, memory system listing, and configuration state. The agent reads this file at session start for project orientation.
88
-
89
- This file is fully auto-generated -- do not edit manually. Changes are overwritten on the next deploy.
90
-
91
- ### `docs/priorities.mdx`
92
-
93
- Created by the agent during your first goal discussion. Records current goals, priorities, and next steps for the workspace. Updated as goals change across sessions.
94
-
95
- This file is NOT scaffolded by default. The agent creates it the first time you discuss project goals or priorities in a session.
96
-
97
- ### `docs/in-progress/`
98
-
99
- Work-in-progress task documents created by `/work create`. Each file represents an active work item with objective, plan, progress markers, and resume context. `/work complete` moves finished items to their permanent location in `docs/`.
100
-
101
- This directory is NOT deployed -- it is filtered out during the doc scan in `elevasis-sdk deploy`.
102
-
103
- ---
104
-
105
- ## Progressive Disclosure Directories
106
-
107
- Only `src/` and `docs/` are scaffolded by `elevasis-sdk init`. The following directories are NOT created by default -- they appear when a specific need arises:
108
-
109
- | Directory | Created by | When |
110
- |-----------|-----------|------|
111
- | `src/operations/` | `elevasis-sdk init` (default) | Always -- platform-status workflow lives here |
112
- | `src/example/` | `elevasis-sdk init` (default) | Always -- echo starter workflow lives here (replace with your own) |
113
- | `src/shared/` | `elevasis-sdk init` (default) | Always -- cross-domain shared utilities (starts empty) |
114
- | `docs/` | `elevasis-sdk init` (default) | Always |
115
- | `docs/in-progress/` | Agent (on first `/work create`) | When you create a task doc for in-progress work |
116
- | `docs/project-map.mdx` | `elevasis-sdk deploy` | Auto-generated on every deploy |
117
- | `docs/priorities.mdx` | Agent (on first goal discussion) | When you discuss project goals or priorities |
118
- | `data/` | Agent (on demand) | When you connect a database |
119
- | `scripts/` | Agent (on demand) | When you need local scripts not deployed to the platform |
120
- | `src/lib/` | Agent (on demand) | When shared code exists between two or more workflows |
121
-
122
- This structure keeps the initial workspace minimal and adds directories only when they earn their place.
123
-
124
- ### `src/lib/`
125
-
126
- Legacy shared code directory. In v5+ projects, use `src/shared/` for cross-domain utilities instead. The agent may still create `src/lib/` in older projects that predate the domain-based organization. Included in the esbuild bundle alongside workflow code.
127
-
128
- ### `data/`
129
-
130
- Created by the agent when you connect a database. Contains `schema.ts` which documents your database schema as TypeScript types. The agent reads this file to understand your data model when writing workflow steps that call the Supabase tool. Not deployed -- it is local documentation for the agent.
131
-
132
- ### `scripts/`
133
-
134
- Local utility scripts for tasks that do not run on the platform: database seeds, data migrations, one-off transformations, local testing helpers. Created on demand when you need a local script. Not deployed, not bundled.
135
-
136
- ---
137
-
138
- ## `elevasis-sdk deploy` Scope
139
-
140
- `elevasis-sdk deploy` touches only two directories:
141
-
142
- | Directory | Action | Deployed? |
143
- |-----------|--------|-----------|
144
- | `src/` | Bundle into `dist/bundle.js` via esbuild (includes `src/lib/` if present) | Yes |
145
- | `docs/` | Scan `.mdx` files, upload as documentation | Yes |
146
- | `docs/in-progress/` | Ignored -- work-in-progress, not deployed | No |
147
- | `data/` | Ignored -- local documentation for the agent | No |
148
- | `scripts/` | Ignored -- local scripts, not deployed | No |
149
- | `.claude/` | Ignored -- local development only | No |
150
-
151
- ---
152
-
153
- ## Configuration Files
154
-
155
- ### `.env`
156
-
157
- Contains your `ELEVASIS_API_KEY`. This file is gitignored. Never commit it.
158
-
159
- ### `.npmrc`
160
-
161
- Sets `auto-install-peers = true`. The SDK uses Zod as a peer dependency, so this ensures Zod installs automatically.
162
-
163
- ### `tsconfig.json`
164
-
165
- App-focused TypeScript configuration. It does not include `declaration` or `declarationMap` settings because your project is a deployable application, not a library.
166
-
167
- ### `.gitignore`
168
-
169
- Pre-configured to exclude:
170
- - `node_modules/` -- installed packages
171
- - `.env` -- API key
172
- - `dist/` -- generated by deploy, never commit
173
- - `__elevasis_worker.ts` -- temporary file generated during deployment
174
- - `.claude/settings.local.json` -- local Claude Code overrides
175
- - `.claude/memory/` -- your personal cross-session project memory (profile, errors, decisions)
176
-
177
- ---
178
-
179
- ## Claude Code Integration
180
-
181
- The `.claude/` directory and `CLAUDE.md` give Claude Code full awareness of the SDK, CLI, and your project structure from the first session.
182
-
183
- ### `CLAUDE.md`
184
-
185
- The most important file for AI-assisted development. It provides Claude Code with:
186
-
187
- - **Project orientation** -- what an Elevasis SDK project is and how it works
188
- - **Project structure** -- which files contain resources, documentation, and configuration
189
- - **SDK patterns** -- working code examples for resource definitions, Zod schemas, and the `OrganizationResources` export
190
- - **CLI reference** -- all commands with flags (`check`, `deploy`, `exec`, `resources`, `executions`, `execution`, `deployments`, `env list/set/remove`)
191
- - **Development rules** -- conventions the agent should enforce (source in `src/`, docs in `docs/`, use `@elevasis/sdk` types only)
192
-
193
- Do not remove or heavily edit `CLAUDE.md`. It is the primary context source that makes the slash commands work well.
194
-
195
- ### `.claude/settings.json`
196
-
197
- Sets `autoCompact: false`. This prevents Claude Code from automatically compacting context during long sessions, which can lose important earlier context about your project.
198
-
199
- ### `.claude/memory/`
200
-
201
- Created when you run `/meta init` in Claude Code. The agent asks six onboarding questions about your organization, project goals, integrations, and experience level. Answers are stored here as markdown files and used to personalize subsequent sessions.
202
-
203
- ```
204
- .claude/memory/
205
- ├── index.md # Root index linking all memory topics
206
- ├── profile/ # Developer profile (created by /meta init)
207
- ├── index.md
208
- │ ├── identity.md # Organization, goals, integrations
209
- │ ├── skills.md # Skill dimensions and Growth Log
210
- └── preferences.md # Verbosity and guidance style
211
- ├── deployment-state.md # Latest deployment outcomes
212
- ├── decisions.md # Architecture decisions recorded over time
213
- └── errors/ # Error patterns and resolutions
214
- ```
215
-
216
- This directory is gitignored -- it is personal to you and not shared with collaborators. All cross-session knowledge (profile, errors, deployment state, decisions) lives here as plain markdown.
217
-
218
- ---
219
-
220
- ## Slash Commands
221
-
222
- The `.claude/commands/` directory contains four commands covering the core development loop. Invoke them in Claude Code with `/meta`, `/docs`, `/work`, and `/tutorial`.
223
-
224
- ### `/meta` -- Project Lifecycle
225
-
226
- Manages the full lifecycle of your workspace. Five operations:
227
-
228
- - **`init`** -- First-run guided setup: installs dependencies, configures `.env`, runs competency assessment to build your developer profile in `.claude/memory/`, and optionally deploys the starter workflow. Triggered automatically by the `<!-- initialized: false -->` flag in CLAUDE.md.
229
- - **No arguments** -- Project health status: shows template version, SDK version, profile summary, last deployment status, and a quick drift check for missing files.
230
- - **`fix`** -- SDK upgrade check and full drift repair. Step 0 offers to run `pnpm update @elevasis/sdk` and merge template changes. Steps 1-8 repair drift: missing managed files, gitignore entries, CLAUDE.md sections, memory structure, doc cross-references, settings, rules health, and project map freshness.
231
- - **`deploy`** -- Full 9-step deploy pipeline: validate, type-check, verify docs, commit, deploy (auto-regenerates `docs/project-map.mdx`), verify platform, update deployment state, and optionally push.
232
- - **`health`** -- Execution debugging and resource status; shows recent executions, analyzes failures, and checks environment connectivity.
233
-
234
- ### `/docs` -- Documentation
235
-
236
- Manages the permanent `docs/` tree. Three operations:
237
-
238
- - **No arguments** -- Browse. Lists user-maintained docs with auto-generated files (`project-map.mdx`, `resource-map.mdx`) shown as read-only. Pick a number to read and discuss.
239
- - **`create [description]`** -- Interview-driven reference doc creation. If the doc is about a specific resource, the agent reads `src/` and pre-populates from code. Scaffolds sections by doc type (resource guide, integration guide, architecture notes, process doc, general reference).
240
- - **`verify [file?]`** -- Interactive standalone docs verification. Cross-references resource IDs, schema fields, and platform tools in docs against `src/`. Guides fixes interactively.
241
-
242
- ### `/work` -- Task Tracking
243
-
244
- Manages in-progress task tracking across sessions using `docs/in-progress/` task documents. Five operations:
245
-
246
- - **No arguments** -- List all task documents sorted by status.
247
- - **`create <description>`** -- Create a new task document with Objective, Plan, Progress, and Resume Context sections.
248
- - **`save`** -- Update the current task document with progress made this session.
249
- - **`resume [<name>]`** -- Load a task document and continue from where it left off.
250
- - **`complete`** -- Mark the current task as complete.
251
-
252
- ### `/tutorial` -- Progressive Learning
253
-
254
- A 7-lesson guided learning path adapted to the user's skill profile. Lessons cover project orientation, writing workflows, schemas, platform tools, multi-step workflows, conditional routing, and production deployment.
255
-
256
- ---
257
-
258
- ## File Classification
259
-
260
- Not all scaffolded files participate in template updates. Files fall into two categories:
261
-
262
- **SCAFFOLD_FILES total: 29**
263
-
264
- **INIT_ONLY** (14 files) -- Written once during `elevasis-sdk init`, never updated by `elevasis-sdk update`:
265
- - `package.json`, `pnpm-workspace.yaml`, `tsconfig.json`
266
- - `.env`, `.npmrc`
267
- - `src/index.ts`, `src/operations/platform-status.ts`, `src/operations/index.ts`, `src/example/echo.ts`, `src/example/index.ts`, `src/shared/.gitkeep`
268
- - `docs/index.mdx`, `docs/in-progress/.gitkeep`
269
- - `.claude/rules/workspace-patterns.md`
270
-
271
- **MANAGED** (15 files) -- Written during `elevasis-sdk init` and checked/updatable by `elevasis-sdk update`:
272
- - `elevasis.config.ts`, `.gitignore`, `CLAUDE.md`, `.claude/settings.json`
273
- - One hook: `.claude/hooks/enforce-sdk-boundary.mjs`
274
- - Four command files: `.claude/commands/meta.md`, `.claude/commands/docs.md`, `.claude/commands/tutorial.md`, `.claude/commands/work.md`
275
- - One skill: `.claude/skills/creds/SKILL.md`
276
- - Five rule files: `.claude/rules/sdk-patterns.md`, `.claude/rules/docs-authoring.md`, `.claude/rules/memory-conventions.md`, `.claude/rules/project-map.md`, `.claude/rules/task-tracking.md`
277
-
278
- Run `elevasis-sdk update` after installing a new SDK version to bring managed files up to date. The command adds missing files directly and flags files that differ from the new template for agent-assisted review via `/meta fix`.
279
-
280
- ---
281
-
282
- ## File Reference
283
-
284
- | File | When You Edit It |
285
- |------|-----------------|
286
- | `src/index.ts` | Adding or removing resources (the `/resource` command does this automatically) |
287
- | `src/<domain>/*.ts` | Writing and modifying workflow logic (organized by business domain) |
288
- | `docs/index.mdx` | Updating project documentation |
289
- | `docs/project-map.mdx` | Never -- auto-generated by `elevasis-sdk deploy` |
290
- | `docs/priorities.mdx` | When goals or priorities change |
291
- | `elevasis.config.ts` | Changing project-level settings |
292
- | `.env` | Adding environment variables |
293
- | `CLAUDE.md` | Rarely -- only to add project-specific context |
294
- | `.claude/commands/*.md` | Rarely -- commands work well as scaffolded |
295
-
296
- ---
297
-
298
- **Last Updated:** 2026-03-03
1
+ ---
2
+ title: Project Structure
3
+ description: Each file scaffolded by elevasis-sdk init and its purpose in the development workflow
4
+ loadWhen: "Understanding scaffolded files or project layout"
5
+ ---
6
+
7
+ `elevasis-sdk init` creates a complete workspace structure. This page explains what each file does and when you will interact with it.
8
+
9
+ ---
10
+
11
+ ## Source Files
12
+
13
+ ### `src/index.ts`
14
+
15
+ The registry entry point for your workspace. This file aggregates resources from domain barrel files and re-exports them as an `OrganizationResources` default export. It does not contain workflow logic itself -- its sole job is aggregation:
16
+
17
+ ```ts
18
+ import type { OrganizationResources } from '@elevasis/sdk'
19
+ import * as operations from './operations/index.js'
20
+ import * as example from './example/index.js'
21
+
22
+ const org: OrganizationResources = {
23
+ workflows: [
24
+ ...operations.workflows,
25
+ ...example.workflows,
26
+ ],
27
+ agents: [
28
+ ...operations.agents,
29
+ ...example.agents,
30
+ ],
31
+ }
32
+ export default org
33
+ ```
34
+
35
+ Each domain directory exports `workflows` and `agents` arrays via an `index.ts` barrel. When you add a new domain, import it here and spread its arrays. The `/resource workflow` command updates the appropriate domain barrel automatically.
36
+
37
+ ### `src/operations/platform-status.ts`
38
+
39
+ A multi-step workflow demonstrating real platform API usage. Calls `platform.call({ tool: 'status', method: 'overview' })` to gather platform status data, then passes it to `platform.call({ tool: 'llm', method: 'generate' })` for a natural language summary. Shows the pattern for workflows that interact with platform tools and chain steps with `StepType.LINEAR`.
40
+
41
+ ### `src/example/echo.ts`
42
+
43
+ The starter workflow, scaffolded to demonstrate the per-file pattern: one workflow per file with its own Zod input/output schemas, config object, contract, and step handler. Replace this domain with your own when you're ready.
44
+
45
+ ### `src/shared/`
46
+
47
+ Cross-domain shared types and utilities. This directory starts empty (`.gitkeep`). Place code here when two or more domains share the same utility -- for example, formatters, shared types, or notification helpers. Domain-specific shared code goes in `<domain>/shared/` instead.
48
+
49
+ ### `elevasis.config.ts`
50
+
51
+ Project-level configuration. The scaffolded file includes `templateVersion`, which tracks which template generation your project uses, plus commented-out options (`defaultStatus`, `dev.port`) so you can discover available settings without looking them up:
52
+
53
+ ```ts
54
+ import type { ElevasConfig } from '@elevasis/sdk'
55
+
56
+ export default {
57
+ templateVersion: 28,
58
+ // defaultStatus: 'dev', // Default status for new resources ('dev' | 'prod')
59
+ // dev: { port: 5170 }, // Local API port (internal development only)
60
+ } satisfies ElevasConfig
61
+ ```
62
+
63
+ Leave this file minimal -- the platform provides sensible defaults. Do not remove `templateVersion`; it is read by `elevasis-sdk update` to determine which template changes need to be applied to your project.
64
+
65
+ ---
66
+
67
+ ## Documentation
68
+
69
+ ### `docs/index.mdx`
70
+
71
+ The entry point for your workspace's documentation. Documentation files in `docs/` are deployed alongside your code during `elevasis-sdk deploy` and rendered in the Elevasis platform UI.
72
+
73
+ Use MDX frontmatter to set page metadata:
74
+
75
+ ```yaml
76
+ ---
77
+ title: Overview
78
+ description: Documentation for this project
79
+ order: 0
80
+ ---
81
+ ```
82
+
83
+ Add more pages by creating additional `.mdx` files in `docs/`. Nested directories create sections: `docs/guides/setup.mdx` becomes a `guides/setup` page under your deployment's documentation.
84
+
85
+ ### `docs/project-map.mdx`
86
+
87
+ Auto-generated by `elevasis-sdk deploy` on every deploy and by `/meta fix` step 8. Contains a full project snapshot: organization, SDK version, template version, last deploy date, source domains, resource tables (workflows and agents), documentation index, SDK reference summary, commands/rules/skills, memory system listing, and configuration state. The agent reads this file at session start for project orientation.
88
+
89
+ This file is fully auto-generated -- do not edit manually. Changes are overwritten on the next deploy.
90
+
91
+ ### `docs/priorities.mdx`
92
+
93
+ Created by the agent during your first goal discussion. Records current goals, priorities, and next steps for the workspace. Updated as goals change across sessions.
94
+
95
+ This file is NOT scaffolded by default. The agent creates it the first time you discuss project goals or priorities in a session.
96
+
97
+ ### `docs/in-progress/`
98
+
99
+ Work-in-progress task documents created by `/work create`. Each file represents an active work item with objective, plan, progress markers, and resume context. `/work complete` moves finished items to their permanent location in `docs/`.
100
+
101
+ This directory is NOT deployed -- it is filtered out during the doc scan in `elevasis-sdk deploy`.
102
+
103
+ ---
104
+
105
+ ## Progressive Disclosure Directories
106
+
107
+ Only `src/` and `docs/` are scaffolded by `elevasis-sdk init`. The following directories are NOT created by default -- they appear when a specific need arises:
108
+
109
+ | Directory | Created by | When |
110
+ | ---------------------- | -------------------------------- | ------------------------------------------------------------------ |
111
+ | `src/operations/` | `elevasis-sdk init` (default) | Always -- platform-status workflow lives here |
112
+ | `src/example/` | `elevasis-sdk init` (default) | Always -- echo starter workflow lives here (replace with your own) |
113
+ | `src/shared/` | `elevasis-sdk init` (default) | Always -- cross-domain shared utilities (starts empty) |
114
+ | `docs/` | `elevasis-sdk init` (default) | Always |
115
+ | `docs/in-progress/` | Agent (on first `/work create`) | When you create a task doc for in-progress work |
116
+ | `docs/project-map.mdx` | `elevasis-sdk deploy` | Auto-generated on every deploy |
117
+ | `docs/priorities.mdx` | Agent (on first goal discussion) | When you discuss project goals or priorities |
118
+ | `data/` | Agent (on demand) | When you connect a database |
119
+ | `scripts/` | Agent (on demand) | When you need local scripts not deployed to the platform |
120
+ | `src/lib/` | Agent (on demand) | When shared code exists between two or more workflows |
121
+
122
+ This structure keeps the initial workspace minimal and adds directories only when they earn their place.
123
+
124
+ ### `src/lib/`
125
+
126
+ Legacy shared code directory. In v5+ projects, use `src/shared/` for cross-domain utilities instead. The agent may still create `src/lib/` in older projects that predate the domain-based organization. Included in the esbuild bundle alongside workflow code.
127
+
128
+ ### `data/`
129
+
130
+ Created by the agent when you connect a database. Contains `schema.ts` which documents your database schema as TypeScript types. The agent reads this file to understand your data model when writing workflow steps that call the Supabase tool. Not deployed -- it is local documentation for the agent.
131
+
132
+ ### `scripts/`
133
+
134
+ Local utility scripts for tasks that do not run on the platform: database seeds, data migrations, one-off transformations, local testing helpers. Created on demand when you need a local script. Not deployed, not bundled.
135
+
136
+ ---
137
+
138
+ ## `elevasis-sdk deploy` Scope
139
+
140
+ `elevasis-sdk deploy` touches only two directories:
141
+
142
+ | Directory | Action | Deployed? |
143
+ | ------------------- | ------------------------------------------------------------------------- | --------- |
144
+ | `src/` | Bundle into `dist/bundle.js` via esbuild (includes `src/lib/` if present) | Yes |
145
+ | `docs/` | Scan `.mdx` files, upload as documentation | Yes |
146
+ | `docs/in-progress/` | Ignored -- work-in-progress, not deployed | No |
147
+ | `data/` | Ignored -- local documentation for the agent | No |
148
+ | `scripts/` | Ignored -- local scripts, not deployed | No |
149
+ | `.claude/` | Ignored -- local development only | No |
150
+
151
+ ---
152
+
153
+ ## Configuration Files
154
+
155
+ ### `.env`
156
+
157
+ Contains your `ELEVASIS_PLATFORM_KEY`. This file is gitignored. Never commit it.
158
+
159
+ ### `.npmrc`
160
+
161
+ Sets `auto-install-peers = true`. The SDK uses Zod as a peer dependency, so this ensures Zod installs automatically.
162
+
163
+ ### `tsconfig.json`
164
+
165
+ App-focused TypeScript configuration. It does not include `declaration` or `declarationMap` settings because your project is a deployable application, not a library.
166
+
167
+ ### `.gitignore`
168
+
169
+ Pre-configured to exclude:
170
+
171
+ - `node_modules/` -- installed packages
172
+ - `.env` -- API key
173
+ - `dist/` -- generated by deploy, never commit
174
+ - `__elevasis_worker.ts` -- temporary file generated during deployment
175
+ - `.claude/settings.local.json` -- local Claude Code overrides
176
+ - `.claude/memory/` -- your personal cross-session project memory (profile, errors, decisions)
177
+
178
+ ---
179
+
180
+ ## Claude Code Integration
181
+
182
+ The `.claude/` directory and `CLAUDE.md` give Claude Code full awareness of the SDK, CLI, and your project structure from the first session.
183
+
184
+ ### `CLAUDE.md`
185
+
186
+ The most important file for AI-assisted development. It provides Claude Code with:
187
+
188
+ - **Project orientation** -- what an Elevasis SDK project is and how it works
189
+ - **Project structure** -- which files contain resources, documentation, and configuration
190
+ - **SDK patterns** -- working code examples for resource definitions, Zod schemas, and the `OrganizationResources` export
191
+ - **CLI reference** -- all commands with flags (`check`, `deploy`, `exec`, `resources`, `executions`, `execution`, `deployments`, `env list/set/remove`)
192
+ - **Development rules** -- conventions the agent should enforce (source in `src/`, docs in `docs/`, use `@elevasis/sdk` types only)
193
+
194
+ Do not remove or heavily edit `CLAUDE.md`. It is the primary context source that makes the slash commands work well.
195
+
196
+ ### `.claude/settings.json`
197
+
198
+ Configures Claude Code for the workspace: disables auto-compaction (prevents losing earlier context in long sessions) and registers three hooks -- a PreToolUse boundary hook, a PostToolUse formatting/type-check hook, and a PostToolUseFailure error recovery hook.
199
+
200
+ ### `.claude/memory/`
201
+
202
+ Created when you run `/meta init` in Claude Code. The agent asks six onboarding questions about your organization, project goals, integrations, and experience level. Answers are stored here as markdown files and used to personalize subsequent sessions.
203
+
204
+ ```
205
+ .claude/memory/
206
+ ├── index.md # Root index linking all memory topics
207
+ ├── profile/ # Developer profile (created by /meta init)
208
+ │ ├── index.md
209
+ │ ├── identity.md # Organization, goals, integrations
210
+ ├── skills.md # Skill dimensions and Growth Log
211
+ │ └── preferences.md # Verbosity and guidance style
212
+ ├── deployment-state.md # Latest deployment outcomes
213
+ ├── decisions.md # Architecture decisions recorded over time
214
+ └── errors/ # Error patterns and resolutions
215
+ ```
216
+
217
+ This directory is gitignored -- it is personal to you and not shared with collaborators. All cross-session knowledge (profile, errors, deployment state, decisions) lives here as plain markdown.
218
+
219
+ ---
220
+
221
+ ## Slash Commands
222
+
223
+ The `.claude/commands/` directory contains four commands covering the core development loop:
224
+
225
+ - **`/meta`** -- Project lifecycle: init, status, fix, deploy, health
226
+ - **`/docs`** -- Browse, create, and verify permanent documentation
227
+ - **`/work`** -- Task tracking across sessions: list, create, save, resume, complete
228
+ - **`/tutorial`** -- Progressive learning path adapted to your skill profile
229
+
230
+ For detailed command documentation, see [Agent System](agent).
231
+
232
+ ---
233
+
234
+ ## File Classification
235
+
236
+ Not all scaffolded files participate in template updates. Files fall into two categories:
237
+
238
+ **SCAFFOLD_FILES total: 32**
239
+
240
+ **INIT_ONLY** (14 files) -- Written once during `elevasis-sdk init`, never updated by `elevasis-sdk update`:
241
+
242
+ - `package.json`, `pnpm-workspace.yaml`, `tsconfig.json`
243
+ - `.env`, `.npmrc`
244
+ - `src/index.ts`, `src/operations/platform-status.ts`, `src/operations/index.ts`, `src/example/echo.ts`, `src/example/index.ts`, `src/shared/.gitkeep`
245
+ - `docs/index.mdx`, `docs/in-progress/.gitkeep`
246
+ - `.claude/rules/workspace-patterns.md`
247
+
248
+ **MANAGED** (18 files) -- Written during `elevasis-sdk init` and checked/updatable by `elevasis-sdk update`:
249
+
250
+ - `elevasis.config.ts`, `.gitignore`, `CLAUDE.md`, `.claude/settings.json`
251
+ - Three hooks: `.claude/hooks/enforce-sdk-boundary.mjs`, `.claude/hooks/post-edit-validate.mjs`, `.claude/hooks/tool-failure-recovery.mjs`
252
+ - Four command files: `.claude/commands/meta.md`, `.claude/commands/docs.md`, `.claude/commands/tutorial.md`, `.claude/commands/work.md`
253
+ - One skill: `.claude/skills/creds/SKILL.md`
254
+ - Five rule files: `.claude/rules/sdk-patterns.md`, `.claude/rules/docs-authoring.md`, `.claude/rules/memory-conventions.md`, `.claude/rules/project-map.md`, `.claude/rules/task-tracking.md`
255
+ - One script: `.claude/scripts/statusline-command.js`
256
+
257
+ Run `elevasis-sdk update` after installing a new SDK version to bring managed files up to date. The command adds missing files directly and flags files that differ from the new template for agent-assisted review via `/meta fix`.
258
+
259
+ ---
260
+
261
+ ## File Reference
262
+
263
+ | File | When You Edit It |
264
+ | ----------------------- | ------------------------------------------------------------------------------ |
265
+ | `src/index.ts` | Adding or removing resources (the `/resource` command does this automatically) |
266
+ | `src/<domain>/*.ts` | Writing and modifying workflow logic (organized by business domain) |
267
+ | `docs/index.mdx` | Updating project documentation |
268
+ | `docs/project-map.mdx` | Never -- auto-generated by `elevasis-sdk deploy` |
269
+ | `docs/priorities.mdx` | When goals or priorities change |
270
+ | `elevasis.config.ts` | Changing project-level settings |
271
+ | `.env` | Adding environment variables |
272
+ | `CLAUDE.md` | Rarely -- only to add project-specific context |
273
+ | `.claude/commands/*.md` | Rarely -- commands work well as scaffolded |
274
+
275
+ ---
276
+
277
+ **Last Updated:** 2026-03-03