@agents-inc/cli 0.45.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.
- package/CHANGELOG.md +27 -0
- package/dist/{chunk-V43QDMYQ.js → chunk-2RQYJFKA.js} +2 -2
- package/dist/{chunk-ABE55TEU.js → chunk-3APMMQUA.js} +11 -3
- package/dist/chunk-3APMMQUA.js.map +1 -0
- package/dist/{chunk-KWWLPPHF.js → chunk-B4QYXVPZ.js} +2 -2
- package/dist/{chunk-473YHDYQ.js → chunk-C4QI54PN.js} +147 -52
- package/dist/chunk-C4QI54PN.js.map +1 -0
- package/dist/{chunk-CLHBKFHU.js → chunk-CJFWO46A.js} +2 -2
- package/dist/{chunk-M2XPTQDT.js → chunk-DC333ZDC.js} +4 -4
- package/dist/{chunk-M3AGB4TR.js → chunk-DVW6ASTO.js} +4 -4
- package/dist/{chunk-ARET3NYO.js → chunk-EZ46ZTAQ.js} +3 -3
- package/dist/{chunk-VTDEENSP.js → chunk-FMQ3A7W4.js} +5 -5
- package/dist/{chunk-VTDEENSP.js.map → chunk-FMQ3A7W4.js.map} +1 -1
- package/dist/{chunk-FVN5PFFY.js → chunk-FTD5Z6QD.js} +5 -1
- package/dist/chunk-FTD5Z6QD.js.map +1 -0
- package/dist/{chunk-YQFU2KZ5.js → chunk-FXQYEXLS.js} +3 -3
- package/dist/{chunk-ZECXM7LP.js → chunk-GFDGYQ6M.js} +3553 -3497
- package/dist/chunk-GFDGYQ6M.js.map +1 -0
- package/dist/chunk-HLTJK3XB.js +71 -0
- package/dist/chunk-HLTJK3XB.js.map +1 -0
- package/dist/{chunk-KVHLKPYB.js → chunk-HPJP3HFD.js} +7 -7
- package/dist/{chunk-KZNPPUQG.js → chunk-INKJBMPJ.js} +5 -3
- package/dist/chunk-INKJBMPJ.js.map +1 -0
- package/dist/{chunk-SBWMSNS2.js → chunk-IRJADQM7.js} +2 -2
- package/dist/{chunk-SYGEV3KV.js → chunk-JTTTXGHX.js} +4 -4
- package/dist/{chunk-ELRGSZHZ.js → chunk-JZHIF3K7.js} +5 -5
- package/dist/{chunk-OALQWRLG.js → chunk-KQ27IDYL.js} +2 -2
- package/dist/{chunk-OLZBZAW4.js → chunk-LJ5E4GXC.js} +2 -2
- package/dist/{chunk-SRFNNOLC.js → chunk-LNA6M2IE.js} +2 -2
- package/dist/{chunk-GUIRWCKI.js → chunk-M4P5YJ45.js} +3 -3
- package/dist/{chunk-3S4GIO4B.js → chunk-MVEYK55V.js} +2 -2
- package/dist/{chunk-HKRLWERR.js → chunk-N5OCAAXY.js} +2 -2
- package/dist/{chunk-YRVTXSXP.js → chunk-NRCKIHND.js} +9 -15
- package/dist/chunk-NRCKIHND.js.map +1 -0
- package/dist/{chunk-DAVOSI4M.js → chunk-OEJDFGAF.js} +5 -5
- package/dist/{chunk-ENWMWIHP.js → chunk-QR2TM4OY.js} +5 -12
- package/dist/chunk-QR2TM4OY.js.map +1 -0
- package/dist/{chunk-FYNMNY4P.js → chunk-SPSGZWTZ.js} +25 -12
- package/dist/chunk-SPSGZWTZ.js.map +1 -0
- package/dist/{chunk-3JRWNWBF.js → chunk-TBB3THSL.js} +38 -4
- package/dist/chunk-TBB3THSL.js.map +1 -0
- package/dist/chunk-TWDVLTU6.js +132 -0
- package/dist/chunk-TWDVLTU6.js.map +1 -0
- package/dist/{chunk-KCYNTAAF.js → chunk-VAQJLHUW.js} +12 -10
- package/dist/chunk-VAQJLHUW.js.map +1 -0
- package/dist/{chunk-F3O5YHSI.js → chunk-VSZ5GDET.js} +2 -2
- package/dist/{chunk-Q5BSIARS.js → chunk-XTRPYUWK.js} +15 -15
- package/dist/chunk-XTRPYUWK.js.map +1 -0
- package/dist/{chunk-WWSKP5SR.js → chunk-YTRFL3MR.js} +70 -24
- package/dist/chunk-YTRFL3MR.js.map +1 -0
- package/dist/{chunk-NTPHCNJO.js → chunk-ZWAL2ZY7.js} +2 -2
- package/dist/commands/build/marketplace.js +12 -126
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +5 -5
- package/dist/commands/build/stack.js +5 -5
- package/dist/commands/compile.js +6 -6
- package/dist/commands/config/get.js +4 -4
- package/dist/commands/config/index.js +5 -5
- package/dist/commands/config/path.js +4 -4
- package/dist/commands/config/set-project.js +4 -4
- package/dist/commands/config/show.js +5 -5
- package/dist/commands/config/unset-project.js +4 -4
- package/dist/commands/diff.js +4 -4
- package/dist/commands/doctor.js +4 -4
- package/dist/commands/edit.js +29 -29
- package/dist/commands/eject.js +19 -23
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/import/skill.js +5 -5
- package/dist/commands/info.js +5 -5
- package/dist/commands/init.js +30 -29
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +4 -4
- package/dist/commands/new/agent.js +52 -38
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/marketplace.js +252 -0
- package/dist/commands/new/marketplace.js.map +1 -0
- package/dist/commands/new/skill.js +35 -16
- package/dist/commands/new/skill.js.map +1 -1
- package/dist/commands/outdated.js +4 -4
- package/dist/commands/search.js +7 -7
- package/dist/commands/uninstall.js +6 -6
- package/dist/commands/update.js +6 -6
- package/dist/commands/validate.js +229 -19
- package/dist/commands/validate.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +3 -3
- package/dist/components/wizard/category-grid.js +2 -2
- package/dist/components/wizard/category-grid.test.js +122 -2
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/checkbox-grid.js +3 -3
- package/dist/components/wizard/checkbox-grid.test.js +3 -3
- package/dist/components/wizard/domain-selection.js +9 -8
- package/dist/components/wizard/help-modal.js +2 -2
- package/dist/components/wizard/menu-item.js +1 -1
- package/dist/components/wizard/search-modal.js +2 -2
- package/dist/components/wizard/search-modal.test.js +2 -2
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +2 -2
- package/dist/components/wizard/selection-card.js +2 -2
- package/dist/components/wizard/source-grid.js +3 -3
- package/dist/components/wizard/source-grid.test.js +3 -3
- package/dist/components/wizard/stack-selection.js +8 -9
- package/dist/components/wizard/step-agents.js +8 -7
- package/dist/components/wizard/step-agents.test.js +25 -20
- package/dist/components/wizard/step-agents.test.js.map +1 -1
- package/dist/components/wizard/step-build.js +8 -8
- package/dist/components/wizard/step-build.test.js +78 -46
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +4 -4
- package/dist/components/wizard/step-confirm.test.js +8 -8
- package/dist/components/wizard/step-refine.js +2 -2
- package/dist/components/wizard/step-refine.test.js +2 -2
- package/dist/components/wizard/step-settings.js +5 -5
- package/dist/components/wizard/step-settings.test.js +8 -8
- package/dist/components/wizard/step-sources.js +10 -10
- package/dist/components/wizard/step-sources.test.js +11 -11
- package/dist/components/wizard/step-stack.js +12 -12
- package/dist/components/wizard/step-stack.test.js +27 -15
- package/dist/components/wizard/step-stack.test.js.map +1 -1
- package/dist/components/wizard/view-title.js +2 -2
- package/dist/components/wizard/wizard-layout.js +8 -8
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +2 -2
- package/dist/components/wizard/wizard.js +25 -25
- package/dist/hooks/init.js +3 -5
- package/dist/hooks/init.js.map +1 -1
- package/dist/{source-manager-HXFXBZJU.js → source-manager-Q34LTUVM.js} +4 -4
- package/dist/src/agents/meta/documentor/examples.md +35 -36
- package/dist/src/agents/meta/documentor/workflow.md +91 -105
- package/dist/stores/wizard-store.js +5 -5
- package/dist/stores/wizard-store.test.js +48 -6
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/meta/documentor/examples.md +35 -36
- package/src/agents/meta/documentor/workflow.md +91 -105
- package/src/schemas/agent.schema.json +6 -0
- package/src/schemas/metadata.schema.json +7 -41
- package/src/schemas/project-config.schema.json +8 -4
- package/src/schemas/skills-matrix.schema.json +11 -298
- package/src/schemas/stacks.schema.json +2 -4
- package/dist/chunk-3JRWNWBF.js.map +0 -1
- package/dist/chunk-473YHDYQ.js.map +0 -1
- package/dist/chunk-5BDYODWP.js +0 -45
- package/dist/chunk-5BDYODWP.js.map +0 -1
- package/dist/chunk-ABE55TEU.js.map +0 -1
- package/dist/chunk-ENWMWIHP.js.map +0 -1
- package/dist/chunk-FVN5PFFY.js.map +0 -1
- package/dist/chunk-FYNMNY4P.js.map +0 -1
- package/dist/chunk-KCYNTAAF.js.map +0 -1
- package/dist/chunk-KZNPPUQG.js.map +0 -1
- package/dist/chunk-Q5BSIARS.js.map +0 -1
- package/dist/chunk-WWSKP5SR.js.map +0 -1
- package/dist/chunk-YRVTXSXP.js.map +0 -1
- package/dist/chunk-ZECXM7LP.js.map +0 -1
- package/dist/cli/defaults/agent-mappings.yaml +0 -215
- /package/dist/{chunk-V43QDMYQ.js.map → chunk-2RQYJFKA.js.map} +0 -0
- /package/dist/{chunk-KWWLPPHF.js.map → chunk-B4QYXVPZ.js.map} +0 -0
- /package/dist/{chunk-CLHBKFHU.js.map → chunk-CJFWO46A.js.map} +0 -0
- /package/dist/{chunk-M2XPTQDT.js.map → chunk-DC333ZDC.js.map} +0 -0
- /package/dist/{chunk-M3AGB4TR.js.map → chunk-DVW6ASTO.js.map} +0 -0
- /package/dist/{chunk-ARET3NYO.js.map → chunk-EZ46ZTAQ.js.map} +0 -0
- /package/dist/{chunk-YQFU2KZ5.js.map → chunk-FXQYEXLS.js.map} +0 -0
- /package/dist/{chunk-KVHLKPYB.js.map → chunk-HPJP3HFD.js.map} +0 -0
- /package/dist/{chunk-SBWMSNS2.js.map → chunk-IRJADQM7.js.map} +0 -0
- /package/dist/{chunk-SYGEV3KV.js.map → chunk-JTTTXGHX.js.map} +0 -0
- /package/dist/{chunk-ELRGSZHZ.js.map → chunk-JZHIF3K7.js.map} +0 -0
- /package/dist/{chunk-OALQWRLG.js.map → chunk-KQ27IDYL.js.map} +0 -0
- /package/dist/{chunk-OLZBZAW4.js.map → chunk-LJ5E4GXC.js.map} +0 -0
- /package/dist/{chunk-SRFNNOLC.js.map → chunk-LNA6M2IE.js.map} +0 -0
- /package/dist/{chunk-GUIRWCKI.js.map → chunk-M4P5YJ45.js.map} +0 -0
- /package/dist/{chunk-3S4GIO4B.js.map → chunk-MVEYK55V.js.map} +0 -0
- /package/dist/{chunk-HKRLWERR.js.map → chunk-N5OCAAXY.js.map} +0 -0
- /package/dist/{chunk-DAVOSI4M.js.map → chunk-OEJDFGAF.js.map} +0 -0
- /package/dist/{chunk-F3O5YHSI.js.map → chunk-VSZ5GDET.js.map} +0 -0
- /package/dist/{chunk-NTPHCNJO.js.map → chunk-ZWAL2ZY7.js.map} +0 -0
- /package/dist/{source-manager-HXFXBZJU.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
|
|
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:** [
|
|
237
|
+
**Library:** [Zustand | Redux | MobX | Context | other]
|
|
238
238
|
**Version:** [if known]
|
|
239
|
-
**Pattern:** [
|
|
239
|
+
**Pattern:** [create<State>() stores | Slices | Root store | other]
|
|
240
240
|
|
|
241
241
|
## Stores
|
|
242
242
|
|
|
243
|
-
| Store | File Path
|
|
244
|
-
| ----------- |
|
|
245
|
-
|
|
|
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
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
-
-
|
|
261
|
-
-
|
|
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 {
|
|
271
|
-
const
|
|
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
|
-
-
|
|
277
|
-
-
|
|
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
|
-
**
|
|
280
|
+
**Zustand patterns used:**
|
|
282
281
|
|
|
283
|
-
- `
|
|
284
|
-
- Actions
|
|
285
|
-
- No
|
|
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
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
-
|
|
308
|
-
-
|
|
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:
|
|
529
|
+
// From: src/cli/components/wizard/step-build.tsx
|
|
533
530
|
|
|
534
|
-
import {
|
|
535
|
-
import {
|
|
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
|
|
539
|
-
const
|
|
534
|
+
export const StepBuild = () => {
|
|
535
|
+
const domains = useWizardStore((s) => s.domains);
|
|
540
536
|
|
|
541
|
-
return
|
|
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
|
-
-
|
|
549
|
-
-
|
|
550
|
-
-
|
|
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
|
-
-
|
|
555
|
-
-
|
|
556
|
-
-
|
|
557
|
-
(
|
|
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
|
-
|
|
587
|
-
|
|
588
|
-
|
|
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
|
|
599
|
-
const
|
|
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
|
|
603
|
+
**Ink terminal components (no CSS/SCSS):**
|
|
608
604
|
|
|
609
605
|
```typescript
|
|
610
|
-
import
|
|
606
|
+
import { Box, Text } from "ink";
|
|
607
|
+
import { CLI_COLORS } from "../../consts.js";
|
|
611
608
|
|
|
612
|
-
<
|
|
613
|
-
<
|
|
614
|
-
</
|
|
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
|
-
**
|
|
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
|
-
**
|
|
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 {
|
|
641
|
-
import {
|
|
626
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
627
|
+
import { createMockSkill, createTempDir, cleanupTempDir } from "../__tests__/helpers.js";
|
|
642
628
|
|
|
643
|
-
describe("
|
|
644
|
-
it("
|
|
645
|
-
|
|
646
|
-
expect(
|
|
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
|
-
**
|
|
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
|
|
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
|
-
##
|
|
1166
|
+
## WizardStore
|
|
1181
1167
|
|
|
1182
|
-
**File:**
|
|
1183
|
-
**Pattern:**
|
|
1168
|
+
**File:** `src/cli/stores/wizard-store.ts`
|
|
1169
|
+
**Pattern:** Zustand create<State>() with selectors
|
|
1184
1170
|
|
|
1185
1171
|
**Key Actions:**
|
|
1186
1172
|
|
|
1187
|
-
- `
|
|
1188
|
-
- `
|
|
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
|
-
##
|
|
1180
|
+
## WizardStore
|
|
1195
1181
|
|
|
1196
|
-
The
|
|
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>
|
|
@@ -6,47 +6,7 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"category": {
|
|
9
|
-
"type": "string"
|
|
10
|
-
"enum": [
|
|
11
|
-
"web-framework",
|
|
12
|
-
"web-styling",
|
|
13
|
-
"web-client-state",
|
|
14
|
-
"web-server-state",
|
|
15
|
-
"web-forms",
|
|
16
|
-
"web-testing",
|
|
17
|
-
"web-ui-components",
|
|
18
|
-
"web-mocking",
|
|
19
|
-
"web-error-handling",
|
|
20
|
-
"web-i18n",
|
|
21
|
-
"web-file-upload",
|
|
22
|
-
"web-files",
|
|
23
|
-
"web-utilities",
|
|
24
|
-
"web-realtime",
|
|
25
|
-
"web-animation",
|
|
26
|
-
"web-pwa",
|
|
27
|
-
"web-accessibility",
|
|
28
|
-
"web-performance",
|
|
29
|
-
"web-base-framework",
|
|
30
|
-
"api-api",
|
|
31
|
-
"api-database",
|
|
32
|
-
"api-auth",
|
|
33
|
-
"api-observability",
|
|
34
|
-
"api-analytics",
|
|
35
|
-
"api-email",
|
|
36
|
-
"api-performance",
|
|
37
|
-
"mobile-framework",
|
|
38
|
-
"mobile-platform",
|
|
39
|
-
"shared-monorepo",
|
|
40
|
-
"shared-tooling",
|
|
41
|
-
"shared-security",
|
|
42
|
-
"shared-methodology",
|
|
43
|
-
"shared-research",
|
|
44
|
-
"shared-reviewing",
|
|
45
|
-
"shared-ci-cd",
|
|
46
|
-
"cli-framework",
|
|
47
|
-
"cli-prompts",
|
|
48
|
-
"cli-testing"
|
|
49
|
-
]
|
|
9
|
+
"type": "string"
|
|
50
10
|
},
|
|
51
11
|
"categoryExclusive": {
|
|
52
12
|
"type": "boolean"
|
|
@@ -141,6 +101,12 @@
|
|
|
141
101
|
},
|
|
142
102
|
"required": ["skillId", "contentHash", "date"],
|
|
143
103
|
"additionalProperties": false
|
|
104
|
+
},
|
|
105
|
+
"domain": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"custom": {
|
|
109
|
+
"type": "boolean"
|
|
144
110
|
}
|
|
145
111
|
},
|
|
146
112
|
"required": ["category", "author", "cliName", "cliDescription", "usageGuidance"],
|
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
"enum": ["web", "api", "cli", "mobile", "shared"]
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
+
"selectedAgents": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
48
54
|
"stack": {
|
|
49
55
|
"type": "object",
|
|
50
56
|
"propertyNames": {
|
|
@@ -107,8 +113,7 @@
|
|
|
107
113
|
"type": "object",
|
|
108
114
|
"properties": {
|
|
109
115
|
"id": {
|
|
110
|
-
"type": "string"
|
|
111
|
-
"pattern": "^(web|api|cli|mobile|infra|meta|security)-.+-.+$"
|
|
116
|
+
"type": "string"
|
|
112
117
|
},
|
|
113
118
|
"preloaded": {
|
|
114
119
|
"type": "boolean"
|
|
@@ -137,8 +142,7 @@
|
|
|
137
142
|
"type": "object",
|
|
138
143
|
"properties": {
|
|
139
144
|
"id": {
|
|
140
|
-
"type": "string"
|
|
141
|
-
"pattern": "^(web|api|cli|mobile|infra|meta|security)-.+-.+$"
|
|
145
|
+
"type": "string"
|
|
142
146
|
},
|
|
143
147
|
"preloaded": {
|
|
144
148
|
"type": "boolean"
|