@elevasis/sdk 0.4.16 → 0.5.1
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 +727 -509
- package/dist/templates.js +44 -328
- package/dist/types/templates.d.ts +1 -1
- package/package.json +10 -10
- package/reference/concepts/index.mdx +1 -1
- package/reference/framework/agent.mdx +62 -88
- package/reference/framework/index.mdx +17 -14
- package/reference/framework/project-structure.mdx +41 -46
- package/reference/getting-started/index.mdx +16 -12
- package/reference/index.mdx +2 -2
- package/reference/resources/index.mdx +80 -33
package/dist/templates.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// package.json
|
|
2
|
+
|
|
3
|
+
// src/cli/commands/templates/core/workspace.ts
|
|
2
4
|
function gitignoreTemplate(ctx = {}) {
|
|
3
5
|
let content = `node_modules/
|
|
4
6
|
.env
|
|
@@ -14,6 +16,8 @@ ui/dist/
|
|
|
14
16
|
}
|
|
15
17
|
return content;
|
|
16
18
|
}
|
|
19
|
+
|
|
20
|
+
// src/cli/commands/templates/core/claude.ts
|
|
17
21
|
function claudeSettingsTemplate() {
|
|
18
22
|
return JSON.stringify({ autoCompact: false }, null, 2) + "\n";
|
|
19
23
|
}
|
|
@@ -67,7 +71,7 @@ proactivity -- to their assessed levels.
|
|
|
67
71
|
| Error history | \`.claude/memory/errors/index.md\` | Debugging errors, checking past fixes |
|
|
68
72
|
| Command View model | \`reference/deployment/command-view.mdx\` | Deploying or building resources that invoke other resources |
|
|
69
73
|
| SDK error reference | \`reference/troubleshooting/common-errors.mdx\` | Unknown error not in workspace memory |
|
|
70
|
-
| Project
|
|
74
|
+
| Project map | \`docs/project-map.mdx\` | Session start, project orientation |
|
|
71
75
|
| Project priorities | \`docs/priorities.mdx\` | Deciding what to work on next |
|
|
72
76
|
| User profile and skills | \`.claude/memory/profile/skills.md\` | Session start (mandatory) |
|
|
73
77
|
| Cross-session memory | \`.claude/memory/index.md\` | Session start, recalling past context |${ctx.hasUI ? `
|
|
@@ -77,23 +81,19 @@ All \`reference/\` paths resolve to \`node_modules/@elevasis/sdk/reference/\`.
|
|
|
77
81
|
|
|
78
82
|
## Rules
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
- The default export must be an \`OrganizationResources\` object
|
|
85
|
-
- Do not import from \`@repo/core\` -- use \`@elevasis/sdk\` types only
|
|
86
|
-
- \`StepType\`, \`ExecutionError\`, \`ToolingError\` are runtime imports from \`'@elevasis/sdk'\`
|
|
87
|
-
- \`platform\`, \`PlatformToolError\` are runtime imports from \`'@elevasis/sdk/worker'\`
|
|
88
|
-
- \`.env\` is for CLI authentication only (\`ELEVASIS_API_KEY\`) -- never deployed, never in workers
|
|
89
|
-
- Integration credentials are managed via the \`creds\` skill (auto-triggers when you mention credentials) or the Command Center UI
|
|
84
|
+
SDK patterns (imports, source structure, platform tools) are auto-loaded from
|
|
85
|
+
\`.claude/rules/sdk-patterns.md\`. Project-specific patterns live in
|
|
86
|
+
\`.claude/rules/workspace-patterns.md\`.
|
|
87
|
+
|
|
90
88
|
- Documentation goes in \`docs/\` as \`.mdx\` files
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
|
|
90
|
+
### Error Handling
|
|
91
|
+
|
|
92
|
+
When an error occurs:
|
|
93
|
+
1. Check \`.claude/memory/errors/\` first for past fixes
|
|
94
|
+
2. If new, check \`reference/troubleshooting/common-errors.mdx\`
|
|
95
|
+
3. After resolving, record in \`memory/errors/\` with context and fix
|
|
96
|
+
4. If an error recurs 3+ times, add a rule to \`.claude/rules/workspace-patterns.md\`${ctx.hasUI ? `
|
|
97
97
|
|
|
98
98
|
### UI App (\`ui/\`)
|
|
99
99
|
|
|
@@ -129,16 +129,10 @@ For detailed per-dimension adaptation rules, read
|
|
|
129
129
|
|
|
130
130
|
| Command | Purpose |
|
|
131
131
|
| --- | --- |
|
|
132
|
-
| \`/meta\` | Project lifecycle: init, status,
|
|
132
|
+
| \`/meta\` | Project lifecycle: init, status, fix, deploy, health |
|
|
133
133
|
| \`/docs\` | Documentation lifecycle: create, review, verify |
|
|
134
|
-
| \`/work\` | Task tracking:
|
|
135
|
-
| \`/database\` | Database operations: init, browse, query, schema, import |
|
|
136
|
-
| \`/resource\` | Scaffold a new workflow or agent |
|
|
137
|
-
| \`/templates\` | Discover and apply workflow templates |
|
|
138
|
-
| \`/agent\` | Agent development (placeholder) |
|
|
134
|
+
| \`/work\` | Task tracking: create, save, resume, complete |
|
|
139
135
|
| \`/tutorial\` | Progressive learning path |
|
|
140
|
-
| \`/help\` | Command tree and navigation map |
|
|
141
|
-
| \`/profile\` | View and update developer profile |
|
|
142
136
|
|
|
143
137
|
## Skills
|
|
144
138
|
|
|
@@ -212,63 +206,6 @@ code (resource IDs, schema fields, platform tools used), and report
|
|
|
212
206
|
discrepancies. Useful before \`/meta deploy\` to ensure docs are accurate.
|
|
213
207
|
`;
|
|
214
208
|
}
|
|
215
|
-
function claudeResourceCommandTemplate() {
|
|
216
|
-
return `# /resource command
|
|
217
|
-
|
|
218
|
-
You are a resource scaffolding assistant for this Elevasis workspace.
|
|
219
|
-
|
|
220
|
-
## Context
|
|
221
|
-
|
|
222
|
-
Read CLAUDE.md for navigation to SDK patterns (reference/resources/patterns.mdx).
|
|
223
|
-
Read src/index.ts for the registry and domain directories for existing resources.
|
|
224
|
-
|
|
225
|
-
Before suggesting tools, read \`.claude/memory/profile/identity.md\` if it exists
|
|
226
|
-
to check the user's known integrations and suggest relevant platform tools.
|
|
227
|
-
|
|
228
|
-
## Guided Mode
|
|
229
|
-
|
|
230
|
-
Before any operation, check \`.claude/memory/profile/skills.md\`. If the user's
|
|
231
|
-
programming level is \`none\` or \`minimal\`, or automation level is \`none\`,
|
|
232
|
-
activate Guided Mode:
|
|
233
|
-
|
|
234
|
-
1. Ask: "What does this workflow need to do?" -- let user describe in plain English
|
|
235
|
-
2. Based on description, suggest a resourceId, input schema fields, output schema
|
|
236
|
-
fields, and whether platform tools are needed
|
|
237
|
-
3. Show suggestions and ask for confirmation before generating code
|
|
238
|
-
4. Generate the complete resource using the confirmed structure
|
|
239
|
-
|
|
240
|
-
This wraps existing operations with conversational discovery for users who
|
|
241
|
-
cannot specify schemas directly.
|
|
242
|
-
|
|
243
|
-
## Operations
|
|
244
|
-
|
|
245
|
-
**\`workflow <name>\`:** Create a new workflow in the appropriate domain directory (e.g., \`src/<domain>/<name>.ts\`) with:
|
|
246
|
-
- Zod input/output schemas with \`z.infer\` type aliases
|
|
247
|
-
- Config object (resourceId, name, type, description, version, status)
|
|
248
|
-
- Contract with schemas
|
|
249
|
-
- Step definition with handler
|
|
250
|
-
- Add the import to \`src/index.ts\` registry
|
|
251
|
-
|
|
252
|
-
**\`multi-step <name>\`:** Create a multi-step workflow with:
|
|
253
|
-
- Multiple steps connected via StepType.LINEAR or StepType.CONDITIONAL
|
|
254
|
-
- Import \`{ StepType }\` from '@elevasis/sdk' (runtime value, not type)
|
|
255
|
-
- Each step has its own inputSchema/outputSchema
|
|
256
|
-
- Linear: \`next: { type: StepType.LINEAR, target: 'step-two' }\`
|
|
257
|
-
- Conditional: \`next: { type: StepType.CONDITIONAL, routes: [...], default: 'fallback' }\`
|
|
258
|
-
- Last step: \`next: null\`
|
|
259
|
-
- Add to \`src/index.ts\` registry
|
|
260
|
-
|
|
261
|
-
**\`tool-step <name>\`:** Create a step that calls a platform tool:
|
|
262
|
-
- Prefer typed adapters: \`import { createAttioAdapter, scheduler, llm } from '@elevasis/sdk/worker'\`
|
|
263
|
-
- Integration tools: \`const attio = createAttioAdapter('cred'); await attio.listRecords({...})\`
|
|
264
|
-
- Platform singletons: \`await scheduler.createSchedule({...})\`, \`await llm.generate({...})\`
|
|
265
|
-
- Fallback for tools without adapters: \`await platform.call({ tool, method, params, credential })\`
|
|
266
|
-
- Import \`{ PlatformToolError }\` from '@elevasis/sdk/worker' for error handling
|
|
267
|
-
- Wrap in try/catch for PlatformToolError
|
|
268
|
-
- Note: 60s timeout per call, credential required for integration tools
|
|
269
|
-
- See reference/platform-tools/adapters.mdx for the full adapter API
|
|
270
|
-
`;
|
|
271
|
-
}
|
|
272
209
|
function claudeTutorialCommandTemplate() {
|
|
273
210
|
return `# /tutorial command
|
|
274
211
|
|
|
@@ -359,215 +296,6 @@ Store in \`.claude/memory/tutorial-progress.md\`:
|
|
|
359
296
|
- Assessment Notes (bullet points)
|
|
360
297
|
`;
|
|
361
298
|
}
|
|
362
|
-
function claudeHelpCommandTemplate() {
|
|
363
|
-
return `# /help command
|
|
364
|
-
|
|
365
|
-
You are a navigation assistant for this Elevasis workspace.
|
|
366
|
-
|
|
367
|
-
## Operations
|
|
368
|
-
|
|
369
|
-
**\`/help\` (no args):** Display the full command tree:
|
|
370
|
-
|
|
371
|
-
\`\`\`
|
|
372
|
-
Available Commands:
|
|
373
|
-
|
|
374
|
-
/meta Project lifecycle
|
|
375
|
-
/meta init First-run setup and onboarding
|
|
376
|
-
/meta status Project health and template version
|
|
377
|
-
/meta update SDK upgrade and template merge
|
|
378
|
-
/meta fix Drift repair
|
|
379
|
-
/meta deploy Full deploy pipeline (validate, git, deploy, verify)
|
|
380
|
-
/meta health Execution debugging and resource status
|
|
381
|
-
/meta develop Development navigation hub (resources, tools, examples)
|
|
382
|
-
|
|
383
|
-
/docs Documentation lifecycle
|
|
384
|
-
/docs Show documentation status
|
|
385
|
-
/docs create Create new documentation page
|
|
386
|
-
/docs review Review docs for accuracy
|
|
387
|
-
/docs verify Cross-reference docs with codebase for accuracy
|
|
388
|
-
|
|
389
|
-
/work Task tracking
|
|
390
|
-
/work Show current tasks
|
|
391
|
-
/work start Create new task
|
|
392
|
-
/work save Save progress for session resume
|
|
393
|
-
/work resume Resume in-progress work
|
|
394
|
-
/work done Complete and move task
|
|
395
|
-
/work list List all tasks with status
|
|
396
|
-
|
|
397
|
-
/database Database operations
|
|
398
|
-
/database init Connect Supabase project
|
|
399
|
-
/database browse Query and display table contents
|
|
400
|
-
/database query Run filtered queries
|
|
401
|
-
/database schema View/compare schema documentation
|
|
402
|
-
/database import Import CSV/JSON data
|
|
403
|
-
|
|
404
|
-
/resource Scaffold a new workflow or agent
|
|
405
|
-
/templates Discover and apply workflow templates
|
|
406
|
-
/agent Agent development (placeholder)
|
|
407
|
-
/tutorial Progressive learning path
|
|
408
|
-
/profile View and update developer profile
|
|
409
|
-
/help This help menu
|
|
410
|
-
|
|
411
|
-
Navigation:
|
|
412
|
-
- docs/navigation.mdx Resource and documentation map
|
|
413
|
-
- docs/priorities.mdx Current goals and priorities
|
|
414
|
-
- memory/index.md Cross-session knowledge
|
|
415
|
-
\`\`\`
|
|
416
|
-
|
|
417
|
-
**\`/help <command>\`:** Show detailed help for a specific command with its
|
|
418
|
-
subcommands and usage examples. Read the corresponding command file at
|
|
419
|
-
\`.claude/commands/<command>.md\` and present a summary.
|
|
420
|
-
`;
|
|
421
|
-
}
|
|
422
|
-
function claudeTemplatesCommandTemplate() {
|
|
423
|
-
return `# /templates command
|
|
424
|
-
|
|
425
|
-
You are a workflow template assistant for this Elevasis workspace.
|
|
426
|
-
|
|
427
|
-
## Context
|
|
428
|
-
|
|
429
|
-
Read \`reference/templates/\` in node_modules/@elevasis/sdk/reference/templates/
|
|
430
|
-
for available template definitions. Read src/index.ts for the current registry.
|
|
431
|
-
Read \`.claude/memory/profile/skills.md\` to adapt generated code to skill level.
|
|
432
|
-
|
|
433
|
-
## Operations
|
|
434
|
-
|
|
435
|
-
**\`/templates\` (no args):** Show available template categories:
|
|
436
|
-
- Data Collection (web scraper, RSS feed reader, form handler)
|
|
437
|
-
- Data Processing (CSV import, data enrichment, deduplication)
|
|
438
|
-
- Communication (email sender, notification dispatcher)
|
|
439
|
-
- CRM (contact sync, lead scoring, pipeline update)
|
|
440
|
-
- Documents (PDF generator, report builder, invoice creator)
|
|
441
|
-
- AI (text classifier, data extractor, summarizer)
|
|
442
|
-
- Scheduling (recurring job, delayed task, batch processor)
|
|
443
|
-
|
|
444
|
-
**\`/templates <category>\`:** Show templates in the category with descriptions.
|
|
445
|
-
|
|
446
|
-
**\`/templates apply <name>\`:** Generate a workflow from the template:
|
|
447
|
-
1. Read the template definition from reference/templates/<name>.mdx
|
|
448
|
-
2. Generate a workflow file in the appropriate domain directory
|
|
449
|
-
3. Add the import to src/index.ts registry
|
|
450
|
-
4. If the template uses platform tools, prompt for credential setup
|
|
451
|
-
5. If the template uses the database, check that /database init has been run
|
|
452
|
-
6. Run \`elevasis check\` to validate
|
|
453
|
-
|
|
454
|
-
Templates are documentation-based. The agent reads the template definition
|
|
455
|
-
and generates context-aware code adapted to the user's existing schemas,
|
|
456
|
-
credentials, skill level, and naming conventions.
|
|
457
|
-
`;
|
|
458
|
-
}
|
|
459
|
-
function claudeDatabaseCommandTemplate() {
|
|
460
|
-
return `# /database command
|
|
461
|
-
|
|
462
|
-
You are a database assistant for this Elevasis workspace.
|
|
463
|
-
|
|
464
|
-
## Context
|
|
465
|
-
|
|
466
|
-
Read \`data/schema.ts\` if it exists for the current schema documentation.
|
|
467
|
-
Read \`.claude/memory/deployment-state.md\` for database connection status.
|
|
468
|
-
Read \`.claude/memory/profile/skills.md\` to adapt explanations.
|
|
469
|
-
|
|
470
|
-
## Operations
|
|
471
|
-
|
|
472
|
-
**\`/database init\`:** Guide user through Supabase project setup:
|
|
473
|
-
1. Explain Supabase (free, great dashboard, integrates with workflows)
|
|
474
|
-
2. Walk through: create project at supabase.com/dashboard
|
|
475
|
-
3. Collect Project URL and service_role key
|
|
476
|
-
4. Store as platform credential named 'my-database' via command center
|
|
477
|
-
5. Test connection
|
|
478
|
-
6. Create data/schema.ts with initial table documentation
|
|
479
|
-
7. Record database connection in memory/deployment-state.md
|
|
480
|
-
|
|
481
|
-
**\`/database\` (no args):** Show database connection status, tables, row counts.
|
|
482
|
-
|
|
483
|
-
**\`/database add <table>\`:** Create a migration script:
|
|
484
|
-
1. Generate scripts/migrations/NNN-create-<table>.ts
|
|
485
|
-
2. Show the script and explain each statement
|
|
486
|
-
3. Confirm before execution
|
|
487
|
-
4. Update data/schema.ts and docs/database.mdx
|
|
488
|
-
|
|
489
|
-
**\`/database browse <table>\`:** Query and display table contents via CLI.
|
|
490
|
-
|
|
491
|
-
**\`/database schema\`:** Show data/schema.ts contents, compare against live DB.
|
|
492
|
-
|
|
493
|
-
**\`/database import <table> --file <path>\`:** Import CSV/JSON into a table.
|
|
494
|
-
|
|
495
|
-
## Database Safety
|
|
496
|
-
|
|
497
|
-
ALWAYS confirm with the user before:
|
|
498
|
-
- DROP TABLE or DROP COLUMN operations
|
|
499
|
-
- DELETE without a WHERE clause (bulk delete)
|
|
500
|
-
- TRUNCATE operations
|
|
501
|
-
- ALTER TABLE that removes columns
|
|
502
|
-
- Any operation that cannot be undone
|
|
503
|
-
|
|
504
|
-
For read operations and targeted writes (INSERT, UPDATE with WHERE),
|
|
505
|
-
proceed normally.
|
|
506
|
-
|
|
507
|
-
## Supabase Platform Tool
|
|
508
|
-
|
|
509
|
-
Workflows access the database via platform.call({ tool: 'supabase', ... }).
|
|
510
|
-
Methods: insert, select, update, delete, upsert, rpc, count.
|
|
511
|
-
Filter syntax uses PostgREST format (eq, neq, gt, gte, lt, lte, like, ilike, in, is).
|
|
512
|
-
`;
|
|
513
|
-
}
|
|
514
|
-
function claudeAgentCommandTemplate() {
|
|
515
|
-
return `# /agent command
|
|
516
|
-
|
|
517
|
-
You are an agent development assistant for this Elevasis workspace.
|
|
518
|
-
|
|
519
|
-
## Current State
|
|
520
|
-
|
|
521
|
-
Agent definitions are accepted by the SDK and appear in the registry.
|
|
522
|
-
Autonomous agent execution (multi-turn tool use loops) is deferred.
|
|
523
|
-
LLM calls are available via the \`llm\` typed adapter: \`import { llm } from '@elevasis/sdk/worker'\`, then \`await llm.generate({ messages: [...] })\`.
|
|
524
|
-
|
|
525
|
-
## Operations
|
|
526
|
-
|
|
527
|
-
**\`/agent\` (no args):** Explain the current state:
|
|
528
|
-
- Agent definitions are accepted by the SDK and appear in the registry
|
|
529
|
-
- Autonomous agent execution (multi-turn tool use loops) is deferred
|
|
530
|
-
- LLM calls are available via the \`llm\` typed adapter (\`import { llm } from '@elevasis/sdk/worker'\`)
|
|
531
|
-
- Show the AgentDefinition pattern for future use
|
|
532
|
-
|
|
533
|
-
**\`/agent scaffold <name>\`:** Create an agent definition with:
|
|
534
|
-
- Config (resourceId, name, type, description, version, status)
|
|
535
|
-
- System prompt
|
|
536
|
-
- Available tools list
|
|
537
|
-
- Note that execution will fail until agent runtime is implemented
|
|
538
|
-
- Add to src/index.ts registry
|
|
539
|
-
`;
|
|
540
|
-
}
|
|
541
|
-
function claudeProfileCommandTemplate() {
|
|
542
|
-
return `# /profile command
|
|
543
|
-
|
|
544
|
-
You are a profile management assistant for this Elevasis workspace.
|
|
545
|
-
|
|
546
|
-
## Context
|
|
547
|
-
|
|
548
|
-
Read \`.claude/memory/profile/index.md\` to discover profile sub-files.
|
|
549
|
-
Read the sub-files (identity.md, skills.md, preferences.md) to load the current profile.
|
|
550
|
-
|
|
551
|
-
If \`.claude/memory/profile/\` does not exist, suggest running \`/meta init\` to create it.
|
|
552
|
-
|
|
553
|
-
## Operations
|
|
554
|
-
|
|
555
|
-
**No arguments (default):** Display the current profile in a readable format.
|
|
556
|
-
Show organization, industry, experience level, goals, known integrations, and preferences.
|
|
557
|
-
Ask if anything needs updating.
|
|
558
|
-
|
|
559
|
-
**\`update\`:** Walk through each profile section, showing current values and
|
|
560
|
-
asking if they should change. Only update fields the user wants to change.
|
|
561
|
-
Write changes to the appropriate memory/profile/ file.
|
|
562
|
-
|
|
563
|
-
**\`level\`:** Assess the user's current skill level based on their project
|
|
564
|
-
history (resources created, successful deploys, error handling patterns).
|
|
565
|
-
Suggest updating memory/profile/skills.md if the assessment differs from the stored level.
|
|
566
|
-
|
|
567
|
-
**\`assess\`:** Re-run the competency assessment questions from /meta init.
|
|
568
|
-
Update all skill dimensions in memory/profile/skills.md.
|
|
569
|
-
`;
|
|
570
|
-
}
|
|
571
299
|
function claudeMetaCommandTemplate() {
|
|
572
300
|
return `# /meta command
|
|
573
301
|
|
|
@@ -655,32 +383,35 @@ Display a project health summary:
|
|
|
655
383
|
2. SDK package version from package.json
|
|
656
384
|
3. Profile summary (from memory/profile/skills.md)
|
|
657
385
|
4. Quick drift check: count of missing managed files, missing gitignore entries
|
|
386
|
+
5. Last deployment status (from memory/deployment-state.md if it exists)
|
|
658
387
|
|
|
659
|
-
### \`/meta
|
|
660
|
-
|
|
661
|
-
Upgrade the SDK and merge template changes:
|
|
662
|
-
|
|
663
|
-
1. Run \`pnpm update @elevasis/sdk\` to pull the latest SDK
|
|
664
|
-
2. Run \`elevasis update\` to add missing files and flag conflicts
|
|
665
|
-
3. For each flagged file in the output:
|
|
666
|
-
- Read the current project file
|
|
667
|
-
- Read the new template from \`@elevasis/sdk/templates\`
|
|
668
|
-
- Compare and merge intelligently:
|
|
669
|
-
- Add new sections that don't exist
|
|
670
|
-
- Preserve user customizations
|
|
671
|
-
- If a section differs, show both versions and let user choose
|
|
672
|
-
4. Return a report of changes
|
|
673
|
-
|
|
674
|
-
### \`/meta fix\` -- Fix Drift
|
|
388
|
+
### \`/meta fix\` -- Maintenance and Upgrade
|
|
675
389
|
|
|
676
|
-
Detect and repair drift
|
|
390
|
+
Detect and repair all drift. Optionally upgrades the SDK first.
|
|
677
391
|
|
|
392
|
+
0. **SDK version check** -- Compare installed \`@elevasis/sdk\` against the latest
|
|
393
|
+
available. If behind, offer to run \`pnpm update @elevasis/sdk\` before
|
|
394
|
+
continuing. If the user accepts, run it, then run \`elevasis update\` to add
|
|
395
|
+
any new managed files and flag conflicts. For each flagged file:
|
|
396
|
+
- Read the current project file and the new template from \`@elevasis/sdk/templates\`
|
|
397
|
+
- Add new sections that don't exist; preserve user customizations
|
|
398
|
+
- If a section differs, show both versions and let the user choose
|
|
678
399
|
1. **Missing managed files:** Regenerate from templates
|
|
679
400
|
2. **Gitignore drift:** Append missing entries
|
|
680
401
|
3. **CLAUDE.md sections:** Add missing sections in correct position
|
|
681
402
|
4. **Memory structure:** Verify index consistency
|
|
682
403
|
5. **Doc cross-references:** Scan for broken links
|
|
683
404
|
6. **Settings consistency:** Verify expected fields
|
|
405
|
+
7. **Rules health:** Scan \`memory/errors/\` -- flag any entry that has recurred
|
|
406
|
+
3+ times and is not yet in \`.claude/rules/workspace-patterns.md\`.
|
|
407
|
+
If \`workspace-patterns.md\` has no rules yet and 5+ resources exist in \`src/\`,
|
|
408
|
+
suggest adding patterns. Surface suggestions only -- do not auto-generate.
|
|
409
|
+
8. **Project map freshness:** Check whether \`docs/project-map.mdx\` reflects the
|
|
410
|
+
current project state (resources, commands, rules, skills, memory files).
|
|
411
|
+
Compare filesystem state against the map. If stale, run \`elevasis deploy\`
|
|
412
|
+
to regenerate, or patch inline for minor drift.
|
|
413
|
+
|
|
414
|
+
Each step reports its result. Steps 1-8 run even if step 0 is skipped.
|
|
684
415
|
|
|
685
416
|
### \`/meta deploy\` -- Full Deploy Pipeline
|
|
686
417
|
|
|
@@ -692,7 +423,7 @@ Detect and repair drift without a version upgrade:
|
|
|
692
423
|
3. Verify docs reflect current resources
|
|
693
424
|
4. If git configured: stage changes, commit with deploy message
|
|
694
425
|
5. Run \`elevasis deploy\`
|
|
695
|
-
6.
|
|
426
|
+
6. \`docs/project-map.mdx\` is auto-regenerated by deploy (no manual bump needed)
|
|
696
427
|
7. Verify deployment via platform
|
|
697
428
|
8. Update \`memory/deployment-state.md\` with count, timestamp, inventory
|
|
698
429
|
9. If git configured and remote exists: optionally push
|
|
@@ -703,29 +434,12 @@ for the enforcement model and common fixes.
|
|
|
703
434
|
|
|
704
435
|
### \`/meta health\` -- Execution Debugging
|
|
705
436
|
|
|
706
|
-
|
|
437
|
+
Diagnose runtime failures and environment issues:
|
|
707
438
|
- Show recent executions with status (completed/failed)
|
|
708
439
|
- For failed executions: analyze logs, cross-reference with memory/errors/
|
|
709
440
|
- Check resource deployment status (deployed, outdated, never deployed)
|
|
710
441
|
- Verify environment: API key valid, credentials accessible, DB connected
|
|
711
442
|
|
|
712
|
-
### \`/meta develop\` -- Development Navigation Hub
|
|
713
|
-
|
|
714
|
-
Primary development entry point. Loads a navigation map and offers actions.
|
|
715
|
-
|
|
716
|
-
1. **Project Resource Map** -- from docs/navigation.mdx. Shows deployed
|
|
717
|
-
resources: resourceId, name, status, tools used, last deployment.
|
|
718
|
-
2. **Development Actions** -- contextual based on resource map:
|
|
719
|
-
- Edit/extend a workflow
|
|
720
|
-
- Test a workflow
|
|
721
|
-
- Debug a failed execution
|
|
722
|
-
- Browse platform tools (read reference/platform-tools/index.mdx)
|
|
723
|
-
- Set up credentials
|
|
724
|
-
- View examples (read reference/resources/patterns.mdx)
|
|
725
|
-
3. **SDK Reference Navigation** -- pointers to reference files
|
|
726
|
-
4. **Upkeep Detection** -- check navigation freshness, in-progress items,
|
|
727
|
-
pending priorities. Suggest /docs cleanup or /docs resume if needed.
|
|
728
|
-
|
|
729
443
|
## Merge Strategy
|
|
730
444
|
|
|
731
445
|
- **CLAUDE.md:** Add new sections in correct position. Preserve customizations.
|
|
@@ -738,6 +452,8 @@ The agent reads current templates from the installed SDK:
|
|
|
738
452
|
\`@elevasis/sdk/templates\` subpath exports all template functions.
|
|
739
453
|
`;
|
|
740
454
|
}
|
|
455
|
+
|
|
456
|
+
// src/cli/commands/templates/core/resources.ts
|
|
741
457
|
function starterWorkflowTemplate() {
|
|
742
458
|
return `import type { WorkflowDefinition } from '@elevasis/sdk'
|
|
743
459
|
import { z } from 'zod'
|
|
@@ -884,4 +600,4 @@ export const agents = []
|
|
|
884
600
|
`;
|
|
885
601
|
}
|
|
886
602
|
|
|
887
|
-
export {
|
|
603
|
+
export { claudeDocsCommandTemplate, claudeMdTemplate, claudeMetaCommandTemplate, claudeSettingsTemplate, claudeTutorialCommandTemplate, exampleBarrelTemplate, gitignoreTemplate, operationsBarrelTemplate, platformStatusTemplate, starterWorkflowTemplate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { claudeMdTemplate, claudeMetaCommandTemplate,
|
|
1
|
+
export { claudeMdTemplate, claudeMetaCommandTemplate, claudeDocsCommandTemplate, claudeTutorialCommandTemplate, gitignoreTemplate, claudeSettingsTemplate, starterWorkflowTemplate, platformStatusTemplate, operationsBarrelTemplate, exampleBarrelTemplate, } from './cli/commands/init.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"comment:bin": "IMPORTANT: This package shares the 'elevasis' binary name with @repo/cli. They never conflict because @elevasis/sdk must NEVER be added as a dependency of any workspace package (apps/*, packages/*, organizations/*). Workspace projects use @repo/cli for the 'elevasis' binary. External developers (outside the workspace) get this SDK's binary via npm install.",
|
|
6
6
|
"type": "module",
|
|
@@ -34,11 +34,6 @@
|
|
|
34
34
|
"dist/types/templates.d.ts",
|
|
35
35
|
"reference/"
|
|
36
36
|
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --external:jiti --banner:js=\"#!/usr/bin/env node\" && node scripts/copy-reference-docs.mjs && node scripts/generate-navigation.mjs",
|
|
39
|
-
"check-types": "tsc --noEmit",
|
|
40
|
-
"test:bundle": "pnpm build && vitest run --config vitest.bundle.config.ts"
|
|
41
|
-
},
|
|
42
37
|
"dependencies": {
|
|
43
38
|
"esbuild": "^0.25.0",
|
|
44
39
|
"jiti": "^2.0.0"
|
|
@@ -47,8 +42,6 @@
|
|
|
47
42
|
"zod": "^4.1.0"
|
|
48
43
|
},
|
|
49
44
|
"devDependencies": {
|
|
50
|
-
"@repo/core": "workspace:*",
|
|
51
|
-
"@repo/typescript-config": "workspace:*",
|
|
52
45
|
"@types/node": "^22.0.0",
|
|
53
46
|
"chalk": "^5.3.0",
|
|
54
47
|
"commander": "^11.0.0",
|
|
@@ -59,6 +52,13 @@
|
|
|
59
52
|
"rollup-plugin-dts": "^6.3.0",
|
|
60
53
|
"tsup": "^8.0.0",
|
|
61
54
|
"typescript": "5.9.2",
|
|
62
|
-
"zod": "^4.1.0"
|
|
55
|
+
"zod": "^4.1.0",
|
|
56
|
+
"@repo/core": "0.0.0",
|
|
57
|
+
"@repo/typescript-config": "0.0.0"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --external:jiti --banner:js=\"#!/usr/bin/env node\" && node scripts/copy-reference-docs.mjs && node scripts/generate-navigation.mjs",
|
|
61
|
+
"check-types": "tsc --noEmit",
|
|
62
|
+
"test:bundle": "pnpm build && vitest run --config vitest.bundle.config.ts"
|
|
63
63
|
}
|
|
64
|
-
}
|
|
64
|
+
}
|
|
@@ -11,7 +11,7 @@ This page covers core Elevasis concepts in plain English. It is the teaching voc
|
|
|
11
11
|
| Term | Definition |
|
|
12
12
|
| --- | --- |
|
|
13
13
|
| Workflow | A series of named steps that run one after another. Each step does one job. The workflow receives input data and produces output data. |
|
|
14
|
-
| Agent | An autonomous AI resource with access to platform tools. Agents can make decisions and call tools on their own.
|
|
14
|
+
| Agent | An autonomous AI resource with access to platform tools. Agents can make decisions and call tools on their own. Run agents with `--async` to avoid HTTP timeout limits on long-running executions. |
|
|
15
15
|
| Resource | Anything you deploy to the platform -- a workflow or an agent. Each resource has a unique ID. |
|
|
16
16
|
| Step | One job inside a workflow. A step receives data, processes it, and passes data to the next step. |
|
|
17
17
|
| Schema | A description of what your data looks like. Schemas validate that input and output data has the right shape -- the right fields with the right types. |
|