@elevasis/sdk 0.4.5 → 0.4.7
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.
- package/dist/cli.cjs +829 -413
- package/dist/index.d.ts +79 -14
- package/dist/index.js +17 -12
- package/dist/templates.js +747 -0
- package/dist/types/templates.d.ts +1 -0
- package/dist/types/worker/index.d.ts +6 -0
- package/dist/types/worker/platform.d.ts +32 -0
- package/dist/worker/index.js +4701 -9
- package/package.json +10 -3
- package/reference/_index.md +95 -0
- package/reference/_navigation.md +104 -0
- package/reference/cli/index.mdx +497 -0
- package/reference/concepts/index.mdx +203 -0
- package/reference/deployment/api.mdx +297 -0
- package/reference/deployment/index.mdx +153 -0
- package/reference/developer/interaction-guidance.mdx +213 -0
- package/reference/framework/agent.mdx +175 -0
- package/reference/framework/documentation.mdx +92 -0
- package/reference/framework/index.mdx +95 -0
- package/reference/framework/memory.mdx +337 -0
- package/reference/framework/project-structure.mdx +294 -0
- package/reference/getting-started/index.mdx +148 -0
- package/reference/index.mdx +113 -0
- package/reference/platform-tools/examples.mdx +187 -0
- package/reference/platform-tools/index.mdx +182 -0
- package/reference/resources/index.mdx +289 -0
- package/reference/resources/patterns.mdx +341 -0
- package/reference/resources/types.mdx +207 -0
- package/reference/roadmap/index.mdx +147 -0
- package/reference/runtime/index.mdx +141 -0
- package/reference/runtime/limits.mdx +77 -0
- package/reference/security/credentials.mdx +141 -0
- package/reference/templates/data-enrichment.mdx +162 -0
- package/reference/templates/email-sender.mdx +135 -0
- package/reference/templates/lead-scorer.mdx +175 -0
- package/reference/templates/pdf-generator.mdx +151 -0
- package/reference/templates/recurring-job.mdx +189 -0
- package/reference/templates/text-classifier.mdx +147 -0
- package/reference/templates/web-scraper.mdx +135 -0
- package/reference/troubleshooting/common-errors.mdx +210 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Memory System
|
|
3
|
+
description: Cross-session project knowledge stored in .claude/memory/ -- deployment state, environment, decisions, and error patterns that persist between Claude Code sessions
|
|
4
|
+
loadWhen: "Working with agent memory or session state"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The memory system gives Claude Code a structured knowledge base for your project that survives across sessions. Deployment history, discovered credentials, architectural decisions, and error patterns are all written to `.claude/memory/` as the project evolves -- so the agent never starts from scratch.
|
|
8
|
+
|
|
9
|
+
The `memory/` directory is gitignored and personal to each developer. The `profile/` subdirectory is created by `/meta init` during first-run setup. All other topics are created by the agent as the project evolves.
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Without project memory, the agent starts every session with only the context of the current conversation. It cannot remember that you already deployed yesterday, that a particular credential is configured, or that you encountered and solved a specific TypeScript error last week.
|
|
14
|
+
|
|
15
|
+
With project memory, the agent loads a root index at session start, sees what has been recorded, and can retrieve detail on demand. Error patterns are matched before diagnosis. Deployment state is available before deploying again. The agent can say "I've seen this before -- here's the fix" instead of repeating the same diagnostic process.
|
|
16
|
+
|
|
17
|
+
## Architecture
|
|
18
|
+
|
|
19
|
+
Memory is organized as a hierarchical index tree. Every directory has an `index.md` that maps to its children -- either content files or subdirectories with their own indexes.
|
|
20
|
+
|
|
21
|
+
**The invariant:** A reader always starts at the root index and drills down. The agent reads `memory/index.md` at session start. It reads individual topic files on demand when the user asks about that topic or the agent is about to perform an action in that domain.
|
|
22
|
+
|
|
23
|
+
**The scaling rule:** When a content file outgrows a single document, it graduates into a subdirectory:
|
|
24
|
+
|
|
25
|
+
1. `topic.md` becomes `topic/index.md` + sub-files
|
|
26
|
+
2. The parent index updates its link from `topic.md` to `topic/index.md`
|
|
27
|
+
3. The new sub-index maps to the sub-files
|
|
28
|
+
|
|
29
|
+
This pattern is recursive. Subdirectories can split further as needed. The agent applies its own judgment about when a file has grown past usefulness as a single document.
|
|
30
|
+
|
|
31
|
+
### Starting Structure
|
|
32
|
+
|
|
33
|
+
After `/meta init` and a first deployment, the structure looks like this:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
.claude/memory/
|
|
37
|
+
├── index.md # Root index -- read at session start
|
|
38
|
+
├── profile/ # Developer profile (created by /meta init)
|
|
39
|
+
│ ├── index.md # Profile summary with links to sub-files
|
|
40
|
+
│ ├── identity.md # Organization, industry, goals, integrations
|
|
41
|
+
│ ├── skills.md # TypeScript level, automation experience, growth
|
|
42
|
+
│ └── preferences.md # Verbosity, guidance style, interaction patterns
|
|
43
|
+
├── deployment-state.md # Deploy IDs, resource inventory, org info
|
|
44
|
+
├── environment.md # Credentials, API keys, env vars
|
|
45
|
+
├── decisions.md # Architectural decisions and patterns
|
|
46
|
+
└── errors/ # Subdirectory -- multiple categories
|
|
47
|
+
├── index.md # Error category summary with counts
|
|
48
|
+
├── deploy.md # Deployment error patterns
|
|
49
|
+
├── runtime.md # Runtime execution error patterns
|
|
50
|
+
└── typescript.md # Type and build error patterns
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Profile tracking starts as a subdirectory because it has natural sub-topics from day one (identity, skills, preferences). Error tracking starts as a subdirectory because it naturally spans multiple categories. Other topics start as flat files.
|
|
54
|
+
|
|
55
|
+
### Grown Structure
|
|
56
|
+
|
|
57
|
+
As a project matures, other topics may split:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
.claude/memory/
|
|
61
|
+
├── index.md
|
|
62
|
+
├── environment.md
|
|
63
|
+
├── decisions.md
|
|
64
|
+
├── deployment-state/ # Grew large enough to split
|
|
65
|
+
│ ├── index.md
|
|
66
|
+
│ ├── resources.md
|
|
67
|
+
│ └── history.md
|
|
68
|
+
└── errors/
|
|
69
|
+
├── index.md
|
|
70
|
+
├── deploy.md
|
|
71
|
+
├── typescript.md
|
|
72
|
+
└── runtime/ # Runtime errors grew further
|
|
73
|
+
├── index.md
|
|
74
|
+
├── lead-scorer.md
|
|
75
|
+
└── email-sender.md
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Memory Topics
|
|
79
|
+
|
|
80
|
+
### Developer Profile
|
|
81
|
+
|
|
82
|
+
The `profile/` directory stores the developer's personal context -- organization details, skill levels, goals, and interaction preferences. It is created during `/meta init` guided setup and is the first thing the root index links to.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
.claude/memory/profile/
|
|
86
|
+
├── index.md # Profile summary with links to sub-files
|
|
87
|
+
├── identity.md # Organization, industry, goals, integrations
|
|
88
|
+
├── skills.md # TypeScript level, automation experience, growth history
|
|
89
|
+
└── preferences.md # Verbosity, guidance style, interaction patterns
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**`identity.md`** records the organization name, industry, size, project goals, and known tool integrations. Example:
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
# Identity
|
|
96
|
+
|
|
97
|
+
| Field | Value |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| Organization | Acme Corp |
|
|
100
|
+
| Industry | E-commerce |
|
|
101
|
+
| Size | 10-50 |
|
|
102
|
+
|
|
103
|
+
## Project Goals
|
|
104
|
+
|
|
105
|
+
- Automate lead scoring from Attio CRM
|
|
106
|
+
- Send follow-up emails via Resend
|
|
107
|
+
- Weekly pipeline reports
|
|
108
|
+
|
|
109
|
+
## Known Integrations
|
|
110
|
+
|
|
111
|
+
- Attio (CRM)
|
|
112
|
+
- Resend (email)
|
|
113
|
+
- Google Sheets (reporting)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**`skills.md`** stores skill levels as structured values so the Adaptive Guidance rules can apply them consistently. It also tracks a growth history table so the agent can detect when a level upgrade is warranted. Example:
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
# Skills
|
|
120
|
+
|
|
121
|
+
| Skill | Level | Since |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| TypeScript | beginner | 2026-02-25 |
|
|
124
|
+
| AI automation | new | 2026-02-25 |
|
|
125
|
+
|
|
126
|
+
## Growth History
|
|
127
|
+
|
|
128
|
+
| Date | Change | Evidence |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**`preferences.md`** stores verbosity and proactive guidance settings. Example:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
# Preferences
|
|
136
|
+
|
|
137
|
+
| Setting | Value |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Verbosity | detailed |
|
|
140
|
+
| Proactive guidance | yes |
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### What Profile-as-Memory Eliminates
|
|
144
|
+
|
|
145
|
+
Storing profile data in the memory system instead of a separate JSON file removes:
|
|
146
|
+
|
|
147
|
+
- The `.claude/profile.json` file entirely
|
|
148
|
+
- A separate JSON schema to maintain
|
|
149
|
+
- A separate read path at session start -- profile and memory index are unified under `memory/index.md`
|
|
150
|
+
- Onboarding questions baked into `CLAUDE.md` that write JSON -- `/meta init` writes markdown instead
|
|
151
|
+
|
|
152
|
+
### Root Index
|
|
153
|
+
|
|
154
|
+
`memory/index.md` is the only file read at session start. It lists all topics with their last-updated dates, giving the agent enough context to know what has been recorded without loading any detail.
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
# Project Memory
|
|
158
|
+
|
|
159
|
+
Agent-maintained cross-session knowledge base. Updated automatically.
|
|
160
|
+
|
|
161
|
+
| Entry | Topic | Last Updated |
|
|
162
|
+
| --- | --- | --- |
|
|
163
|
+
| [profile/](profile/index.md) | Developer profile (skills, identity, preferences) | 2026-02-25 |
|
|
164
|
+
| [deployment-state.md](deployment-state.md) | Deploy history, resource inventory, org info | 2026-02-25 |
|
|
165
|
+
| [environment.md](environment.md) | Credentials, API keys, env vars | 2026-02-25 |
|
|
166
|
+
| [decisions.md](decisions.md) | Architectural decisions and patterns | 2026-02-26 |
|
|
167
|
+
| [errors/](errors/index.md) | Error patterns by category | 2026-02-26 |
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Subdirectory entries link to their `index.md` rather than the directory itself.
|
|
171
|
+
|
|
172
|
+
### Deployment State
|
|
173
|
+
|
|
174
|
+
`deployment-state.md` tracks the most recent deploy and resource inventory. The agent updates it after every successful deployment.
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
# Deployment State
|
|
178
|
+
|
|
179
|
+
## Latest Deploy
|
|
180
|
+
|
|
181
|
+
| Field | Value |
|
|
182
|
+
| --- | --- |
|
|
183
|
+
| Date | 2026-02-26 |
|
|
184
|
+
| Deploy ID | dep_abc123 |
|
|
185
|
+
| Resource count | 2 |
|
|
186
|
+
| Organization | acme-corp |
|
|
187
|
+
|
|
188
|
+
## Resources
|
|
189
|
+
|
|
190
|
+
- `echo` (workflow, dev) -- echoes input, starter resource
|
|
191
|
+
- `lead-scorer` (workflow, production) -- scores leads from Attio
|
|
192
|
+
|
|
193
|
+
## Deploy History
|
|
194
|
+
|
|
195
|
+
| Date | Deploy ID | Resources | Status |
|
|
196
|
+
| --- | --- | --- | --- |
|
|
197
|
+
| 2026-02-26 | dep_abc123 | 2 | success |
|
|
198
|
+
| 2026-02-25 | dep_xyz789 | 1 | success |
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Environment
|
|
202
|
+
|
|
203
|
+
`environment.md` records discovered credentials and environment variable status. The agent updates it when credentials are confirmed via the command center or deployment output.
|
|
204
|
+
|
|
205
|
+
### Decisions
|
|
206
|
+
|
|
207
|
+
`decisions.md` captures architectural choices as a table: which tools were chosen, what patterns were established, and why. The agent adds a row when the user makes a significant decision during development.
|
|
208
|
+
|
|
209
|
+
## Error Tracking
|
|
210
|
+
|
|
211
|
+
Error tracking is the first memory topic to outgrow a flat file. It starts as a subdirectory with one file per error category.
|
|
212
|
+
|
|
213
|
+
### Error Index
|
|
214
|
+
|
|
215
|
+
`errors/index.md` provides a high-level summary of known error patterns by category. The agent reads this file (via the root index) at session start.
|
|
216
|
+
|
|
217
|
+
```markdown
|
|
218
|
+
# Error Patterns
|
|
219
|
+
|
|
220
|
+
Error pattern tracking by category. Updated when errors are diagnosed and resolved.
|
|
221
|
+
|
|
222
|
+
| Entry | Category | Patterns | Total Occurrences | Last Seen |
|
|
223
|
+
| --- | --- | --- | --- | --- |
|
|
224
|
+
| [deploy.md](deploy.md) | Deployment | 2 | 3 | 2026-02-26 |
|
|
225
|
+
| [runtime.md](runtime.md) | Runtime | 1 | 1 | 2026-02-26 |
|
|
226
|
+
| [typescript.md](typescript.md) | TypeScript | 1 | 2 | 2026-02-25 |
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
- **Patterns** -- count of unique error patterns in the category file
|
|
230
|
+
- **Total Occurrences** -- sum of all occurrences across patterns
|
|
231
|
+
- **Last Seen** -- most recent date any error in this category was seen
|
|
232
|
+
|
|
233
|
+
### Category Files
|
|
234
|
+
|
|
235
|
+
Each category file is a table of known error patterns with resolutions:
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
# Deploy Errors
|
|
239
|
+
|
|
240
|
+
| Last Seen | Error | Resolution | Occurrences |
|
|
241
|
+
| --- | --- | --- | --- |
|
|
242
|
+
| 2026-02-25 | `ELEVASIS_API_KEY not set` | Added key to `.env` | 2 |
|
|
243
|
+
| 2026-02-26 | `Schema validation: missing outputSchema` | Added Zod output schema to workflow | 1 |
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Runtime errors include the resource name since the same error in different resources may have different causes:
|
|
247
|
+
|
|
248
|
+
```markdown
|
|
249
|
+
# Runtime Errors
|
|
250
|
+
|
|
251
|
+
| Last Seen | Resource | Error | Resolution | Occurrences |
|
|
252
|
+
| --- | --- | --- | --- | --- |
|
|
253
|
+
| 2026-02-26 | lead-scorer | `PlatformToolError: credential not found` | Set credential via `elevasis env set` | 1 |
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Error Resolution Flow
|
|
257
|
+
|
|
258
|
+
When the agent encounters an error, it follows this sequence:
|
|
259
|
+
|
|
260
|
+
1. Checks `memory/errors/index.md` (already loaded via root index) for a matching category
|
|
261
|
+
2. If the relevant category has known patterns, reads the category file
|
|
262
|
+
3. If a match exists, applies the known resolution immediately -- "I've seen this before, here's the fix"
|
|
263
|
+
4. If no match exists, diagnoses normally, then logs the new pattern
|
|
264
|
+
|
|
265
|
+
When the agent logs a resolved error:
|
|
266
|
+
|
|
267
|
+
1. Reads the relevant category file (e.g., `memory/errors/deploy.md`)
|
|
268
|
+
2. If the pattern already exists, increments `Occurrences` and updates `Last Seen`
|
|
269
|
+
3. If it is a new pattern, adds a new row
|
|
270
|
+
4. Updates the error index: recalculates `Patterns`, `Total Occurrences`, and `Last Seen`
|
|
271
|
+
5. If the category file does not exist yet, creates it and adds a row to the error index
|
|
272
|
+
|
|
273
|
+
## Scaling Rule
|
|
274
|
+
|
|
275
|
+
When a file has grown past usefulness as a single document -- too many rows to scan, too many unrelated concerns, or too much context to load for a targeted lookup -- split it into a subdirectory.
|
|
276
|
+
|
|
277
|
+
**Before split:**
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
memory/
|
|
281
|
+
├── index.md
|
|
282
|
+
└── deployment-state.md # entry: deployment-state.md
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**After split:**
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
memory/
|
|
289
|
+
├── index.md # entry updated: deployment-state/ -> deployment-state/index.md
|
|
290
|
+
└── deployment-state/
|
|
291
|
+
├── index.md
|
|
292
|
+
├── resources.md
|
|
293
|
+
└── history.md
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The parent index link changes from `deployment-state.md` to `deployment-state/index.md`. The new sub-index maps to the sub-files. The agent applies this pattern at every depth level.
|
|
297
|
+
|
|
298
|
+
## Maintenance
|
|
299
|
+
|
|
300
|
+
### Pruning
|
|
301
|
+
|
|
302
|
+
Keep content useful, not exhaustive:
|
|
303
|
+
|
|
304
|
+
- Keep the most recent ~20 entries in tables that grow over time (deploy history, error patterns)
|
|
305
|
+
- Drop patterns that have not recurred in 30 or more days unless the resolution was non-obvious
|
|
306
|
+
- Summarize if patterns are worth preserving but detail is not
|
|
307
|
+
|
|
308
|
+
### Index Hygiene
|
|
309
|
+
|
|
310
|
+
- If a file exists but is not in its parent index, add it
|
|
311
|
+
- If an index references a missing file, remove the row
|
|
312
|
+
|
|
313
|
+
The agent self-heals on read. Index hygiene is applied as part of normal session operation.
|
|
314
|
+
|
|
315
|
+
### Promotion
|
|
316
|
+
|
|
317
|
+
If an error pattern recurs 3 or more times, promote it to a rule in the `CLAUDE.md` Rules section. Rules prevent errors rather than diagnosing them.
|
|
318
|
+
|
|
319
|
+
## Relationship to Claude Code Auto-Memory
|
|
320
|
+
|
|
321
|
+
Claude Code maintains its own auto-memory at `~/.claude/projects/{hash}/memory/MEMORY.md`. Project memory is complementary, not a replacement.
|
|
322
|
+
|
|
323
|
+
| Aspect | Auto-Memory (`MEMORY.md`) | Project Memory (`.claude/memory/`) |
|
|
324
|
+
| --- | --- | --- |
|
|
325
|
+
| Maintained by | Claude Code platform | CLAUDE.md instructions |
|
|
326
|
+
| Scope | Organic discoveries | Explicit project state |
|
|
327
|
+
| Portability | Machine-specific | Gitignored (personal to each developer) |
|
|
328
|
+
| Content | General patterns | Deployment state, resources, credentials, errors |
|
|
329
|
+
| User control | Implicit | Explicit (can read, edit, delete) |
|
|
330
|
+
| Session load cost | Full file (truncated at 200 lines) | Root index only (~5 lines); detail on-demand |
|
|
331
|
+
| Scaling | Single file, truncated | Hierarchical tree, unlimited depth |
|
|
332
|
+
|
|
333
|
+
Both should be active. Auto-memory captures things the agent notices organically. Project memory captures structured project state that `CLAUDE.md` explicitly instructs the agent to record.
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
**Last Updated:** 2026-02-25
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Project Structure
|
|
3
|
+
description: Each file scaffolded by elevasis init and its purpose in the development workflow
|
|
4
|
+
loadWhen: "Understanding scaffolded files or project layout"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
`elevasis 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 imports and re-exports all resources from `src/workflows/` 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 { echo } from './workflows/echo.js'
|
|
20
|
+
|
|
21
|
+
const org: OrganizationResources = {
|
|
22
|
+
workflows: [echo],
|
|
23
|
+
}
|
|
24
|
+
export default org
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Every resource you add is wired into this file. The `/resource workflow` command updates it automatically.
|
|
28
|
+
|
|
29
|
+
### `src/workflows/echo.ts`
|
|
30
|
+
|
|
31
|
+
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. When you add new workflows, each one gets its own file in `src/workflows/` and is imported into `src/index.ts`.
|
|
32
|
+
|
|
33
|
+
### `elevasis.config.ts`
|
|
34
|
+
|
|
35
|
+
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:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import type { ElevasConfig } from '@elevasis/sdk'
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
templateVersion: 4,
|
|
42
|
+
// defaultStatus: 'dev', // Default status for new resources ('dev' | 'production')
|
|
43
|
+
// dev: { port: 5170 }, // Local API port (internal development only)
|
|
44
|
+
} satisfies ElevasConfig
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Leave this file minimal -- the platform provides sensible defaults. Do not remove `templateVersion`; it is read by `elevasis update` to determine which template changes need to be applied to your project.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Documentation
|
|
52
|
+
|
|
53
|
+
### `docs/index.mdx`
|
|
54
|
+
|
|
55
|
+
The entry point for your workspace's documentation. Documentation files in `docs/` are deployed alongside your code during `elevasis deploy` and rendered in the Elevasis platform UI.
|
|
56
|
+
|
|
57
|
+
Use MDX frontmatter to set page metadata:
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
---
|
|
61
|
+
title: Overview
|
|
62
|
+
description: Documentation for this project
|
|
63
|
+
order: 0
|
|
64
|
+
---
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
### `docs/navigation.mdx`
|
|
70
|
+
|
|
71
|
+
Auto-generated on the first `/meta deploy` and regenerated after each subsequent deploy. Contains a table of all deployed resources (resourceId, name, tools used, schema fields) and an index of all documentation pages. The agent reads this file during navigation to understand the current state of your workspace. You can also read it for a quick project overview.
|
|
72
|
+
|
|
73
|
+
This file is MANAGED -- `elevasis update` ensures it exists but does not overwrite it. The actual content is generated by `/meta deploy`.
|
|
74
|
+
|
|
75
|
+
### `docs/priorities.mdx`
|
|
76
|
+
|
|
77
|
+
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.
|
|
78
|
+
|
|
79
|
+
This file is NOT scaffolded by default. The agent creates it the first time you discuss project goals or priorities in a session.
|
|
80
|
+
|
|
81
|
+
### `docs/in-progress/`
|
|
82
|
+
|
|
83
|
+
Work-in-progress documentation created by `/docs checkpoint`. Each file represents an active work item with current state, decisions made, and remaining tasks. `/docs cleanup` moves completed items to their final location in `docs/`. `/docs resume` reviews these files at session start.
|
|
84
|
+
|
|
85
|
+
This directory is NOT deployed -- it is filtered out during the doc scan in `elevasis deploy`.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Progressive Disclosure Directories
|
|
90
|
+
|
|
91
|
+
Only `src/` and `docs/` are scaffolded by `elevasis init`. The following directories are NOT created by default -- they appear when a specific need arises:
|
|
92
|
+
|
|
93
|
+
| Directory | Created by | When |
|
|
94
|
+
|-----------|-----------|------|
|
|
95
|
+
| `src/workflows/` | `elevasis init` (default) | Always -- starter workflow `echo.ts` lives here |
|
|
96
|
+
| `docs/` | `elevasis init` (default) | Always |
|
|
97
|
+
| `docs/in-progress/` | Agent (on first `/docs checkpoint`) | When you save work-in-progress across sessions |
|
|
98
|
+
| `docs/navigation.mdx` | Agent (on first `/meta deploy`) | Auto-generated and updated on each deploy |
|
|
99
|
+
| `docs/priorities.mdx` | Agent (on first goal discussion) | When you discuss project goals or priorities |
|
|
100
|
+
| `data/` | `/database init` command | When you connect a database |
|
|
101
|
+
| `scripts/` | Agent (on demand) | When you need local scripts not deployed to the platform |
|
|
102
|
+
| `src/lib/` | Agent (on demand) | When shared code exists between two or more workflows |
|
|
103
|
+
|
|
104
|
+
This structure keeps the initial workspace minimal and adds directories only when they earn their place.
|
|
105
|
+
|
|
106
|
+
### `src/lib/`
|
|
107
|
+
|
|
108
|
+
Shared TypeScript utilities, types, and helpers used by multiple workflows. The agent creates this directory when you have code shared between two or more workflow files -- for example, retry logic, formatters, or shared types. Included in the esbuild bundle alongside workflow code. Not scaffolded by default to avoid premature abstraction.
|
|
109
|
+
|
|
110
|
+
### `data/`
|
|
111
|
+
|
|
112
|
+
Created by `/database init`. 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.
|
|
113
|
+
|
|
114
|
+
### `scripts/`
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## `elevasis deploy` Scope
|
|
121
|
+
|
|
122
|
+
`elevasis deploy` touches only two directories:
|
|
123
|
+
|
|
124
|
+
| Directory | Action | Deployed? |
|
|
125
|
+
|-----------|--------|-----------|
|
|
126
|
+
| `src/` | Bundle into `dist/bundle.js` via esbuild (includes `src/lib/` if present) | Yes |
|
|
127
|
+
| `docs/` | Scan `.mdx` files, upload as documentation | Yes |
|
|
128
|
+
| `docs/in-progress/` | Ignored -- work-in-progress, not deployed | No |
|
|
129
|
+
| `data/` | Ignored -- local documentation for the agent | No |
|
|
130
|
+
| `scripts/` | Ignored -- local scripts, not deployed | No |
|
|
131
|
+
| `.claude/` | Ignored -- local development only | No |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Configuration Files
|
|
136
|
+
|
|
137
|
+
### `.env`
|
|
138
|
+
|
|
139
|
+
Contains your `ELEVASIS_API_KEY`. This file is gitignored. Never commit it.
|
|
140
|
+
|
|
141
|
+
### `.env.example`
|
|
142
|
+
|
|
143
|
+
A git-safe template showing which variables are needed:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
ELEVASIS_API_KEY=sk_your_key_here
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Commit this file so collaborators know what to configure.
|
|
150
|
+
|
|
151
|
+
### `.npmrc`
|
|
152
|
+
|
|
153
|
+
Sets `auto-install-peers = true`. The SDK uses Zod as a peer dependency, so this ensures Zod installs automatically.
|
|
154
|
+
|
|
155
|
+
### `tsconfig.json`
|
|
156
|
+
|
|
157
|
+
App-focused TypeScript configuration. It does not include `declaration` or `declarationMap` settings because your project is a deployable application, not a library.
|
|
158
|
+
|
|
159
|
+
### `.gitignore`
|
|
160
|
+
|
|
161
|
+
Pre-configured to exclude:
|
|
162
|
+
- `node_modules/` -- installed packages
|
|
163
|
+
- `.env` -- API key
|
|
164
|
+
- `dist/` -- generated by deploy, never commit
|
|
165
|
+
- `__elevasis_worker.ts` -- temporary file generated during deployment
|
|
166
|
+
- `.claude/settings.local.json` -- local Claude Code overrides
|
|
167
|
+
- `.claude/memory/` -- your personal cross-session project memory (profile, errors, decisions)
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Claude Code Integration
|
|
172
|
+
|
|
173
|
+
The `.claude/` directory and `CLAUDE.md` give Claude Code full awareness of the SDK, CLI, and your project structure from the first session.
|
|
174
|
+
|
|
175
|
+
### `CLAUDE.md`
|
|
176
|
+
|
|
177
|
+
The most important file for AI-assisted development. It provides Claude Code with:
|
|
178
|
+
|
|
179
|
+
- **Project orientation** -- what an Elevasis SDK project is and how it works
|
|
180
|
+
- **Project structure** -- which files contain resources, documentation, and configuration
|
|
181
|
+
- **SDK patterns** -- working code examples for resource definitions, Zod schemas, and the `OrganizationResources` export
|
|
182
|
+
- **CLI reference** -- all commands with flags (`check`, `deploy`, `exec`, `resources`, `executions`, `execution`, `deployments`, `env list/set/remove`)
|
|
183
|
+
- **Development rules** -- conventions the agent should enforce (source in `src/`, docs in `docs/`, use `@elevasis/sdk` types only)
|
|
184
|
+
|
|
185
|
+
Do not remove or heavily edit `CLAUDE.md`. It is the primary context source that makes the slash commands work well.
|
|
186
|
+
|
|
187
|
+
### `.claude/settings.json`
|
|
188
|
+
|
|
189
|
+
Sets `autoCompact: false`. This prevents Claude Code from automatically compacting context during long sessions, which can lose important earlier context about your project.
|
|
190
|
+
|
|
191
|
+
### `.claude/memory/`
|
|
192
|
+
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
.claude/memory/
|
|
197
|
+
├── index.md # Root index linking all memory topics
|
|
198
|
+
├── profile/ # Developer profile (created by /meta init)
|
|
199
|
+
│ ├── index.md
|
|
200
|
+
│ ├── identity.md # Organization, goals, integrations
|
|
201
|
+
│ ├── skills.md # TypeScript level, automation experience
|
|
202
|
+
│ └── preferences.md # Verbosity and guidance style
|
|
203
|
+
├── deployment-state.md # Latest deployment outcomes
|
|
204
|
+
├── decisions.md # Architecture decisions recorded over time
|
|
205
|
+
└── errors/ # Error patterns and resolutions
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
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.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Slash Commands
|
|
213
|
+
|
|
214
|
+
The `.claude/commands/` directory contains nine commands covering the core development loop. Invoke them in Claude Code with `/docs`, `/resource`, `/profile`, `/meta`, `/help`, `/database`, `/agent`, `/templates`, and `/tutorial`.
|
|
215
|
+
|
|
216
|
+
### `/docs` -- Documentation Lifecycle
|
|
217
|
+
|
|
218
|
+
Manages documentation creation and maintenance for `docs/`. Six operations:
|
|
219
|
+
|
|
220
|
+
- **No arguments** -- Show current documentation status: pages in progress, recent changes, and stale entries flagged for review
|
|
221
|
+
- **`create <page-name>`** -- Scaffold a new documentation page with correct frontmatter, populated from your resource definitions
|
|
222
|
+
- **`checkpoint`** -- Save current work progress for session resume. Creates or updates `docs/in-progress/` with current state, decisions made, remaining work, and blockers
|
|
223
|
+
- **`cleanup`** -- Move completed documents from `docs/in-progress/` to their final location. Rebuilds `docs/navigation.mdx`
|
|
224
|
+
- **`resume`** -- Start-of-session review of in-progress docs, priorities, and recent deployment state
|
|
225
|
+
- **`verify`** -- Cross-reference documentation with the codebase. Reports discrepancies against actual resource IDs, schema fields, and platform tools
|
|
226
|
+
|
|
227
|
+
### `/resource` -- Resource Scaffolding
|
|
228
|
+
|
|
229
|
+
Scaffolds new workflow definitions with proper types, Zod schemas, and step structure. Three operations:
|
|
230
|
+
|
|
231
|
+
- **`workflow <name>`** -- Single-step workflow with Zod input/output schemas, config object, contract, step handler, and addition to the `OrganizationResources` export
|
|
232
|
+
- **`multi-step <name>`** -- Multi-step workflow with `StepType.LINEAR` or `StepType.CONDITIONAL`, connected steps, and per-step schemas
|
|
233
|
+
- **`tool-step <name>`** -- Step that calls a platform tool via `platform.call()` with `PlatformToolError` error handling and a credential note
|
|
234
|
+
|
|
235
|
+
### `/meta` -- Project Lifecycle
|
|
236
|
+
|
|
237
|
+
Manages the full lifecycle of your workspace. Seven operations:
|
|
238
|
+
|
|
239
|
+
- **`init`** -- First-run guided setup: installs dependencies, configures `.env`, runs onboarding to build your developer profile in `.claude/memory/`, and optionally deploys the starter workflow. Run this once after `elevasis init`
|
|
240
|
+
- **No arguments** -- Project health status: shows template version, SDK version, profile summary, and a quick drift check for missing files
|
|
241
|
+
- **`update`** -- Full upgrade flow: runs `pnpm update @elevasis/sdk`, then `elevasis update` to add missing files, then reviews and merges any flagged template changes with your customizations intact
|
|
242
|
+
- **`fix`** -- Repairs drift without a version upgrade: restores missing command files, appends missing `.gitignore` entries, verifies CLAUDE.md sections, and checks memory structure consistency
|
|
243
|
+
- **`deploy`** -- Full 9-step deploy pipeline: validate, type-check, verify docs, commit, deploy, bump version, verify platform, update deployment state, and optionally push
|
|
244
|
+
- **`health`** -- Execution debugging and resource status; shows recent executions, analyzes failures, and checks environment connectivity
|
|
245
|
+
- **`develop`** -- Development navigation hub that loads the resource map, SDK reference, and project state
|
|
246
|
+
|
|
247
|
+
### `/templates` -- Workflow Templates
|
|
248
|
+
|
|
249
|
+
Applies pre-built workflow templates to your workspace. Three operations:
|
|
250
|
+
|
|
251
|
+
- **No arguments** -- List available template categories (Data Collection, Data Processing, Communication, CRM, Documents, AI, Scheduling)
|
|
252
|
+
- **`<category>`** -- Show templates in a category with descriptions
|
|
253
|
+
- **`apply <name>`** -- Generate a workflow from a template: writes to `src/workflows/`, wires into `src/index.ts`, prompts for credential setup if needed, and runs `elevasis check` to validate
|
|
254
|
+
|
|
255
|
+
Templates are documentation files bundled with the SDK, not rigid copy-paste code. The agent reads the template and generates a workflow adapted to your existing schemas, credentials, and naming conventions.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## File Classification
|
|
260
|
+
|
|
261
|
+
Not all scaffolded files participate in template updates. Files fall into two categories:
|
|
262
|
+
|
|
263
|
+
**SCAFFOLD_FILES total: 23**
|
|
264
|
+
|
|
265
|
+
**INIT_ONLY** (10 files) -- Written once during `elevasis init`, never updated by `elevasis update`:
|
|
266
|
+
- `package.json`, `pnpm-workspace.yaml`, `tsconfig.json`
|
|
267
|
+
- `.env`, `.env.example`, `.npmrc`
|
|
268
|
+
- `src/index.ts`, `src/workflows/echo.ts`, `docs/index.mdx`, `.claude/settings.json`
|
|
269
|
+
|
|
270
|
+
**MANAGED** (13 files) -- Written during `elevasis init` and checked/updatable by `elevasis update`:
|
|
271
|
+
- `elevasis.config.ts`, `.gitignore`, `CLAUDE.md`, `docs/navigation.mdx`
|
|
272
|
+
- All nine command files: `docs.md`, `resource.md`, `profile.md`, `meta.md`, `help.md`, `database.md`, `agent.md`, `templates.md`, `tutorial.md`
|
|
273
|
+
|
|
274
|
+
Run `elevasis 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 update`.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## File Reference
|
|
279
|
+
|
|
280
|
+
| File | When You Edit It |
|
|
281
|
+
|------|-----------------|
|
|
282
|
+
| `src/index.ts` | Adding or removing resources (the `/resource` command does this automatically) |
|
|
283
|
+
| `src/workflows/*.ts` | Writing and modifying workflow logic |
|
|
284
|
+
| `docs/index.mdx` | Updating project documentation |
|
|
285
|
+
| `docs/navigation.mdx` | Never -- auto-generated by `/meta deploy` |
|
|
286
|
+
| `docs/priorities.mdx` | When goals or priorities change |
|
|
287
|
+
| `elevasis.config.ts` | Changing project-level settings |
|
|
288
|
+
| `.env` | Adding environment variables |
|
|
289
|
+
| `CLAUDE.md` | Rarely -- only to add project-specific context |
|
|
290
|
+
| `.claude/commands/*.md` | Rarely -- commands work well as scaffolded |
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
**Last Updated:** 2026-02-26
|