opencodekit 0.3.3 → 0.5.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 (36) hide show
  1. package/dist/index.js +10 -1
  2. package/dist/template/.opencode/AGENTS.md +78 -55
  3. package/dist/template/.opencode/agent/build.md +20 -0
  4. package/dist/template/.opencode/agent/rush.md +27 -15
  5. package/dist/template/.opencode/agent/vision.md +95 -60
  6. package/dist/template/.opencode/command/accessibility-check.md +66 -0
  7. package/dist/template/.opencode/command/analyze-mockup.md +43 -0
  8. package/dist/template/.opencode/command/design-audit.md +53 -0
  9. package/dist/template/.opencode/command/edit-image.md +40 -0
  10. package/dist/template/.opencode/command/generate-diagram.md +48 -0
  11. package/dist/template/.opencode/command/generate-icon.md +40 -0
  12. package/dist/template/.opencode/command/generate-image.md +27 -0
  13. package/dist/template/.opencode/command/generate-pattern.md +41 -0
  14. package/dist/template/.opencode/command/generate-storyboard.md +41 -0
  15. package/dist/template/.opencode/command/init.md +176 -0
  16. package/dist/template/.opencode/command/new-feature.md +137 -0
  17. package/dist/template/.opencode/command/research-ui.md +34 -27
  18. package/dist/template/.opencode/command/restore-image.md +39 -0
  19. package/dist/template/.opencode/command/revert-feature.md +127 -0
  20. package/dist/template/.opencode/command/ui-review.md +26 -34
  21. package/dist/template/.opencode/memory/project/README.md +59 -0
  22. package/dist/template/.opencode/memory/project/architecture.md +26 -0
  23. package/dist/template/.opencode/memory/project/commands.md +26 -0
  24. package/dist/template/.opencode/memory/project/conventions.md +26 -0
  25. package/dist/template/.opencode/memory/project/gotchas.md +26 -0
  26. package/dist/template/.opencode/memory/user.example.md +21 -0
  27. package/dist/template/.opencode/memory/user.md +21 -0
  28. package/dist/template/.opencode/opencode.json +475 -457
  29. package/dist/template/.opencode/package.json +1 -2
  30. package/dist/template/.opencode/skills/accessibility-audit/SKILL.md +180 -0
  31. package/dist/template/.opencode/skills/design-system-audit/SKILL.md +141 -0
  32. package/dist/template/.opencode/skills/frontend-aesthetics/SKILL.md +40 -65
  33. package/dist/template/.opencode/skills/mockup-to-code/SKILL.md +158 -0
  34. package/dist/template/.opencode/skills/ui-ux-research/SKILL.md +60 -131
  35. package/dist/template/.opencode/skills/visual-analysis/SKILL.md +130 -0
  36. package/package.json +1 -1
@@ -1,114 +1,73 @@
1
- ---
2
- name: ui-ux-research
3
- description: Use when analyzing mockups, screenshots, design systems, or conducting UI/UX research - leverages Gemini CLI non-interactive mode for large context image analysis and codebase-wide UI pattern discovery
4
- ---
1
+ # UI/UX Research Skill
5
2
 
6
- # UI/UX Research with Gemini CLI
7
-
8
- ## Overview
9
-
10
- Leverage Gemini CLI's 1M token context window and multimodal capabilities for UI/UX research tasks that exceed typical context limits. Use non-interactive mode (`-p` flag) for automated analysis of mockups, screenshots, and large design systems.
3
+ Research UI patterns, design systems, and user experience across codebases.
11
4
 
12
5
  ## When to Use
13
6
 
14
- - Analyzing multiple UI mockups/screenshots at once
15
- - Researching UI patterns across large codebases (100KB+)
7
+ - Analyzing UI patterns across large codebases
16
8
  - Comparing design system implementations
17
- - Auditing UI consistency across app
18
- - Understanding competitor UI patterns
19
-
20
- ## Choosing the Right Model
21
-
22
- For UI/UX research, use **`gemini-2.5-pro`** for all analysis tasks—it has a 1M token context window and excels at understanding images, mockups, and screenshots. This is the default model when you run `gemini`.
23
-
24
- If you need faster responses and don't need the full context window, use **`gemini-2.5-flash`** (32K tokens).
9
+ - Auditing UI consistency
10
+ - Understanding existing patterns before implementation
25
11
 
26
- **Important:** Don't confuse analysis with generation. Image generation models like `imagen-3.0-generate-002` are for _creating_ new images, not analyzing existing ones. For reviewing mockups or screenshots, always stick with `gemini-2.5-pro`.
12
+ ## Research Patterns
27
13
 
28
- ## Gemini CLI Non-Interactive Basics
29
-
30
- ```bash
31
- # Basic prompt
32
- gemini -p "Your prompt here"
33
-
34
- # Include files/directories with @ syntax
35
- gemini -p "@src/components/ Analyze UI patterns used"
36
-
37
- # Include all project files
38
- gemini --all-files -p "Find all React components with accessibility issues"
14
+ ### Find All UI Components
39
15
 
40
- # Specify model (Pro has 1M context, best for image analysis)
41
- gemini -m gemini-2.5-pro -p "@src/ Analyze design system"
42
16
  ```
43
-
44
- ## Image Analysis Workflow
45
-
46
- ### Step 1: Download Image (if URL)
47
-
48
- ```bash
49
- curl -o mockup.png "https://example.com/design.png"
17
+ Analyze the components directory.
18
+ List all UI components with their props interfaces.
50
19
  ```
51
20
 
52
- ### Step 2: Analyze with Gemini (Interactive Mode Preferred for Images)
21
+ ### Audit Design System Consistency
53
22
 
54
- ```bash
55
- # Start interactive session
56
- gemini
57
- > @mockup.png Analyze this UI for accessibility issues
58
23
  ```
24
+ Check design token usage consistency:
25
+ - Colors
26
+ - Spacing
27
+ - Typography
59
28
 
60
- ### Step 3: For Non-Interactive Image Analysis
61
-
62
- ```bash
63
- # Use read_file tool through shell
64
- gemini -p "Read the image at ./mockup.png and analyze the UI layout, color contrast, and typography choices"
29
+ Identify inconsistencies and suggest consolidation.
65
30
  ```
66
31
 
67
- ## Large-Scale UI Research Commands
68
-
69
- ### Find All UI Components
32
+ ### Compare UI Implementations
70
33
 
71
- ```bash
72
- gemini -p "@src/components/ List all UI components with their props interfaces"
73
34
  ```
74
-
75
- ### Audit Design System Consistency
76
-
77
- ```bash
78
- gemini -p "@src/ @styles/ Check design token usage consistency - colors, spacing, typography"
35
+ Compare layout patterns across pages.
36
+ Identify inconsistencies and recommend standardization.
79
37
  ```
80
38
 
81
- ### Compare UI Implementations
39
+ ### Accessibility Audit
82
40
 
83
- ```bash
84
- gemini -p "@src/pages/ @src/components/ Compare layout patterns across pages, identify inconsistencies"
85
41
  ```
42
+ Audit components for WCAG compliance:
43
+ - Color contrast
44
+ - ARIA labels
45
+ - Keyboard navigation
86
46
 
87
- ### Accessibility Audit
88
-
89
- ```bash
90
- gemini -p "@src/components/ Audit for WCAG compliance: color contrast, ARIA labels, keyboard navigation"
47
+ Prioritize issues by severity.
91
48
  ```
92
49
 
93
50
  ### Responsive Design Review
94
51
 
95
- ```bash
96
- gemini -p "@src/ Find all responsive breakpoints and media queries, assess mobile-first compliance"
52
+ ```
53
+ Find all responsive breakpoints and media queries.
54
+ Assess mobile-first compliance.
55
+ Identify missing responsive considerations.
97
56
  ```
98
57
 
99
- ## UI Pattern Research Template
58
+ ## Pattern Search Template
59
+
60
+ ```
61
+ Has [PATTERN] been implemented?
100
62
 
101
- ```bash
102
- # Research pattern across codebase
103
- gemini -p "@src/ @lib/ Has [PATTERN] been implemented?
104
63
  Show:
105
64
  1. Files containing the pattern
106
65
  2. Implementation approach
107
66
  3. Consistency across usages
108
- 4. Potential improvements"
67
+ 4. Potential improvements
109
68
  ```
110
69
 
111
- **Example patterns to search:**
70
+ **Common patterns to search:**
112
71
 
113
72
  - Dark mode toggle
114
73
  - Form validation
@@ -116,76 +75,46 @@ Show:
116
75
  - Error boundaries
117
76
  - Toast notifications
118
77
  - Modal dialogs
119
- - Data tables with sorting/filtering
78
+ - Data tables
120
79
 
121
- ## Integration with OpenCode Workflow
80
+ ## Integration with Beads
122
81
 
123
- ### For Task-Constrained Research
82
+ For task-constrained research:
124
83
 
125
- 1. **Check bead exists:**
84
+ 1. Check bead spec constraints
85
+ 2. Research within those constraints
86
+ 3. Save findings to bead artifacts
126
87
 
127
- ```bash
128
- bd show bd-xxx
129
- ```
88
+ ## Storage
130
89
 
131
- 2. **Research within spec constraints:**
90
+ Save research findings to `.opencode/memory/design/research/`
132
91
 
133
- ```bash
134
- gemini -p "@src/components/ @.beads/artifacts/bd-xxx/spec.md
135
- Find implementations matching spec requirements"
136
- ```
92
+ ## Output Format
137
93
 
138
- 3. **Save findings:**
139
- ```bash
140
- # Save to bead artifacts
141
- # Write to .beads/artifacts/bd-xxx/research.md
142
- ```
94
+ ```markdown
95
+ ## Research: [Topic]
143
96
 
144
- ### Combining with Frontend Aesthetics Skill
97
+ ### Findings
145
98
 
146
- Use this skill for research, then apply `frontend-aesthetics` skill for implementation:
99
+ [Key discoveries]
147
100
 
148
- 1. **Research:** `gemini -p "@src/ What typography is currently used?"`
149
- 2. **Implement:** Apply `frontend-aesthetics` prompt to generate improved components
101
+ ### Current Implementation
150
102
 
151
- ## Output Formats
103
+ [What exists]
152
104
 
153
- ```bash
154
- # JSON output for scripting
155
- gemini -p "query" --output-format json
105
+ ### Recommendations
156
106
 
157
- # Stream for long operations
158
- gemini -p "query" --output-format stream-json
159
- ```
160
-
161
- ## Common Use Cases
162
-
163
- - **Mockup analysis:** Start interactive mode with `gemini`, then `@mockup.png Analyze UI`
164
- - **Design token audit:** `gemini -p "@styles/ List all design tokens"`
165
- - **Component inventory:** `gemini -p "@src/components/ Create component catalog"`
166
- - **Accessibility check:** `gemini -p "@src/ WCAG compliance audit"`
167
- - **Pattern search:** `gemini -p "@src/ Find modal implementations"`
168
-
169
- ## Limitations
107
+ [What to improve]
170
108
 
171
- - `@file` syntax works best in interactive mode
172
- - Non-interactive image analysis requires workarounds (curl + read)
173
- - For real-time UI changes, prefer interactive mode
174
- - Token limits: 1M (`gemini-2.5-pro`), 32K (`gemini-2.5-flash`)
175
- - Image analysis uses `gemini-2.5-pro`, NOT image generation models
109
+ ### Next Steps
176
110
 
177
- ## Quick Reference
178
-
179
- ```bash
180
- # Start research session
181
- gemini -m gemini-2.5-pro
182
-
183
- # Non-interactive codebase analysis
184
- gemini -p "@src/ @styles/ [your research question]"
111
+ [Actionable items]
112
+ ```
185
113
 
186
- # Include multiple directories
187
- gemini -p "@frontend/ @shared/ Compare UI patterns"
114
+ ## Related Skills
188
115
 
189
- # Save session for resumption
190
- gemini --checkpointing
191
- ```
116
+ | After Research | Use Skill |
117
+ | --------------------------- | --------------------- |
118
+ | Need implementation | `mockup-to-code` |
119
+ | Need aesthetic improvements | `frontend-aesthetics` |
120
+ | Need accessibility fixes | `accessibility-audit` |
@@ -0,0 +1,130 @@
1
+ # Visual Analysis Skill
2
+
3
+ Analyze images, screenshots, and visual content.
4
+
5
+ ## When to Use
6
+
7
+ - Analyzing UI mockups or screenshots
8
+ - Extracting information from images
9
+ - Comparing visual designs
10
+ - Quick visual assessments
11
+
12
+ ## Quick Mode
13
+
14
+ Fast, focused analysis for specific questions.
15
+
16
+ **Prompt pattern:**
17
+
18
+ ```
19
+ Analyze this image: [attach image]
20
+ [specific question]
21
+ ```
22
+
23
+ **Examples:**
24
+
25
+ - "What text is visible in this UI?"
26
+ - "List all colors used with their hex values"
27
+ - "Identify all interactive elements"
28
+
29
+ ## Deep Mode
30
+
31
+ Comprehensive analysis with structured output.
32
+
33
+ **Prompt pattern:**
34
+
35
+ ```
36
+ Analyze this image comprehensively:
37
+
38
+ 1. CONTENT INVENTORY
39
+ - All UI elements present
40
+ - Text content
41
+ - Icons and imagery
42
+
43
+ 2. VISUAL PROPERTIES
44
+ - Color palette (hex values)
45
+ - Typography (fonts, sizes, weights)
46
+ - Spacing patterns
47
+ - Layout structure
48
+
49
+ 3. OBSERVATIONS
50
+ - Design patterns used
51
+ - Potential issues
52
+ - Notable features
53
+
54
+ Output as structured markdown.
55
+ ```
56
+
57
+ ## Common Analysis Patterns
58
+
59
+ ### UI Component Analysis
60
+
61
+ ```
62
+ Analyze this UI component:
63
+
64
+ 1. Component type and purpose
65
+ 2. Visual states (hover, focus, disabled)
66
+ 3. Accessibility considerations
67
+ 4. Props/variants needed
68
+ 5. Similar patterns in common UI libraries
69
+ ```
70
+
71
+ ### Screenshot Comparison
72
+
73
+ ```
74
+ Compare these two images:
75
+
76
+ 1. Visual differences (be specific about location)
77
+ 2. Missing elements
78
+ 3. Spacing/sizing discrepancies
79
+ 4. Color accuracy
80
+ 5. Priority fixes ranked by visual impact
81
+ ```
82
+
83
+ ### Color Extraction
84
+
85
+ ```
86
+ Extract all colors from this image.
87
+
88
+ Output as JSON:
89
+ {
90
+ "primary": ["#hex1", "#hex2"],
91
+ "secondary": ["#hex3"],
92
+ "neutral": ["#hex4", "#hex5"],
93
+ "accent": ["#hex6"]
94
+ }
95
+
96
+ Include approximate usage percentage for each color.
97
+ ```
98
+
99
+ ### Layout Analysis
100
+
101
+ ```
102
+ Analyze the layout structure:
103
+
104
+ 1. Grid system (columns, gutters)
105
+ 2. Container widths
106
+ 3. Section divisions
107
+ 4. Responsive breakpoint hints
108
+ 5. Flexbox vs Grid recommendations
109
+
110
+ Output CSS/Tailwind structure.
111
+ ```
112
+
113
+ ## Output Formats
114
+
115
+ - **Markdown** (default): Structured text
116
+ - **JSON**: For design tokens
117
+ - **Code**: Direct implementation
118
+
119
+ ## Storage
120
+
121
+ Save findings to `.opencode/memory/design/analysis/`
122
+
123
+ ## Related Skills
124
+
125
+ | Need | Skill |
126
+ | --------------------------- | --------------------- |
127
+ | Found accessibility issues | `accessibility-audit` |
128
+ | Need to implement design | `mockup-to-code` |
129
+ | Want design tokens | `design-system-audit` |
130
+ | Need aesthetic improvements | `frontend-aesthetics` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.3.3",
3
+ "version": "0.5.0",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "type": "module",
6
6
  "repository": {