@agents-inc/cli 0.46.0 → 0.47.0

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.
Files changed (157) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{chunk-G2WNOT3R.js → chunk-2RQYJFKA.js} +2 -2
  3. package/dist/{chunk-CD64ZNYI.js → chunk-3APMMQUA.js} +11 -3
  4. package/dist/chunk-3APMMQUA.js.map +1 -0
  5. package/dist/{chunk-DO5OZHSS.js → chunk-B4QYXVPZ.js} +2 -2
  6. package/dist/{chunk-5QRJUBK7.js → chunk-C4QI54PN.js} +20 -11
  7. package/dist/chunk-C4QI54PN.js.map +1 -0
  8. package/dist/{chunk-QBUOZVNZ.js → chunk-CJFWO46A.js} +2 -2
  9. package/dist/{chunk-VH3PI43B.js → chunk-DC333ZDC.js} +4 -4
  10. package/dist/{chunk-GVLYNP2I.js → chunk-DVW6ASTO.js} +4 -4
  11. package/dist/{chunk-NMXNHRAK.js → chunk-EZ46ZTAQ.js} +3 -3
  12. package/dist/{chunk-FUEZQ2H6.js → chunk-FMQ3A7W4.js} +4 -4
  13. package/dist/{chunk-74HSA7C4.js → chunk-FTD5Z6QD.js} +3 -1
  14. package/dist/{chunk-74HSA7C4.js.map → chunk-FTD5Z6QD.js.map} +1 -1
  15. package/dist/{chunk-KWQ2BQXF.js → chunk-FXQYEXLS.js} +3 -3
  16. package/dist/{chunk-RT6IBH37.js → chunk-GFDGYQ6M.js} +55 -21
  17. package/dist/chunk-GFDGYQ6M.js.map +1 -0
  18. package/dist/{chunk-CDGHSTB6.js → chunk-HLTJK3XB.js} +7 -5
  19. package/dist/chunk-HLTJK3XB.js.map +1 -0
  20. package/dist/{chunk-72GS6PIH.js → chunk-HPJP3HFD.js} +7 -7
  21. package/dist/{chunk-J64CA4V6.js → chunk-INKJBMPJ.js} +2 -2
  22. package/dist/{chunk-YVMYQSED.js → chunk-IRJADQM7.js} +2 -2
  23. package/dist/{chunk-PZLUO4OY.js → chunk-JTTTXGHX.js} +4 -4
  24. package/dist/{chunk-4C7PDDLY.js → chunk-JZHIF3K7.js} +5 -5
  25. package/dist/{chunk-D7JTL3DJ.js → chunk-KQ27IDYL.js} +2 -2
  26. package/dist/{chunk-SGXUMZWL.js → chunk-LJ5E4GXC.js} +2 -2
  27. package/dist/{chunk-LFZXMQOH.js → chunk-LNA6M2IE.js} +2 -2
  28. package/dist/{chunk-ODQ2BKWU.js → chunk-M4P5YJ45.js} +3 -3
  29. package/dist/{chunk-TOWP4T5L.js → chunk-MVEYK55V.js} +2 -2
  30. package/dist/{chunk-5M6JI76P.js → chunk-N5OCAAXY.js} +2 -2
  31. package/dist/{chunk-RWR56UVK.js → chunk-NRCKIHND.js} +11 -2
  32. package/dist/chunk-NRCKIHND.js.map +1 -0
  33. package/dist/{chunk-FKBCYT7B.js → chunk-OEJDFGAF.js} +5 -5
  34. package/dist/{chunk-I26YP2Q3.js → chunk-QR2TM4OY.js} +5 -5
  35. package/dist/{chunk-UK3AMBR7.js → chunk-SPSGZWTZ.js} +13 -6
  36. package/dist/{chunk-UK3AMBR7.js.map → chunk-SPSGZWTZ.js.map} +1 -1
  37. package/dist/{chunk-XE6RTHUD.js → chunk-TBB3THSL.js} +38 -3
  38. package/dist/chunk-TBB3THSL.js.map +1 -0
  39. package/dist/{chunk-7LDSHHKN.js → chunk-TWDVLTU6.js} +3 -3
  40. package/dist/{chunk-YT7UHV67.js → chunk-VAQJLHUW.js} +11 -9
  41. package/dist/chunk-VAQJLHUW.js.map +1 -0
  42. package/dist/{chunk-C7BO2ASM.js → chunk-VSZ5GDET.js} +2 -2
  43. package/dist/{chunk-CTQHZELA.js → chunk-XTRPYUWK.js} +14 -14
  44. package/dist/{chunk-HM3DHMW7.js → chunk-YTRFL3MR.js} +8 -8
  45. package/dist/chunk-YTRFL3MR.js.map +1 -0
  46. package/dist/{chunk-3WKFSTG6.js → chunk-ZWAL2ZY7.js} +2 -2
  47. package/dist/commands/build/marketplace.js +4 -4
  48. package/dist/commands/build/plugins.js +5 -5
  49. package/dist/commands/build/stack.js +5 -5
  50. package/dist/commands/compile.js +6 -6
  51. package/dist/commands/config/get.js +4 -4
  52. package/dist/commands/config/index.js +5 -5
  53. package/dist/commands/config/path.js +4 -4
  54. package/dist/commands/config/set-project.js +4 -4
  55. package/dist/commands/config/show.js +5 -5
  56. package/dist/commands/config/unset-project.js +4 -4
  57. package/dist/commands/diff.js +4 -4
  58. package/dist/commands/doctor.js +4 -4
  59. package/dist/commands/edit.js +29 -29
  60. package/dist/commands/eject.js +4 -4
  61. package/dist/commands/import/skill.js +5 -5
  62. package/dist/commands/info.js +5 -5
  63. package/dist/commands/init.js +28 -28
  64. package/dist/commands/list.js +4 -4
  65. package/dist/commands/new/agent.js +6 -6
  66. package/dist/commands/new/marketplace.js +5 -5
  67. package/dist/commands/new/skill.js +9 -6
  68. package/dist/commands/new/skill.js.map +1 -1
  69. package/dist/commands/outdated.js +4 -4
  70. package/dist/commands/search.js +7 -7
  71. package/dist/commands/uninstall.js +6 -6
  72. package/dist/commands/update.js +6 -6
  73. package/dist/commands/validate.js +229 -19
  74. package/dist/commands/validate.js.map +1 -1
  75. package/dist/components/skill-search/skill-search.js +3 -3
  76. package/dist/components/wizard/category-grid.js +2 -2
  77. package/dist/components/wizard/category-grid.test.js +122 -2
  78. package/dist/components/wizard/category-grid.test.js.map +1 -1
  79. package/dist/components/wizard/checkbox-grid.js +3 -3
  80. package/dist/components/wizard/checkbox-grid.test.js +3 -3
  81. package/dist/components/wizard/domain-selection.js +9 -9
  82. package/dist/components/wizard/help-modal.js +2 -2
  83. package/dist/components/wizard/menu-item.js +1 -1
  84. package/dist/components/wizard/search-modal.js +2 -2
  85. package/dist/components/wizard/search-modal.test.js +2 -2
  86. package/dist/components/wizard/section-progress.js +2 -2
  87. package/dist/components/wizard/section-progress.test.js +2 -2
  88. package/dist/components/wizard/selection-card.js +2 -2
  89. package/dist/components/wizard/source-grid.js +3 -3
  90. package/dist/components/wizard/source-grid.test.js +3 -3
  91. package/dist/components/wizard/stack-selection.js +8 -8
  92. package/dist/components/wizard/step-agents.js +8 -8
  93. package/dist/components/wizard/step-agents.test.js +9 -9
  94. package/dist/components/wizard/step-build.js +8 -8
  95. package/dist/components/wizard/step-build.test.js +78 -46
  96. package/dist/components/wizard/step-build.test.js.map +1 -1
  97. package/dist/components/wizard/step-confirm.js +4 -4
  98. package/dist/components/wizard/step-confirm.test.js +8 -8
  99. package/dist/components/wizard/step-refine.js +2 -2
  100. package/dist/components/wizard/step-refine.test.js +2 -2
  101. package/dist/components/wizard/step-settings.js +5 -5
  102. package/dist/components/wizard/step-settings.test.js +8 -8
  103. package/dist/components/wizard/step-sources.js +10 -10
  104. package/dist/components/wizard/step-sources.test.js +11 -11
  105. package/dist/components/wizard/step-stack.js +12 -12
  106. package/dist/components/wizard/step-stack.test.js +13 -13
  107. package/dist/components/wizard/view-title.js +2 -2
  108. package/dist/components/wizard/wizard-layout.js +8 -8
  109. package/dist/components/wizard/wizard-tabs.js +2 -2
  110. package/dist/components/wizard/wizard-tabs.test.js +2 -2
  111. package/dist/components/wizard/wizard.js +25 -25
  112. package/dist/hooks/init.js +3 -3
  113. package/dist/{source-manager-6QZ2GDUA.js → source-manager-Q34LTUVM.js} +4 -4
  114. package/dist/src/agents/meta/documentor/examples.md +35 -36
  115. package/dist/src/agents/meta/documentor/workflow.md +91 -105
  116. package/dist/stores/wizard-store.js +5 -5
  117. package/dist/stores/wizard-store.test.js +48 -6
  118. package/dist/stores/wizard-store.test.js.map +1 -1
  119. package/package.json +1 -1
  120. package/src/agents/meta/documentor/examples.md +35 -36
  121. package/src/agents/meta/documentor/workflow.md +91 -105
  122. package/src/schemas/agent.schema.json +3 -0
  123. package/src/schemas/metadata.schema.json +3 -0
  124. package/dist/chunk-5QRJUBK7.js.map +0 -1
  125. package/dist/chunk-CD64ZNYI.js.map +0 -1
  126. package/dist/chunk-CDGHSTB6.js.map +0 -1
  127. package/dist/chunk-HM3DHMW7.js.map +0 -1
  128. package/dist/chunk-RT6IBH37.js.map +0 -1
  129. package/dist/chunk-RWR56UVK.js.map +0 -1
  130. package/dist/chunk-XE6RTHUD.js.map +0 -1
  131. package/dist/chunk-YT7UHV67.js.map +0 -1
  132. /package/dist/{chunk-G2WNOT3R.js.map → chunk-2RQYJFKA.js.map} +0 -0
  133. /package/dist/{chunk-DO5OZHSS.js.map → chunk-B4QYXVPZ.js.map} +0 -0
  134. /package/dist/{chunk-QBUOZVNZ.js.map → chunk-CJFWO46A.js.map} +0 -0
  135. /package/dist/{chunk-VH3PI43B.js.map → chunk-DC333ZDC.js.map} +0 -0
  136. /package/dist/{chunk-GVLYNP2I.js.map → chunk-DVW6ASTO.js.map} +0 -0
  137. /package/dist/{chunk-NMXNHRAK.js.map → chunk-EZ46ZTAQ.js.map} +0 -0
  138. /package/dist/{chunk-FUEZQ2H6.js.map → chunk-FMQ3A7W4.js.map} +0 -0
  139. /package/dist/{chunk-KWQ2BQXF.js.map → chunk-FXQYEXLS.js.map} +0 -0
  140. /package/dist/{chunk-72GS6PIH.js.map → chunk-HPJP3HFD.js.map} +0 -0
  141. /package/dist/{chunk-J64CA4V6.js.map → chunk-INKJBMPJ.js.map} +0 -0
  142. /package/dist/{chunk-YVMYQSED.js.map → chunk-IRJADQM7.js.map} +0 -0
  143. /package/dist/{chunk-PZLUO4OY.js.map → chunk-JTTTXGHX.js.map} +0 -0
  144. /package/dist/{chunk-4C7PDDLY.js.map → chunk-JZHIF3K7.js.map} +0 -0
  145. /package/dist/{chunk-D7JTL3DJ.js.map → chunk-KQ27IDYL.js.map} +0 -0
  146. /package/dist/{chunk-SGXUMZWL.js.map → chunk-LJ5E4GXC.js.map} +0 -0
  147. /package/dist/{chunk-LFZXMQOH.js.map → chunk-LNA6M2IE.js.map} +0 -0
  148. /package/dist/{chunk-ODQ2BKWU.js.map → chunk-M4P5YJ45.js.map} +0 -0
  149. /package/dist/{chunk-TOWP4T5L.js.map → chunk-MVEYK55V.js.map} +0 -0
  150. /package/dist/{chunk-5M6JI76P.js.map → chunk-N5OCAAXY.js.map} +0 -0
  151. /package/dist/{chunk-FKBCYT7B.js.map → chunk-OEJDFGAF.js.map} +0 -0
  152. /package/dist/{chunk-I26YP2Q3.js.map → chunk-QR2TM4OY.js.map} +0 -0
  153. /package/dist/{chunk-7LDSHHKN.js.map → chunk-TWDVLTU6.js.map} +0 -0
  154. /package/dist/{chunk-C7BO2ASM.js.map → chunk-VSZ5GDET.js.map} +0 -0
  155. /package/dist/{chunk-CTQHZELA.js.map → chunk-XTRPYUWK.js.map} +0 -0
  156. /package/dist/{chunk-3WKFSTG6.js.map → chunk-ZWAL2ZY7.js.map} +0 -0
  157. /package/dist/{source-manager-6QZ2GDUA.js.map → source-manager-Q34LTUVM.js.map} +0 -0
@@ -5,7 +5,7 @@
5
5
  **If you notice yourself:**
6
6
 
7
7
  - **Documenting without reading code first** → STOP. Read the actual files before making claims.
8
- - **Using generic descriptions instead of file paths** → STOP. Replace with specific paths like `/src/stores/UserStore.ts:45-89`.
8
+ - **Using generic descriptions instead of file paths** → STOP. Replace with specific paths like `src/cli/stores/wizard-store.ts:45-89`.
9
9
  - **Describing patterns based on assumptions** → STOP. Verify with Grep/Glob before documenting.
10
10
  - **Skipping the documentation map update** → STOP. Update DOCUMENTATION_MAP.md before finishing.
11
11
  - **Skipping CLAUDE.md update** → STOP. Add reference to generated docs in project CLAUDE.md.
@@ -234,78 +234,75 @@ Use the output format to show what was accomplished.
234
234
 
235
235
  ## State Management Library
236
236
 
237
- **Library:** [MobX | Redux | Zustand | Context | other]
237
+ **Library:** [Zustand | Redux | MobX | Context | other]
238
238
  **Version:** [if known]
239
- **Pattern:** [Root store | Individual stores | Slices | other]
239
+ **Pattern:** [create<State>() stores | Slices | Root store | other]
240
240
 
241
241
  ## Stores
242
242
 
243
- | Store | File Path | Purpose | Key Observables | Key Actions |
244
- | ----------- | ---------------------------- | -------------------- | ----------------------------------- | -------------------------------- |
245
- | EditorStore | `/src/stores/EditorStore.ts` | Manages editor state | `layers`, `selectedTool`, `history` | `addLayer()`, `undo()`, `redo()` |
246
- | UserStore | `/src/stores/UserStore.ts` | User session | `currentUser`, `isAuthenticated` | `login()`, `logout()` |
243
+ | Store | File Path | Purpose | Key State | Key Actions |
244
+ | ----------- | -------------------------------- | ----------------- | ----------------------------------------------- | ----------------------------------------------- |
245
+ | WizardStore | `src/cli/stores/wizard-store.ts` | Wizard flow state | `domains`, `selectedSkills`, `sourceSelections` | `toggleSkill()`, `setSource()`, `resetWizard()` |
247
246
 
248
247
  ## Store Relationships
249
248
 
250
249
  ```mermaid
251
250
  graph TD
252
- RootStore --> EditorStore
253
- RootStore --> UserStore
254
- EditorStore --> LayerStore
251
+ WizardStore --> StepBuild[step-build.tsx]
252
+ WizardStore --> StepStack[step-stack.tsx]
253
+ WizardStore --> StepConfirm[step-confirm.tsx]
255
254
  ```
256
255
  ````
257
256
 
258
257
  **Description:**
259
258
 
260
- - RootStore: `/src/stores/RootStore.ts` - Initializes and provides all stores
261
- - EditorStore imports LayerStore for layer management
262
- - UserStore is independent
259
+ - WizardStore: `src/cli/stores/wizard-store.ts` - Manages wizard flow state
260
+ - Accessed by Ink components via `useWizardStore()` selectors
263
261
 
264
262
  ## Usage Pattern
265
263
 
266
264
  **How stores are accessed:**
267
265
 
268
266
  ```typescript
269
- // Pattern used in this codebase
270
- import { useStore } from "@/contexts/StoreContext";
271
- const { editorStore } = useStore();
267
+ // Pattern used in this codebase (Zustand selectors)
268
+ import { useWizardStore } from "../../stores/wizard-store.js";
269
+ const domains = useWizardStore((s) => s.domains);
270
+ const toggleSkill = useWizardStore((s) => s.toggleSkill);
272
271
  ```
273
272
 
274
273
  **Example files using this pattern:**
275
274
 
276
- - `/src/components/Editor/EditorCanvas.tsx:15`
277
- - `/src/components/Toolbar/ToolSelector.tsx:8`
275
+ - `src/cli/components/wizard/step-build.tsx`
276
+ - `src/cli/components/wizard/step-stack.tsx`
278
277
 
279
278
  ## State Update Patterns
280
279
 
281
- **MobX patterns used:**
280
+ **Zustand patterns used:**
282
281
 
283
- - `makeAutoObservable` in all stores
284
- - Actions are async functions with `flow` wrapper
285
- - No decorators (class-based with makeAutoObservable)
282
+ - `create<State>()` for store creation
283
+ - Actions defined inside the store creator with `set`/`get`
284
+ - No class-based stores, no decorators, no observer wrappers
286
285
 
287
286
  **Example:**
288
287
 
289
288
  ```typescript
290
- // From EditorStore.ts:45-67
291
- class EditorStore {
292
- layers: Layer[] = [];
293
-
294
- constructor() {
295
- makeAutoObservable(this);
296
- }
297
-
298
- addLayer = flow(function* (this: EditorStore, layer: Layer) {
299
- yield api.saveLayer(layer);
300
- this.layers.push(layer);
301
- });
302
- }
289
+ // From wizard-store.ts (simplified)
290
+ export const useWizardStore = create<WizardState>((set, get) => ({
291
+ domains: [],
292
+ selectedSkills: {},
293
+
294
+ toggleSkill: (skillId: SkillId) => {
295
+ set((state) => ({
296
+ /* toggle logic */
297
+ }));
298
+ },
299
+ }));
303
300
  ```
304
301
 
305
302
  ## Anti-Patterns Found
306
303
 
307
- - Direct store mutation without actions (found in `/src/legacy/OldEditor.tsx:123`)
308
- - Accessing stores outside React tree (found in `/src/utils/legacy-helper.ts:45`)
304
+ - [Document actual anti-patterns found in codebase]
305
+ - [e.g., Destructuring store state outside selectors, accessing store outside React tree]
309
306
 
310
307
  ## Related Documentation
311
308
 
@@ -529,32 +526,36 @@ components/editor-toolbar/
529
526
  **Standard pattern:**
530
527
 
531
528
  ```typescript
532
- // From: /src/components/editor-canvas/editor-canvas.tsx
529
+ // From: src/cli/components/wizard/step-build.tsx
533
530
 
534
- import { observer } from "mobx-react-lite";
535
- import { useStore } from "@/contexts/StoreContext";
536
- import styles from "./editor-canvas.module.scss";
531
+ import { Box, Text } from "ink";
532
+ import { useWizardStore } from "../../stores/wizard-store.js";
537
533
 
538
- export const EditorCanvas = observer(() => {
539
- const { editorStore } = useStore();
534
+ export const StepBuild = () => {
535
+ const domains = useWizardStore((s) => s.domains);
540
536
 
541
- return <canvas className={styles.canvas}>{/* ... */}</canvas>;
542
- });
537
+ return (
538
+ <Box flexDirection="column">
539
+ <Text bold>Build Configuration</Text>
540
+ {/* ... */}
541
+ </Box>
542
+ );
543
+ };
543
544
  ```
544
545
 
545
546
  **Key patterns:**
546
547
 
547
548
  - Named exports (no default exports)
548
- - `observer` wrapper for components using stores
549
- - SCSS Modules for styling
550
- - Store access via `useStore()` hook
549
+ - Ink components (`<Box>`, `<Text>`) for terminal UI
550
+ - Zustand selectors for store access (no wrapper needed)
551
+ - Inline Ink props for styling (`bold`, `color`, `dimColor`)
551
552
 
552
553
  **Files following pattern:**
553
554
 
554
- - `/src/components/editor-canvas/editor-canvas.tsx`
555
- - `/src/components/toolbar/toolbar.tsx`
556
- - `/src/components/layer-panel/layer-panel.tsx`
557
- (45 more files...)
555
+ - `src/cli/components/wizard/step-build.tsx`
556
+ - `src/cli/components/wizard/step-stack.tsx`
557
+ - `src/cli/components/wizard/step-confirm.tsx`
558
+ (more files...)
558
559
 
559
560
  ## Props Pattern
560
561
 
@@ -580,75 +581,60 @@ export const Button = ({ variant = "primary", size = "sm", ...props }: ButtonPro
580
581
 
581
582
  ## Store Usage Pattern
582
583
 
583
- **Standard pattern:**
584
+ **Standard pattern (Zustand selectors):**
584
585
 
585
586
  ```typescript
586
- const { editorStore, userStore } = useStore()
587
-
588
- // Observe specific properties
589
- <div>{editorStore.selectedTool}</div>
590
-
591
- // ✅ Call actions
592
- <button onClick={() => editorStore.setTool('brush')}>
587
+ // Select specific state slices
588
+ const domains = useWizardStore((s) => s.domains);
589
+ const toggleSkill = useWizardStore((s) => s.toggleSkill);
593
590
  ```
594
591
 
595
592
  **Anti-patterns:**
596
593
 
597
594
  ```typescript
598
- // ❌ Don't destructure observables
599
- const { selectedTool } = editorStore; // Breaks reactivity!
595
+ // ❌ Don't select the entire store (causes unnecessary re-renders)
596
+ const store = useWizardStore();
600
597
 
601
- // ❌ Don't mutate directly
602
- editorStore.selectedTool = "brush"; // Use actions!
598
+ // ❌ Don't mutate state directly outside set()
603
599
  ```
604
600
 
605
601
  ## Styling Pattern
606
602
 
607
- **SCSS Modules:**
603
+ **Ink terminal components (no CSS/SCSS):**
608
604
 
609
605
  ```typescript
610
- import styles from './component.module.scss'
606
+ import { Box, Text } from "ink";
607
+ import { CLI_COLORS } from "../../consts.js";
611
608
 
612
- <div className={styles.container}>
613
- <button className={styles.button}>
614
- </div>
609
+ <Box flexDirection="column" gap={1}>
610
+ <Text bold color={CLI_COLORS.PRIMARY}>Title</Text>
611
+ <Text dimColor>Subtitle</Text>
612
+ </Box>
615
613
  ```
616
614
 
617
- **Design tokens:**
618
-
619
- ```scss
620
- .container {
621
- padding: var(--space-md);
622
- color: var(--color-text-default);
623
- }
624
- ```
625
-
626
- **Files:** All components use SCSS Modules
615
+ **Constants:** Use `CLI_COLORS.*` and `UI_SYMBOLS.*` from `src/cli/consts.ts`
627
616
 
628
617
  ## Testing Pattern
629
618
 
630
- **Co-located tests:**
619
+ **Test framework: Vitest**
631
620
 
632
- ```
633
- component.tsx
634
- component.test.tsx
635
- ```
621
+ **Test location:** `src/cli/lib/__tests__/` and co-located `*.test.ts` files
636
622
 
637
623
  **Pattern:**
638
624
 
639
625
  ```typescript
640
- import { render, screen } from "@testing-library/react";
641
- import { EditorCanvas } from "./editor-canvas";
626
+ import { describe, it, expect, beforeEach } from "vitest";
627
+ import { createMockSkill, createTempDir, cleanupTempDir } from "../__tests__/helpers.js";
642
628
 
643
- describe("EditorCanvas", () => {
644
- it("renders canvas", () => {
645
- render(<EditorCanvas />);
646
- expect(screen.getByRole("img")).toBeInTheDocument();
629
+ describe("feature-name", () => {
630
+ it("does expected behavior", () => {
631
+ const skill = createMockSkill("web-framework-react", "web/framework");
632
+ expect(skill.id).toBe("web-framework-react");
647
633
  });
648
634
  });
649
635
  ```
650
636
 
651
- **Coverage:** 78% of components have tests
637
+ **Key:** Always use factory functions from `helpers.ts` for test data, never inline
652
638
 
653
639
  ````
654
640
 
@@ -837,7 +823,7 @@ EditorPage imports:
837
823
  - Commands: `src/cli/commands/*.ts`
838
824
  - Components: `src/cli/components/wizard/*.tsx`
839
825
  - Business logic: `src/cli/lib/**/*.ts`
840
- - Types: `src/cli/types/*.ts`, `src/cli/types-matrix.ts`
826
+ - Types: `src/cli/types/*.ts`, `src/cli/types/matrix.ts`
841
827
  - Constants: `src/cli/consts.ts`
842
828
  - Test helpers: `src/cli/lib/__tests__/helpers.ts`
843
829
 
@@ -1177,23 +1163,23 @@ fi
1177
1163
  **✅ Good:**
1178
1164
 
1179
1165
  ```markdown
1180
- ## EditorStore
1166
+ ## WizardStore
1181
1167
 
1182
- **File:** `/src/stores/EditorStore.ts`
1183
- **Pattern:** MobX with makeAutoObservable
1168
+ **File:** `src/cli/stores/wizard-store.ts`
1169
+ **Pattern:** Zustand create<State>() with selectors
1184
1170
 
1185
1171
  **Key Actions:**
1186
1172
 
1187
- - `setTool(tool: Tool)` - Changes active tool (line 45)
1188
- - `addLayer(layer: Layer)` - Adds layer to canvas (line 67)
1173
+ - `toggleSkill(skillId: SkillId)` - Toggles skill selection (line ~450)
1174
+ - `resetWizard()` - Resets wizard to initial state (line ~480)
1189
1175
  ```
1190
1176
 
1191
1177
  **❌ Bad:**
1192
1178
 
1193
1179
  ```markdown
1194
- ## EditorStore
1180
+ ## WizardStore
1195
1181
 
1196
- The editor store manages editor state. It uses MobX for reactivity and follows best practices.
1182
+ The wizard store manages wizard state. It uses Zustand for state management and follows best practices.
1197
1183
  ```
1198
1184
 
1199
1185
  **Why good example is better:**
@@ -1254,18 +1240,18 @@ We use kebab-case for component files. Most components follow this.
1254
1240
 
1255
1241
  **You DON'T handle:**
1256
1242
 
1257
- - Writing code or implementing features -> web-developer, api-developer
1243
+ - Writing code or implementing features -> cli-developer, web-developer, api-developer
1258
1244
  - Creating specifications for new features -> web-pm
1259
- - Reviewing code for quality issues -> web-reviewer, api-reviewer
1260
- - Writing tests -> web-tester
1245
+ - Reviewing code for quality issues -> cli-reviewer, web-reviewer, api-reviewer
1246
+ - Writing tests -> cli-tester, web-tester
1261
1247
  - Creating tutorial-style documentation for humans
1262
1248
  - Writing README files or setup guides
1263
1249
 
1264
1250
  **When to defer:**
1265
1251
 
1266
- - "Implement this feature" -> web-developer or api-developer
1252
+ - "Implement this feature" -> cli-developer, web-developer, or api-developer
1267
1253
  - "Create a spec for X" -> web-pm
1268
- - "Review this code" -> web-reviewer or api-reviewer
1269
- - "Write tests for X" -> web-tester
1254
+ - "Review this code" -> cli-reviewer, web-reviewer, or api-reviewer
1255
+ - "Write tests for X" -> cli-tester or web-tester
1270
1256
 
1271
1257
  </domain_scope>
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  useWizardStore
4
- } from "../chunk-UK3AMBR7.js";
5
- import "../chunk-J64CA4V6.js";
6
- import "../chunk-RT6IBH37.js";
4
+ } from "../chunk-SPSGZWTZ.js";
5
+ import "../chunk-INKJBMPJ.js";
6
+ import "../chunk-GFDGYQ6M.js";
7
7
  import "../chunk-T4EXUIBY.js";
8
- import "../chunk-5QRJUBK7.js";
9
- import "../chunk-74HSA7C4.js";
8
+ import "../chunk-C4QI54PN.js";
9
+ import "../chunk-FTD5Z6QD.js";
10
10
  import "../chunk-DHET7RCE.js";
11
11
  export {
12
12
  useWizardStore
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createMockMatrix,
4
4
  getTestSkill
5
- } from "../chunk-XE6RTHUD.js";
5
+ } from "../chunk-TBB3THSL.js";
6
6
  import {
7
7
  beforeEach,
8
8
  describe,
@@ -11,16 +11,16 @@ import {
11
11
  } from "../chunk-XY3XDVMI.js";
12
12
  import {
13
13
  useWizardStore
14
- } from "../chunk-UK3AMBR7.js";
15
- import "../chunk-J64CA4V6.js";
16
- import "../chunk-RT6IBH37.js";
14
+ } from "../chunk-SPSGZWTZ.js";
15
+ import "../chunk-INKJBMPJ.js";
16
+ import "../chunk-GFDGYQ6M.js";
17
17
  import {
18
18
  typedKeys
19
19
  } from "../chunk-T4EXUIBY.js";
20
- import "../chunk-5QRJUBK7.js";
20
+ import "../chunk-C4QI54PN.js";
21
21
  import {
22
22
  DEFAULT_PRESELECTED_SKILLS
23
- } from "../chunk-74HSA7C4.js";
23
+ } from "../chunk-FTD5Z6QD.js";
24
24
  import {
25
25
  init_esm_shims
26
26
  } from "../chunk-DHET7RCE.js";
@@ -151,6 +151,48 @@ describe("WizardStore", () => {
151
151
  const { selectedDomains } = useWizardStore.getState();
152
152
  globalExpect(selectedDomains).toEqual(["web", "api", "cli"]);
153
153
  });
154
+ it("should remove skills from deselected domain", () => {
155
+ const store = useWizardStore.getState();
156
+ store.toggleDomain("web");
157
+ store.toggleTechnology("web", "web-framework", "web-framework-react", true);
158
+ store.toggleTechnology("web", "web-styling", "web-styling-scss-modules", true);
159
+ store.toggleDomain("web");
160
+ const { domainSelections } = useWizardStore.getState();
161
+ globalExpect(domainSelections.web).toBeUndefined();
162
+ globalExpect(store.getAllSelectedTechnologies()).toEqual([]);
163
+ globalExpect(store.getTechnologyCount()).toBe(0);
164
+ });
165
+ it("should not affect skills in other domains when deselecting a domain", () => {
166
+ const store = useWizardStore.getState();
167
+ store.toggleDomain("web");
168
+ store.toggleDomain("api");
169
+ store.toggleTechnology("web", "web-framework", "web-framework-react", true);
170
+ store.toggleTechnology("api", "api-api", "api-framework-hono", true);
171
+ store.toggleDomain("web");
172
+ const { domainSelections } = useWizardStore.getState();
173
+ globalExpect(domainSelections.web).toBeUndefined();
174
+ globalExpect(domainSelections.api["api-api"]).toEqual(["api-framework-hono"]);
175
+ globalExpect(store.getAllSelectedTechnologies()).toEqual(["api-framework-hono"]);
176
+ });
177
+ it("should not auto-select skills when toggling domain on", () => {
178
+ const store = useWizardStore.getState();
179
+ store.toggleDomain("web");
180
+ const { domainSelections } = useWizardStore.getState();
181
+ globalExpect(domainSelections.web).toBeUndefined();
182
+ globalExpect(store.getAllSelectedTechnologies()).toEqual([]);
183
+ });
184
+ it("should reflect correct technology count after domain deselection", () => {
185
+ const store = useWizardStore.getState();
186
+ store.toggleDomain("web");
187
+ store.toggleDomain("api");
188
+ store.toggleTechnology("web", "web-framework", "web-framework-react", true);
189
+ store.toggleTechnology("web", "web-styling", "web-styling-scss-modules", true);
190
+ store.toggleTechnology("api", "api-api", "api-framework-hono", true);
191
+ globalExpect(store.getTechnologyCount()).toBe(3);
192
+ store.toggleDomain("web");
193
+ globalExpect(store.getTechnologyCount()).toBe(1);
194
+ globalExpect(store.getAllSelectedTechnologies()).toEqual(["api-framework-hono"]);
195
+ });
154
196
  });
155
197
  describe("technology selection", () => {
156
198
  it("should toggle technology in exclusive mode", () => {