@elevasis/sdk 0.8.5 → 0.8.6
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 +148 -69
- package/dist/index.d.ts +5 -5
- package/dist/templates.js +131 -63
- package/dist/types/templates.d.ts +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -43883,7 +43883,7 @@ function wrapAction(commandName, fn) {
|
|
|
43883
43883
|
// package.json
|
|
43884
43884
|
var package_default = {
|
|
43885
43885
|
name: "@elevasis/sdk",
|
|
43886
|
-
version: "0.8.
|
|
43886
|
+
version: "0.8.6",
|
|
43887
43887
|
description: "SDK for building Elevasis organization resources",
|
|
43888
43888
|
type: "module",
|
|
43889
43889
|
bin: {
|
|
@@ -44125,7 +44125,7 @@ async function generateProjectMap(org) {
|
|
|
44125
44125
|
"",
|
|
44126
44126
|
"# Project Map",
|
|
44127
44127
|
"",
|
|
44128
|
-
"> Auto-generated by `elevasis-sdk deploy` and `/
|
|
44128
|
+
"> Auto-generated by `elevasis-sdk deploy` and `/fix`. Do not edit manually.",
|
|
44129
44129
|
"",
|
|
44130
44130
|
"## Project Overview",
|
|
44131
44131
|
"",
|
|
@@ -45233,7 +45233,7 @@ var import_path3 = require("path");
|
|
|
45233
45233
|
var import_promises2 = require("fs/promises");
|
|
45234
45234
|
|
|
45235
45235
|
// src/cli/commands/templates/core/workspace.ts
|
|
45236
|
-
var TEMPLATE_VERSION =
|
|
45236
|
+
var TEMPLATE_VERSION = 34;
|
|
45237
45237
|
function configTemplate() {
|
|
45238
45238
|
return `import type { ElevasConfig } from '@elevasis/sdk'
|
|
45239
45239
|
|
|
@@ -45567,7 +45567,7 @@ function claudeMdTemplate(ctx = {}) {
|
|
|
45567
45567
|
At the start of every session:
|
|
45568
45568
|
|
|
45569
45569
|
0. Check the \`<!-- initialized: ... -->\` flag at the top of this file.
|
|
45570
|
-
If \`false\`, read \`.claude/commands/
|
|
45570
|
+
If \`false\`, read \`.claude/commands/init.md\` and run the \`/init\` flow.
|
|
45571
45571
|
After initialization completes, change the flag to \`<!-- initialized: true -->\`.
|
|
45572
45572
|
If \`true\`, proceed with steps below.
|
|
45573
45573
|
1. Read \`.claude/memory/profile/skills.md\` -- adapt all responses to the user's
|
|
@@ -45575,8 +45575,8 @@ At the start of every session:
|
|
|
45575
45575
|
2. Read \`.claude/memory/index.md\` -- drill into relevant topic files as needed.
|
|
45576
45576
|
Balance context relevance against token usage.
|
|
45577
45577
|
3. Check installed \`@elevasis/sdk\` template version against \`templateVersion\`
|
|
45578
|
-
in \`elevasis.config.ts\`. If newer, notify and suggest \`/
|
|
45579
|
-
4. If \`.claude/memory/\` does not exist, suggest \`/
|
|
45578
|
+
in \`elevasis.config.ts\`. If newer, notify and suggest \`/fix\`.
|
|
45579
|
+
4. If \`.claude/memory/\` does not exist, suggest \`/init\`.
|
|
45580
45580
|
5. If user Platform Navigation level is none (from skills.md) and
|
|
45581
45581
|
\`.claude/memory/tutorial-progress.md\` does not exist, suggest \`/tutorial\`.
|
|
45582
45582
|
If tutorial-progress.md exists and Phase is not complete, mention that the
|
|
@@ -45690,7 +45690,10 @@ For detailed per-dimension adaptation rules, read
|
|
|
45690
45690
|
|
|
45691
45691
|
| Command | Purpose |
|
|
45692
45692
|
| --- | --- |
|
|
45693
|
-
| \`/
|
|
45693
|
+
| \`/init\` | First-run workspace setup and competency assessment |
|
|
45694
|
+
| \`/status\` | Project health dashboard |
|
|
45695
|
+
| \`/fix\` | Maintenance, drift repair, and SDK upgrade |
|
|
45696
|
+
| \`/deploy\` | Full deploy pipeline (validate \u2192 deploy \u2192 verify) |
|
|
45694
45697
|
| \`/docs\` | Browse, create, and verify permanent documentation |
|
|
45695
45698
|
| \`/tutorial\` | Progressive learning path (21 items across 4 sections) |
|
|
45696
45699
|
|
|
@@ -45702,6 +45705,7 @@ Skills auto-trigger based on conversation context. You do not need to invoke the
|
|
|
45702
45705
|
| --- | --- |
|
|
45703
45706
|
| \`work\` | You say /work, ask to track or save progress across sessions, ask what you were working on, want to create/resume/complete a task doc, or say you are done for today. Also proactively save when conversation is heavy or 2+ steps completed |
|
|
45704
45707
|
| \`creds\` | You mention credentials, API keys, secrets, webhook secrets, or setting up integrations |
|
|
45708
|
+
| \`diagnostics\` | An execution fails, user asks why something failed, user mentions runtime errors, or agent observes a failed execution |
|
|
45705
45709
|
|
|
45706
45710
|
## Maintaining Memory
|
|
45707
45711
|
|
|
@@ -45789,7 +45793,7 @@ Elevasis Tutorial
|
|
|
45789
45793
|
INTRODUCTION 0/4
|
|
45790
45794
|
1 Welcome & Orientation [ ]
|
|
45791
45795
|
2 How This Workspace Works [ ]
|
|
45792
|
-
3
|
|
45796
|
+
3 Project Commands (/init, /status, /fix, /deploy) [ ]
|
|
45793
45797
|
4 /work and /docs [ ]
|
|
45794
45798
|
|
|
45795
45799
|
CORE CONCEPTS 0/6
|
|
@@ -45867,7 +45871,7 @@ When automation is none:
|
|
|
45867
45871
|
"This workspace comes with a built-in assistant that knows your project, your tools,
|
|
45868
45872
|
and your goals. Let me show you how it's set up." Open CLAUDE.md and explain in
|
|
45869
45873
|
plain terms: it's the agent's instruction sheet. Point out the commands in the
|
|
45870
|
-
Commands table. Show /
|
|
45874
|
+
Commands table. Show /status, /tutorial. Explain the work and creds skills as
|
|
45871
45875
|
"the assistant automatically helps when you mention tasks or API keys." Tour the memory folder
|
|
45872
45876
|
at a high level -- "this is where the agent stores what it learns about your project."
|
|
45873
45877
|
Verify: Ask the user a question about their business goal and show how the agent
|
|
@@ -45880,7 +45884,7 @@ session start, how the navigation table works, what the Skills section means.
|
|
|
45880
45884
|
Explain the three commands briefly and the two auto-triggering skills (work, creds). Show that the agent has memory: open
|
|
45881
45885
|
\`.claude/memory/profile/skills.md\` and show their own profile -- "every session,
|
|
45882
45886
|
the agent reads this and adapts." Explain the initialized flag.
|
|
45883
|
-
Verify: Run /
|
|
45887
|
+
Verify: Run /status to see project status.
|
|
45884
45888
|
Observation focus: memory system concept, session initialization flow.
|
|
45885
45889
|
|
|
45886
45890
|
When automation is custom:
|
|
@@ -45888,37 +45892,39 @@ Read CLAUDE.md in full. Explain the session initialization sequence: CLAUDE.md -
|
|
|
45888
45892
|
navigation table -> memory files -> context loading. Walk through: Commands section
|
|
45889
45893
|
(3 commands + work and creds skills), Rules section (auto-loaded based on file paths), Skills
|
|
45890
45894
|
section (auto-triggered by content patterns). Point out the initialized flag and
|
|
45891
|
-
explain how /
|
|
45892
|
-
Verify: Run /
|
|
45895
|
+
explain how /init set it.
|
|
45896
|
+
Verify: Run /status to see project status; observe which fields it reports.
|
|
45893
45897
|
Observation focus: initialization model, command-vs-rule-vs-skill distinction.
|
|
45894
45898
|
|
|
45895
|
-
**Item 3:
|
|
45899
|
+
**Item 3: Project Commands (/init, /status, /fix, /deploy)**
|
|
45896
45900
|
|
|
45897
45901
|
When automation is none:
|
|
45898
|
-
"Think of /
|
|
45899
|
-
attention." Run /
|
|
45900
|
-
|
|
45901
|
-
Explain /
|
|
45902
|
-
|
|
45903
|
-
Verify: Run /
|
|
45902
|
+
"Think of /status as your project dashboard -- it shows what's healthy and what needs
|
|
45903
|
+
attention." Run /status and narrate the output in plain language: what each field means.
|
|
45904
|
+
Explain /fix as "the agent tidies up and applies updates."
|
|
45905
|
+
Explain /deploy as "the agent publishes your changes in one step." Mention the
|
|
45906
|
+
diagnostics skill: "If something goes wrong, the assistant automatically investigates."
|
|
45907
|
+
Verify: Run /status. Narrate the output together.
|
|
45904
45908
|
Observation focus: project lifecycle concept, dashboard reading.
|
|
45905
45909
|
|
|
45906
45910
|
When automation is low-code:
|
|
45907
|
-
Show all
|
|
45908
|
-
like "repair this Zap" in Zapier; /
|
|
45909
|
-
Walk through
|
|
45910
|
-
uses), SDK version (installed package), profile summary, drift check.
|
|
45911
|
-
|
|
45911
|
+
Show all project commands with their purpose. Map to familiar concepts: /fix is
|
|
45912
|
+
like "repair this Zap" in Zapier; /deploy is a one-command publish pipeline.
|
|
45913
|
+
Walk through /status output: template version (SDK template your workspace
|
|
45914
|
+
uses), SDK version (installed package), profile summary, drift check. Mention the
|
|
45915
|
+
diagnostics skill auto-triggers on execution failures.
|
|
45916
|
+
Verify: Run /status and interpret each field together.
|
|
45912
45917
|
Observation focus: deploy pipeline understanding, version tracking.
|
|
45913
45918
|
|
|
45914
45919
|
When automation is custom:
|
|
45915
|
-
Read \`.claude/commands
|
|
45916
|
-
with assessment),
|
|
45917
|
-
rules health), deploy (
|
|
45918
|
-
project-map, verify
|
|
45919
|
-
|
|
45920
|
-
|
|
45921
|
-
|
|
45920
|
+
Read each command file in \`.claude/commands/\`: init.md (/init -- first-run setup
|
|
45921
|
+
with assessment), status.md (/status -- health dashboard), fix.md (/fix -- drift
|
|
45922
|
+
repair + SDK upgrade + rules health), deploy.md (/deploy -- 9-step pipeline: check,
|
|
45923
|
+
typecheck, docs, git, deploy, project-map, verify, state, push). Explain the
|
|
45924
|
+
diagnostics skill (auto-triggered on execution failures for runtime debugging).
|
|
45925
|
+
Explain the merge strategy for CLAUDE.md and commands. Note the template access
|
|
45926
|
+
model: templates read from @elevasis/sdk/templates subpath.
|
|
45927
|
+
Verify: Run /status to see project status. Identify what a version mismatch looks like.
|
|
45922
45928
|
Observation focus: full lifecycle coverage, pipeline internals.
|
|
45923
45929
|
|
|
45924
45930
|
**Item 4: /work and /docs**
|
|
@@ -45958,7 +45964,7 @@ Then read \`.claude/commands/docs.md\`. Cover /docs operations:
|
|
|
45958
45964
|
/docs (default): browse permanent docs/, categorized with read-only auto-generated files
|
|
45959
45965
|
separate; /docs create: interview-driven, resource-aware doc creation from src/ code
|
|
45960
45966
|
analysis; /docs verify: cross-references resource IDs, schema fields, platform tools in
|
|
45961
|
-
docs against src/ -- standalone analog of /
|
|
45967
|
+
docs against src/ -- standalone analog of /fix step 5.
|
|
45962
45968
|
Explain the relationship: /work owns docs/in-progress/ (task lifecycle), completing a task
|
|
45963
45969
|
moves docs to permanent location, /docs browses and verifies what's there.
|
|
45964
45970
|
Verify: Create a task via /work, make progress, observe auto-save, then run /work complete
|
|
@@ -46205,21 +46211,21 @@ Observation focus: MANAGED vs INIT_ONLY lifecycle, rule authoring, memory layout
|
|
|
46205
46211
|
|
|
46206
46212
|
When automation is none:
|
|
46207
46213
|
"When Elevasis SDK releases updates, the assistant can apply them to your workspace
|
|
46208
|
-
automatically. You don't have to redo your customizations." Explain /
|
|
46214
|
+
automatically. You don't have to redo your customizations." Explain /fix as
|
|
46209
46215
|
the command that applies updates. Skip technical file classification details.
|
|
46210
46216
|
Show \`docs/project-map.mdx\` briefly: "This is an auto-generated map of everything
|
|
46211
46217
|
in your project -- the agent uses it for navigation."
|
|
46212
|
-
Verify: Run /
|
|
46218
|
+
Verify: Run /fix (or explain what it would do). Check \`docs/project-map.mdx\`.
|
|
46213
46219
|
Next steps: point to reference docs in docs/, encourage using /work for new tasks.
|
|
46214
46220
|
Observation focus: update model concept, project map as navigation aid.
|
|
46215
46221
|
|
|
46216
46222
|
When automation is low-code:
|
|
46217
46223
|
Explain MANAGED (auto-updated by elevasis-sdk update) vs INIT_ONLY (set once, yours).
|
|
46218
|
-
Show how /
|
|
46224
|
+
Show how /fix applies SDK updates with conflict handling: "If a file changed,
|
|
46219
46225
|
it shows you both versions and lets you decide."
|
|
46220
46226
|
Show \`docs/project-map.mdx\` and explain what it contains: resources, commands,
|
|
46221
46227
|
rules, memory index. Note that deploy auto-regenerates it.
|
|
46222
|
-
Verify: Read \`elevasis.config.ts\` templateVersion. Compare to the running SDK version from /
|
|
46228
|
+
Verify: Read \`elevasis.config.ts\` templateVersion. Compare to the running SDK version from /status.
|
|
46223
46229
|
Observation focus: update workflow, project map freshness.
|
|
46224
46230
|
|
|
46225
46231
|
When automation is custom:
|
|
@@ -46231,7 +46237,7 @@ file, read template from @elevasis/sdk/templates, merge preserving customization
|
|
|
46231
46237
|
Explain the project map: auto-generated by deploy, contains resource inventory,
|
|
46232
46238
|
command list, rule list, memory index.
|
|
46233
46239
|
Next steps: explore reference docs, use /work for complex tasks, build custom rules.
|
|
46234
|
-
Verify: Compare elevasis.config.ts templateVersion with output of /
|
|
46240
|
+
Verify: Compare elevasis.config.ts templateVersion with output of /status. Identify any drift.
|
|
46235
46241
|
Observation focus: full template lifecycle, conflict resolution pattern.
|
|
46236
46242
|
|
|
46237
46243
|
## Adaptation Rules
|
|
@@ -46300,8 +46306,8 @@ Update rules:
|
|
|
46300
46306
|
Backward-compatible: missing Completed Modules treated as empty. Old files with Completed MF Lessons: map entries to items 2-4 and 20-21 by lesson title match.
|
|
46301
46307
|
`;
|
|
46302
46308
|
}
|
|
46303
|
-
function
|
|
46304
|
-
return `# /
|
|
46309
|
+
function claudeInitCommandTemplate() {
|
|
46310
|
+
return `# /init command
|
|
46305
46311
|
|
|
46306
46312
|
You are a project management assistant for this Elevasis workspace.
|
|
46307
46313
|
|
|
@@ -46311,9 +46317,7 @@ Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
|
46311
46317
|
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
46312
46318
|
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
46313
46319
|
|
|
46314
|
-
##
|
|
46315
|
-
|
|
46316
|
-
### \`/meta init\` -- First-Run Setup
|
|
46320
|
+
## Operation
|
|
46317
46321
|
|
|
46318
46322
|
Guided setup for a freshly scaffolded workspace. Triggered automatically
|
|
46319
46323
|
by the \`<!-- initialized: false -->\` flag in CLAUDE.md, or run manually.
|
|
@@ -46404,16 +46408,40 @@ by the \`<!-- initialized: false -->\` flag in CLAUDE.md, or run manually.
|
|
|
46404
46408
|
7. **Update flag**
|
|
46405
46409
|
Change \`<!-- initialized: false -->\` to \`<!-- initialized: true -->\`
|
|
46406
46410
|
in CLAUDE.md.
|
|
46411
|
+
`;
|
|
46412
|
+
}
|
|
46413
|
+
function claudeStatusCommandTemplate() {
|
|
46414
|
+
return `# /status command
|
|
46407
46415
|
|
|
46408
|
-
|
|
46416
|
+
You are a project management assistant for this Elevasis workspace.
|
|
46417
|
+
|
|
46418
|
+
## Context
|
|
46419
|
+
|
|
46420
|
+
Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
46421
|
+
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
46422
|
+
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
46423
|
+
|
|
46424
|
+
## Operation
|
|
46409
46425
|
|
|
46410
46426
|
Display a project health summary:
|
|
46411
46427
|
1. Template version (from elevasis.config.ts) and installed SDK version (from package.json). Suggest \`elevasis-sdk update\` to check for updates
|
|
46412
46428
|
2. Profile summary (from .claude/memory/profile/skills.md)
|
|
46413
46429
|
3. Quick drift check: count of missing managed files, missing gitignore entries
|
|
46414
46430
|
4. Last deployment status (from .claude/memory/deployment-state.md if it exists)
|
|
46431
|
+
`;
|
|
46432
|
+
}
|
|
46433
|
+
function claudeFixCommandTemplate() {
|
|
46434
|
+
return `# /fix command
|
|
46415
46435
|
|
|
46416
|
-
|
|
46436
|
+
You are a project management assistant for this Elevasis workspace.
|
|
46437
|
+
|
|
46438
|
+
## Context
|
|
46439
|
+
|
|
46440
|
+
Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
46441
|
+
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
46442
|
+
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
46443
|
+
|
|
46444
|
+
## Operation
|
|
46417
46445
|
|
|
46418
46446
|
Detect and repair all drift. Optionally upgrades the SDK first.
|
|
46419
46447
|
|
|
@@ -46453,7 +46481,30 @@ Detect and repair all drift. Optionally upgrades the SDK first.
|
|
|
46453
46481
|
|
|
46454
46482
|
Each step reports its result. Steps 1-8 run even if step 0 is skipped.
|
|
46455
46483
|
|
|
46456
|
-
|
|
46484
|
+
## Merge Strategy
|
|
46485
|
+
|
|
46486
|
+
- **CLAUDE.md:** Add new sections in correct position. Preserve customizations.
|
|
46487
|
+
- **Commands:** Usually additive. Show diff for changes.
|
|
46488
|
+
- **.gitignore:** Append-only -- never remove existing entries.
|
|
46489
|
+
|
|
46490
|
+
## Template Access
|
|
46491
|
+
|
|
46492
|
+
The agent reads current templates from the installed SDK:
|
|
46493
|
+
\`@elevasis/sdk/templates\` subpath exports all template functions.
|
|
46494
|
+
`;
|
|
46495
|
+
}
|
|
46496
|
+
function claudeDeployCommandTemplate() {
|
|
46497
|
+
return `# /deploy command
|
|
46498
|
+
|
|
46499
|
+
You are a project management assistant for this Elevasis workspace.
|
|
46500
|
+
|
|
46501
|
+
## Context
|
|
46502
|
+
|
|
46503
|
+
Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
46504
|
+
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
46505
|
+
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
46506
|
+
|
|
46507
|
+
## Operation
|
|
46457
46508
|
|
|
46458
46509
|
0. Read \`reference/deployment/command-center.mdx\` -- understand the Command View
|
|
46459
46510
|
model, relationship declarations, and what deploy-time validation checks.
|
|
@@ -46471,25 +46522,38 @@ Each step reports its result. Steps 1-8 run even if step 0 is skipped.
|
|
|
46471
46522
|
Each step reports its result. Pipeline stops on failure with suggested fix.
|
|
46472
46523
|
If validation fails with relationship errors, re-read \`reference/deployment/command-center.mdx\`
|
|
46473
46524
|
for the enforcement model and common fixes.
|
|
46525
|
+
`;
|
|
46526
|
+
}
|
|
46527
|
+
function claudeDiagnosticsSkillTemplate() {
|
|
46528
|
+
return `---
|
|
46529
|
+
name: diagnostics
|
|
46530
|
+
description: "Execution diagnostics and runtime debugging. TRIGGER when: an execution fails, user asks why something failed or errored, user mentions runtime errors or unexpected behavior, or agent observes a failed execution result. DO NOT TRIGGER when: user is discussing errors in code (type errors, lint errors) or build failures -- those are development issues, not runtime diagnostics."
|
|
46531
|
+
---
|
|
46474
46532
|
|
|
46475
|
-
|
|
46533
|
+
# Execution Diagnostics
|
|
46476
46534
|
|
|
46477
|
-
|
|
46478
|
-
- Show recent executions with status (completed/failed)
|
|
46479
|
-
- For failed executions: analyze logs, cross-reference with .claude/memory/errors/
|
|
46480
|
-
- Check resource deployment status (deployed, outdated, never deployed)
|
|
46481
|
-
- Verify environment: API key valid, credentials accessible, DB connected
|
|
46535
|
+
You are a runtime diagnostics assistant for this Elevasis workspace.
|
|
46482
46536
|
|
|
46483
|
-
##
|
|
46537
|
+
## Context
|
|
46484
46538
|
|
|
46485
|
-
|
|
46486
|
-
-
|
|
46487
|
-
- **.gitignore:** Append-only -- never remove existing entries.
|
|
46539
|
+
Read \`.claude/memory/errors/index.md\` if it exists for past error patterns.
|
|
46540
|
+
Read \`.claude/memory/deployment-state.md\` if it exists for deployment context.
|
|
46488
46541
|
|
|
46489
|
-
##
|
|
46542
|
+
## When Triggered
|
|
46490
46543
|
|
|
46491
|
-
|
|
46492
|
-
|
|
46544
|
+
Diagnose runtime failures and environment issues:
|
|
46545
|
+
|
|
46546
|
+
1. **Identify the failure** -- get the execution ID and resource ID from the error or conversation context
|
|
46547
|
+
2. **Pull execution details** -- run \`elevasis-sdk execution <resource-id> <execution-id>\` to get logs
|
|
46548
|
+
3. **Cross-reference** -- check \`.claude/memory/errors/\` for known patterns
|
|
46549
|
+
4. **Check deployment status** -- is the resource deployed? Is it the latest version?
|
|
46550
|
+
5. **Verify environment** -- API key valid, required credentials accessible
|
|
46551
|
+
6. **Diagnose root cause** -- analyze logs, identify the failing step, trace the error
|
|
46552
|
+
7. **Record** -- save new error patterns to \`.claude/memory/errors/\` with context and fix
|
|
46553
|
+
8. **Suggest fix** -- propose a concrete fix or next step
|
|
46554
|
+
|
|
46555
|
+
If the error has occurred before (found in memory/errors/), apply the known fix directly.
|
|
46556
|
+
If it recurs 3+ times, suggest adding a rule to \`.claude/rules/workspace-patterns.md\`.
|
|
46493
46557
|
`;
|
|
46494
46558
|
}
|
|
46495
46559
|
function claudeWorkSkillTemplate() {
|
|
@@ -46782,7 +46846,7 @@ Leaves technical prose to the user. Concise.
|
|
|
46782
46846
|
|
|
46783
46847
|
### \`verify [file?]\` -- Interactive Documentation Verification
|
|
46784
46848
|
|
|
46785
|
-
Standalone interactive version of \`/
|
|
46849
|
+
Standalone interactive version of \`/fix\` step 5. Checks docs against current code.
|
|
46786
46850
|
|
|
46787
46851
|
**Without argument -- verify all:**
|
|
46788
46852
|
|
|
@@ -46837,7 +46901,7 @@ ambiguous ones.
|
|
|
46837
46901
|
- Touch \`docs/in-progress/\` -- \`/work\`'s territory
|
|
46838
46902
|
- Handle task lifecycle (planned / in-progress / complete)
|
|
46839
46903
|
- Edit \`project-map.mdx\` or \`resource-map.mdx\` -- auto-generated, read-only
|
|
46840
|
-
- Replace \`/
|
|
46904
|
+
- Replace \`/fix\` step 5 -- it supplements it with interactivity
|
|
46841
46905
|
`;
|
|
46842
46906
|
}
|
|
46843
46907
|
function claudeCredsSkillTemplate() {
|
|
@@ -47082,7 +47146,7 @@ It is NOT for instructions (commands), reference docs, or templates.
|
|
|
47082
47146
|
}
|
|
47083
47147
|
function claudeProjectMapRuleTemplate() {
|
|
47084
47148
|
return `---
|
|
47085
|
-
description: Project map conventions -- auto-generated, do not edit, maintained by deploy and /
|
|
47149
|
+
description: Project map conventions -- auto-generated, do not edit, maintained by deploy and /fix
|
|
47086
47150
|
paths:
|
|
47087
47151
|
- docs/project-map.mdx
|
|
47088
47152
|
- docs/resource-map.mdx
|
|
@@ -47092,8 +47156,8 @@ paths:
|
|
|
47092
47156
|
|
|
47093
47157
|
- \`docs/project-map.mdx\` and \`docs/resource-map.mdx\` are fully auto-generated by \`elevasis-sdk deploy\`
|
|
47094
47158
|
- Do not edit either file manually -- changes are overwritten on next deploy
|
|
47095
|
-
- \`/
|
|
47096
|
-
- If a new command, rule, skill, or memory file is added, run \`/
|
|
47159
|
+
- \`/fix\` step 8 checks for drift and patches the map
|
|
47160
|
+
- If a new command, rule, skill, or memory file is added, run \`/fix\` or \`elevasis-sdk deploy\` to update
|
|
47097
47161
|
`;
|
|
47098
47162
|
}
|
|
47099
47163
|
function claudeTaskTrackingRuleTemplate() {
|
|
@@ -47586,7 +47650,11 @@ function getManagedTemplates(ctx = {}) {
|
|
|
47586
47650
|
".claude/hooks/post-edit-validate.mjs": claudePostEditValidateHookTemplate,
|
|
47587
47651
|
".claude/hooks/tool-failure-recovery.mjs": claudeToolFailureRecoveryHookTemplate,
|
|
47588
47652
|
".claude/commands/tutorial.md": claudeTutorialCommandTemplate,
|
|
47589
|
-
".claude/commands/
|
|
47653
|
+
".claude/commands/init.md": claudeInitCommandTemplate,
|
|
47654
|
+
".claude/commands/status.md": claudeStatusCommandTemplate,
|
|
47655
|
+
".claude/commands/fix.md": claudeFixCommandTemplate,
|
|
47656
|
+
".claude/commands/deploy.md": claudeDeployCommandTemplate,
|
|
47657
|
+
".claude/skills/diagnostics/SKILL.md": claudeDiagnosticsSkillTemplate,
|
|
47590
47658
|
".claude/skills/work/SKILL.md": claudeWorkSkillTemplate,
|
|
47591
47659
|
".claude/commands/docs.md": claudeDocsCommandTemplate,
|
|
47592
47660
|
".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate,
|
|
@@ -47801,7 +47869,11 @@ var MANAGED_FILES = [
|
|
|
47801
47869
|
".claude/hooks/post-edit-validate.mjs",
|
|
47802
47870
|
".claude/hooks/tool-failure-recovery.mjs",
|
|
47803
47871
|
".claude/commands/tutorial.md",
|
|
47804
|
-
".claude/commands/
|
|
47872
|
+
".claude/commands/init.md",
|
|
47873
|
+
".claude/commands/status.md",
|
|
47874
|
+
".claude/commands/fix.md",
|
|
47875
|
+
".claude/commands/deploy.md",
|
|
47876
|
+
".claude/skills/diagnostics/SKILL.md",
|
|
47805
47877
|
".claude/skills/work/SKILL.md",
|
|
47806
47878
|
".claude/commands/docs.md",
|
|
47807
47879
|
".claude/skills/creds/SKILL.md",
|
|
@@ -47872,7 +47944,11 @@ function registerInitCommand(program3) {
|
|
|
47872
47944
|
".claude/hooks/post-edit-validate.mjs": claudePostEditValidateHookTemplate(),
|
|
47873
47945
|
".claude/hooks/tool-failure-recovery.mjs": claudeToolFailureRecoveryHookTemplate(),
|
|
47874
47946
|
".claude/commands/tutorial.md": claudeTutorialCommandTemplate(),
|
|
47875
|
-
".claude/commands/
|
|
47947
|
+
".claude/commands/init.md": claudeInitCommandTemplate(),
|
|
47948
|
+
".claude/commands/status.md": claudeStatusCommandTemplate(),
|
|
47949
|
+
".claude/commands/fix.md": claudeFixCommandTemplate(),
|
|
47950
|
+
".claude/commands/deploy.md": claudeDeployCommandTemplate(),
|
|
47951
|
+
".claude/skills/diagnostics/SKILL.md": claudeDiagnosticsSkillTemplate(),
|
|
47876
47952
|
".claude/skills/work/SKILL.md": claudeWorkSkillTemplate(),
|
|
47877
47953
|
".claude/commands/docs.md": claudeDocsCommandTemplate(),
|
|
47878
47954
|
".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate(),
|
|
@@ -48121,8 +48197,12 @@ function registerUpdateCommand(program3) {
|
|
|
48121
48197
|
}
|
|
48122
48198
|
}
|
|
48123
48199
|
const OBSOLETE_FILES = [
|
|
48124
|
-
".claude/commands/work.md"
|
|
48200
|
+
".claude/commands/work.md",
|
|
48125
48201
|
// v31: moved to .claude/skills/work/SKILL.md
|
|
48202
|
+
".claude/commands/meta.md",
|
|
48203
|
+
// v33: split into init.md, status.md, fix.md, deploy.md, health.md
|
|
48204
|
+
".claude/commands/health.md"
|
|
48205
|
+
// v33: moved to .claude/skills/diagnostics/SKILL.md
|
|
48126
48206
|
];
|
|
48127
48207
|
const removed = [];
|
|
48128
48208
|
if (!upToDate) {
|
|
@@ -48194,8 +48274,7 @@ function registerUpdateCommand(program3) {
|
|
|
48194
48274
|
}
|
|
48195
48275
|
if (flagged.length > 0) {
|
|
48196
48276
|
console.log("");
|
|
48197
|
-
console.log(source_default.gray(" Run /
|
|
48198
|
-
console.log(source_default.gray(" Or run /meta fix to verify and repair the full framework."));
|
|
48277
|
+
console.log(source_default.gray(" Run /fix in Claude Code to verify and repair the full framework."));
|
|
48199
48278
|
}
|
|
48200
48279
|
if (mergedUpdated.length > 0 || mergedPreserved.length > 0) {
|
|
48201
48280
|
console.log("");
|
package/dist/index.d.ts
CHANGED
|
@@ -1516,7 +1516,7 @@ type Database = {
|
|
|
1516
1516
|
};
|
|
1517
1517
|
acq_lists: {
|
|
1518
1518
|
Row: {
|
|
1519
|
-
|
|
1519
|
+
batch_ids: string[];
|
|
1520
1520
|
completed_at: string | null;
|
|
1521
1521
|
created_at: string;
|
|
1522
1522
|
description: string | null;
|
|
@@ -1530,7 +1530,7 @@ type Database = {
|
|
|
1530
1530
|
type: string;
|
|
1531
1531
|
};
|
|
1532
1532
|
Insert: {
|
|
1533
|
-
|
|
1533
|
+
batch_ids?: string[];
|
|
1534
1534
|
completed_at?: string | null;
|
|
1535
1535
|
created_at?: string;
|
|
1536
1536
|
description?: string | null;
|
|
@@ -1544,7 +1544,7 @@ type Database = {
|
|
|
1544
1544
|
type?: string;
|
|
1545
1545
|
};
|
|
1546
1546
|
Update: {
|
|
1547
|
-
|
|
1547
|
+
batch_ids?: string[];
|
|
1548
1548
|
completed_at?: string | null;
|
|
1549
1549
|
created_at?: string;
|
|
1550
1550
|
description?: string | null;
|
|
@@ -3417,7 +3417,7 @@ interface AcqList {
|
|
|
3417
3417
|
name: string;
|
|
3418
3418
|
description: string | null;
|
|
3419
3419
|
type: string;
|
|
3420
|
-
|
|
3420
|
+
batchIds: string[];
|
|
3421
3421
|
instantlyCampaignId: string | null;
|
|
3422
3422
|
status: string;
|
|
3423
3423
|
metadata: Record<string, unknown>;
|
|
@@ -3499,7 +3499,7 @@ interface CreateListParams {
|
|
|
3499
3499
|
name: string;
|
|
3500
3500
|
description?: string;
|
|
3501
3501
|
type?: string;
|
|
3502
|
-
|
|
3502
|
+
batchIds?: string[];
|
|
3503
3503
|
instantlyCampaignId?: string;
|
|
3504
3504
|
status?: string;
|
|
3505
3505
|
metadata?: Record<string, unknown>;
|
package/dist/templates.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
|
|
3
3
|
// src/cli/commands/templates/core/workspace.ts
|
|
4
|
-
var TEMPLATE_VERSION =
|
|
4
|
+
var TEMPLATE_VERSION = 34;
|
|
5
5
|
function configTemplate() {
|
|
6
6
|
return `import type { ElevasConfig } from '@elevasis/sdk'
|
|
7
7
|
|
|
@@ -208,7 +208,7 @@ function claudeMdTemplate(ctx = {}) {
|
|
|
208
208
|
At the start of every session:
|
|
209
209
|
|
|
210
210
|
0. Check the \`<!-- initialized: ... -->\` flag at the top of this file.
|
|
211
|
-
If \`false\`, read \`.claude/commands/
|
|
211
|
+
If \`false\`, read \`.claude/commands/init.md\` and run the \`/init\` flow.
|
|
212
212
|
After initialization completes, change the flag to \`<!-- initialized: true -->\`.
|
|
213
213
|
If \`true\`, proceed with steps below.
|
|
214
214
|
1. Read \`.claude/memory/profile/skills.md\` -- adapt all responses to the user's
|
|
@@ -216,8 +216,8 @@ At the start of every session:
|
|
|
216
216
|
2. Read \`.claude/memory/index.md\` -- drill into relevant topic files as needed.
|
|
217
217
|
Balance context relevance against token usage.
|
|
218
218
|
3. Check installed \`@elevasis/sdk\` template version against \`templateVersion\`
|
|
219
|
-
in \`elevasis.config.ts\`. If newer, notify and suggest \`/
|
|
220
|
-
4. If \`.claude/memory/\` does not exist, suggest \`/
|
|
219
|
+
in \`elevasis.config.ts\`. If newer, notify and suggest \`/fix\`.
|
|
220
|
+
4. If \`.claude/memory/\` does not exist, suggest \`/init\`.
|
|
221
221
|
5. If user Platform Navigation level is none (from skills.md) and
|
|
222
222
|
\`.claude/memory/tutorial-progress.md\` does not exist, suggest \`/tutorial\`.
|
|
223
223
|
If tutorial-progress.md exists and Phase is not complete, mention that the
|
|
@@ -331,7 +331,10 @@ For detailed per-dimension adaptation rules, read
|
|
|
331
331
|
|
|
332
332
|
| Command | Purpose |
|
|
333
333
|
| --- | --- |
|
|
334
|
-
| \`/
|
|
334
|
+
| \`/init\` | First-run workspace setup and competency assessment |
|
|
335
|
+
| \`/status\` | Project health dashboard |
|
|
336
|
+
| \`/fix\` | Maintenance, drift repair, and SDK upgrade |
|
|
337
|
+
| \`/deploy\` | Full deploy pipeline (validate \u2192 deploy \u2192 verify) |
|
|
335
338
|
| \`/docs\` | Browse, create, and verify permanent documentation |
|
|
336
339
|
| \`/tutorial\` | Progressive learning path (21 items across 4 sections) |
|
|
337
340
|
|
|
@@ -343,6 +346,7 @@ Skills auto-trigger based on conversation context. You do not need to invoke the
|
|
|
343
346
|
| --- | --- |
|
|
344
347
|
| \`work\` | You say /work, ask to track or save progress across sessions, ask what you were working on, want to create/resume/complete a task doc, or say you are done for today. Also proactively save when conversation is heavy or 2+ steps completed |
|
|
345
348
|
| \`creds\` | You mention credentials, API keys, secrets, webhook secrets, or setting up integrations |
|
|
349
|
+
| \`diagnostics\` | An execution fails, user asks why something failed, user mentions runtime errors, or agent observes a failed execution |
|
|
346
350
|
|
|
347
351
|
## Maintaining Memory
|
|
348
352
|
|
|
@@ -430,7 +434,7 @@ Elevasis Tutorial
|
|
|
430
434
|
INTRODUCTION 0/4
|
|
431
435
|
1 Welcome & Orientation [ ]
|
|
432
436
|
2 How This Workspace Works [ ]
|
|
433
|
-
3
|
|
437
|
+
3 Project Commands (/init, /status, /fix, /deploy) [ ]
|
|
434
438
|
4 /work and /docs [ ]
|
|
435
439
|
|
|
436
440
|
CORE CONCEPTS 0/6
|
|
@@ -508,7 +512,7 @@ When automation is none:
|
|
|
508
512
|
"This workspace comes with a built-in assistant that knows your project, your tools,
|
|
509
513
|
and your goals. Let me show you how it's set up." Open CLAUDE.md and explain in
|
|
510
514
|
plain terms: it's the agent's instruction sheet. Point out the commands in the
|
|
511
|
-
Commands table. Show /
|
|
515
|
+
Commands table. Show /status, /tutorial. Explain the work and creds skills as
|
|
512
516
|
"the assistant automatically helps when you mention tasks or API keys." Tour the memory folder
|
|
513
517
|
at a high level -- "this is where the agent stores what it learns about your project."
|
|
514
518
|
Verify: Ask the user a question about their business goal and show how the agent
|
|
@@ -521,7 +525,7 @@ session start, how the navigation table works, what the Skills section means.
|
|
|
521
525
|
Explain the three commands briefly and the two auto-triggering skills (work, creds). Show that the agent has memory: open
|
|
522
526
|
\`.claude/memory/profile/skills.md\` and show their own profile -- "every session,
|
|
523
527
|
the agent reads this and adapts." Explain the initialized flag.
|
|
524
|
-
Verify: Run /
|
|
528
|
+
Verify: Run /status to see project status.
|
|
525
529
|
Observation focus: memory system concept, session initialization flow.
|
|
526
530
|
|
|
527
531
|
When automation is custom:
|
|
@@ -529,37 +533,39 @@ Read CLAUDE.md in full. Explain the session initialization sequence: CLAUDE.md -
|
|
|
529
533
|
navigation table -> memory files -> context loading. Walk through: Commands section
|
|
530
534
|
(3 commands + work and creds skills), Rules section (auto-loaded based on file paths), Skills
|
|
531
535
|
section (auto-triggered by content patterns). Point out the initialized flag and
|
|
532
|
-
explain how /
|
|
533
|
-
Verify: Run /
|
|
536
|
+
explain how /init set it.
|
|
537
|
+
Verify: Run /status to see project status; observe which fields it reports.
|
|
534
538
|
Observation focus: initialization model, command-vs-rule-vs-skill distinction.
|
|
535
539
|
|
|
536
|
-
**Item 3:
|
|
540
|
+
**Item 3: Project Commands (/init, /status, /fix, /deploy)**
|
|
537
541
|
|
|
538
542
|
When automation is none:
|
|
539
|
-
"Think of /
|
|
540
|
-
attention." Run /
|
|
541
|
-
|
|
542
|
-
Explain /
|
|
543
|
-
|
|
544
|
-
Verify: Run /
|
|
543
|
+
"Think of /status as your project dashboard -- it shows what's healthy and what needs
|
|
544
|
+
attention." Run /status and narrate the output in plain language: what each field means.
|
|
545
|
+
Explain /fix as "the agent tidies up and applies updates."
|
|
546
|
+
Explain /deploy as "the agent publishes your changes in one step." Mention the
|
|
547
|
+
diagnostics skill: "If something goes wrong, the assistant automatically investigates."
|
|
548
|
+
Verify: Run /status. Narrate the output together.
|
|
545
549
|
Observation focus: project lifecycle concept, dashboard reading.
|
|
546
550
|
|
|
547
551
|
When automation is low-code:
|
|
548
|
-
Show all
|
|
549
|
-
like "repair this Zap" in Zapier; /
|
|
550
|
-
Walk through
|
|
551
|
-
uses), SDK version (installed package), profile summary, drift check.
|
|
552
|
-
|
|
552
|
+
Show all project commands with their purpose. Map to familiar concepts: /fix is
|
|
553
|
+
like "repair this Zap" in Zapier; /deploy is a one-command publish pipeline.
|
|
554
|
+
Walk through /status output: template version (SDK template your workspace
|
|
555
|
+
uses), SDK version (installed package), profile summary, drift check. Mention the
|
|
556
|
+
diagnostics skill auto-triggers on execution failures.
|
|
557
|
+
Verify: Run /status and interpret each field together.
|
|
553
558
|
Observation focus: deploy pipeline understanding, version tracking.
|
|
554
559
|
|
|
555
560
|
When automation is custom:
|
|
556
|
-
Read \`.claude/commands
|
|
557
|
-
with assessment),
|
|
558
|
-
rules health), deploy (
|
|
559
|
-
project-map, verify
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
Read each command file in \`.claude/commands/\`: init.md (/init -- first-run setup
|
|
562
|
+
with assessment), status.md (/status -- health dashboard), fix.md (/fix -- drift
|
|
563
|
+
repair + SDK upgrade + rules health), deploy.md (/deploy -- 9-step pipeline: check,
|
|
564
|
+
typecheck, docs, git, deploy, project-map, verify, state, push). Explain the
|
|
565
|
+
diagnostics skill (auto-triggered on execution failures for runtime debugging).
|
|
566
|
+
Explain the merge strategy for CLAUDE.md and commands. Note the template access
|
|
567
|
+
model: templates read from @elevasis/sdk/templates subpath.
|
|
568
|
+
Verify: Run /status to see project status. Identify what a version mismatch looks like.
|
|
563
569
|
Observation focus: full lifecycle coverage, pipeline internals.
|
|
564
570
|
|
|
565
571
|
**Item 4: /work and /docs**
|
|
@@ -599,7 +605,7 @@ Then read \`.claude/commands/docs.md\`. Cover /docs operations:
|
|
|
599
605
|
/docs (default): browse permanent docs/, categorized with read-only auto-generated files
|
|
600
606
|
separate; /docs create: interview-driven, resource-aware doc creation from src/ code
|
|
601
607
|
analysis; /docs verify: cross-references resource IDs, schema fields, platform tools in
|
|
602
|
-
docs against src/ -- standalone analog of /
|
|
608
|
+
docs against src/ -- standalone analog of /fix step 5.
|
|
603
609
|
Explain the relationship: /work owns docs/in-progress/ (task lifecycle), completing a task
|
|
604
610
|
moves docs to permanent location, /docs browses and verifies what's there.
|
|
605
611
|
Verify: Create a task via /work, make progress, observe auto-save, then run /work complete
|
|
@@ -846,21 +852,21 @@ Observation focus: MANAGED vs INIT_ONLY lifecycle, rule authoring, memory layout
|
|
|
846
852
|
|
|
847
853
|
When automation is none:
|
|
848
854
|
"When Elevasis SDK releases updates, the assistant can apply them to your workspace
|
|
849
|
-
automatically. You don't have to redo your customizations." Explain /
|
|
855
|
+
automatically. You don't have to redo your customizations." Explain /fix as
|
|
850
856
|
the command that applies updates. Skip technical file classification details.
|
|
851
857
|
Show \`docs/project-map.mdx\` briefly: "This is an auto-generated map of everything
|
|
852
858
|
in your project -- the agent uses it for navigation."
|
|
853
|
-
Verify: Run /
|
|
859
|
+
Verify: Run /fix (or explain what it would do). Check \`docs/project-map.mdx\`.
|
|
854
860
|
Next steps: point to reference docs in docs/, encourage using /work for new tasks.
|
|
855
861
|
Observation focus: update model concept, project map as navigation aid.
|
|
856
862
|
|
|
857
863
|
When automation is low-code:
|
|
858
864
|
Explain MANAGED (auto-updated by elevasis-sdk update) vs INIT_ONLY (set once, yours).
|
|
859
|
-
Show how /
|
|
865
|
+
Show how /fix applies SDK updates with conflict handling: "If a file changed,
|
|
860
866
|
it shows you both versions and lets you decide."
|
|
861
867
|
Show \`docs/project-map.mdx\` and explain what it contains: resources, commands,
|
|
862
868
|
rules, memory index. Note that deploy auto-regenerates it.
|
|
863
|
-
Verify: Read \`elevasis.config.ts\` templateVersion. Compare to the running SDK version from /
|
|
869
|
+
Verify: Read \`elevasis.config.ts\` templateVersion. Compare to the running SDK version from /status.
|
|
864
870
|
Observation focus: update workflow, project map freshness.
|
|
865
871
|
|
|
866
872
|
When automation is custom:
|
|
@@ -872,7 +878,7 @@ file, read template from @elevasis/sdk/templates, merge preserving customization
|
|
|
872
878
|
Explain the project map: auto-generated by deploy, contains resource inventory,
|
|
873
879
|
command list, rule list, memory index.
|
|
874
880
|
Next steps: explore reference docs, use /work for complex tasks, build custom rules.
|
|
875
|
-
Verify: Compare elevasis.config.ts templateVersion with output of /
|
|
881
|
+
Verify: Compare elevasis.config.ts templateVersion with output of /status. Identify any drift.
|
|
876
882
|
Observation focus: full template lifecycle, conflict resolution pattern.
|
|
877
883
|
|
|
878
884
|
## Adaptation Rules
|
|
@@ -941,8 +947,8 @@ Update rules:
|
|
|
941
947
|
Backward-compatible: missing Completed Modules treated as empty. Old files with Completed MF Lessons: map entries to items 2-4 and 20-21 by lesson title match.
|
|
942
948
|
`;
|
|
943
949
|
}
|
|
944
|
-
function
|
|
945
|
-
return `# /
|
|
950
|
+
function claudeInitCommandTemplate() {
|
|
951
|
+
return `# /init command
|
|
946
952
|
|
|
947
953
|
You are a project management assistant for this Elevasis workspace.
|
|
948
954
|
|
|
@@ -952,9 +958,7 @@ Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
|
952
958
|
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
953
959
|
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
954
960
|
|
|
955
|
-
##
|
|
956
|
-
|
|
957
|
-
### \`/meta init\` -- First-Run Setup
|
|
961
|
+
## Operation
|
|
958
962
|
|
|
959
963
|
Guided setup for a freshly scaffolded workspace. Triggered automatically
|
|
960
964
|
by the \`<!-- initialized: false -->\` flag in CLAUDE.md, or run manually.
|
|
@@ -1045,16 +1049,40 @@ by the \`<!-- initialized: false -->\` flag in CLAUDE.md, or run manually.
|
|
|
1045
1049
|
7. **Update flag**
|
|
1046
1050
|
Change \`<!-- initialized: false -->\` to \`<!-- initialized: true -->\`
|
|
1047
1051
|
in CLAUDE.md.
|
|
1052
|
+
`;
|
|
1053
|
+
}
|
|
1054
|
+
function claudeStatusCommandTemplate() {
|
|
1055
|
+
return `# /status command
|
|
1048
1056
|
|
|
1049
|
-
|
|
1057
|
+
You are a project management assistant for this Elevasis workspace.
|
|
1058
|
+
|
|
1059
|
+
## Context
|
|
1060
|
+
|
|
1061
|
+
Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
1062
|
+
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
1063
|
+
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
1064
|
+
|
|
1065
|
+
## Operation
|
|
1050
1066
|
|
|
1051
1067
|
Display a project health summary:
|
|
1052
1068
|
1. Template version (from elevasis.config.ts) and installed SDK version (from package.json). Suggest \`elevasis-sdk update\` to check for updates
|
|
1053
1069
|
2. Profile summary (from .claude/memory/profile/skills.md)
|
|
1054
1070
|
3. Quick drift check: count of missing managed files, missing gitignore entries
|
|
1055
1071
|
4. Last deployment status (from .claude/memory/deployment-state.md if it exists)
|
|
1072
|
+
`;
|
|
1073
|
+
}
|
|
1074
|
+
function claudeFixCommandTemplate() {
|
|
1075
|
+
return `# /fix command
|
|
1056
1076
|
|
|
1057
|
-
|
|
1077
|
+
You are a project management assistant for this Elevasis workspace.
|
|
1078
|
+
|
|
1079
|
+
## Context
|
|
1080
|
+
|
|
1081
|
+
Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
1082
|
+
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
1083
|
+
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
1084
|
+
|
|
1085
|
+
## Operation
|
|
1058
1086
|
|
|
1059
1087
|
Detect and repair all drift. Optionally upgrades the SDK first.
|
|
1060
1088
|
|
|
@@ -1094,7 +1122,30 @@ Detect and repair all drift. Optionally upgrades the SDK first.
|
|
|
1094
1122
|
|
|
1095
1123
|
Each step reports its result. Steps 1-8 run even if step 0 is skipped.
|
|
1096
1124
|
|
|
1097
|
-
|
|
1125
|
+
## Merge Strategy
|
|
1126
|
+
|
|
1127
|
+
- **CLAUDE.md:** Add new sections in correct position. Preserve customizations.
|
|
1128
|
+
- **Commands:** Usually additive. Show diff for changes.
|
|
1129
|
+
- **.gitignore:** Append-only -- never remove existing entries.
|
|
1130
|
+
|
|
1131
|
+
## Template Access
|
|
1132
|
+
|
|
1133
|
+
The agent reads current templates from the installed SDK:
|
|
1134
|
+
\`@elevasis/sdk/templates\` subpath exports all template functions.
|
|
1135
|
+
`;
|
|
1136
|
+
}
|
|
1137
|
+
function claudeDeployCommandTemplate() {
|
|
1138
|
+
return `# /deploy command
|
|
1139
|
+
|
|
1140
|
+
You are a project management assistant for this Elevasis workspace.
|
|
1141
|
+
|
|
1142
|
+
## Context
|
|
1143
|
+
|
|
1144
|
+
Read \`elevasis.config.ts\` to get the current \`templateVersion\`.
|
|
1145
|
+
Read \`package.json\` to get the installed \`@elevasis/sdk\` version.
|
|
1146
|
+
Read \`.claude/memory/index.md\` if it exists for project state.
|
|
1147
|
+
|
|
1148
|
+
## Operation
|
|
1098
1149
|
|
|
1099
1150
|
0. Read \`reference/deployment/command-center.mdx\` -- understand the Command View
|
|
1100
1151
|
model, relationship declarations, and what deploy-time validation checks.
|
|
@@ -1112,25 +1163,38 @@ Each step reports its result. Steps 1-8 run even if step 0 is skipped.
|
|
|
1112
1163
|
Each step reports its result. Pipeline stops on failure with suggested fix.
|
|
1113
1164
|
If validation fails with relationship errors, re-read \`reference/deployment/command-center.mdx\`
|
|
1114
1165
|
for the enforcement model and common fixes.
|
|
1166
|
+
`;
|
|
1167
|
+
}
|
|
1168
|
+
function claudeDiagnosticsSkillTemplate() {
|
|
1169
|
+
return `---
|
|
1170
|
+
name: diagnostics
|
|
1171
|
+
description: "Execution diagnostics and runtime debugging. TRIGGER when: an execution fails, user asks why something failed or errored, user mentions runtime errors or unexpected behavior, or agent observes a failed execution result. DO NOT TRIGGER when: user is discussing errors in code (type errors, lint errors) or build failures -- those are development issues, not runtime diagnostics."
|
|
1172
|
+
---
|
|
1115
1173
|
|
|
1116
|
-
|
|
1174
|
+
# Execution Diagnostics
|
|
1117
1175
|
|
|
1118
|
-
|
|
1119
|
-
- Show recent executions with status (completed/failed)
|
|
1120
|
-
- For failed executions: analyze logs, cross-reference with .claude/memory/errors/
|
|
1121
|
-
- Check resource deployment status (deployed, outdated, never deployed)
|
|
1122
|
-
- Verify environment: API key valid, credentials accessible, DB connected
|
|
1176
|
+
You are a runtime diagnostics assistant for this Elevasis workspace.
|
|
1123
1177
|
|
|
1124
|
-
##
|
|
1178
|
+
## Context
|
|
1125
1179
|
|
|
1126
|
-
|
|
1127
|
-
-
|
|
1128
|
-
- **.gitignore:** Append-only -- never remove existing entries.
|
|
1180
|
+
Read \`.claude/memory/errors/index.md\` if it exists for past error patterns.
|
|
1181
|
+
Read \`.claude/memory/deployment-state.md\` if it exists for deployment context.
|
|
1129
1182
|
|
|
1130
|
-
##
|
|
1183
|
+
## When Triggered
|
|
1131
1184
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1185
|
+
Diagnose runtime failures and environment issues:
|
|
1186
|
+
|
|
1187
|
+
1. **Identify the failure** -- get the execution ID and resource ID from the error or conversation context
|
|
1188
|
+
2. **Pull execution details** -- run \`elevasis-sdk execution <resource-id> <execution-id>\` to get logs
|
|
1189
|
+
3. **Cross-reference** -- check \`.claude/memory/errors/\` for known patterns
|
|
1190
|
+
4. **Check deployment status** -- is the resource deployed? Is it the latest version?
|
|
1191
|
+
5. **Verify environment** -- API key valid, required credentials accessible
|
|
1192
|
+
6. **Diagnose root cause** -- analyze logs, identify the failing step, trace the error
|
|
1193
|
+
7. **Record** -- save new error patterns to \`.claude/memory/errors/\` with context and fix
|
|
1194
|
+
8. **Suggest fix** -- propose a concrete fix or next step
|
|
1195
|
+
|
|
1196
|
+
If the error has occurred before (found in memory/errors/), apply the known fix directly.
|
|
1197
|
+
If it recurs 3+ times, suggest adding a rule to \`.claude/rules/workspace-patterns.md\`.
|
|
1134
1198
|
`;
|
|
1135
1199
|
}
|
|
1136
1200
|
function claudeWorkSkillTemplate() {
|
|
@@ -1423,7 +1487,7 @@ Leaves technical prose to the user. Concise.
|
|
|
1423
1487
|
|
|
1424
1488
|
### \`verify [file?]\` -- Interactive Documentation Verification
|
|
1425
1489
|
|
|
1426
|
-
Standalone interactive version of \`/
|
|
1490
|
+
Standalone interactive version of \`/fix\` step 5. Checks docs against current code.
|
|
1427
1491
|
|
|
1428
1492
|
**Without argument -- verify all:**
|
|
1429
1493
|
|
|
@@ -1478,7 +1542,7 @@ ambiguous ones.
|
|
|
1478
1542
|
- Touch \`docs/in-progress/\` -- \`/work\`'s territory
|
|
1479
1543
|
- Handle task lifecycle (planned / in-progress / complete)
|
|
1480
1544
|
- Edit \`project-map.mdx\` or \`resource-map.mdx\` -- auto-generated, read-only
|
|
1481
|
-
- Replace \`/
|
|
1545
|
+
- Replace \`/fix\` step 5 -- it supplements it with interactivity
|
|
1482
1546
|
`;
|
|
1483
1547
|
}
|
|
1484
1548
|
function claudeCredsSkillTemplate() {
|
|
@@ -1683,7 +1747,7 @@ It is NOT for instructions (commands), reference docs, or templates.
|
|
|
1683
1747
|
}
|
|
1684
1748
|
function claudeProjectMapRuleTemplate() {
|
|
1685
1749
|
return `---
|
|
1686
|
-
description: Project map conventions -- auto-generated, do not edit, maintained by deploy and /
|
|
1750
|
+
description: Project map conventions -- auto-generated, do not edit, maintained by deploy and /fix
|
|
1687
1751
|
paths:
|
|
1688
1752
|
- docs/project-map.mdx
|
|
1689
1753
|
- docs/resource-map.mdx
|
|
@@ -1693,8 +1757,8 @@ paths:
|
|
|
1693
1757
|
|
|
1694
1758
|
- \`docs/project-map.mdx\` and \`docs/resource-map.mdx\` are fully auto-generated by \`elevasis-sdk deploy\`
|
|
1695
1759
|
- Do not edit either file manually -- changes are overwritten on next deploy
|
|
1696
|
-
- \`/
|
|
1697
|
-
- If a new command, rule, skill, or memory file is added, run \`/
|
|
1760
|
+
- \`/fix\` step 8 checks for drift and patches the map
|
|
1761
|
+
- If a new command, rule, skill, or memory file is added, run \`/fix\` or \`elevasis-sdk deploy\` to update
|
|
1698
1762
|
`;
|
|
1699
1763
|
}
|
|
1700
1764
|
function claudeTaskTrackingRuleTemplate() {
|
|
@@ -2169,7 +2233,11 @@ function getManagedTemplates(ctx = {}) {
|
|
|
2169
2233
|
".claude/hooks/post-edit-validate.mjs": claudePostEditValidateHookTemplate,
|
|
2170
2234
|
".claude/hooks/tool-failure-recovery.mjs": claudeToolFailureRecoveryHookTemplate,
|
|
2171
2235
|
".claude/commands/tutorial.md": claudeTutorialCommandTemplate,
|
|
2172
|
-
".claude/commands/
|
|
2236
|
+
".claude/commands/init.md": claudeInitCommandTemplate,
|
|
2237
|
+
".claude/commands/status.md": claudeStatusCommandTemplate,
|
|
2238
|
+
".claude/commands/fix.md": claudeFixCommandTemplate,
|
|
2239
|
+
".claude/commands/deploy.md": claudeDeployCommandTemplate,
|
|
2240
|
+
".claude/skills/diagnostics/SKILL.md": claudeDiagnosticsSkillTemplate,
|
|
2173
2241
|
".claude/skills/work/SKILL.md": claudeWorkSkillTemplate,
|
|
2174
2242
|
".claude/commands/docs.md": claudeDocsCommandTemplate,
|
|
2175
2243
|
".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate,
|
|
@@ -2182,4 +2250,4 @@ function getManagedTemplates(ctx = {}) {
|
|
|
2182
2250
|
};
|
|
2183
2251
|
}
|
|
2184
2252
|
|
|
2185
|
-
export { claudeCredsSkillTemplate, claudeDocsAuthoringRuleTemplate, claudeMdTemplate, claudeMemoryConventionsRuleTemplate,
|
|
2253
|
+
export { claudeCredsSkillTemplate, claudeDeployCommandTemplate, claudeDiagnosticsSkillTemplate, claudeDocsAuthoringRuleTemplate, claudeFixCommandTemplate, claudeInitCommandTemplate, claudeMdTemplate, claudeMemoryConventionsRuleTemplate, claudeProjectMapRuleTemplate, claudeSdkBoundaryHookTemplate, claudeSdkPatternsRuleTemplate, claudeSettingsTemplate, claudeStatusCommandTemplate, claudeTaskTrackingRuleTemplate, claudeTutorialCommandTemplate, claudeWorkSkillTemplate, exampleBarrelTemplate, getManagedTemplates, gitignoreTemplate, operationsBarrelTemplate, platformStatusTemplate, starterWorkflowTemplate };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { claudeMdTemplate,
|
|
1
|
+
export { claudeMdTemplate, claudeInitCommandTemplate, claudeStatusCommandTemplate, claudeFixCommandTemplate, claudeDeployCommandTemplate, claudeDiagnosticsSkillTemplate, claudeWorkSkillTemplate, claudeTutorialCommandTemplate, claudeSettingsTemplate, claudeSdkBoundaryHookTemplate, claudeCredsSkillTemplate, claudeSdkPatternsRuleTemplate, claudeDocsAuthoringRuleTemplate, claudeMemoryConventionsRuleTemplate, claudeProjectMapRuleTemplate, claudeTaskTrackingRuleTemplate, gitignoreTemplate, starterWorkflowTemplate, platformStatusTemplate, operationsBarrelTemplate, exampleBarrelTemplate } from './cli/commands/init.js';
|
|
2
2
|
export { getManagedTemplates } from './cli/commands/templates/core/index.js';
|