@su-record/vibe 2.16.3 → 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.
- package/.env.example +15 -0
- package/CLAUDE.md +8 -8
- package/README.en.md +46 -29
- package/README.md +41 -24
- package/agents/acceptance-tester.md +56 -0
- package/agents/architect.md +25 -67
- package/agents/build-error-resolver.md +28 -97
- package/agents/code-reviewer.md +89 -0
- package/agents/diagrammer.md +34 -165
- package/agents/documenter.md +43 -0
- package/agents/e2e-tester.md +46 -277
- package/agents/event/event-ops.md +54 -77
- package/agents/event/event-planner.md +63 -0
- package/agents/figma/figma-engineer.md +76 -0
- package/agents/implementer.md +26 -41
- package/agents/security-reviewer.md +56 -0
- package/agents/tester.md +37 -33
- package/agents/ui/design-reviewer.md +62 -0
- package/agents/ui/design-system-gen.md +63 -0
- package/dist/__tests__/agent-model-sync.test.d.ts +2 -0
- package/dist/__tests__/agent-model-sync.test.d.ts.map +1 -0
- package/dist/__tests__/agent-model-sync.test.js +71 -0
- package/dist/__tests__/agent-model-sync.test.js.map +1 -0
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +8 -1
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +2 -0
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/llm.d.ts +11 -0
- package/dist/cli/commands/llm.d.ts.map +1 -0
- package/dist/cli/commands/llm.js +62 -0
- package/dist/cli/commands/llm.js.map +1 -0
- package/dist/cli/commands/remove.d.ts.map +1 -1
- package/dist/cli/commands/remove.js +8 -10
- package/dist/cli/commands/remove.js.map +1 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +35 -1
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/index.d.ts +0 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +59 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/llm/config.d.ts.map +1 -1
- package/dist/cli/llm/config.js +7 -0
- package/dist/cli/llm/config.js.map +1 -1
- package/dist/cli/llm/index.d.ts +1 -0
- package/dist/cli/llm/index.d.ts.map +1 -1
- package/dist/cli/llm/index.js +1 -0
- package/dist/cli/llm/index.js.map +1 -1
- package/dist/cli/llm/model-refresh.d.ts +29 -0
- package/dist/cli/llm/model-refresh.d.ts.map +1 -0
- package/dist/cli/llm/model-refresh.js +139 -0
- package/dist/cli/llm/model-refresh.js.map +1 -0
- package/dist/cli/llm/zai-commands.d.ts +15 -0
- package/dist/cli/llm/zai-commands.d.ts.map +1 -0
- package/dist/cli/llm/zai-commands.js +64 -0
- package/dist/cli/llm/zai-commands.js.map +1 -0
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +16 -77
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +81 -296
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/cursor-agents.d.ts +5 -0
- package/dist/cli/postinstall/cursor-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/cursor-agents.js +26 -68
- package/dist/cli/postinstall/cursor-agents.js.map +1 -1
- package/dist/cli/postinstall/cursor-skills.d.ts.map +1 -1
- package/dist/cli/postinstall/cursor-skills.js +26 -30
- package/dist/cli/postinstall/cursor-skills.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +0 -2
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/setup/Provisioner.d.ts.map +1 -1
- package/dist/cli/setup/Provisioner.js +19 -21
- package/dist/cli/setup/Provisioner.js.map +1 -1
- package/dist/cli/types.d.ts +15 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/utils.d.ts +4 -1
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/cli/utils.js +4 -1
- package/dist/cli/utils.js.map +1 -1
- package/dist/infra/lib/FrameworkDetector.js +4 -4
- package/dist/infra/lib/FrameworkDetector.js.map +1 -1
- package/dist/infra/lib/OrchestrateWorkflow.js +2 -2
- package/dist/infra/lib/OrchestrateWorkflow.js.map +1 -1
- package/dist/infra/lib/browser/launch.js +1 -1
- package/dist/infra/lib/browser/launch.js.map +1 -1
- package/dist/infra/lib/browser/types.d.ts +1 -1
- package/dist/infra/lib/browser/types.js +1 -1
- package/dist/infra/lib/config/GlobalConfigManager.d.ts +2 -0
- package/dist/infra/lib/config/GlobalConfigManager.d.ts.map +1 -1
- package/dist/infra/lib/config/GlobalConfigManager.js +6 -0
- package/dist/infra/lib/config/GlobalConfigManager.js.map +1 -1
- package/dist/infra/lib/constants.d.ts +1 -1
- package/dist/infra/lib/constants.d.ts.map +1 -1
- package/dist/infra/lib/constants.js +4 -5
- package/dist/infra/lib/constants.js.map +1 -1
- package/dist/infra/lib/evolution/__tests__/integration.test.js +7 -7
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
- package/dist/infra/lib/llm-availability.d.ts +4 -0
- package/dist/infra/lib/llm-availability.d.ts.map +1 -1
- package/dist/infra/lib/llm-availability.js +9 -1
- package/dist/infra/lib/llm-availability.js.map +1 -1
- package/dist/infra/lib/memory/index.d.ts +0 -2
- package/dist/infra/lib/memory/index.d.ts.map +1 -1
- package/dist/infra/lib/memory/index.js +0 -2
- package/dist/infra/lib/memory/index.js.map +1 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js +1 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +1 -1
- package/dist/infra/lib/zai/client.d.ts +30 -0
- package/dist/infra/lib/zai/client.d.ts.map +1 -0
- package/dist/infra/lib/zai/client.js +124 -0
- package/dist/infra/lib/zai/client.js.map +1 -0
- package/dist/infra/lib/zai/index.d.ts +11 -0
- package/dist/infra/lib/zai/index.d.ts.map +1 -0
- package/dist/infra/lib/zai/index.js +10 -0
- package/dist/infra/lib/zai/index.js.map +1 -0
- package/dist/infra/lib/zai/orchestration.d.ts +15 -0
- package/dist/infra/lib/zai/orchestration.d.ts.map +1 -0
- package/dist/infra/lib/zai/orchestration.js +54 -0
- package/dist/infra/lib/zai/orchestration.js.map +1 -0
- package/dist/infra/lib/zai/types.d.ts +40 -0
- package/dist/infra/lib/zai/types.d.ts.map +1 -0
- package/dist/infra/lib/zai/types.js +5 -0
- package/dist/infra/lib/zai/types.js.map +1 -0
- package/dist/infra/orchestrator/SmartRouter.d.ts.map +1 -1
- package/dist/infra/orchestrator/SmartRouter.js +16 -34
- package/dist/infra/orchestrator/SmartRouter.js.map +1 -1
- package/dist/infra/orchestrator/index.d.ts +1 -0
- package/dist/infra/orchestrator/index.d.ts.map +1 -1
- package/dist/infra/orchestrator/index.js +11 -9
- package/dist/infra/orchestrator/index.js.map +1 -1
- package/dist/infra/orchestrator/types.d.ts +32 -9
- package/dist/infra/orchestrator/types.d.ts.map +1 -1
- package/dist/infra/orchestrator/types.js +68 -37
- package/dist/infra/orchestrator/types.js.map +1 -1
- package/dist/infra/orchestrator/types.test.d.ts +2 -0
- package/dist/infra/orchestrator/types.test.d.ts.map +1 -0
- package/dist/infra/orchestrator/types.test.js +57 -0
- package/dist/infra/orchestrator/types.test.js.map +1 -0
- package/dist/tools/index.d.ts +0 -4
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +0 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/memory/autoSaveContext.d.ts +0 -1
- package/dist/tools/memory/autoSaveContext.d.ts.map +1 -1
- package/dist/tools/memory/autoSaveContext.js +13 -27
- package/dist/tools/memory/autoSaveContext.js.map +1 -1
- package/hooks/scripts/__tests__/code-check-detectors.test.js +2 -2
- package/hooks/scripts/__tests__/run-ledger.test.js +1 -1
- package/hooks/scripts/__tests__/scope-from-spec.test.js +12 -12
- package/hooks/scripts/__tests__/step-counter.test.js +1 -1
- package/hooks/scripts/code-check.js +16 -203
- package/hooks/scripts/context-save.js +0 -11
- package/hooks/scripts/lib/scope-from-spec.js +9 -6
- package/hooks/scripts/llm-orchestrate.js +49 -0
- package/hooks/scripts/post-edit-dispatcher.js +1 -1
- package/hooks/scripts/prompt-dispatcher.js +7 -18
- package/hooks/scripts/session-start.js +25 -35
- package/package.json +4 -4
- package/skills/agents-md/SKILL.md +62 -15
- package/skills/arch-guard/SKILL.md +1 -1
- package/skills/brand-assets/SKILL.md +2 -2
- package/skills/capability-loop/SKILL.md +1 -1
- package/skills/chub-usage/SKILL.md +1 -1
- package/skills/commerce-patterns/SKILL.md +2 -2
- package/skills/commit-push-pr/SKILL.md +0 -1
- package/skills/context7-usage/SKILL.md +1 -1
- package/skills/create-prd/agents/edge-case-finder.md +4 -4
- package/skills/create-prd/agents/prioritizer.md +4 -4
- package/skills/create-prd/agents/requirements-writer.md +3 -3
- package/skills/create-prd/agents/researcher.md +3 -3
- package/skills/create-prd/agents/reviewer.md +3 -3
- package/skills/create-prd/orchestrator.md +2 -0
- package/skills/design-refine/SKILL.md +140 -0
- package/skills/{design-polish → design-refine}/templates/polish-report.md +1 -1
- package/skills/{design-normalize → design-refine}/templates/token-audit.md +3 -3
- package/skills/design-review/SKILL.md +143 -0
- package/skills/{design-audit → design-review}/agents/a11y-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/performance-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/responsive-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/slop-detector.md +1 -1
- package/skills/{design-audit → design-review}/frameworks/core-web-vitals.md +1 -1
- package/skills/{design-audit → design-review}/frameworks/wcag-checklist.md +1 -1
- package/skills/{design-audit → design-review}/orchestrator.md +5 -3
- package/skills/{design-critique → design-review}/templates/critique-report.md +3 -3
- package/skills/{design-audit → design-review}/templates/report.md +3 -3
- package/skills/design-teach/SKILL.md +11 -11
- package/skills/docs/SKILL.md +14 -16
- package/skills/e2e-commerce/SKILL.md +1 -1
- package/skills/event-comms/SKILL.md +1 -1
- package/skills/event-ops/SKILL.md +2 -2
- package/skills/event-planning/SKILL.md +1 -1
- package/skills/exec-plan/SKILL.md +2 -2
- package/skills/exec-plan/orchestrator.md +2 -0
- package/skills/figma/SKILL.md +240 -148
- package/skills/figma/rubrics/css-mapping.md +125 -0
- package/skills/git-worktree/SKILL.md +1 -1
- package/skills/handoff/SKILL.md +1 -1
- package/skills/parallel-research/SKILL.md +14 -28
- package/skills/parallel-research/orchestrator.md +2 -0
- package/skills/priority-todos/SKILL.md +1 -1
- package/skills/regress/SKILL.md +11 -0
- package/skills/restraint/SKILL.md +72 -0
- package/skills/seo-checklist/SKILL.md +2 -2
- package/skills/spec/SKILL.md +65 -836
- package/skills/test/SKILL.md +3 -3
- package/skills/tool-fallback/SKILL.md +2 -2
- package/skills/vercel-react-best-practices/SKILL.md +1 -1
- package/skills/vibe/SKILL.md +20 -35
- package/skills/vibe.analyze/SKILL.md +7 -9
- package/skills/vibe.docs/SKILL.md +1 -1
- package/skills/vibe.event/SKILL.md +27 -27
- package/skills/vibe.figma/SKILL.md +14 -18
- package/skills/vibe.harness/SKILL.md +5 -5
- package/skills/vibe.llm/SKILL.md +50 -0
- package/skills/vibe.reason/SKILL.md +0 -2
- package/skills/vibe.review/SKILL.md +45 -49
- package/skills/vibe.run/SKILL.md +2 -5
- package/skills/vibe.run/references/parallel-agents.md +33 -98
- package/skills/vibe.spec/SKILL.md +38 -535
- package/skills/vibe.utils/SKILL.md +3 -3
- package/skills/vibe.verify/SKILL.md +70 -542
- package/skills/video-production/SKILL.md +1 -1
- package/vibe/rules/orchestrator-contract.md +57 -0
- package/vibe/rules/quality/performance.md +1 -1
- package/vibe/templates/claudemd-template.md +1 -1
- package/vibe/templates/spec-template.md +35 -185
- package/agents/architect-low.md +0 -41
- package/agents/architect-medium.md +0 -59
- package/agents/compounder.md +0 -261
- package/agents/docs/api-documenter.md +0 -99
- package/agents/docs/changelog-writer.md +0 -93
- package/agents/event/event-comms.md +0 -78
- package/agents/event/event-content.md +0 -68
- package/agents/event/event-image.md +0 -95
- package/agents/event/event-scheduler.md +0 -69
- package/agents/event/event-speaker.md +0 -86
- package/agents/explorer-low.md +0 -42
- package/agents/explorer-medium.md +0 -59
- package/agents/explorer.md +0 -48
- package/agents/figma/figma-analyst.md +0 -52
- package/agents/figma/figma-architect.md +0 -112
- package/agents/figma/figma-auditor.md +0 -82
- package/agents/figma/figma-builder.md +0 -100
- package/agents/implementer-low.md +0 -43
- package/agents/implementer-medium.md +0 -52
- package/agents/junior-mentor.md +0 -141
- package/agents/planning/requirements-analyst.md +0 -84
- package/agents/planning/ux-advisor.md +0 -83
- package/agents/qa/acceptance-tester.md +0 -86
- package/agents/qa/edge-case-finder.md +0 -93
- package/agents/qa/qa-coordinator.md +0 -131
- package/agents/refactor-cleaner.md +0 -143
- package/agents/research/best-practices.md +0 -199
- package/agents/research/codebase-patterns.md +0 -157
- package/agents/research/framework-docs.md +0 -188
- package/agents/research/security-advisory.md +0 -213
- package/agents/review/architecture-reviewer.md +0 -107
- package/agents/review/complexity-reviewer.md +0 -116
- package/agents/review/data-integrity-reviewer.md +0 -88
- package/agents/review/git-history-reviewer.md +0 -103
- package/agents/review/performance-reviewer.md +0 -86
- package/agents/review/python-reviewer.md +0 -150
- package/agents/review/rails-reviewer.md +0 -139
- package/agents/review/react-reviewer.md +0 -144
- package/agents/review/security-reviewer.md +0 -80
- package/agents/review/simplicity-reviewer.md +0 -140
- package/agents/review/test-coverage-reviewer.md +0 -116
- package/agents/review/typescript-reviewer.md +0 -127
- package/agents/searcher.md +0 -54
- package/agents/simplifier.md +0 -120
- package/agents/teams/debug-team.md +0 -70
- package/agents/teams/dev-team.md +0 -88
- package/agents/teams/docs-team.md +0 -80
- package/agents/teams/figma-team.md +0 -85
- package/agents/teams/fullstack-team.md +0 -83
- package/agents/teams/lite-team.md +0 -69
- package/agents/teams/migration-team.md +0 -78
- package/agents/teams/refactor-team.md +0 -94
- package/agents/teams/research-team.md +0 -86
- package/agents/teams/review-debate-team.md +0 -125
- package/agents/teams/security-team.md +0 -81
- package/agents/ui/ui-a11y-auditor.md +0 -93
- package/agents/ui/ui-antipattern-detector.md +0 -102
- package/agents/ui/ui-dataviz-advisor.md +0 -69
- package/agents/ui/ui-design-system-gen.md +0 -57
- package/agents/ui/ui-industry-analyzer.md +0 -49
- package/agents/ui/ui-layout-architect.md +0 -65
- package/agents/ui/ui-stack-implementer.md +0 -68
- package/agents/ui/ux-compliance-reviewer.md +0 -81
- package/agents/ui-previewer.md +0 -258
- package/hooks/scripts/__tests__/keyword-detector.test.js +0 -242
- package/hooks/scripts/keyword-detector.js +0 -226
- package/skills/characterization-test/SKILL.md +0 -209
- package/skills/characterization-test/agents/behavior-capturer.md +0 -50
- package/skills/characterization-test/agents/coverage-checker.md +0 -54
- package/skills/characterization-test/agents/reporter.md +0 -50
- package/skills/characterization-test/agents/test-writer.md +0 -49
- package/skills/characterization-test/rubrics/coverage-criteria.md +0 -53
- package/skills/characterization-test/templates/test-template.ts +0 -101
- package/skills/claude-md-guide/SKILL.md +0 -353
- package/skills/claude-md-guide/rubrics/anti-patterns.md +0 -88
- package/skills/design-audit/SKILL.md +0 -154
- package/skills/design-critique/SKILL.md +0 -140
- package/skills/design-distill/SKILL.md +0 -131
- package/skills/design-normalize/SKILL.md +0 -135
- package/skills/design-polish/SKILL.md +0 -132
- package/skills/figma-convert/SKILL.md +0 -236
- package/skills/figma-extract/SKILL.md +0 -242
- package/skills/interview/SKILL.md +0 -358
- package/skills/interview/checklists/api.md +0 -101
- package/skills/interview/checklists/feature.md +0 -88
- package/skills/interview/checklists/library.md +0 -95
- package/skills/interview/checklists/mobile.md +0 -89
- package/skills/interview/checklists/webapp.md +0 -97
- package/skills/interview/checklists/website.md +0 -99
- package/skills/plan/SKILL.md +0 -254
- package/skills/rob-pike/SKILL.md +0 -66
- package/skills/spec/references/askuser-examples.md +0 -57
- package/skills/spec/references/example-session.md +0 -87
- package/skills/spec/references/templates.md +0 -194
- package/skills/spec-review/SKILL.md +0 -725
- package/skills/systematic-debugging/SKILL.md +0 -142
- package/skills/techdebt/SKILL.md +0 -126
- package/skills/techdebt/agents/analyzer.md +0 -50
- package/skills/techdebt/agents/fixer.md +0 -41
- package/skills/techdebt/agents/reviewer.md +0 -47
- package/skills/techdebt/agents/scanner.md +0 -44
- package/skills/techdebt/orchestrator.md +0 -70
- package/skills/techdebt/rubrics/severity.md +0 -51
- package/skills/techdebt/scripts/scan.js +0 -90
- package/skills/techdebt/templates/report.md +0 -86
- package/skills/typescript-advanced-types/SKILL.md +0 -68
- package/skills/typescript-advanced-types/rubrics/type-patterns.md +0 -109
- package/skills/yagni-ladder/SKILL.md +0 -90
- /package/skills/{claude-md-guide → agents-md}/templates/claude-md.md +0 -0
- /package/skills/{design-polish → design-refine}/rubrics/polish-checklist.md +0 -0
- /package/skills/{design-normalize → design-refine}/rubrics/token-naming.md +0 -0
- /package/skills/{design-distill → design-refine}/templates/design-system.md +0 -0
- /package/skills/{design-audit → design-review}/agents/scorer.md +0 -0
- /package/skills/{design-audit → design-review}/rubrics/ai-slop-patterns.md +0 -0
- /package/skills/{design-audit → design-review}/rubrics/scoring.md +0 -0
- /package/skills/{design-critique → design-review}/rubrics/ux-heuristics.md +0 -0
- /package/skills/{figma-convert → figma}/rubrics/conversion-rules.md +0 -0
- /package/skills/{figma-extract → figma}/rubrics/image-rules.md +0 -0
- /package/skills/{figma-convert → figma}/templates/component.md +0 -0
package/agents/ui-previewer.md
DELETED
|
@@ -1,258 +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
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
/vibe.ui "login page" # Text description
|
|
17
|
-
/vibe.ui "dashboard" --layout grid # With layout option
|
|
18
|
-
/vibe.ui ./design/ # Design guide folder
|
|
19
|
-
/vibe.ui ./mockups/login.html # Single HTML file
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Process
|
|
23
|
-
|
|
24
|
-
### 0. Detect Input Type
|
|
25
|
-
|
|
26
|
-
First, determine if input is:
|
|
27
|
-
|
|
28
|
-
- **Text description**: Generate UI from description
|
|
29
|
-
- **Folder path**: Read design files and generate UI
|
|
30
|
-
- **File path**: Read single file and generate UI
|
|
31
|
-
|
|
32
|
-
**Detection logic:**
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
if (input starts with "./" or "/" or contains "/" or "\") → path
|
|
36
|
-
else → text description
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### 1. If Folder/File Path: Read Design Files
|
|
40
|
-
|
|
41
|
-
**Supported file formats:**
|
|
42
|
-
|
|
43
|
-
| Format | Purpose | How to read |
|
|
44
|
-
| ------ | ------- | ----------- |
|
|
45
|
-
| `*.html` | HTML mockups/prototypes | Read and parse structure |
|
|
46
|
-
| `*.md` | Design guide documents | Read content |
|
|
47
|
-
| `*.json` | Design tokens, theme config | Parse JSON |
|
|
48
|
-
| `*.css` / `*.scss` | Style variables, colors | Extract variables |
|
|
49
|
-
| `*.png` / `*.jpg` / `*.webp` | UI screenshots, mockups | **Use Read tool** (multimodal) |
|
|
50
|
-
| `*.svg` | Icons, vector graphics | Read as XML |
|
|
51
|
-
| `*.figma.json` | Figma export | Parse components |
|
|
52
|
-
|
|
53
|
-
**Reading images:**
|
|
54
|
-
|
|
55
|
-
Claude can read images using the Read tool. When encountering image files:
|
|
56
|
-
|
|
57
|
-
1. Use Read tool to view the image
|
|
58
|
-
2. Analyze UI structure, colors, layout from the image
|
|
59
|
-
3. Extract component hierarchy
|
|
60
|
-
|
|
61
|
-
**Folder scanning priority:**
|
|
62
|
-
|
|
63
|
-
1. `*.html` files first (main structure)
|
|
64
|
-
2. `*.png` / `*.jpg` images (visual reference)
|
|
65
|
-
3. `*.json` (design tokens)
|
|
66
|
-
4. `*.css` / `*.scss` (styles)
|
|
67
|
-
5. `*.md` (documentation)
|
|
68
|
-
|
|
69
|
-
**Example folder structure:**
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
design/
|
|
73
|
-
├── mockup.html # Main HTML mockup
|
|
74
|
-
├── screenshot.png # UI screenshot
|
|
75
|
-
├── tokens.json # Design tokens
|
|
76
|
-
├── variables.css # CSS variables
|
|
77
|
-
└── style-guide.md # Documentation
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### 2. Analyze UI (from description or files)
|
|
81
|
-
|
|
82
|
-
Analyze the UI structure:
|
|
83
|
-
|
|
84
|
-
- Page/component name
|
|
85
|
-
- Required UI elements (buttons, inputs, cards, etc.)
|
|
86
|
-
- Layout structure (header-footer, sidebar, grid, etc.)
|
|
87
|
-
- **Colors and typography** (from design tokens/CSS)
|
|
88
|
-
- **Component hierarchy** (from HTML/images)
|
|
89
|
-
|
|
90
|
-
### 3. Check Gemini Status and Generate
|
|
91
|
-
|
|
92
|
-
**Check Gemini authentication:**
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
vibe gemini status
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
#### If Gemini Enabled: Generate UI Image + Code
|
|
99
|
-
|
|
100
|
-
##### A. UI Mockup Image Generation
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
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"
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
##### B. UI Code Generation (from design files)
|
|
107
|
-
|
|
108
|
-
When design files (image/HTML/folder) are provided, use Gemini to generate production-ready component code:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
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."
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Pass the design context (file contents, extracted colors, layout structure from step 2) as the user prompt via stdin or arguments.
|
|
115
|
-
|
|
116
|
-
**When to use each:**
|
|
117
|
-
|
|
118
|
-
| Input | Image (Step A) | Code (Step B) |
|
|
119
|
-
| ----- | -------------- | ------------- |
|
|
120
|
-
| Text description | Generate mockup | Skip |
|
|
121
|
-
| Image/HTML/Folder | Generate mockup | Generate component code |
|
|
122
|
-
|
|
123
|
-
#### If Gemini Disabled: ASCII Art Fallback
|
|
124
|
-
|
|
125
|
-
Generate ASCII art based on the UI description:
|
|
126
|
-
|
|
127
|
-
**Input format:**
|
|
128
|
-
|
|
129
|
-
- Page name
|
|
130
|
-
- Layout type (centered, sidebar, grid, header-footer)
|
|
131
|
-
- Components list (type, label, position)
|
|
132
|
-
|
|
133
|
-
**Example ASCII output:**
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
┌─────────────────────────────────────────┐
|
|
137
|
-
│ Welcome │
|
|
138
|
-
├─────────────────────────────────────────┤
|
|
139
|
-
│ │
|
|
140
|
-
│ ┌─────────────────────┐ │
|
|
141
|
-
│ Email: │ │ │
|
|
142
|
-
│ └─────────────────────┘ │
|
|
143
|
-
│ │
|
|
144
|
-
│ ┌─────────────────────┐ │
|
|
145
|
-
│ Pass: │ │ │
|
|
146
|
-
│ └─────────────────────┘ │
|
|
147
|
-
│ │
|
|
148
|
-
│ ┌─────────────────────┐ │
|
|
149
|
-
│ │ Login │ │
|
|
150
|
-
│ └─────────────────────┘ │
|
|
151
|
-
│ │
|
|
152
|
-
└─────────────────────────────────────────┘
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### 4. Generate Component List
|
|
156
|
-
|
|
157
|
-
Suggest list of components needed for UI:
|
|
158
|
-
|
|
159
|
-
**Required Components:**
|
|
160
|
-
|
|
161
|
-
- `Header.tsx` - Header ("Welcome")
|
|
162
|
-
- `LoginForm.tsx` - Form container
|
|
163
|
-
- `Input.tsx` - Reusable input field
|
|
164
|
-
- `Button.tsx` - Login button
|
|
165
|
-
|
|
166
|
-
**Expected File Structure:**
|
|
167
|
-
|
|
168
|
-
```
|
|
169
|
-
src/
|
|
170
|
-
├── components/
|
|
171
|
-
│ ├── common/
|
|
172
|
-
│ │ ├── Input.tsx
|
|
173
|
-
│ │ └── Button.tsx
|
|
174
|
-
│ └── auth/
|
|
175
|
-
│ ├── Header.tsx
|
|
176
|
-
│ └── LoginForm.tsx
|
|
177
|
-
└── pages/
|
|
178
|
-
└── LoginPage.tsx
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Example (with Gemini)
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
User: /vibe.ui ./design/dashboard/
|
|
185
|
-
|
|
186
|
-
Claude: Reading design folder...
|
|
187
|
-
- Found: mockup.png, tokens.json, style-guide.md
|
|
188
|
-
|
|
189
|
-
Analyzing design files...
|
|
190
|
-
- Layout: Sidebar + Main content
|
|
191
|
-
- Colors: Primary #2F6BFF, Background #F5F5F5
|
|
192
|
-
- Components: Header, Sidebar, 3 StatCards, Footer
|
|
193
|
-
|
|
194
|
-
Generating UI mockup with Gemini...
|
|
195
|
-
|
|
196
|
-
✅ UI Preview generated: ./ui-preview-1706234567.png
|
|
197
|
-
|
|
198
|
-
[Image displayed]
|
|
199
|
-
|
|
200
|
-
**Component Breakdown:**
|
|
201
|
-
1. Header (logo, user menu)
|
|
202
|
-
2. Sidebar (navigation)
|
|
203
|
-
3. StatsCard (reusable card)
|
|
204
|
-
4. Footer (copyright, links)
|
|
205
|
-
5. DashboardLayout (overall layout)
|
|
206
|
-
|
|
207
|
-
Next step: /vibe.spec "dashboard page"
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
## Example (ASCII Fallback)
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
User: /vibe.ui "Dashboard page - header, sidebar, main content (3 cards), footer"
|
|
214
|
-
|
|
215
|
-
Claude: Gemini not configured. Using ASCII preview...
|
|
216
|
-
|
|
217
|
-
┌────────────────────────────────────────────────────────┐
|
|
218
|
-
│ [Logo] Dashboard [User] [Logout] │
|
|
219
|
-
├────────┬───────────────────────────────────────────────┤
|
|
220
|
-
│ │ │
|
|
221
|
-
│ Home │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
|
222
|
-
│ Stats │ │ Card 1 │ │ Card 2 │ │ Card 3 │ │
|
|
223
|
-
│ Users │ │ │ │ │ │ │ │
|
|
224
|
-
│ Settings│ │ 100 │ │ 200 │ │ 50 │ │
|
|
225
|
-
│ │ └──────────┘ └──────────┘ └──────────┘ │
|
|
226
|
-
│ │ │
|
|
227
|
-
│ │ │
|
|
228
|
-
├────────┴───────────────────────────────────────────────┤
|
|
229
|
-
│ © 2025 Company Privacy | Terms │
|
|
230
|
-
└────────────────────────────────────────────────────────┘
|
|
231
|
-
|
|
232
|
-
**Required Components:**
|
|
233
|
-
1. Header (logo, user menu)
|
|
234
|
-
2. Sidebar (navigation)
|
|
235
|
-
3. StatsCard (reusable card)
|
|
236
|
-
4. Footer (copyright, links)
|
|
237
|
-
5. DashboardLayout (overall layout)
|
|
238
|
-
|
|
239
|
-
**Layout Structure:**
|
|
240
|
-
- Layout: sidebar (fixed left)
|
|
241
|
-
- Main: grid (3 columns)
|
|
242
|
-
- Responsive: Changes to 1 column on mobile
|
|
243
|
-
|
|
244
|
-
💡 Tip: Run `vibe gemini key <key>` for actual UI image generation
|
|
245
|
-
|
|
246
|
-
Next step: /vibe.spec "dashboard page"
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Notes
|
|
250
|
-
|
|
251
|
-
- For complex UI, request in multiple parts
|
|
252
|
-
- Layout options: `sidebar`, `header-footer`, `grid`, `centered`, `split`
|
|
253
|
-
- Gemini generates high-quality mockups; ASCII is for quick visualization
|
|
254
|
-
- Design folder input extracts colors, typography, and component structure automatically
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
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
|
-
});
|