opencodekit 0.15.21 → 0.16.1
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/dist/index.js +5 -7
- package/dist/template/.opencode/AGENTS.md +85 -23
- package/dist/template/.opencode/agent/build.md +88 -7
- package/dist/template/.opencode/agent/explore.md +1 -1
- package/dist/template/.opencode/agent/general.md +54 -4
- package/dist/template/.opencode/agent/looker.md +1 -1
- package/dist/template/.opencode/agent/painter.md +1 -1
- package/dist/template/.opencode/agent/plan.md +52 -0
- package/dist/template/.opencode/agent/review.md +1 -1
- package/dist/template/.opencode/agent/scout.md +3 -3
- package/dist/template/.opencode/agent/vision.md +1 -1
- package/dist/template/.opencode/command/create.md +231 -91
- package/dist/template/.opencode/command/design.md +40 -7
- package/dist/template/.opencode/command/handoff.md +22 -0
- package/dist/template/.opencode/command/init.md +49 -78
- package/dist/template/.opencode/command/plan.md +36 -16
- package/dist/template/.opencode/command/pr.md +15 -0
- package/dist/template/.opencode/command/research.md +3 -0
- package/dist/template/.opencode/command/resume.md +8 -18
- package/dist/template/.opencode/command/review-codebase.md +30 -0
- package/dist/template/.opencode/command/ship.md +199 -0
- package/dist/template/.opencode/command/start.md +316 -28
- package/dist/template/.opencode/command/status.md +24 -1
- package/dist/template/.opencode/command/ui-review.md +36 -7
- package/dist/template/.opencode/command/verify.md +307 -0
- package/dist/template/.opencode/memory/_templates/prd.md +29 -0
- package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
- package/dist/template/.opencode/memory/_templates/spec.md +66 -0
- package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
- package/dist/template/.opencode/memory/_templates/tech-stack.md +50 -0
- package/dist/template/.opencode/memory/project/tech-stack.md +53 -0
- package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
- package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +18 -4
- package/dist/template/.opencode/package.json +1 -0
- package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +418 -0
- package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +170 -0
- package/dist/template/.opencode/plans/1770013678126-witty-planet.md +278 -0
- package/dist/template/.opencode/plugin/lib/memory-db.ts +828 -0
- package/dist/template/.opencode/plugin/memory.ts +38 -1
- package/dist/template/.opencode/skill/index-knowledge/SKILL.md +76 -31
- package/dist/template/.opencode/skill/memory-system/SKILL.md +110 -55
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
- package/dist/template/.opencode/tool/memory-get.ts +143 -0
- package/dist/template/.opencode/tool/memory-maintain.ts +167 -0
- package/dist/template/.opencode/tool/memory-migrate.ts +319 -0
- package/dist/template/.opencode/tool/memory-read.ts +17 -46
- package/dist/template/.opencode/tool/memory-search.ts +131 -28
- package/dist/template/.opencode/tool/memory-timeline.ts +105 -0
- package/dist/template/.opencode/tool/memory-update.ts +21 -26
- package/dist/template/.opencode/tool/observation.ts +112 -100
- package/dist/template/.opencode/tsconfig.json +19 -19
- package/package.json +1 -1
- package/dist/template/.opencode/command/accessibility-check.md +0 -331
- package/dist/template/.opencode/command/agent-browser.md +0 -21
- package/dist/template/.opencode/command/analyze-mockup.md +0 -423
- package/dist/template/.opencode/command/analyze-project.md +0 -295
- package/dist/template/.opencode/command/brainstorm.md +0 -373
- package/dist/template/.opencode/command/cloudflare.md +0 -70
- package/dist/template/.opencode/command/commit.md +0 -245
- package/dist/template/.opencode/command/complete-next-task.md +0 -77
- package/dist/template/.opencode/command/design-audit.md +0 -480
- package/dist/template/.opencode/command/edit-image.md +0 -242
- package/dist/template/.opencode/command/finish.md +0 -255
- package/dist/template/.opencode/command/fix-ci.md +0 -109
- package/dist/template/.opencode/command/fix-types.md +0 -104
- package/dist/template/.opencode/command/fix-ui.md +0 -117
- package/dist/template/.opencode/command/fix.md +0 -168
- package/dist/template/.opencode/command/frontend-design.md +0 -21
- package/dist/template/.opencode/command/generate-diagram.md +0 -349
- package/dist/template/.opencode/command/generate-icon.md +0 -283
- package/dist/template/.opencode/command/generate-image.md +0 -246
- package/dist/template/.opencode/command/generate-pattern.md +0 -247
- package/dist/template/.opencode/command/generate-storyboard.md +0 -250
- package/dist/template/.opencode/command/implement.md +0 -609
- package/dist/template/.opencode/command/import-plan.md +0 -406
- package/dist/template/.opencode/command/index-knowledge.md +0 -25
- package/dist/template/.opencode/command/integration-test.md +0 -424
- package/dist/template/.opencode/command/issue.md +0 -102
- package/dist/template/.opencode/command/new-feature.md +0 -651
- package/dist/template/.opencode/command/opensrc.md +0 -58
- package/dist/template/.opencode/command/quick-build.md +0 -238
- package/dist/template/.opencode/command/ralph.md +0 -41
- package/dist/template/.opencode/command/research-and-implement.md +0 -148
- package/dist/template/.opencode/command/research-ui.md +0 -466
- package/dist/template/.opencode/command/restore-image.md +0 -424
- package/dist/template/.opencode/command/revert-feature.md +0 -386
- package/dist/template/.opencode/command/skill-create.md +0 -517
- package/dist/template/.opencode/command/skill-optimize.md +0 -556
- package/dist/template/.opencode/command/summarize.md +0 -412
- package/dist/template/.opencode/command/triage.md +0 -398
- package/dist/template/.opencode/memory/_templates/README.md +0 -35
- package/dist/template/.opencode/memory/_templates/observation.md +0 -39
- package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
- package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
- package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
- package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
- package/dist/template/.opencode/memory/_templates/prompt-engineering.md +0 -333
- package/dist/template/.opencode/memory/observations/2026-01-22-decision-agents-md-prompt-engineering-improvement.md +0 -29
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-agent-roles-build-orchestrates-general-e.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-simplified-swarm-helper-tool-to-fix-type.md +0 -20
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-use-beads-as-swarm-board-source-of-truth.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-25-learning-user-wants-real-swarm-coordination-guida.md +0 -15
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-created-deep-research-skill-for-thorough.md +0 -29
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-oracle-tool-optimal-usage-patterns.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-28-learning-ampcode-deep-mode-research-integration-w.md +0 -42
- package/dist/template/.opencode/memory/observations/2026-01-28-pattern-research-delegation-pattern-explore-for-.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-29-decision-copilot-auth-plugin-rate-limit-handling.md +0 -27
- package/dist/template/.opencode/memory/observations/2026-01-29-decision-spec-driven-approach-for-opencodekit.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +0 -44
- package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-30-discovery-kimi-k2-5-agent-swarm-architecture-patte.md +0 -45
- package/dist/template/.opencode/memory/observations/2026-01-30-pattern-swarm-tools-architecture.md +0 -28
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +0 -63
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-created-dedicated-worker-agent-for-swarm.md +0 -20
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-rollback-to-v1-1-47-for-copilot-claude-r.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-simplified-swarm-to-task-tool-pattern.md +0 -44
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-swarm-architecture-task-tool-over-tmux.md +0 -33
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-worker-skills-defined-for-swarm-delegati.md +0 -30
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-gpt-reasoning-config-for-github-copilot.md +0 -51
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +0 -61
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +0 -66
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-custom-tools-api.md +0 -48
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-v1-1-48-skills-as-slash-command.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-swarm-system-simplified-removed-mailbox-.md +0 -30
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-v1-1-48-native-copilot-reasoning-via-pr-.md +0 -45
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-cannot-add-custom-config-to-opencode-jso.md +0 -18
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +0 -48
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-opencode-v1-1-48-claude-thinking-block-s.md +0 -51
- package/dist/template/.opencode/memory/project/architecture.md +0 -60
- package/dist/template/.opencode/memory/project/commands.md +0 -72
- package/dist/template/.opencode/memory/project/conventions.md +0 -68
- package/dist/template/.opencode/memory/project/gotchas.md +0 -41
- package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
- package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
- package/dist/template/.opencode/tool/notebooklm.ts +0 -488
- package/dist/template/.opencode/tool/oracle.ts +0 -240
- /package/dist/template/.opencode/memory/{user.example.md → _templates/user.md} +0 -0
- /package/dist/template/.opencode/memory/{user.md → project/user.md} +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Automate browser tasks (scraping, form filling, web interaction)
|
|
3
|
-
argument-hint: "[what you want to do in the browser]"
|
|
4
|
-
agent: general
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Agent Browser: $ARGUMENTS
|
|
8
|
-
|
|
9
|
-
Automate browser tasks using agent-browser CLI.
|
|
10
|
-
|
|
11
|
-
## Load Skill
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
skill({ name: "agent-browser" });
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Then follow the skill instructions to help with browser automation.
|
|
18
|
-
|
|
19
|
-
<user-request>
|
|
20
|
-
$ARGUMENTS
|
|
21
|
-
</user-request>
|
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Analyze UI mockup or screenshot with structured output
|
|
3
|
-
argument-hint: "<image-path> [focus: layout|colors|components|typography|a11y|all] [--quick|--deep] [--compare <file>]"
|
|
4
|
-
agent: vision
|
|
5
|
-
model: proxypal/gemini-3-flash-preview
|
|
6
|
-
subtask: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Analyze Mockup: $ARGUMENTS
|
|
10
|
-
|
|
11
|
-
## Load Beads Skill
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
skill({ name: "beads" });
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Phase 1: Parse Arguments
|
|
18
|
-
|
|
19
|
-
Extract from `$ARGUMENTS`:
|
|
20
|
-
|
|
21
|
-
| Argument | Default | Options |
|
|
22
|
-
| ---------- | -------- | ------------------------------------------------------------- |
|
|
23
|
-
| Image path | required | File path or URL |
|
|
24
|
-
| Focus | `all` | `layout`, `colors`, `components`, `typography`, `a11y`, `all` |
|
|
25
|
-
| Depth | `--deep` | `--quick` (2-3 min), `--deep` (10-15 min) |
|
|
26
|
-
| Compare | none | `--compare <existing-file.tsx>` for diff analysis |
|
|
27
|
-
|
|
28
|
-
Load the image and determine analysis scope.
|
|
29
|
-
|
|
30
|
-
## Phase 2: Structured Analysis
|
|
31
|
-
|
|
32
|
-
skill({ name: "visual-analysis" })
|
|
33
|
-
|
|
34
|
-
Run analysis based on focus area. Each section has specific output format.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
### Colors Analysis
|
|
39
|
-
|
|
40
|
-
**Extract:**
|
|
41
|
-
|
|
42
|
-
```json
|
|
43
|
-
{
|
|
44
|
-
"primary": {
|
|
45
|
-
"hex": "#0066CC",
|
|
46
|
-
"usage": "buttons, links",
|
|
47
|
-
"percentage": "15%"
|
|
48
|
-
},
|
|
49
|
-
"secondary": {
|
|
50
|
-
"hex": "#6B7280",
|
|
51
|
-
"usage": "text, borders",
|
|
52
|
-
"percentage": "25%"
|
|
53
|
-
},
|
|
54
|
-
"background": {
|
|
55
|
-
"hex": "#FFFFFF",
|
|
56
|
-
"usage": "page background",
|
|
57
|
-
"percentage": "50%"
|
|
58
|
-
},
|
|
59
|
-
"accent": { "hex": "#10B981", "usage": "success states", "percentage": "5%" },
|
|
60
|
-
"error": { "hex": "#EF4444", "usage": "error states", "percentage": "2%" },
|
|
61
|
-
"neutral": ["#F3F4F6", "#E5E7EB", "#D1D5DB", "#9CA3AF"]
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**Accessibility Check:**
|
|
66
|
-
| Combination | Contrast Ratio | WCAG AA | WCAG AAA |
|
|
67
|
-
|-------------|----------------|---------|----------|
|
|
68
|
-
| primary on background | 4.5:1 | Pass | Fail |
|
|
69
|
-
| text on background | 7.2:1 | Pass | Pass |
|
|
70
|
-
|
|
71
|
-
**CSS Output:**
|
|
72
|
-
|
|
73
|
-
```css
|
|
74
|
-
:root {
|
|
75
|
-
--color-primary: #0066cc;
|
|
76
|
-
--color-primary-hover: #0052a3;
|
|
77
|
-
--color-secondary: #6b7280;
|
|
78
|
-
--color-background: #ffffff;
|
|
79
|
-
--color-surface: #f3f4f6;
|
|
80
|
-
--color-accent: #10b981;
|
|
81
|
-
--color-error: #ef4444;
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**Tailwind Output:**
|
|
86
|
-
|
|
87
|
-
```js
|
|
88
|
-
// tailwind.config.js
|
|
89
|
-
colors: {
|
|
90
|
-
primary: { DEFAULT: '#0066CC', hover: '#0052A3' },
|
|
91
|
-
secondary: '#6B7280',
|
|
92
|
-
accent: '#10B981',
|
|
93
|
-
error: '#EF4444',
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
### Layout Analysis
|
|
100
|
-
|
|
101
|
-
**Grid System:**
|
|
102
|
-
|
|
103
|
-
- Type: [12-column grid | Flexbox | CSS Grid | Mixed]
|
|
104
|
-
- Container max-width: [e.g., 1280px]
|
|
105
|
-
- Gutters: [e.g., 24px]
|
|
106
|
-
- Margins: [e.g., 16px mobile, 32px desktop]
|
|
107
|
-
|
|
108
|
-
**Section Breakdown:**
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
┌─────────────────────────────────────┐
|
|
112
|
-
│ Header (h-16, sticky) │
|
|
113
|
-
├─────────────────────────────────────┤
|
|
114
|
-
│ Hero (h-96, flex center) │
|
|
115
|
-
├─────────────────────────────────────┤
|
|
116
|
-
│ Content (grid cols-3, gap-6) │
|
|
117
|
-
│ ┌─────┐ ┌─────┐ ┌─────┐ │
|
|
118
|
-
│ │Card │ │Card │ │Card │ │
|
|
119
|
-
│ └─────┘ └─────┘ └─────┘ │
|
|
120
|
-
├─────────────────────────────────────┤
|
|
121
|
-
│ Footer (py-8) │
|
|
122
|
-
└─────────────────────────────────────┘
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Responsive Breakpoints:**
|
|
126
|
-
| Breakpoint | Layout Change |
|
|
127
|
-
|------------|---------------|
|
|
128
|
-
| < 640px (sm) | Stack to single column, hide sidebar |
|
|
129
|
-
| < 1024px (lg) | 2-column grid, collapsible nav |
|
|
130
|
-
| >= 1280px (xl) | Full 3-column layout |
|
|
131
|
-
|
|
132
|
-
**CSS Structure:**
|
|
133
|
-
|
|
134
|
-
```css
|
|
135
|
-
.container {
|
|
136
|
-
max-width: 1280px;
|
|
137
|
-
margin: 0 auto;
|
|
138
|
-
padding: 0 1rem;
|
|
139
|
-
}
|
|
140
|
-
.grid {
|
|
141
|
-
display: grid;
|
|
142
|
-
grid-template-columns: repeat(3, 1fr);
|
|
143
|
-
gap: 1.5rem;
|
|
144
|
-
}
|
|
145
|
-
@media (max-width: 1024px) {
|
|
146
|
-
.grid {
|
|
147
|
-
grid-template-columns: repeat(2, 1fr);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
@media (max-width: 640px) {
|
|
151
|
-
.grid {
|
|
152
|
-
grid-template-columns: 1fr;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
### Components Analysis
|
|
160
|
-
|
|
161
|
-
**Component Inventory:**
|
|
162
|
-
|
|
163
|
-
| Component | Library Match | Variants | Complexity | Priority |
|
|
164
|
-
| --------- | ------------- | --------------------------- | ---------- | -------- |
|
|
165
|
-
| Button | shadcn/Button | primary, secondary, outline | S | High |
|
|
166
|
-
| Card | shadcn/Card | default, hover, selected | M | High |
|
|
167
|
-
| Input | shadcn/Input | default, error, disabled | S | Medium |
|
|
168
|
-
| Modal | Radix Dialog | - | M | Low |
|
|
169
|
-
| Dropdown | shadcn/Select | - | M | Medium |
|
|
170
|
-
|
|
171
|
-
**Component Details (for each):**
|
|
172
|
-
|
|
173
|
-
```markdown
|
|
174
|
-
## Component: [Name]
|
|
175
|
-
|
|
176
|
-
**Library:** shadcn/ui, MUI, Radix, custom
|
|
177
|
-
**Variants:** primary | secondary | outline
|
|
178
|
-
**States:** default, hover, focus, active, disabled
|
|
179
|
-
**Props Interface:**
|
|
180
|
-
|
|
181
|
-
- variant: 'primary' | 'secondary' | 'outline'
|
|
182
|
-
- size: 'sm' | 'md' | 'lg'
|
|
183
|
-
- disabled?: boolean
|
|
184
|
-
|
|
185
|
-
**Accessibility:**
|
|
186
|
-
|
|
187
|
-
- Focus ring visible
|
|
188
|
-
- ARIA labels needed
|
|
189
|
-
- Keyboard: Enter/Space to activate
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
### Typography Analysis
|
|
195
|
-
|
|
196
|
-
**Font Stack:**
|
|
197
|
-
|
|
198
|
-
```css
|
|
199
|
-
--font-sans: "Inter", system-ui, -apple-system, sans-serif;
|
|
200
|
-
--font-mono: "JetBrains Mono", monospace;
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Type Scale:**
|
|
204
|
-
| Element | Size | Weight | Line Height | Letter Spacing |
|
|
205
|
-
|---------|------|--------|-------------|----------------|
|
|
206
|
-
| h1 | 2.5rem (40px) | 700 | 1.2 | -0.02em |
|
|
207
|
-
| h2 | 2rem (32px) | 600 | 1.25 | -0.01em |
|
|
208
|
-
| h3 | 1.5rem (24px) | 600 | 1.3 | 0 |
|
|
209
|
-
| body | 1rem (16px) | 400 | 1.5 | 0 |
|
|
210
|
-
| small | 0.875rem (14px) | 400 | 1.4 | 0 |
|
|
211
|
-
| caption | 0.75rem (12px) | 500 | 1.3 | 0.02em |
|
|
212
|
-
|
|
213
|
-
**CSS Output:**
|
|
214
|
-
|
|
215
|
-
```css
|
|
216
|
-
:root {
|
|
217
|
-
--font-size-xs: 0.75rem;
|
|
218
|
-
--font-size-sm: 0.875rem;
|
|
219
|
-
--font-size-base: 1rem;
|
|
220
|
-
--font-size-lg: 1.125rem;
|
|
221
|
-
--font-size-xl: 1.25rem;
|
|
222
|
-
--font-size-2xl: 1.5rem;
|
|
223
|
-
--font-size-3xl: 2rem;
|
|
224
|
-
--font-size-4xl: 2.5rem;
|
|
225
|
-
|
|
226
|
-
--line-height-tight: 1.2;
|
|
227
|
-
--line-height-normal: 1.5;
|
|
228
|
-
--line-height-relaxed: 1.75;
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### Accessibility Analysis (a11y)
|
|
235
|
-
|
|
236
|
-
**Color Contrast:**
|
|
237
|
-
| Element | Foreground | Background | Ratio | Status |
|
|
238
|
-
|---------|------------|------------|-------|--------|
|
|
239
|
-
| Body text | #1F2937 | #FFFFFF | 14.7:1 | AAA Pass |
|
|
240
|
-
| Link | #0066CC | #FFFFFF | 4.5:1 | AA Pass |
|
|
241
|
-
| Button text | #FFFFFF | #0066CC | 4.5:1 | AA Pass |
|
|
242
|
-
| Muted text | #9CA3AF | #FFFFFF | 2.9:1 | FAIL |
|
|
243
|
-
|
|
244
|
-
**Touch Targets:**
|
|
245
|
-
|
|
246
|
-
- Minimum size check: 44x44px for mobile
|
|
247
|
-
- [ ] Buttons meet minimum
|
|
248
|
-
- [ ] Links have adequate padding
|
|
249
|
-
- [ ] Icons have tap area
|
|
250
|
-
|
|
251
|
-
**Focus States:**
|
|
252
|
-
|
|
253
|
-
- [ ] Visible focus ring on interactive elements
|
|
254
|
-
- [ ] Focus order logical (left-right, top-bottom)
|
|
255
|
-
- [ ] Skip links present (if applicable)
|
|
256
|
-
|
|
257
|
-
**Issues Found:**
|
|
258
|
-
| Severity | Issue | Location | Fix |
|
|
259
|
-
|----------|-------|----------|-----|
|
|
260
|
-
| Critical | Low contrast muted text | Body paragraphs | Change to #6B7280 |
|
|
261
|
-
| Warning | Small touch target | Icon buttons | Add 8px padding |
|
|
262
|
-
| Info | No focus ring | Cards | Add focus-visible ring |
|
|
263
|
-
|
|
264
|
-
---
|
|
265
|
-
|
|
266
|
-
## Phase 3: Design Token Export
|
|
267
|
-
|
|
268
|
-
Consolidate all findings into ready-to-use code:
|
|
269
|
-
|
|
270
|
-
**Complete CSS Variables:**
|
|
271
|
-
|
|
272
|
-
```css
|
|
273
|
-
:root {
|
|
274
|
-
/* Colors */
|
|
275
|
-
--color-primary: #0066cc;
|
|
276
|
-
--color-secondary: #6b7280;
|
|
277
|
-
--color-background: #ffffff;
|
|
278
|
-
--color-surface: #f3f4f6;
|
|
279
|
-
--color-accent: #10b981;
|
|
280
|
-
--color-error: #ef4444;
|
|
281
|
-
|
|
282
|
-
/* Typography */
|
|
283
|
-
--font-sans: "Inter", system-ui, sans-serif;
|
|
284
|
-
--font-size-base: 1rem;
|
|
285
|
-
--line-height-base: 1.5;
|
|
286
|
-
|
|
287
|
-
/* Spacing */
|
|
288
|
-
--space-1: 0.25rem;
|
|
289
|
-
--space-2: 0.5rem;
|
|
290
|
-
--space-4: 1rem;
|
|
291
|
-
--space-6: 1.5rem;
|
|
292
|
-
--space-8: 2rem;
|
|
293
|
-
|
|
294
|
-
/* Borders */
|
|
295
|
-
--radius-sm: 0.25rem;
|
|
296
|
-
--radius-md: 0.5rem;
|
|
297
|
-
--radius-lg: 1rem;
|
|
298
|
-
|
|
299
|
-
/* Shadows */
|
|
300
|
-
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
301
|
-
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
302
|
-
}
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
**Tailwind Config Extension:**
|
|
306
|
-
|
|
307
|
-
```js
|
|
308
|
-
// tailwind.config.js
|
|
309
|
-
module.exports = {
|
|
310
|
-
theme: {
|
|
311
|
-
extend: {
|
|
312
|
-
colors: {
|
|
313
|
-
/* extracted colors */
|
|
314
|
-
},
|
|
315
|
-
fontFamily: { sans: ["Inter", ...defaultTheme.fontFamily.sans] },
|
|
316
|
-
spacing: {
|
|
317
|
-
/* if custom */
|
|
318
|
-
},
|
|
319
|
-
borderRadius: {
|
|
320
|
-
/* if custom */
|
|
321
|
-
},
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
|
-
## Phase 4: Comparison Mode (if --compare)
|
|
330
|
-
|
|
331
|
-
When `--compare <existing-file>` is provided:
|
|
332
|
-
|
|
333
|
-
skill({ name: "mockup-to-code" })
|
|
334
|
-
|
|
335
|
-
**Diff Analysis:**
|
|
336
|
-
| Aspect | Mockup | Implementation | Delta |
|
|
337
|
-
|--------|--------|----------------|-------|
|
|
338
|
-
| Primary color | #0066CC | #0066CC | Match |
|
|
339
|
-
| Button radius | 8px | 4px | +4px needed |
|
|
340
|
-
| Card shadow | shadow-md | shadow-sm | Increase shadow |
|
|
341
|
-
| Heading size | 40px | 36px | +4px needed |
|
|
342
|
-
|
|
343
|
-
**Priority Fixes:**
|
|
344
|
-
|
|
345
|
-
1. [High] Button border-radius: change `rounded` to `rounded-lg`
|
|
346
|
-
2. [Medium] Card shadow: change `shadow-sm` to `shadow-md`
|
|
347
|
-
3. [Low] Heading font-size: increase from 2.25rem to 2.5rem
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
## Phase 5: Implementation Plan
|
|
352
|
-
|
|
353
|
-
**Component Build Order (dependency-aware):**
|
|
354
|
-
|
|
355
|
-
1. Design tokens (CSS variables) - no dependencies
|
|
356
|
-
2. Typography components (Text, Heading) - depends on tokens
|
|
357
|
-
3. Button - depends on tokens
|
|
358
|
-
4. Card - depends on tokens
|
|
359
|
-
5. Form inputs - depends on tokens, Button
|
|
360
|
-
6. Page layouts - depends on all above
|
|
361
|
-
|
|
362
|
-
**Create Implementation Tasks:**
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
bd create "Implement design tokens from mockup" -t task -p 1
|
|
366
|
-
bd create "Implement [ComponentName] component" -t task -p 2
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
**Suggested Follow-up Commands:**
|
|
370
|
-
|
|
371
|
-
- `/design src/styles/tokens.css` - Create token file from extracted values
|
|
372
|
-
- `/implement bd-<token-task>` - Implement the design tokens
|
|
373
|
-
- `/fix-ui src/components/Button.tsx --compare mockup.png` - Fix component to match
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
## Quick Mode (--quick)
|
|
378
|
-
|
|
379
|
-
When `--quick` is specified, output only:
|
|
380
|
-
|
|
381
|
-
1. **Summary** (2-3 sentences)
|
|
382
|
-
2. **Color palette** (hex values only, no CSS)
|
|
383
|
-
3. **Component list** (names and library matches)
|
|
384
|
-
4. **Top 3 accessibility issues**
|
|
385
|
-
5. **Suggested next command**
|
|
386
|
-
|
|
387
|
-
Skip: detailed breakdowns, CSS output, typography scale, comparison mode.
|
|
388
|
-
|
|
389
|
-
---
|
|
390
|
-
|
|
391
|
-
## Examples
|
|
392
|
-
|
|
393
|
-
```bash
|
|
394
|
-
# Full analysis of a mockup
|
|
395
|
-
/analyze-mockup designs/homepage.png
|
|
396
|
-
|
|
397
|
-
# Quick color extraction
|
|
398
|
-
/analyze-mockup designs/button.png colors --quick
|
|
399
|
-
|
|
400
|
-
# Deep layout analysis
|
|
401
|
-
/analyze-mockup designs/dashboard.png layout --deep
|
|
402
|
-
|
|
403
|
-
# Compare implementation to mockup
|
|
404
|
-
/analyze-mockup designs/card.png components --compare src/components/Card.tsx
|
|
405
|
-
|
|
406
|
-
# Accessibility audit
|
|
407
|
-
/analyze-mockup designs/form.png a11y
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
---
|
|
411
|
-
|
|
412
|
-
## Output Storage
|
|
413
|
-
|
|
414
|
-
Save analysis to `.opencode/memory/design/analysis/[mockup-name].md` for future reference.
|
|
415
|
-
|
|
416
|
-
## Related Commands
|
|
417
|
-
|
|
418
|
-
| Need | Command |
|
|
419
|
-
| ---------------------------- | ------------------------- |
|
|
420
|
-
| Implement the design | `/design` or `/implement` |
|
|
421
|
-
| Audit existing design system | `/design-audit` |
|
|
422
|
-
| Fix UI to match mockup | `/fix-ui --compare` |
|
|
423
|
-
| Check accessibility | `/accessibility-check` |
|