@elevasis/sdk 0.5.3 → 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.3",
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",
@@ -45074,7 +45074,7 @@ var import_path3 = require("path");
45074
45074
  var import_promises2 = require("fs/promises");
45075
45075
 
45076
45076
  // src/cli/commands/templates/core/workspace.ts
45077
- var TEMPLATE_VERSION = 21;
45077
+ var TEMPLATE_VERSION = 22;
45078
45078
  function configTemplate() {
45079
45079
  return `import type { ElevasConfig } from '@elevasis/sdk'
45080
45080
 
@@ -45492,6 +45492,7 @@ For detailed per-dimension adaptation rules, read
45492
45492
  | Command | Purpose |
45493
45493
  | --- | --- |
45494
45494
  | \`/meta\` | Project lifecycle: init, status, fix, deploy, health |
45495
+ | \`/docs\` | Browse, create, and verify permanent documentation |
45495
45496
  | \`/work\` | Task tracking: create, save, resume, complete |
45496
45497
  | \`/tutorial\` | Progressive learning path (7 core lessons + 9 modules) |
45497
45498
 
@@ -45575,67 +45576,57 @@ Read \`.claude/memory/tutorial-progress.md\` to check current lesson progress.
45575
45576
  When \`/tutorial\` is invoked:
45576
45577
 
45577
45578
  1. Read \`.claude/memory/tutorial-progress.md\` (if it exists)
45578
- 2. Display the appropriate menu:
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.
45579
45581
 
45580
- **No progress (first time):**
45582
+ Progress indicators: \`[ ]\` not started, \`[>]\` in progress, \`[x] YYYY-MM-DD\` complete.
45581
45583
 
45582
- \`\`\`
45583
- Welcome to the Elevasis Tutorial!
45584
- ==================================
45585
-
45586
- What would you like to learn?
45587
-
45588
- 1. Orchestration Concepts (Core Path)
45589
- Build workflows step-by-step: data schemas, platform tools,
45590
- multi-step flows, decision points, and production deployment.
45591
- 7 lessons -- estimated 2-3 hours total.
45584
+ Example (first time, no progress):
45592
45585
 
45593
- 2. Examples & Advanced Modules
45594
- Hands-on deep-dives: human-in-the-loop, scheduling,
45595
- notifications, integrations, LLM, agents, and more.
45596
- 9 standalone modules -- pick any order.
45597
-
45598
- 3. Meta-Framework
45599
- Learn the Claude Code context system: /meta, /work,
45600
- rules, memory, and how to customize your workspace.
45601
- 5 lessons -- estimated 1-2 hours total.
45602
-
45603
- Pick a number to start, or say "status" to see your progress.
45604
45586
  \`\`\`
45605
-
45606
- **With existing progress:**
45607
-
45608
- Show active tracks at the top, then offer resume options alongside new choices. Example:
45609
-
45610
- \`\`\`
45611
- Progress: Core Path (Lesson 4/7) | Meta-Framework (MF2/5)
45612
-
45613
- 1. Resume Orchestration Concepts (Lesson 4)
45614
- 2. Orchestration Concepts (Core Path -- start over)
45615
- 3. Examples & Advanced Modules
45616
- 4. Resume Meta-Framework (MF2)
45617
- 5. Meta-Framework (start over)
45618
- 6. Show full status
45619
-
45620
- 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.
45621
45618
  \`\`\`
45622
45619
 
45623
- After user picks:
45624
- - Orchestration Concepts: Resume or start core lesson flow
45625
- - Examples & Advanced Modules: Show module menu (see ## Module Menu)
45626
- - Meta-Framework: Resume or start MF1 (see ## Meta-Framework Track)
45627
- - "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.
45628
45622
 
45629
45623
  ## Progress Logic
45630
45624
 
45631
45625
  1. Read \`.claude/memory/tutorial-progress.md\`
45632
- 2. Show the menu (## Menu section) with progress summary if progress exists
45633
- 3. After user picks a track:
45634
- - **Orchestration Concepts**: If Completed Lessons < 7 -> start/resume at Current Lesson; if 7 complete -> note completion, offer module menu or repeat
45635
- - **Examples & Advanced Modules**: Show module menu (## Module Menu section)
45636
- - **Meta-Framework**: If Current MF Lesson is set -> resume at that lesson; otherwise start MF1
45637
- 4. Track completion: mark the track done in progress file when all lessons/modules complete
45638
- 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
45639
45630
 
45640
45631
  ## Lesson Flow
45641
45632
 
@@ -45643,7 +45634,7 @@ Each lesson follows this flow:
45643
45634
  1. Announce lesson title and what they'll learn (1-2 sentences)
45644
45635
  2. Explain the concept (read docs per skill level, adapt to user)
45645
45636
  3. Guide user to build or modify something (agent writes all code for automation: none)
45646
- 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)
45647
45638
  5. Celebrate success, record observations in \`.claude/memory/tutorial-progress.md\`
45648
45639
  6. Ask: "Ready for the next lesson, or want to practice more?"
45649
45640
 
@@ -45657,7 +45648,7 @@ from \`reference/developer/interaction-guidance.mdx\` (recipe, assembly line, ki
45657
45648
  appliance). Explain deployment plainly: "You write the recipe here, then deploy it so
45658
45649
  it's live." Deploy the starter echo workflow (\`elevasis check\` + \`elevasis deploy\`),
45659
45650
  THEN tour the Command Center so the user sees populated pages, not empty ones. Tour:
45660
- Command View (echo node), Execution Runner (run echo from form), Execution Logs (result).
45651
+ Command View (echo node), Execution Logs (result).
45661
45652
  Observation focus: automation value understanding, Command Center comfort.
45662
45653
 
45663
45654
  When automation is low-code or custom:
@@ -45665,7 +45656,7 @@ Tour project files: src/index.ts (registry), src/example/echo.ts (starter
45665
45656
  workflow), src/operations/platform-status.ts (platform API example),
45666
45657
  elevasis.config.ts, .env, docs/. Explain the execution model.
45667
45658
  Verify: run \`elevasis resources\`. Then open the Command Center and tour the
45668
- main pages: Command View (resource graph), Execution Runner, Execution Logs.
45659
+ main pages: Command View (resource graph), Execution Logs.
45669
45660
  Point out the echo workflow node in Command View.
45670
45661
  Observation focus: cloud deployment model, UI navigation comfort.
45671
45662
 
@@ -45674,9 +45665,9 @@ Observation focus: cloud deployment model, UI navigation comfort.
45674
45665
  When automation is none:
45675
45666
  Frame the workflow as "a recipe." Use plain language: "settings" not "config",
45676
45667
  "what data it needs" not "contract", "instructions" not "steps", "where it starts"
45677
- not "entryPoint." Agent writes all code changes. Execution Runner form is PRIMARY
45678
- verification -- show user how to fill the form and run it. CLI is secondary:
45679
- "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.
45680
45671
 
45681
45672
  When automation is low-code or custom:
45682
45673
  Modify the echo workflow. Walk through each part: config, contract, steps,
@@ -45689,25 +45680,25 @@ Observation focus: deployment-to-execution loop, TypeScript syntax comfort.
45689
45680
  **Lesson 3: Understanding Data (Schemas)**
45690
45681
 
45691
45682
  When automation is none:
45692
- Frame as "What information does your automation need?" Each piece becomes a form
45693
- field. Describe types in plain English: text, number, yes/no, a choice from a list.
45694
- NO Zod, no z.string(), no z.infer(), no code shown. Agent reads identity.md goals
45695
- and writes the workflow schema. User fills the form in Execution Runner to verify.
45696
- 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.
45697
45688
 
45698
45689
  When automation is low-code:
45699
45690
  "Field mapping like Zapier, but with validation." Show Zod types briefly. Demonstrate
45700
- how \`.describe()\` sets the form field label. Build schema based on identity.md goals.
45701
- After deploy, open Execution Runner and point out each field.
45702
- 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.
45703
45694
 
45704
45695
  When automation is custom:
45705
45696
  Explain schemas in plain English (concepts page). Show common Zod types.
45706
45697
  Explain \`z.infer\`. Build a new workflow with real-world input schema based
45707
45698
  on the user's goals (read .claude/memory/profile/identity.md). After deploy,
45708
- open the Execution Runner and show how each Zod field becomes a form control.
45709
- Point out how \`.describe()\` sets the field label.
45710
- 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.
45711
45702
 
45712
45703
  **Lesson 4: Using Platform Tools**
45713
45704
 
@@ -45736,8 +45727,8 @@ Observation focus: credential setup (CLI + UI), async/await.
45736
45727
  When automation is none:
45737
45728
  Frame as "Step 1 passes its result to Step 2, like a relay race." Command View is
45738
45729
  PRIMARY teaching tool -- show the visual graph before explaining code. Agent builds
45739
- the 2-step workflow. User verifies in Command View (see the two nodes + arrow) and
45740
- 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.
45741
45732
  Observation focus: relay-race concept, visual graph comprehension.
45742
45733
 
45743
45734
  When automation is low-code or custom:
@@ -45752,7 +45743,7 @@ Observation focus: data flow reasoning, relationship visualization.
45752
45743
  When automation is none:
45753
45744
  Frame as "If the customer is VIP, do this -- otherwise, do that." No StepType.CONDITIONAL
45754
45745
  jargon -- focus on the concept, not the implementation. Agent adds the condition.
45755
- 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
45756
45747
  path ran. Guide log navigation step-by-step.
45757
45748
  Observation focus: branching concept understanding, log navigation.
45758
45749
 
@@ -45782,18 +45773,10 @@ Observation focus: readiness for independent operation (CLI + UI).
45782
45773
 
45783
45774
  ## Module Menu
45784
45775
 
45785
- Fixed module order: hitl, schedules, notifications, integrations, workflows,
45786
- 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.
45787
45778
 
45788
- Show the next 2-3 uncompleted modules from the list. Format:
45789
-
45790
- "Core path complete! Here are your next modules:"
45791
- 1. <Title> -- <one-line description>
45792
- 2. <Title> -- <one-line description>
45793
- 3. <Title> -- <one-line description>
45794
- "Pick a number to start, or say 'show more' to see additional modules."
45795
-
45796
- If all 9 modules are complete -> set Phase to \`complete\`, congratulate.
45779
+ After completing a module, show the updated full menu table (## Menu).
45797
45780
 
45798
45781
  ## Module Flow
45799
45782
 
@@ -45803,7 +45786,7 @@ Each module follows this flow:
45803
45786
  3. Guide user to build a resource exercising the module's concepts
45804
45787
  4. Verify it works (CLI + Command Center where applicable)
45805
45788
  5. Record observations in \`.claude/memory/tutorial-progress.md\`
45806
- 6. Return to module menu (show next uncompleted modules)
45789
+ 6. Show updated full menu table (## Menu)
45807
45790
 
45808
45791
  ## Modules
45809
45792
 
@@ -45836,6 +45819,15 @@ Key concepts: adapter pattern, credential scoping, error handling for external c
45836
45819
  Verify: Run workflow with real credential, confirm external service call, test error
45837
45820
  handling with invalid credential.
45838
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
+
45839
45831
  **Module: workflows -- Advanced Workflows**
45840
45832
  Read: \`reference/resources/patterns.mdx\` (execution store, logging, organizing).
45841
45833
  Build: Refactor an existing workflow to use \`context.store\` for cross-step data,
@@ -45866,15 +45858,6 @@ Compare agent vs workflow for a task.
45866
45858
  Key concepts: agent definition, tool registration, LLM tool calling, execution trace.
45867
45859
  Verify: Run agent with \`elevasis exec\`, review tool call trace in Execution Logs.
45868
45860
 
45869
- **Module: error-handling -- Error Handling Mastery**
45870
- Read: \`reference/resources/patterns.mdx\` (error handling),
45871
- \`reference/troubleshooting/common-errors.mdx\`.
45872
- Build: Create a workflow demonstrating all three error types. Add try/catch,
45873
- \`context.logger\`, and error recovery.
45874
- Key concepts: ExecutionError, PlatformToolError, ToolingError, recovery patterns.
45875
- Verify: Trigger each error type, confirm messages in Execution Logs with correct
45876
- categorization.
45877
-
45878
45861
  ## Meta-Framework Track
45879
45862
 
45880
45863
  The Meta-Framework track teaches you how the Claude Code workspace works -- the commands,
@@ -45941,32 +45924,46 @@ CLAUDE.md and commands. Note the template access model: templates read from
45941
45924
  Verify: Run /meta to see project status. Identify what a version mismatch looks like.
45942
45925
  Observation focus: full lifecycle coverage, pipeline internals.
45943
45926
 
45944
- **MF3: /work -- Task Lifecycle**
45927
+ **MF3: /work and /docs -- Task and Documentation Lifecycle**
45945
45928
 
45946
45929
  When automation is none:
45947
45930
  "You can ask the assistant to track work across conversations. When you start something
45948
45931
  complex, use /work create to save your place. Next session, /work resume picks up where
45949
- you left off." Walk through the concept without deep command details. Show docs/ -- explain
45950
- 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.
45951
45936
  Verify: Create a task with \`/work create "practice task"\`, then run /work to see it listed.
45952
- 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.
45953
45939
 
45954
45940
  When automation is low-code:
45955
45941
  Show /work operations: create (task doc with frontmatter + sections), save (updates
45956
- Progress + Resume Context), resume (loads context for next session).
45957
- Explain how task docs persist: they're workspace files, not memory -- they survive
45958
- session compaction.
45959
- Verify: Create a task with \`/work create "practice task"\`, run /work save, inspect the file.
45960
- 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.
45961
45951
 
45962
45952
  When automation is custom:
45963
- Read \`.claude/commands/work.md\`. Full coverage:
45953
+ Read \`.claude/commands/work.md\`. Full /work coverage:
45964
45954
  /work create (kebab-case filename, frontmatter with status, Objective/Plan/Progress/
45965
45955
  Resume Context sections), /work save (Progress + Resume Context update), /work resume
45966
45956
  (multiple-task disambiguation), /work complete (moves to final location).
45967
- Explain how Resume Context serves as the session handoff artifact.
45968
- Verify: Create a task doc, save progress, inspect the generated file structure.
45969
- 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.
45970
45967
 
45971
45968
  **MF4: Rules, Memory, and Customization**
45972
45969
 
@@ -46036,13 +46033,13 @@ Observation focus: full template lifecycle, conflict resolution pattern.
46036
46033
 
46037
46034
  **automation: none**
46038
46035
  Use the non-technical variant for each lesson. Agent writes all code -- user
46039
- never types code. User verifies visually (Execution Runner, Command View, Logs).
46040
- 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.
46041
46038
  Always deploy before directing the user to the Command Center.
46042
46039
 
46043
46040
  **automation: low-code**
46044
46041
  Map concepts to Zapier/Make equivalents. Show code with plain-English explanations.
46045
- 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.
46046
46043
 
46047
46044
  **automation: custom**
46048
46045
  Full technical content. Code-first. CLI and UI are equal. Condense explanations
@@ -46052,26 +46049,22 @@ for intermediate/advanced users.
46052
46049
  - If user is fast, acknowledge and offer to skip ahead within a lesson
46053
46050
  - After each lesson, update \`.claude/memory/tutorial-progress.md\`
46054
46051
  - If user demonstrates a level change, promote to skills.md Growth Log
46055
- - After completing a module, return to the module menu
46052
+ - After completing a module, show the updated full menu table
46056
46053
  - Adapt module depth to skill level as with lessons
46057
46054
 
46058
46055
  ## Progress Format
46059
46056
 
46060
46057
  Store in \`.claude/memory/tutorial-progress.md\`:
46061
- - Phase (core | modules | meta-framework | complete)
46062
- - Current Lesson number (during core phase)
46063
- - Current Module (module id during modules phase)
46064
- - Current MF Lesson (MF1-MF5, during meta-framework phase)
46058
+ - Current (free-form, e.g. "L4: Using Platform Tools" or "M:integrations" or "MF2")
46065
46059
  - Started and Last Session dates
46066
46060
  - Completed Lessons table (lesson, title, completed, duration)
46067
46061
  - Completed Modules table (module, title, completed, duration)
46068
46062
  - Completed MF Lessons table (lesson, title, completed, notes)
46069
- - 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
46070
46064
  - Assessment Notes (bullet points)
46071
46065
 
46072
- Backward-compatible: missing Phase is inferred from lesson count;
46073
- missing Completed Modules is treated as empty;
46074
- 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.
46075
46068
  `;
46076
46069
  }
46077
46070
  function claudeMetaCommandTemplate() {
@@ -46192,6 +46185,7 @@ Detect and repair all drift. Optionally upgrades the SDK first.
46192
46185
  c. Flag mismatches between documented schemas and actual resource definitions
46193
46186
  d. Check for undocumented resources (resources in src/ without docs coverage)
46194
46187
  e. Report discrepancies with suggested fixes
46188
+ Note: \`/docs verify\` is available for standalone interactive verification outside this pipeline.
46195
46189
  6. **Settings consistency:** Verify expected fields
46196
46190
  7. **Rules health:** Scan \`memory/errors/\` -- flag any entry that has recurred
46197
46191
  3+ times and is not yet in \`.claude/rules/workspace-patterns.md\`.
@@ -46406,6 +46400,173 @@ Mark task complete, clean up, and move to permanent docs:
46406
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."
46407
46401
  `;
46408
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
+ }
46409
46570
  function claudeCredsSkillTemplate() {
46410
46571
  return `---
46411
46572
  name: creds
@@ -46871,6 +47032,7 @@ function getManagedTemplates(ctx = {}) {
46871
47032
  ".claude/commands/tutorial.md": claudeTutorialCommandTemplate,
46872
47033
  ".claude/commands/meta.md": claudeMetaCommandTemplate,
46873
47034
  ".claude/commands/work.md": claudeWorkCommandTemplate,
47035
+ ".claude/commands/docs.md": claudeDocsCommandTemplate,
46874
47036
  ".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate,
46875
47037
  ".claude/rules/sdk-patterns.md": claudeSdkPatternsRuleTemplate,
46876
47038
  ".claude/rules/docs-authoring.md": claudeDocsAuthoringRuleTemplate,
@@ -47077,6 +47239,7 @@ var MANAGED_FILES = [
47077
47239
  ".claude/commands/tutorial.md",
47078
47240
  ".claude/commands/meta.md",
47079
47241
  ".claude/commands/work.md",
47242
+ ".claude/commands/docs.md",
47080
47243
  ".claude/skills/creds/SKILL.md",
47081
47244
  ".claude/rules/sdk-patterns.md",
47082
47245
  ".claude/rules/docs-authoring.md",
@@ -47142,6 +47305,7 @@ function registerInitCommand(program3) {
47142
47305
  ".claude/commands/tutorial.md": claudeTutorialCommandTemplate(),
47143
47306
  ".claude/commands/meta.md": claudeMetaCommandTemplate(),
47144
47307
  ".claude/commands/work.md": claudeWorkCommandTemplate(),
47308
+ ".claude/commands/docs.md": claudeDocsCommandTemplate(),
47145
47309
  ".claude/skills/creds/SKILL.md": claudeCredsSkillTemplate(),
47146
47310
  ".claude/rules/sdk-patterns.md": claudeSdkPatternsRuleTemplate(),
47147
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
  }