@elevasis/sdk 0.5.2 → 0.5.4

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 CHANGED
@@ -43785,7 +43785,7 @@ async function apiDelete(endpoint, apiUrl = resolveApiUrl()) {
43785
43785
  // package.json
43786
43786
  var package_default = {
43787
43787
  name: "@elevasis/sdk",
43788
- version: "0.5.2",
43788
+ version: "0.5.4",
43789
43789
  description: "SDK for building Elevasis organization resources",
43790
43790
  "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.",
43791
43791
  type: "module",
@@ -44373,10 +44373,6 @@ function registerDeployCommand(program3) {
44373
44373
  }
44374
44374
  await generateResourceMap(org);
44375
44375
  await generateProjectMap(org);
44376
- try {
44377
- await (0, import_promises.unlink)((0, import_path.resolve)("docs/resource-map.mdx"));
44378
- } catch {
44379
- }
44380
44376
  const documentation = await scanDocumentation();
44381
44377
  if (documentation) {
44382
44378
  console.log(source_default.gray(` docs ${source_default.white(String(documentation.length))} file${documentation.length !== 1 ? "s" : ""}`));
@@ -45078,7 +45074,7 @@ var import_path3 = require("path");
45078
45074
  var import_promises2 = require("fs/promises");
45079
45075
 
45080
45076
  // src/cli/commands/templates/core/workspace.ts
45081
- var TEMPLATE_VERSION = 21;
45077
+ var TEMPLATE_VERSION = 22;
45082
45078
  function configTemplate() {
45083
45079
  return `import type { ElevasConfig } from '@elevasis/sdk'
45084
45080
 
@@ -45496,6 +45492,7 @@ For detailed per-dimension adaptation rules, read
45496
45492
  | Command | Purpose |
45497
45493
  | --- | --- |
45498
45494
  | \`/meta\` | Project lifecycle: init, status, fix, deploy, health |
45495
+ | \`/docs\` | Browse, create, and verify permanent documentation |
45499
45496
  | \`/work\` | Task tracking: create, save, resume, complete |
45500
45497
  | \`/tutorial\` | Progressive learning path (7 core lessons + 9 modules) |
45501
45498
 
@@ -45579,67 +45576,57 @@ Read \`.claude/memory/tutorial-progress.md\` to check current lesson progress.
45579
45576
  When \`/tutorial\` is invoked:
45580
45577
 
45581
45578
  1. Read \`.claude/memory/tutorial-progress.md\` (if it exists)
45582
- 2. Display the appropriate menu:
45583
-
45584
- **No progress (first time):**
45585
-
45586
- \`\`\`
45587
- Welcome to the Elevasis Tutorial!
45588
- ==================================
45589
-
45590
- What would you like to learn?
45591
-
45592
- 1. Orchestration Concepts (Core Path)
45593
- Build workflows step-by-step: data schemas, platform tools,
45594
- multi-step flows, decision points, and production deployment.
45595
- 7 lessons -- estimated 2-3 hours total.
45596
-
45597
- 2. Examples & Advanced Modules
45598
- Hands-on deep-dives: human-in-the-loop, scheduling,
45599
- notifications, integrations, LLM, agents, and more.
45600
- 9 standalone modules -- pick any order.
45601
-
45602
- 3. Meta-Framework
45603
- Learn the Claude Code context system: /meta, /work,
45604
- rules, memory, and how to customize your workspace.
45605
- 5 lessons -- estimated 1-2 hours total.
45606
-
45607
- Pick a number to start, or say "status" to see your progress.
45608
- \`\`\`
45579
+ 2. Display the full menu table. Fill in progress indicators from the progress file.
45580
+ 3. User picks a number -> start or resume that item directly. No track gating.
45609
45581
 
45610
- **With existing progress:**
45582
+ Progress indicators: \`[ ]\` not started, \`[>]\` in progress, \`[x] YYYY-MM-DD\` complete.
45611
45583
 
45612
- Show active tracks at the top, then offer resume options alongside new choices. Example:
45584
+ Example (first time, no progress):
45613
45585
 
45614
45586
  \`\`\`
45615
- Progress: Core Path (Lesson 4/7) | Meta-Framework (MF2/5)
45616
-
45617
- 1. Resume Orchestration Concepts (Lesson 4)
45618
- 2. Orchestration Concepts (Core Path -- start over)
45619
- 3. Examples & Advanced Modules
45620
- 4. Resume Meta-Framework (MF2)
45621
- 5. Meta-Framework (start over)
45622
- 6. Show full status
45623
-
45624
- Pick a number, or describe what you'd like to learn.
45587
+ Elevasis Tutorial
45588
+ ==================
45589
+
45590
+ ORCHESTRATION CONCEPTS 0/7
45591
+ 1 Welcome & Orientation [ ]
45592
+ 2 Your First Custom Workflow [ ]
45593
+ 3 Understanding Data (Schemas) [ ]
45594
+ 4 Using Platform Tools [ ]
45595
+ 5 Multi-Step Workflows [ ]
45596
+ 6 Decision Points [ ]
45597
+ 7 Going to Production [ ]
45598
+
45599
+ EXAMPLES & ADVANCED MODULES 0/9
45600
+ 8 Human-in-the-Loop [ ]
45601
+ 9 Task Scheduling [ ]
45602
+ 10 Notification System [ ]
45603
+ 11 Real-World Integrations [ ]
45604
+ 12 Error Handling Mastery [ ]
45605
+ 13 Advanced Workflows [ ]
45606
+ 14 Resource Composition [ ]
45607
+ 15 LLM Integration [ ]
45608
+ 16 AI Agents [ ]
45609
+
45610
+ META-FRAMEWORK 0/5
45611
+ 17 The Agent Framework [ ]
45612
+ 18 The /meta Command [ ]
45613
+ 19 /work and /docs [ ]
45614
+ 20 Rules, Memory, and Customization [ ]
45615
+ 21 Template Lifecycle [ ]
45616
+
45617
+ Pick a number to start.
45625
45618
  \`\`\`
45626
45619
 
45627
- After user picks:
45628
- - Orchestration Concepts: Resume or start core lesson flow
45629
- - Examples & Advanced Modules: Show module menu (see ## Module Menu)
45630
- - Meta-Framework: Resume or start MF1 (see ## Meta-Framework Track)
45631
- - "status": Display Phase, current position, completion counts
45620
+ Always show this full table when \`/tutorial\` is invoked. Populate progress
45621
+ indicators from completed/current state. \`"status"\` -> show the same table.
45632
45622
 
45633
45623
  ## Progress Logic
45634
45624
 
45635
45625
  1. Read \`.claude/memory/tutorial-progress.md\`
45636
- 2. Show the menu (## Menu section) with progress summary if progress exists
45637
- 3. After user picks a track:
45638
- - **Orchestration Concepts**: If Completed Lessons < 7 -> start/resume at Current Lesson; if 7 complete -> note completion, offer module menu or repeat
45639
- - **Examples & Advanced Modules**: Show module menu (## Module Menu section)
45640
- - **Meta-Framework**: If Current MF Lesson is set -> resume at that lesson; otherwise start MF1
45641
- 4. Track completion: mark the track done in progress file when all lessons/modules complete
45642
- 5. If all three tracks complete -> set Phase to \`complete\`, congratulate, suggest exploring docs/ or /work
45626
+ 2. Show the full menu table (## Menu) with progress filled in
45627
+ 3. User picks a number -> start or resume that lesson or module directly
45628
+ 4. After completion: mark done in progress file, show updated menu table
45629
+ 5. All 21 items complete -> congratulate, suggest exploring docs/ or /work
45643
45630
 
45644
45631
  ## Lesson Flow
45645
45632
 
@@ -45647,7 +45634,7 @@ Each lesson follows this flow:
45647
45634
  1. Announce lesson title and what they'll learn (1-2 sentences)
45648
45635
  2. Explain the concept (read docs per skill level, adapt to user)
45649
45636
  3. Guide user to build or modify something (agent writes all code for automation: none)
45650
- 4. Verify it works (Execution Runner is primary for none; CLI + UI are equal for others)
45637
+ 4. Verify it works (CLI primary for all levels; Command Center for visual review -- Command View, Execution Logs)
45651
45638
  5. Celebrate success, record observations in \`.claude/memory/tutorial-progress.md\`
45652
45639
  6. Ask: "Ready for the next lesson, or want to practice more?"
45653
45640
 
@@ -45661,7 +45648,7 @@ from \`reference/developer/interaction-guidance.mdx\` (recipe, assembly line, ki
45661
45648
  appliance). Explain deployment plainly: "You write the recipe here, then deploy it so
45662
45649
  it's live." Deploy the starter echo workflow (\`elevasis check\` + \`elevasis deploy\`),
45663
45650
  THEN tour the Command Center so the user sees populated pages, not empty ones. Tour:
45664
- Command View (echo node), Execution Runner (run echo from form), Execution Logs (result).
45651
+ Command View (echo node), Execution Logs (result).
45665
45652
  Observation focus: automation value understanding, Command Center comfort.
45666
45653
 
45667
45654
  When automation is low-code or custom:
@@ -45669,7 +45656,7 @@ Tour project files: src/index.ts (registry), src/example/echo.ts (starter
45669
45656
  workflow), src/operations/platform-status.ts (platform API example),
45670
45657
  elevasis.config.ts, .env, docs/. Explain the execution model.
45671
45658
  Verify: run \`elevasis resources\`. Then open the Command Center and tour the
45672
- main pages: Command View (resource graph), Execution Runner, Execution Logs.
45659
+ main pages: Command View (resource graph), Execution Logs.
45673
45660
  Point out the echo workflow node in Command View.
45674
45661
  Observation focus: cloud deployment model, UI navigation comfort.
45675
45662
 
@@ -45678,9 +45665,9 @@ Observation focus: cloud deployment model, UI navigation comfort.
45678
45665
  When automation is none:
45679
45666
  Frame the workflow as "a recipe." Use plain language: "settings" not "config",
45680
45667
  "what data it needs" not "contract", "instructions" not "steps", "where it starts"
45681
- not "entryPoint." Agent writes all code changes. Execution Runner form is PRIMARY
45682
- verification -- show user how to fill the form and run it. CLI is secondary:
45683
- "here's the power user way." Observation focus: recipe-to-result connection, form comfort.
45668
+ not "entryPoint." Agent writes all code changes. Agent runs \`elevasis exec\` to verify
45669
+ and narrates the result in plain terms.
45670
+ Observation focus: recipe-to-result connection.
45684
45671
 
45685
45672
  When automation is low-code or custom:
45686
45673
  Modify the echo workflow. Walk through each part: config, contract, steps,
@@ -45693,25 +45680,25 @@ Observation focus: deployment-to-execution loop, TypeScript syntax comfort.
45693
45680
  **Lesson 3: Understanding Data (Schemas)**
45694
45681
 
45695
45682
  When automation is none:
45696
- Frame as "What information does your automation need?" Each piece becomes a form
45697
- field. Describe types in plain English: text, number, yes/no, a choice from a list.
45698
- NO Zod, no z.string(), no z.infer(), no code shown. Agent reads identity.md goals
45699
- and writes the workflow schema. User fills the form in Execution Runner to verify.
45700
- Observation focus: data-to-form connection, required vs optional understanding.
45683
+ Frame as "What information does your automation need?" Describe types in plain English:
45684
+ text, number, yes/no, a choice from a list. NO Zod, no z.string(), no z.infer(), no
45685
+ code shown. Agent reads identity.md goals and writes the workflow schema. Agent runs
45686
+ \`elevasis exec\` with sample input and narrates the result.
45687
+ Observation focus: data-to-input connection, required vs optional understanding.
45701
45688
 
45702
45689
  When automation is low-code:
45703
45690
  "Field mapping like Zapier, but with validation." Show Zod types briefly. Demonstrate
45704
- how \`.describe()\` sets the form field label. Build schema based on identity.md goals.
45705
- After deploy, open Execution Runner and point out each field.
45706
- Observation focus: schema-to-form connection, optional fields, types.
45691
+ how \`.describe()\` documents each field. Build schema based on identity.md goals.
45692
+ After deploy, run with \`elevasis exec --input '{...}'\` to verify each field.
45693
+ Observation focus: schema-to-input mapping, optional fields, types.
45707
45694
 
45708
45695
  When automation is custom:
45709
45696
  Explain schemas in plain English (concepts page). Show common Zod types.
45710
45697
  Explain \`z.infer\`. Build a new workflow with real-world input schema based
45711
45698
  on the user's goals (read .claude/memory/profile/identity.md). After deploy,
45712
- open the Execution Runner and show how each Zod field becomes a form control.
45713
- Point out how \`.describe()\` sets the field label.
45714
- Observation focus: schema-to-form connection, optional fields, types.
45699
+ run with \`elevasis exec --input '{...}'\` to verify the schema and inspect
45700
+ the execution output.
45701
+ Observation focus: schema-to-input mapping, optional fields, types.
45715
45702
 
45716
45703
  **Lesson 4: Using Platform Tools**
45717
45704
 
@@ -45740,8 +45727,8 @@ Observation focus: credential setup (CLI + UI), async/await.
45740
45727
  When automation is none:
45741
45728
  Frame as "Step 1 passes its result to Step 2, like a relay race." Command View is
45742
45729
  PRIMARY teaching tool -- show the visual graph before explaining code. Agent builds
45743
- the 2-step workflow. User verifies in Command View (see the two nodes + arrow) and
45744
- Execution Runner (see output flow). Code is secondary.
45730
+ the 2-step workflow. Agent runs \`elevasis exec\` to verify and shows output flow.
45731
+ User opens Command View to see the two nodes + arrow. Code is secondary.
45745
45732
  Observation focus: relay-race concept, visual graph comprehension.
45746
45733
 
45747
45734
  When automation is low-code or custom:
@@ -45756,7 +45743,7 @@ Observation focus: data flow reasoning, relationship visualization.
45756
45743
  When automation is none:
45757
45744
  Frame as "If the customer is VIP, do this -- otherwise, do that." No StepType.CONDITIONAL
45758
45745
  jargon -- focus on the concept, not the implementation. Agent adds the condition.
45759
- User tests both paths via Execution Runner, then opens Execution Logs to see which
45746
+ Agent runs \`elevasis exec\` for both paths. Open Execution Logs to see which
45760
45747
  path ran. Guide log navigation step-by-step.
45761
45748
  Observation focus: branching concept understanding, log navigation.
45762
45749
 
@@ -45786,18 +45773,10 @@ Observation focus: readiness for independent operation (CLI + UI).
45786
45773
 
45787
45774
  ## Module Menu
45788
45775
 
45789
- Fixed module order: hitl, schedules, notifications, integrations, workflows,
45790
- composition, llm, agents, error-handling.
45776
+ Module order (items 8-16 in the main menu): hitl, schedules, notifications,
45777
+ integrations, error-handling, workflows, composition, llm, agents.
45791
45778
 
45792
- Show the next 2-3 uncompleted modules from the list. Format:
45793
-
45794
- "Core path complete! Here are your next modules:"
45795
- 1. <Title> -- <one-line description>
45796
- 2. <Title> -- <one-line description>
45797
- 3. <Title> -- <one-line description>
45798
- "Pick a number to start, or say 'show more' to see additional modules."
45799
-
45800
- If all 9 modules are complete -> set Phase to \`complete\`, congratulate.
45779
+ After completing a module, show the updated full menu table (## Menu).
45801
45780
 
45802
45781
  ## Module Flow
45803
45782
 
@@ -45807,7 +45786,7 @@ Each module follows this flow:
45807
45786
  3. Guide user to build a resource exercising the module's concepts
45808
45787
  4. Verify it works (CLI + Command Center where applicable)
45809
45788
  5. Record observations in \`.claude/memory/tutorial-progress.md\`
45810
- 6. Return to module menu (show next uncompleted modules)
45789
+ 6. Show updated full menu table (## Menu)
45811
45790
 
45812
45791
  ## Modules
45813
45792
 
@@ -45840,6 +45819,15 @@ Key concepts: adapter pattern, credential scoping, error handling for external c
45840
45819
  Verify: Run workflow with real credential, confirm external service call, test error
45841
45820
  handling with invalid credential.
45842
45821
 
45822
+ **Module: error-handling -- Error Handling Mastery**
45823
+ Read: \`reference/resources/patterns.mdx\` (error handling),
45824
+ \`reference/troubleshooting/common-errors.mdx\`.
45825
+ Build: Create a workflow demonstrating all three error types. Add try/catch,
45826
+ \`context.logger\`, and error recovery.
45827
+ Key concepts: ExecutionError, PlatformToolError, ToolingError, recovery patterns.
45828
+ Verify: Trigger each error type, confirm messages in Execution Logs with correct
45829
+ categorization.
45830
+
45843
45831
  **Module: workflows -- Advanced Workflows**
45844
45832
  Read: \`reference/resources/patterns.mdx\` (execution store, logging, organizing).
45845
45833
  Build: Refactor an existing workflow to use \`context.store\` for cross-step data,
@@ -45870,15 +45858,6 @@ Compare agent vs workflow for a task.
45870
45858
  Key concepts: agent definition, tool registration, LLM tool calling, execution trace.
45871
45859
  Verify: Run agent with \`elevasis exec\`, review tool call trace in Execution Logs.
45872
45860
 
45873
- **Module: error-handling -- Error Handling Mastery**
45874
- Read: \`reference/resources/patterns.mdx\` (error handling),
45875
- \`reference/troubleshooting/common-errors.mdx\`.
45876
- Build: Create a workflow demonstrating all three error types. Add try/catch,
45877
- \`context.logger\`, and error recovery.
45878
- Key concepts: ExecutionError, PlatformToolError, ToolingError, recovery patterns.
45879
- Verify: Trigger each error type, confirm messages in Execution Logs with correct
45880
- categorization.
45881
-
45882
45861
  ## Meta-Framework Track
45883
45862
 
45884
45863
  The Meta-Framework track teaches you how the Claude Code workspace works -- the commands,
@@ -45945,32 +45924,46 @@ CLAUDE.md and commands. Note the template access model: templates read from
45945
45924
  Verify: Run /meta to see project status. Identify what a version mismatch looks like.
45946
45925
  Observation focus: full lifecycle coverage, pipeline internals.
45947
45926
 
45948
- **MF3: /work -- Task Lifecycle**
45927
+ **MF3: /work and /docs -- Task and Documentation Lifecycle**
45949
45928
 
45950
45929
  When automation is none:
45951
45930
  "You can ask the assistant to track work across conversations. When you start something
45952
45931
  complex, use /work create to save your place. Next session, /work resume picks up where
45953
- you left off." Walk through the concept without deep command details. Show docs/ -- explain
45954
- it's where project notes live.
45932
+ you left off." Walk through the concept without deep command details. Then introduce /docs:
45933
+ "When a task is finished, /work complete moves it to docs/ permanently. After that, /docs
45934
+ helps you find and read what's there -- like a notebook for your project." Run /docs (no
45935
+ args) to show the docs/ overview together.
45955
45936
  Verify: Create a task with \`/work create "practice task"\`, then run /work to see it listed.
45956
- Observation focus: persistence concept, cross-session continuity.
45937
+ Then run /docs to see the docs/ structure.
45938
+ Observation focus: persistence concept, cross-session continuity, docs as permanent notes.
45957
45939
 
45958
45940
  When automation is low-code:
45959
45941
  Show /work operations: create (task doc with frontmatter + sections), save (updates
45960
- Progress + Resume Context), resume (loads context for next session).
45961
- Explain how task docs persist: they're workspace files, not memory -- they survive
45962
- session compaction.
45963
- Verify: Create a task with \`/work create "practice task"\`, run /work save, inspect the file.
45964
- Observation focus: task tracking workflow, doc creation pattern.
45942
+ Progress + Resume Context), resume (loads context for next session), complete (moves
45943
+ to permanent docs/).
45944
+ Then introduce /docs: "/docs is for permanent knowledge -- things that don't expire. Use
45945
+ /docs create to document a workflow or integration. Use /docs verify to check if your
45946
+ docs match the current code." Explain the boundary: /work manages in-progress/, /docs
45947
+ manages permanent docs/.
45948
+ Verify: Create a task with \`/work create "practice task"\`, run /work save, inspect the
45949
+ file. Then run /docs to browse docs/.
45950
+ Observation focus: task tracking workflow, /work vs /docs separation.
45965
45951
 
45966
45952
  When automation is custom:
45967
- Read \`.claude/commands/work.md\`. Full coverage:
45953
+ Read \`.claude/commands/work.md\`. Full /work coverage:
45968
45954
  /work create (kebab-case filename, frontmatter with status, Objective/Plan/Progress/
45969
45955
  Resume Context sections), /work save (Progress + Resume Context update), /work resume
45970
45956
  (multiple-task disambiguation), /work complete (moves to final location).
45971
- Explain how Resume Context serves as the session handoff artifact.
45972
- Verify: Create a task doc, save progress, inspect the generated file structure.
45973
- Observation focus: task doc anatomy, resume context as handoff pattern.
45957
+ Then read \`.claude/commands/docs.md\`. Cover /docs operations:
45958
+ /docs (default): browse permanent docs/, categorized with read-only auto-generated files
45959
+ separate; /docs create: interview-driven, resource-aware doc creation from src/ code
45960
+ analysis; /docs verify: cross-references resource IDs, schema fields, platform tools in
45961
+ docs against src/ -- standalone analog of /meta fix step 5.
45962
+ Explain the relationship: /work owns docs/in-progress/ (task lifecycle), /work complete
45963
+ moves docs to permanent location, /docs browses and verifies what's there.
45964
+ Verify: Create a task doc, save progress, run /work complete to move it. Then run /docs
45965
+ to see it in the permanent docs/ listing.
45966
+ Observation focus: task doc anatomy, /work-to-/docs handoff, docs verification as standalone tool.
45974
45967
 
45975
45968
  **MF4: Rules, Memory, and Customization**
45976
45969
 
@@ -46040,13 +46033,13 @@ Observation focus: full template lifecycle, conflict resolution pattern.
46040
46033
 
46041
46034
  **automation: none**
46042
46035
  Use the non-technical variant for each lesson. Agent writes all code -- user
46043
- never types code. User verifies visually (Execution Runner, Command View, Logs).
46044
- Avoid all jargon; use analogies. Execution Runner is the primary verification tool.
46036
+ never types code. Agent runs \`elevasis exec\` for verification and narrates results.
46037
+ Avoid all jargon; use analogies. CLI is the primary verification tool.
46045
46038
  Always deploy before directing the user to the Command Center.
46046
46039
 
46047
46040
  **automation: low-code**
46048
46041
  Map concepts to Zapier/Make equivalents. Show code with plain-English explanations.
46049
- Execution Runner and CLI are equal verification tools. Show Zod types with labels.
46042
+ CLI is the primary verification tool. Show Zod types with labels.
46050
46043
 
46051
46044
  **automation: custom**
46052
46045
  Full technical content. Code-first. CLI and UI are equal. Condense explanations
@@ -46056,26 +46049,22 @@ for intermediate/advanced users.
46056
46049
  - If user is fast, acknowledge and offer to skip ahead within a lesson
46057
46050
  - After each lesson, update \`.claude/memory/tutorial-progress.md\`
46058
46051
  - If user demonstrates a level change, promote to skills.md Growth Log
46059
- - After completing a module, return to the module menu
46052
+ - After completing a module, show the updated full menu table
46060
46053
  - Adapt module depth to skill level as with lessons
46061
46054
 
46062
46055
  ## Progress Format
46063
46056
 
46064
46057
  Store in \`.claude/memory/tutorial-progress.md\`:
46065
- - Phase (core | modules | meta-framework | complete)
46066
- - Current Lesson number (during core phase)
46067
- - Current Module (module id during modules phase)
46068
- - Current MF Lesson (MF1-MF5, during meta-framework phase)
46058
+ - Current (free-form, e.g. "L4: Using Platform Tools" or "M:integrations" or "MF2")
46069
46059
  - Started and Last Session dates
46070
46060
  - Completed Lessons table (lesson, title, completed, duration)
46071
46061
  - Completed Modules table (module, title, completed, duration)
46072
46062
  - Completed MF Lessons table (lesson, title, completed, notes)
46073
- - Capability Observations table (lesson/module, observation) -- prefix L# for lessons, M:<id> for modules, MF# for meta-framework lessons
46063
+ - Capability Observations table (source, observation) -- prefix L# for lessons, M:<id> for modules, MF# for MF lessons
46074
46064
  - Assessment Notes (bullet points)
46075
46065
 
46076
- Backward-compatible: missing Phase is inferred from lesson count;
46077
- missing Completed Modules is treated as empty;
46078
- missing Completed MF Lessons is treated as empty.
46066
+ Backward-compatible: missing Completed Modules treated as empty;
46067
+ missing Completed MF Lessons treated as empty.
46079
46068
  `;
46080
46069
  }
46081
46070
  function claudeMetaCommandTemplate() {
@@ -46196,6 +46185,7 @@ Detect and repair all drift. Optionally upgrades the SDK first.
46196
46185
  c. Flag mismatches between documented schemas and actual resource definitions
46197
46186
  d. Check for undocumented resources (resources in src/ without docs coverage)
46198
46187
  e. Report discrepancies with suggested fixes
46188
+ Note: \`/docs verify\` is available for standalone interactive verification outside this pipeline.
46199
46189
  6. **Settings consistency:** Verify expected fields
46200
46190
  7. **Rules health:** Scan \`memory/errors/\` -- flag any entry that has recurred
46201
46191
  3+ times and is not yet in \`.claude/rules/workspace-patterns.md\`.
@@ -46410,6 +46400,173 @@ Mark task complete, clean up, and move to permanent docs:
46410
46400
  When the agent observes that all plan steps for a task are marked COMPLETE and the user seems to be moving on, proactively suggest: "All steps for '{task}' are complete. Run \`/work complete\` to finalize it."
46411
46401
  `;
46412
46402
  }
46403
+ function claudeDocsCommandTemplate() {
46404
+ return `# /docs command
46405
+
46406
+ You are a documentation assistant for this Elevasis workspace. \`/docs\` manages the
46407
+ permanent \`docs/\` tree -- browsing, creating reference content, and verifying accuracy
46408
+ against code.
46409
+
46410
+ **Scope:** Everything in \`docs/\` EXCEPT:
46411
+ - \`docs/in-progress/\` -- \`/work\`'s territory
46412
+ - \`docs/project-map.mdx\` and \`docs/resource-map.mdx\` -- auto-generated, read-only
46413
+
46414
+ ## Context
46415
+
46416
+ Read \`.claude/memory/profile/skills.md\` first. The \`automation\` skill level controls
46417
+ how results are presented.
46418
+
46419
+ ## Operations
46420
+
46421
+ ### \`/docs\` (no arguments) -- Browse
46422
+
46423
+ Scan \`docs/\` recursively. Display:
46424
+
46425
+ \`\`\`
46426
+ Your Docs
46427
+ =========
46428
+
46429
+ Auto-generated (read-only):
46430
+ project-map.mdx Updated 2026-03-03
46431
+ resource-map.mdx Updated 2026-03-03
46432
+
46433
+ Reference (3):
46434
+ 1. index.mdx Workspace overview
46435
+ 2. priorities.mdx Current priorities
46436
+ 3. crm-integration/ CRM integration guide (2 files)
46437
+
46438
+ Pick a number to read and discuss, or say:
46439
+ "create" to write a new doc
46440
+ "verify" to check docs against current code
46441
+ \`\`\`
46442
+
46443
+ Steps:
46444
+ 1. Scan \`docs/\` recursively for \`.mdx\` files, excluding \`in-progress/\`
46445
+ 2. Separate auto-generated files (\`project-map.mdx\`, \`resource-map.mdx\`) into a
46446
+ read-only group -- show modification date, no number
46447
+ 3. Number all user-maintained docs. For directories, show \`index.mdx\` as primary
46448
+ with file count
46449
+ 4. Sort: \`index.mdx\` first, \`priorities.mdx\` second, then alphabetical
46450
+ 5. When user picks a number: read the file and present a summary. Ask what they
46451
+ want -- discuss, update, or go back
46452
+ 6. If only auto-generated files and \`index.mdx\` exist, suggest: "Your docs/ is
46453
+ mostly empty. Run \`/docs create\` to add reference documentation."
46454
+
46455
+ **automation: none** -- Frame as "your project's knowledge base." Plain language:
46456
+ "These are your project's permanent notes. Pick one to read or discuss."
46457
+
46458
+ **automation: low-code** -- Standard presentation. Map to "like a wiki for your automations."
46459
+
46460
+ **automation: custom** -- Compact. Show file sizes and last-modified dates.
46461
+
46462
+ ---
46463
+
46464
+ ### \`create [description]\` -- Reference Doc Creation
46465
+
46466
+ Interview-driven creation for permanent documentation. Task docs go through \`/work create\`.
46467
+
46468
+ 1. If no description given, ask: "What do you want to document?"
46469
+ 2. Determine doc type (infer or ask):
46470
+ - **Resource guide** -- documents a specific workflow or agent
46471
+ - **Integration guide** -- how a specific external tool is used
46472
+ - **Architecture notes** -- design decisions, system diagrams
46473
+ - **Process doc** -- operational procedures, runbooks
46474
+ - **General reference** -- glossaries, onboarding, anything else
46475
+ 3. If the doc is about a specific resource: scan \`src/\` for matching resource IDs.
46476
+ If found, pre-populate with resource config, schemas, step names, and platform
46477
+ tools used. The user does not need to describe what the resource does.
46478
+ 4. Determine placement:
46479
+ - Scan \`docs/\` for existing directories related to the topic
46480
+ - If related to an existing directory, propose adding to it
46481
+ - If the topic may grow into multiple files, create \`docs/<slug>/index.mdx\`
46482
+ - If small and standalone, create \`docs/<slug>.mdx\`
46483
+ 5. Create with proper frontmatter:
46484
+ \`\`\`yaml
46485
+ ---
46486
+ title: Guide Title
46487
+ description: What this covers
46488
+ ---
46489
+ \`\`\`
46490
+ Sections by doc type:
46491
+ - **Resource guide:** Overview, Input/Output, How It Works, Platform Tools Used, Configuration
46492
+ - **Integration guide:** Overview, Setup (credentials), Data Model, Usage Patterns, Troubleshooting
46493
+ - **Architecture notes:** Context, Decision, Consequences, Alternatives Considered
46494
+ - **Process doc:** Purpose, Prerequisites, Steps, Recovery
46495
+ - **General reference:** determined by content
46496
+ 6. Report what was created and suggest next steps.
46497
+
46498
+ **automation: none** -- Agent writes the full doc from code analysis. User reviews and
46499
+ approves. "I've written a guide for your CRM integration based on the code. Take a look
46500
+ and tell me if anything is missing."
46501
+
46502
+ **automation: low-code** -- Agent drafts, highlights sections the user should customize.
46503
+ Shows what was auto-detected vs what needs human input.
46504
+
46505
+ **automation: custom** -- Agent scaffolds structure and fills in code-derived content.
46506
+ Leaves technical prose to the user. Concise.
46507
+
46508
+ ---
46509
+
46510
+ ### \`verify [file?]\` -- Interactive Documentation Verification
46511
+
46512
+ Standalone interactive version of \`/meta fix\` step 5. Checks docs against current code.
46513
+
46514
+ **Without argument -- verify all:**
46515
+
46516
+ 1. Scan \`docs/\` for user-maintained \`.mdx\` files (skip \`in-progress/\`,
46517
+ \`project-map.mdx\`, \`resource-map.mdx\`)
46518
+ 2. For each file: cross-reference resource IDs, schema fields, and platform tools
46519
+ mentioned against \`src/\`
46520
+ 3. Check for undocumented resources: resources in \`src/\` without docs coverage
46521
+ 4. Present results interactively:
46522
+
46523
+ \`\`\`
46524
+ Docs Verification
46525
+ =================
46526
+
46527
+ crm-integration/index.mdx:
46528
+ - Line 23: references resourceId "attio-sync" but src/ has "attio-sync-v2"
46529
+ - Line 45: schema field "companyName" no longer exists in input schema
46530
+
46531
+ onboarding-guide.mdx:
46532
+ - No issues found
46533
+
46534
+ Undocumented resources (2):
46535
+ - email-sender (src/communications/email-sender.ts)
46536
+ - lead-scorer (src/scoring/lead-scorer.ts)
46537
+
46538
+ Fix crm-integration issues now? (yes/no/skip)
46539
+ \`\`\`
46540
+
46541
+ 5. When user says yes: read source code, apply fixes to doc, show the diff
46542
+ 6. For undocumented resources: offer to create a doc for each one (invokes \`create\` flow)
46543
+
46544
+ **With argument -- verify one file:**
46545
+
46546
+ Same but scoped to a single file. Resolves by substring match against \`docs/\` file names.
46547
+
46548
+ \`\`\`
46549
+ /docs verify crm-integration
46550
+ \`\`\`
46551
+
46552
+ **automation: none** -- Plain language: "Your CRM guide mentions a field called
46553
+ 'companyName' but that field was renamed to 'company'. Want me to fix it?"
46554
+
46555
+ **automation: low-code** -- Standard presentation with suggested fixes.
46556
+
46557
+ **automation: custom** -- Compact diff-style. Auto-fix obvious issues, ask only for
46558
+ ambiguous ones.
46559
+
46560
+ ---
46561
+
46562
+ ## What /docs Does NOT Do
46563
+
46564
+ - Touch \`docs/in-progress/\` -- \`/work\`'s territory
46565
+ - Handle task lifecycle (planned / in-progress / complete)
46566
+ - Edit \`project-map.mdx\` or \`resource-map.mdx\` -- auto-generated, read-only
46567
+ - Replace \`/meta fix\` step 5 -- it supplements it with interactivity
46568
+ `;
46569
+ }
46413
46570
  function claudeCredsSkillTemplate() {
46414
46571
  return `---
46415
46572
  name: creds
@@ -46875,6 +47032,7 @@ function getManagedTemplates(ctx = {}) {
46875
47032
  ".claude/commands/tutorial.md": claudeTutorialCommandTemplate,
46876
47033
  ".claude/commands/meta.md": claudeMetaCommandTemplate,
46877
47034
  ".claude/commands/work.md": claudeWorkCommandTemplate,
47035
+ ".claude/commands/docs.md": claudeDocsCommandTemplate,
46878
47036
  ".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate,
46879
47037
  ".claude/rules/sdk-patterns.md": claudeSdkPatternsRuleTemplate,
46880
47038
  ".claude/rules/docs-authoring.md": claudeDocsAuthoringRuleTemplate,
@@ -47081,6 +47239,7 @@ var MANAGED_FILES = [
47081
47239
  ".claude/commands/tutorial.md",
47082
47240
  ".claude/commands/meta.md",
47083
47241
  ".claude/commands/work.md",
47242
+ ".claude/commands/docs.md",
47084
47243
  ".claude/skills/creds/SKILL.md",
47085
47244
  ".claude/rules/sdk-patterns.md",
47086
47245
  ".claude/rules/docs-authoring.md",
@@ -47146,6 +47305,7 @@ function registerInitCommand(program3) {
47146
47305
  ".claude/commands/tutorial.md": claudeTutorialCommandTemplate(),
47147
47306
  ".claude/commands/meta.md": claudeMetaCommandTemplate(),
47148
47307
  ".claude/commands/work.md": claudeWorkCommandTemplate(),
47308
+ ".claude/commands/docs.md": claudeDocsCommandTemplate(),
47149
47309
  ".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate(),
47150
47310
  ".claude/rules/sdk-patterns.md": claudeSdkPatternsRuleTemplate(),
47151
47311
  ".claude/rules/workspace-patterns.md": claudeWorkspaceRulesTemplate(),
package/dist/index.d.ts CHANGED
@@ -3426,6 +3426,7 @@ interface UpdateContactParams {
3426
3426
  }
3427
3427
  type UpsertContactParams = CreateContactParams;
3428
3428
  interface ContactFilters {
3429
+ listId?: string;
3429
3430
  qualification?: 'qualified' | 'disqualified' | 'pending';
3430
3431
  openingLineIsNull?: boolean;
3431
3432
  }