@su-record/vibe 2.16.4 → 3.0.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 (267) hide show
  1. package/CLAUDE.md +8 -8
  2. package/README.en.md +46 -29
  3. package/README.md +41 -24
  4. package/agents/acceptance-tester.md +56 -0
  5. package/agents/architect.md +25 -67
  6. package/agents/build-error-resolver.md +28 -97
  7. package/agents/code-reviewer.md +89 -0
  8. package/agents/diagrammer.md +34 -169
  9. package/agents/documenter.md +43 -0
  10. package/agents/e2e-tester.md +46 -281
  11. package/agents/event/event-ops.md +54 -77
  12. package/agents/event/event-planner.md +63 -0
  13. package/agents/figma/figma-engineer.md +76 -0
  14. package/agents/implementer.md +26 -41
  15. package/agents/security-reviewer.md +56 -0
  16. package/agents/tester.md +37 -33
  17. package/agents/ui/design-reviewer.md +62 -0
  18. package/agents/ui/design-system-gen.md +63 -0
  19. package/dist/cli/commands/remove.d.ts.map +1 -1
  20. package/dist/cli/commands/remove.js +8 -10
  21. package/dist/cli/commands/remove.js.map +1 -1
  22. package/dist/cli/index.d.ts +0 -4
  23. package/dist/cli/index.d.ts.map +1 -1
  24. package/dist/cli/index.js +0 -4
  25. package/dist/cli/index.js.map +1 -1
  26. package/dist/cli/llm/model-refresh.js +1 -1
  27. package/dist/cli/llm/model-refresh.js.map +1 -1
  28. package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
  29. package/dist/cli/postinstall/claude-agents.js +16 -77
  30. package/dist/cli/postinstall/claude-agents.js.map +1 -1
  31. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  32. package/dist/cli/postinstall/constants.js +80 -296
  33. package/dist/cli/postinstall/constants.js.map +1 -1
  34. package/dist/cli/postinstall/cursor-agents.d.ts +5 -0
  35. package/dist/cli/postinstall/cursor-agents.d.ts.map +1 -1
  36. package/dist/cli/postinstall/cursor-agents.js +26 -68
  37. package/dist/cli/postinstall/cursor-agents.js.map +1 -1
  38. package/dist/cli/postinstall/cursor-skills.d.ts.map +1 -1
  39. package/dist/cli/postinstall/cursor-skills.js +26 -30
  40. package/dist/cli/postinstall/cursor-skills.js.map +1 -1
  41. package/dist/cli/postinstall/main.d.ts.map +1 -1
  42. package/dist/cli/postinstall/main.js +0 -2
  43. package/dist/cli/postinstall/main.js.map +1 -1
  44. package/dist/cli/setup/Provisioner.d.ts.map +1 -1
  45. package/dist/cli/setup/Provisioner.js +19 -21
  46. package/dist/cli/setup/Provisioner.js.map +1 -1
  47. package/dist/cli/utils.d.ts +4 -1
  48. package/dist/cli/utils.d.ts.map +1 -1
  49. package/dist/cli/utils.js +4 -1
  50. package/dist/cli/utils.js.map +1 -1
  51. package/dist/infra/lib/FrameworkDetector.js +4 -4
  52. package/dist/infra/lib/FrameworkDetector.js.map +1 -1
  53. package/dist/infra/lib/OrchestrateWorkflow.js +2 -2
  54. package/dist/infra/lib/OrchestrateWorkflow.js.map +1 -1
  55. package/dist/infra/lib/browser/launch.js +1 -1
  56. package/dist/infra/lib/browser/launch.js.map +1 -1
  57. package/dist/infra/lib/browser/types.d.ts +1 -1
  58. package/dist/infra/lib/browser/types.js +1 -1
  59. package/dist/infra/lib/constants.d.ts +1 -1
  60. package/dist/infra/lib/constants.d.ts.map +1 -1
  61. package/dist/infra/lib/constants.js +4 -5
  62. package/dist/infra/lib/constants.js.map +1 -1
  63. package/dist/infra/lib/evolution/__tests__/integration.test.js +7 -7
  64. package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
  65. package/dist/infra/lib/memory/index.d.ts +0 -2
  66. package/dist/infra/lib/memory/index.d.ts.map +1 -1
  67. package/dist/infra/lib/memory/index.js +0 -2
  68. package/dist/infra/lib/memory/index.js.map +1 -1
  69. package/dist/infra/lib/telemetry/SkillTelemetry.test.js +1 -1
  70. package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +1 -1
  71. package/dist/tools/index.d.ts +0 -4
  72. package/dist/tools/index.d.ts.map +1 -1
  73. package/dist/tools/index.js +0 -4
  74. package/dist/tools/index.js.map +1 -1
  75. package/dist/tools/memory/autoSaveContext.d.ts +0 -1
  76. package/dist/tools/memory/autoSaveContext.d.ts.map +1 -1
  77. package/dist/tools/memory/autoSaveContext.js +13 -27
  78. package/dist/tools/memory/autoSaveContext.js.map +1 -1
  79. package/hooks/scripts/__tests__/code-check-detectors.test.js +2 -2
  80. package/hooks/scripts/__tests__/run-ledger.test.js +1 -1
  81. package/hooks/scripts/__tests__/scope-from-spec.test.js +12 -12
  82. package/hooks/scripts/__tests__/step-counter.test.js +1 -1
  83. package/hooks/scripts/code-check.js +16 -203
  84. package/hooks/scripts/context-save.js +0 -11
  85. package/hooks/scripts/lib/scope-from-spec.js +9 -6
  86. package/hooks/scripts/post-edit-dispatcher.js +1 -1
  87. package/hooks/scripts/prompt-dispatcher.js +7 -18
  88. package/hooks/scripts/session-start.js +25 -35
  89. package/package.json +2 -4
  90. package/skills/agents-md/SKILL.md +62 -15
  91. package/skills/arch-guard/SKILL.md +1 -1
  92. package/skills/brand-assets/SKILL.md +2 -2
  93. package/skills/capability-loop/SKILL.md +1 -1
  94. package/skills/chub-usage/SKILL.md +1 -1
  95. package/skills/commerce-patterns/SKILL.md +2 -2
  96. package/skills/commit-push-pr/SKILL.md +0 -1
  97. package/skills/context7-usage/SKILL.md +1 -1
  98. package/skills/design-refine/SKILL.md +140 -0
  99. package/skills/{design-polish → design-refine}/templates/polish-report.md +1 -1
  100. package/skills/{design-normalize → design-refine}/templates/token-audit.md +3 -3
  101. package/skills/design-review/SKILL.md +143 -0
  102. package/skills/{design-audit → design-review}/agents/a11y-auditor.md +1 -1
  103. package/skills/{design-audit → design-review}/agents/performance-auditor.md +1 -1
  104. package/skills/{design-audit → design-review}/agents/responsive-auditor.md +1 -1
  105. package/skills/{design-audit → design-review}/agents/slop-detector.md +1 -1
  106. package/skills/{design-audit → design-review}/frameworks/core-web-vitals.md +1 -1
  107. package/skills/{design-audit → design-review}/frameworks/wcag-checklist.md +1 -1
  108. package/skills/{design-audit → design-review}/orchestrator.md +3 -3
  109. package/skills/{design-critique → design-review}/templates/critique-report.md +3 -3
  110. package/skills/{design-audit → design-review}/templates/report.md +3 -3
  111. package/skills/design-teach/SKILL.md +11 -11
  112. package/skills/docs/SKILL.md +14 -16
  113. package/skills/e2e-commerce/SKILL.md +1 -1
  114. package/skills/event-comms/SKILL.md +1 -1
  115. package/skills/event-ops/SKILL.md +2 -2
  116. package/skills/event-planning/SKILL.md +1 -1
  117. package/skills/exec-plan/SKILL.md +2 -2
  118. package/skills/figma/SKILL.md +240 -148
  119. package/skills/figma/rubrics/css-mapping.md +125 -0
  120. package/skills/git-worktree/SKILL.md +1 -1
  121. package/skills/handoff/SKILL.md +1 -1
  122. package/skills/parallel-research/SKILL.md +14 -28
  123. package/skills/priority-todos/SKILL.md +1 -1
  124. package/skills/regress/SKILL.md +11 -0
  125. package/skills/restraint/SKILL.md +72 -0
  126. package/skills/seo-checklist/SKILL.md +2 -2
  127. package/skills/spec/SKILL.md +65 -836
  128. package/skills/test/SKILL.md +3 -3
  129. package/skills/tool-fallback/SKILL.md +2 -2
  130. package/skills/vercel-react-best-practices/SKILL.md +1 -1
  131. package/skills/vibe/SKILL.md +20 -35
  132. package/skills/vibe.analyze/SKILL.md +7 -9
  133. package/skills/vibe.docs/SKILL.md +1 -1
  134. package/skills/vibe.event/SKILL.md +27 -27
  135. package/skills/vibe.figma/SKILL.md +14 -18
  136. package/skills/vibe.harness/SKILL.md +5 -5
  137. package/skills/vibe.reason/SKILL.md +0 -2
  138. package/skills/vibe.review/SKILL.md +45 -49
  139. package/skills/vibe.run/SKILL.md +2 -5
  140. package/skills/vibe.run/references/parallel-agents.md +33 -98
  141. package/skills/vibe.spec/SKILL.md +38 -535
  142. package/skills/vibe.utils/SKILL.md +3 -3
  143. package/skills/vibe.verify/SKILL.md +70 -542
  144. package/skills/video-production/SKILL.md +1 -1
  145. package/vibe/rules/orchestrator-contract.md +5 -4
  146. package/vibe/rules/quality/performance.md +1 -1
  147. package/vibe/templates/claudemd-template.md +1 -1
  148. package/vibe/templates/spec-template.md +35 -185
  149. package/agents/architect-low.md +0 -41
  150. package/agents/architect-medium.md +0 -59
  151. package/agents/compounder.md +0 -265
  152. package/agents/docs/api-documenter.md +0 -99
  153. package/agents/docs/changelog-writer.md +0 -93
  154. package/agents/event/event-comms.md +0 -78
  155. package/agents/event/event-content.md +0 -68
  156. package/agents/event/event-image.md +0 -95
  157. package/agents/event/event-scheduler.md +0 -69
  158. package/agents/event/event-speaker.md +0 -86
  159. package/agents/explorer-low.md +0 -42
  160. package/agents/explorer-medium.md +0 -59
  161. package/agents/explorer.md +0 -48
  162. package/agents/figma/figma-analyst.md +0 -56
  163. package/agents/figma/figma-architect.md +0 -116
  164. package/agents/figma/figma-auditor.md +0 -86
  165. package/agents/figma/figma-builder.md +0 -104
  166. package/agents/implementer-low.md +0 -43
  167. package/agents/implementer-medium.md +0 -52
  168. package/agents/junior-mentor.md +0 -141
  169. package/agents/planning/requirements-analyst.md +0 -84
  170. package/agents/planning/ux-advisor.md +0 -83
  171. package/agents/qa/acceptance-tester.md +0 -86
  172. package/agents/qa/edge-case-finder.md +0 -93
  173. package/agents/qa/qa-coordinator.md +0 -131
  174. package/agents/refactor-cleaner.md +0 -143
  175. package/agents/research/best-practices.md +0 -199
  176. package/agents/research/codebase-patterns.md +0 -157
  177. package/agents/research/framework-docs.md +0 -188
  178. package/agents/research/security-advisory.md +0 -213
  179. package/agents/review/architecture-reviewer.md +0 -107
  180. package/agents/review/complexity-reviewer.md +0 -116
  181. package/agents/review/data-integrity-reviewer.md +0 -88
  182. package/agents/review/git-history-reviewer.md +0 -103
  183. package/agents/review/performance-reviewer.md +0 -86
  184. package/agents/review/python-reviewer.md +0 -150
  185. package/agents/review/rails-reviewer.md +0 -139
  186. package/agents/review/react-reviewer.md +0 -144
  187. package/agents/review/security-reviewer.md +0 -80
  188. package/agents/review/simplicity-reviewer.md +0 -140
  189. package/agents/review/test-coverage-reviewer.md +0 -116
  190. package/agents/review/typescript-reviewer.md +0 -127
  191. package/agents/searcher.md +0 -54
  192. package/agents/simplifier.md +0 -124
  193. package/agents/teams/debug-team.md +0 -74
  194. package/agents/teams/dev-team.md +0 -92
  195. package/agents/teams/docs-team.md +0 -84
  196. package/agents/teams/figma-team.md +0 -89
  197. package/agents/teams/fullstack-team.md +0 -87
  198. package/agents/teams/lite-team.md +0 -73
  199. package/agents/teams/migration-team.md +0 -82
  200. package/agents/teams/refactor-team.md +0 -98
  201. package/agents/teams/research-team.md +0 -90
  202. package/agents/teams/review-debate-team.md +0 -129
  203. package/agents/teams/security-team.md +0 -85
  204. package/agents/ui/ui-a11y-auditor.md +0 -93
  205. package/agents/ui/ui-antipattern-detector.md +0 -102
  206. package/agents/ui/ui-dataviz-advisor.md +0 -69
  207. package/agents/ui/ui-design-system-gen.md +0 -57
  208. package/agents/ui/ui-industry-analyzer.md +0 -49
  209. package/agents/ui/ui-layout-architect.md +0 -65
  210. package/agents/ui/ui-stack-implementer.md +0 -68
  211. package/agents/ui/ux-compliance-reviewer.md +0 -81
  212. package/agents/ui-previewer.md +0 -262
  213. package/hooks/scripts/__tests__/keyword-detector.test.js +0 -242
  214. package/hooks/scripts/keyword-detector.js +0 -226
  215. package/skills/characterization-test/SKILL.md +0 -209
  216. package/skills/characterization-test/agents/behavior-capturer.md +0 -50
  217. package/skills/characterization-test/agents/coverage-checker.md +0 -54
  218. package/skills/characterization-test/agents/reporter.md +0 -50
  219. package/skills/characterization-test/agents/test-writer.md +0 -49
  220. package/skills/characterization-test/rubrics/coverage-criteria.md +0 -53
  221. package/skills/characterization-test/templates/test-template.ts +0 -101
  222. package/skills/claude-md-guide/SKILL.md +0 -353
  223. package/skills/claude-md-guide/rubrics/anti-patterns.md +0 -88
  224. package/skills/design-audit/SKILL.md +0 -154
  225. package/skills/design-critique/SKILL.md +0 -140
  226. package/skills/design-distill/SKILL.md +0 -131
  227. package/skills/design-normalize/SKILL.md +0 -135
  228. package/skills/design-polish/SKILL.md +0 -132
  229. package/skills/figma-convert/SKILL.md +0 -236
  230. package/skills/figma-extract/SKILL.md +0 -242
  231. package/skills/interview/SKILL.md +0 -358
  232. package/skills/interview/checklists/api.md +0 -101
  233. package/skills/interview/checklists/feature.md +0 -88
  234. package/skills/interview/checklists/library.md +0 -95
  235. package/skills/interview/checklists/mobile.md +0 -89
  236. package/skills/interview/checklists/webapp.md +0 -97
  237. package/skills/interview/checklists/website.md +0 -99
  238. package/skills/plan/SKILL.md +0 -254
  239. package/skills/rob-pike/SKILL.md +0 -66
  240. package/skills/spec/references/askuser-examples.md +0 -57
  241. package/skills/spec/references/example-session.md +0 -87
  242. package/skills/spec/references/templates.md +0 -194
  243. package/skills/spec-review/SKILL.md +0 -725
  244. package/skills/systematic-debugging/SKILL.md +0 -142
  245. package/skills/techdebt/SKILL.md +0 -126
  246. package/skills/techdebt/agents/analyzer.md +0 -50
  247. package/skills/techdebt/agents/fixer.md +0 -41
  248. package/skills/techdebt/agents/reviewer.md +0 -47
  249. package/skills/techdebt/agents/scanner.md +0 -44
  250. package/skills/techdebt/orchestrator.md +0 -72
  251. package/skills/techdebt/rubrics/severity.md +0 -51
  252. package/skills/techdebt/scripts/scan.js +0 -90
  253. package/skills/techdebt/templates/report.md +0 -86
  254. package/skills/typescript-advanced-types/SKILL.md +0 -68
  255. package/skills/typescript-advanced-types/rubrics/type-patterns.md +0 -109
  256. package/skills/yagni-ladder/SKILL.md +0 -90
  257. /package/skills/{claude-md-guide → agents-md}/templates/claude-md.md +0 -0
  258. /package/skills/{design-polish → design-refine}/rubrics/polish-checklist.md +0 -0
  259. /package/skills/{design-normalize → design-refine}/rubrics/token-naming.md +0 -0
  260. /package/skills/{design-distill → design-refine}/templates/design-system.md +0 -0
  261. /package/skills/{design-audit → design-review}/agents/scorer.md +0 -0
  262. /package/skills/{design-audit → design-review}/rubrics/ai-slop-patterns.md +0 -0
  263. /package/skills/{design-audit → design-review}/rubrics/scoring.md +0 -0
  264. /package/skills/{design-critique → design-review}/rubrics/ux-heuristics.md +0 -0
  265. /package/skills/{figma-convert → figma}/rubrics/conversion-rules.md +0 -0
  266. /package/skills/{figma-extract → figma}/rubrics/image-rules.md +0 -0
  267. /package/skills/{figma-convert → figma}/templates/component.md +0 -0
@@ -1,262 +0,0 @@
1
- ---
2
- description: Preview UI with Gemini image or ASCII art fallback
3
- argument-hint: "UI description or design folder path"
4
- ---
5
-
6
- # /vibe.ui
7
-
8
- Preview UI from description or design guide folder.
9
-
10
- - **Gemini enabled**: Generate actual UI image
11
- - **Gemini disabled**: ASCII art fallback
12
-
13
- ## Model
14
-
15
- **Sonnet** — Balanced reasoning and quality
16
-
17
- ## Usage
18
-
19
- ```
20
- /vibe.ui "login page" # Text description
21
- /vibe.ui "dashboard" --layout grid # With layout option
22
- /vibe.ui ./design/ # Design guide folder
23
- /vibe.ui ./mockups/login.html # Single HTML file
24
- ```
25
-
26
- ## Process
27
-
28
- ### 0. Detect Input Type
29
-
30
- First, determine if input is:
31
-
32
- - **Text description**: Generate UI from description
33
- - **Folder path**: Read design files and generate UI
34
- - **File path**: Read single file and generate UI
35
-
36
- **Detection logic:**
37
-
38
- ```
39
- if (input starts with "./" or "/" or contains "/" or "\") → path
40
- else → text description
41
- ```
42
-
43
- ### 1. If Folder/File Path: Read Design Files
44
-
45
- **Supported file formats:**
46
-
47
- | Format | Purpose | How to read |
48
- | ------ | ------- | ----------- |
49
- | `*.html` | HTML mockups/prototypes | Read and parse structure |
50
- | `*.md` | Design guide documents | Read content |
51
- | `*.json` | Design tokens, theme config | Parse JSON |
52
- | `*.css` / `*.scss` | Style variables, colors | Extract variables |
53
- | `*.png` / `*.jpg` / `*.webp` | UI screenshots, mockups | **Use Read tool** (multimodal) |
54
- | `*.svg` | Icons, vector graphics | Read as XML |
55
- | `*.figma.json` | Figma export | Parse components |
56
-
57
- **Reading images:**
58
-
59
- Claude can read images using the Read tool. When encountering image files:
60
-
61
- 1. Use Read tool to view the image
62
- 2. Analyze UI structure, colors, layout from the image
63
- 3. Extract component hierarchy
64
-
65
- **Folder scanning priority:**
66
-
67
- 1. `*.html` files first (main structure)
68
- 2. `*.png` / `*.jpg` images (visual reference)
69
- 3. `*.json` (design tokens)
70
- 4. `*.css` / `*.scss` (styles)
71
- 5. `*.md` (documentation)
72
-
73
- **Example folder structure:**
74
-
75
- ```
76
- design/
77
- ├── mockup.html # Main HTML mockup
78
- ├── screenshot.png # UI screenshot
79
- ├── tokens.json # Design tokens
80
- ├── variables.css # CSS variables
81
- └── style-guide.md # Documentation
82
- ```
83
-
84
- ### 2. Analyze UI (from description or files)
85
-
86
- Analyze the UI structure:
87
-
88
- - Page/component name
89
- - Required UI elements (buttons, inputs, cards, etc.)
90
- - Layout structure (header-footer, sidebar, grid, etc.)
91
- - **Colors and typography** (from design tokens/CSS)
92
- - **Component hierarchy** (from HTML/images)
93
-
94
- ### 3. Check Gemini Status and Generate
95
-
96
- **Check Gemini authentication:**
97
-
98
- ```bash
99
- vibe gemini status
100
- ```
101
-
102
- #### If Gemini Enabled: Generate UI Image + Code
103
-
104
- ##### A. UI Mockup Image Generation
105
-
106
- ```bash
107
- node "[LLM_SCRIPT]" gemini image "Modern UI mockup: [UI Description from step 2]. Clean design, [colors/typography if available], mobile-first responsive layout" --output "./ui-preview.png"
108
- ```
109
-
110
- ##### B. UI Code Generation (from design files)
111
-
112
- When design files (image/HTML/folder) are provided, use Gemini to generate production-ready component code:
113
-
114
- ```bash
115
- node "[LLM_SCRIPT]" gemini orchestrate "You are a UI code generator. Analyze the provided design and generate production-ready React TypeScript components with Tailwind CSS. Output complete component code with proper types, responsive layout, and accessibility attributes."
116
- ```
117
-
118
- Pass the design context (file contents, extracted colors, layout structure from step 2) as the user prompt via stdin or arguments.
119
-
120
- **When to use each:**
121
-
122
- | Input | Image (Step A) | Code (Step B) |
123
- | ----- | -------------- | ------------- |
124
- | Text description | Generate mockup | Skip |
125
- | Image/HTML/Folder | Generate mockup | Generate component code |
126
-
127
- #### If Gemini Disabled: ASCII Art Fallback
128
-
129
- Generate ASCII art based on the UI description:
130
-
131
- **Input format:**
132
-
133
- - Page name
134
- - Layout type (centered, sidebar, grid, header-footer)
135
- - Components list (type, label, position)
136
-
137
- **Example ASCII output:**
138
-
139
- ```
140
- ┌─────────────────────────────────────────┐
141
- │ Welcome │
142
- ├─────────────────────────────────────────┤
143
- │ │
144
- │ ┌─────────────────────┐ │
145
- │ Email: │ │ │
146
- │ └─────────────────────┘ │
147
- │ │
148
- │ ┌─────────────────────┐ │
149
- │ Pass: │ │ │
150
- │ └─────────────────────┘ │
151
- │ │
152
- │ ┌─────────────────────┐ │
153
- │ │ Login │ │
154
- │ └─────────────────────┘ │
155
- │ │
156
- └─────────────────────────────────────────┘
157
- ```
158
-
159
- ### 4. Generate Component List
160
-
161
- Suggest list of components needed for UI:
162
-
163
- **Required Components:**
164
-
165
- - `Header.tsx` - Header ("Welcome")
166
- - `LoginForm.tsx` - Form container
167
- - `Input.tsx` - Reusable input field
168
- - `Button.tsx` - Login button
169
-
170
- **Expected File Structure:**
171
-
172
- ```
173
- src/
174
- ├── components/
175
- │ ├── common/
176
- │ │ ├── Input.tsx
177
- │ │ └── Button.tsx
178
- │ └── auth/
179
- │ ├── Header.tsx
180
- │ └── LoginForm.tsx
181
- └── pages/
182
- └── LoginPage.tsx
183
- ```
184
-
185
- ## Example (with Gemini)
186
-
187
- ```
188
- User: /vibe.ui ./design/dashboard/
189
-
190
- Claude: Reading design folder...
191
- - Found: mockup.png, tokens.json, style-guide.md
192
-
193
- Analyzing design files...
194
- - Layout: Sidebar + Main content
195
- - Colors: Primary #2F6BFF, Background #F5F5F5
196
- - Components: Header, Sidebar, 3 StatCards, Footer
197
-
198
- Generating UI mockup with Gemini...
199
-
200
- ✅ UI Preview generated: ./ui-preview-1706234567.png
201
-
202
- [Image displayed]
203
-
204
- **Component Breakdown:**
205
- 1. Header (logo, user menu)
206
- 2. Sidebar (navigation)
207
- 3. StatsCard (reusable card)
208
- 4. Footer (copyright, links)
209
- 5. DashboardLayout (overall layout)
210
-
211
- Next step: /vibe.spec "dashboard page"
212
- ```
213
-
214
- ## Example (ASCII Fallback)
215
-
216
- ```
217
- User: /vibe.ui "Dashboard page - header, sidebar, main content (3 cards), footer"
218
-
219
- Claude: Gemini not configured. Using ASCII preview...
220
-
221
- ┌────────────────────────────────────────────────────────┐
222
- │ [Logo] Dashboard [User] [Logout] │
223
- ├────────┬───────────────────────────────────────────────┤
224
- │ │ │
225
- │ Home │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
226
- │ Stats │ │ Card 1 │ │ Card 2 │ │ Card 3 │ │
227
- │ Users │ │ │ │ │ │ │ │
228
- │ Settings│ │ 100 │ │ 200 │ │ 50 │ │
229
- │ │ └──────────┘ └──────────┘ └──────────┘ │
230
- │ │ │
231
- │ │ │
232
- ├────────┴───────────────────────────────────────────────┤
233
- │ © 2025 Company Privacy | Terms │
234
- └────────────────────────────────────────────────────────┘
235
-
236
- **Required Components:**
237
- 1. Header (logo, user menu)
238
- 2. Sidebar (navigation)
239
- 3. StatsCard (reusable card)
240
- 4. Footer (copyright, links)
241
- 5. DashboardLayout (overall layout)
242
-
243
- **Layout Structure:**
244
- - Layout: sidebar (fixed left)
245
- - Main: grid (3 columns)
246
- - Responsive: Changes to 1 column on mobile
247
-
248
- 💡 Tip: Run `vibe gemini key <key>` for actual UI image generation
249
-
250
- Next step: /vibe.spec "dashboard page"
251
- ```
252
-
253
- ## Notes
254
-
255
- - For complex UI, request in multiple parts
256
- - Layout options: `sidebar`, `header-footer`, `grid`, `centered`, `split`
257
- - Gemini generates high-quality mockups; ASCII is for quick visualization
258
- - Design folder input extracts colors, typography, and component structure automatically
259
-
260
- ---
261
-
262
- ARGUMENTS: $ARGUMENTS
@@ -1,242 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { execFileSync } from 'child_process';
3
- import path from 'path';
4
- import { fileURLToPath } from 'url';
5
-
6
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
- const SCRIPT = path.resolve(__dirname, '..', 'keyword-detector.js');
8
-
9
- /**
10
- * Run keyword-detector.js with given text as argv.
11
- * Returns { stdout, exitCode }.
12
- */
13
- function runDetector(text) {
14
- try {
15
- const stdout = execFileSync('node', [SCRIPT, text], {
16
- encoding: 'utf-8',
17
- timeout: 5000,
18
- });
19
- return { stdout: stdout.trim(), exitCode: 0 };
20
- } catch (err) {
21
- return { stdout: (err.stdout || '').trim(), exitCode: err.status };
22
- }
23
- }
24
-
25
- // ══════════════════════════════════════════════════
26
- // Individual keyword detection
27
- // ══════════════════════════════════════════════════
28
- describe('keyword-detector', () => {
29
- describe('ralph keyword', () => {
30
- it('should detect ralph keyword and emit deprecation hint', () => {
31
- const result = runDetector('implement the login feature ralph');
32
- expect(result.stdout).toContain('[vibe]');
33
- expect(result.stdout).toContain('deprecated');
34
- expect(result.stdout).toContain('persistence');
35
- });
36
-
37
- it('should detect ralph case-insensitively', () => {
38
- const result = runDetector('RALPH fix all the bugs');
39
- expect(result.stdout).toContain('[vibe]');
40
- expect(result.stdout).toContain('deprecated');
41
- });
42
- });
43
-
44
- describe('ultrawork keyword', () => {
45
- it('should detect ultrawork keyword and emit automationLevel banner', () => {
46
- const result = runDetector('ultrawork build the entire app');
47
- expect(result.stdout).toContain('[ULTRAWORK]');
48
- expect(result.stdout).toContain('parallel');
49
- });
50
-
51
- it('should detect ulw alias', () => {
52
- const result = runDetector('ulw refactor the codebase');
53
- expect(result.stdout).toContain('[ULTRAWORK]');
54
- });
55
-
56
- it('should detect Korean alias when word boundary matches', () => {
57
- // Note: \\b word boundary may not match Korean characters reliably
58
- // because \\b is designed for ASCII word boundaries.
59
- // This test documents the current behavior.
60
- const result = runDetector('울트라워크');
61
- // Korean chars lack ASCII word boundaries, so regex may not match
62
- // If it does match, great; if not, this documents the limitation
63
- expect(typeof result.stdout).toBe('string');
64
- });
65
- });
66
-
67
- describe('ralplan keyword', () => {
68
- it('should detect ralplan keyword', () => {
69
- const result = runDetector('ralplan design the architecture');
70
- expect(result.stdout).toContain('[RALPLAN MODE]');
71
- expect(result.stdout).toContain('persistence');
72
- expect(result.stdout).toContain('planning');
73
- });
74
- });
75
-
76
- // strict 키워드(일상어): 명령 끝 위치 또는 --flag 에서만 발동.
77
- // 일상 영어("please verify", "quick question")의 오탐을 막기 위함.
78
- describe('verify keyword (strict)', () => {
79
- it('should detect verify at command tail and emit deprecation hint', () => {
80
- const result = runDetector('make the implementation correct, verify');
81
- expect(result.stdout).toContain('[vibe]');
82
- expect(result.stdout).toContain('deprecated');
83
- expect(result.stdout).toContain('verification');
84
- });
85
-
86
- it('should detect --verify flag', () => {
87
- const result = runDetector('fix the bug --verify');
88
- expect(result.stdout).toContain('[vibe]');
89
- expect(result.stdout).toContain('deprecated');
90
- });
91
- });
92
-
93
- describe('quick keyword (strict)', () => {
94
- it('should detect quick at command tail and emit --max-iter 1 hint', () => {
95
- const result = runDetector('fix this typo quick');
96
- expect(result.stdout).toContain('[vibe]');
97
- expect(result.stdout).toContain('--max-iter 1');
98
- expect(result.stdout).toContain('fast');
99
- });
100
-
101
- it('should detect --quick flag', () => {
102
- const result = runDetector('build the payment API --quick');
103
- expect(result.stdout).toContain('[vibe]');
104
- expect(result.stdout).toContain('--max-iter 1');
105
- });
106
- });
107
-
108
- describe('explore keyword (strict)', () => {
109
- it('should detect --explore flag', () => {
110
- const result = runDetector('analyze the codebase --explore');
111
- expect(result.stdout).toContain('[EXPLORE MODE]');
112
- expect(result.stdout).toContain('exploration');
113
- });
114
- });
115
-
116
- describe('plan keyword (strict)', () => {
117
- it('should detect --plan flag', () => {
118
- const result = runDetector('the new feature --plan');
119
- expect(result.stdout).toContain('[PLAN MODE]');
120
- expect(result.stdout).toContain('planning');
121
- });
122
- });
123
-
124
- // ══════════════════════════════════════════════════
125
- // 오탐 방지 회귀 테스트 — 일상어가 명령 중간/시작에 올 때 발동 금지
126
- // ══════════════════════════════════════════════════
127
- describe('strict keyword false-positive guard', () => {
128
- it('should NOT trigger on "quick question on auth"', () => {
129
- expect(runDetector('quick question on auth').stdout).toBe('');
130
- });
131
-
132
- it('should NOT trigger on "please verify the fix works"', () => {
133
- expect(runDetector('please verify the fix works').stdout).toBe('');
134
- });
135
-
136
- it('should NOT trigger on "I plan to refactor later"', () => {
137
- expect(runDetector('I plan to refactor later').stdout).toBe('');
138
- });
139
-
140
- it('should NOT trigger on "let me explore the options first"', () => {
141
- expect(runDetector('let me explore the options first').stdout).toBe('');
142
- });
143
- });
144
-
145
- // ══════════════════════════════════════════════════
146
- // Keyword combinations / synergies
147
- // ══════════════════════════════════════════════════
148
- describe('keyword combinations', () => {
149
- it('should detect ralph+ultrawork synergy and emit deprecation hint', () => {
150
- const result = runDetector('ralph ultrawork build everything from scratch');
151
- expect(result.stdout).toContain('[vibe]');
152
- expect(result.stdout).toContain('deprecated');
153
- expect(result.stdout).toContain('persistence');
154
- expect(result.stdout).toContain('parallel');
155
- });
156
-
157
- it('should detect ralph+verify synergy and emit deprecation hint', () => {
158
- // verify is strict → use --verify flag (ralph stays bare)
159
- const result = runDetector('ralph fix each step --verify');
160
- expect(result.stdout).toContain('[vibe]');
161
- expect(result.stdout).toContain('deprecated');
162
- });
163
-
164
- it('should output both keywords when no synergy key matches sorted order', () => {
165
- // KEYWORD_SYNERGIES defines 'ultrawork+explore' but processCombinations
166
- // sorts keywords alphabetically → tries 'explore+ultrawork' which has no match.
167
- // So individual outputs are emitted instead. explore is strict → --explore.
168
- const result = runDetector('ultrawork analyze the entire project --explore');
169
- expect(result.stdout).toContain('[ULTRAWORK]');
170
- expect(result.stdout).toContain('[EXPLORE MODE]');
171
- expect(result.stdout).toContain('[FLAGS]');
172
- });
173
- });
174
-
175
- // ══════════════════════════════════════════════════
176
- // No keywords
177
- // ══════════════════════════════════════════════════
178
- describe('no keywords detected', () => {
179
- it('should output nothing when no keywords present', () => {
180
- const result = runDetector('just a normal prompt with no magic words');
181
- expect(result.stdout).toBe('');
182
- });
183
-
184
- it('should not match partial words', () => {
185
- // "verify" inside "verifying" — depends on word boundary regex
186
- // The regex uses \b so "verifying" would NOT match "verify" as a whole word
187
- // Actually \bverify\b would match "verify" in "verifying"? No — "verifying" has
188
- // chars after "verify" that are word chars, so \bverify\b won't match.
189
- const result = runDetector('verifying the output looks good');
190
- expect(result.stdout).toBe('');
191
- });
192
-
193
- it('should not match keywords embedded in other words', () => {
194
- const result = runDetector('exploration of quickly planning');
195
- // "explore" should NOT match "exploration" (word boundary)
196
- // "quick" should NOT match "quickly"
197
- // "plan" should NOT match "planning"
198
- expect(result.stdout).toBe('');
199
- });
200
- });
201
-
202
- // ══════════════════════════════════════════════════
203
- // Empty input — shows help
204
- // ══════════════════════════════════════════════════
205
- describe('help output', () => {
206
- it('should show usage info with no input', () => {
207
- const result = runDetector('');
208
- // Empty string arg is still truthy, pass no args instead
209
- try {
210
- const stdout = execFileSync('node', [SCRIPT], {
211
- encoding: 'utf-8',
212
- timeout: 5000,
213
- });
214
- expect(stdout).toContain('Available magic keywords');
215
- expect(stdout).toContain('Keyword combinations');
216
- } catch (err) {
217
- // Should exit 0, but just in case
218
- expect(err.stdout || '').toContain('Available magic keywords');
219
- }
220
- });
221
- });
222
-
223
- // ══════════════════════════════════════════════════
224
- // Flags collection
225
- // ══════════════════════════════════════════════════
226
- describe('flags output', () => {
227
- it('should output collected flags for single keyword', () => {
228
- const result = runDetector('ralph do the thing');
229
- expect(result.stdout).toContain('[FLAGS]');
230
- expect(result.stdout).toContain('persistence');
231
- expect(result.stdout).toContain('verification');
232
- });
233
-
234
- it('should merge flags from multiple keywords', () => {
235
- // quick is strict → place at command tail; ralph stays bare
236
- const result = runDetector('ralph finish this quick');
237
- expect(result.stdout).toContain('[FLAGS]');
238
- expect(result.stdout).toContain('persistence');
239
- expect(result.stdout).toContain('fast');
240
- });
241
- });
242
- });