opencodekit 0.15.21 → 0.16.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 (116) hide show
  1. package/dist/index.js +5 -7
  2. package/dist/template/.opencode/AGENTS.md +21 -20
  3. package/dist/template/.opencode/agent/build.md +88 -7
  4. package/dist/template/.opencode/agent/explore.md +1 -1
  5. package/dist/template/.opencode/agent/general.md +54 -4
  6. package/dist/template/.opencode/agent/looker.md +1 -1
  7. package/dist/template/.opencode/agent/painter.md +1 -1
  8. package/dist/template/.opencode/agent/plan.md +52 -0
  9. package/dist/template/.opencode/agent/review.md +1 -1
  10. package/dist/template/.opencode/agent/scout.md +3 -3
  11. package/dist/template/.opencode/agent/vision.md +1 -1
  12. package/dist/template/.opencode/command/create.md +201 -95
  13. package/dist/template/.opencode/command/design.md +5 -7
  14. package/dist/template/.opencode/command/handoff.md +7 -0
  15. package/dist/template/.opencode/command/init.md +25 -47
  16. package/dist/template/.opencode/command/plan.md +35 -16
  17. package/dist/template/.opencode/command/resume.md +7 -18
  18. package/dist/template/.opencode/command/ship.md +156 -0
  19. package/dist/template/.opencode/command/start.md +315 -28
  20. package/dist/template/.opencode/command/ui-review.md +5 -7
  21. package/dist/template/.opencode/command/verify.md +279 -0
  22. package/dist/template/.opencode/memory/_templates/README.md +57 -19
  23. package/dist/template/.opencode/memory/_templates/prd.md +29 -0
  24. package/dist/template/.opencode/memory/_templates/project/tech-stack.md +50 -0
  25. package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
  26. package/dist/template/.opencode/memory/_templates/spec.md +66 -0
  27. package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
  28. package/dist/template/.opencode/memory/observations/2026-02-01-decision-add-skills-vs-commands-to-global-agents-.md +15 -0
  29. package/dist/template/.opencode/memory/observations/2026-02-01-decision-build-agent-auto-loads-skills-contextual.md +31 -0
  30. package/dist/template/.opencode/memory/observations/2026-02-01-decision-fixed-agent-configuration-for-opencodeki.md +25 -0
  31. package/dist/template/.opencode/memory/observations/2026-02-01-decision-focused-agents-md-upgrade-for-opencode-k.md +14 -0
  32. package/dist/template/.opencode/memory/observations/2026-02-01-decision-implement-tier-1-permission-upgrades.md +15 -0
  33. package/dist/template/.opencode/memory/observations/2026-02-01-decision-instructions-config-explicit-paths-not-w.md +40 -0
  34. package/dist/template/.opencode/memory/observations/2026-02-01-decision-merged-context-into-memory-project-singl.md +42 -0
  35. package/dist/template/.opencode/memory/observations/2026-02-01-decision-oracle-tool-should-use-review-agent-not-.md +14 -0
  36. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-agent-auto-loads-skills-contextuall.md +31 -0
  37. package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-phased-oracle-command-merge-into-ne.md +14 -0
  38. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prd-workflow-uses-prd-and-prd-task-skill.md +23 -0
  39. package/dist/template/.opencode/memory/observations/2026-02-01-decision-prefer-review-agent-via-opencode-cli-ove.md +14 -0
  40. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-add-ship-command-with.md +14 -0
  41. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command-.md +14 -0
  42. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command.md +14 -0
  43. package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-skills-vs-commands-section-from-a.md +14 -0
  44. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-tool-with-ship-command-fl.md +14 -0
  45. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-with-ship-command-workflo.md +14 -0
  46. package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-proxypal-oracle-with-cli-review-.md +14 -0
  47. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-dist-template-only-tech-stack.md +50 -0
  48. package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-templates-only-tech-stack-md.md +26 -0
  49. package/dist/template/.opencode/memory/observations/2026-02-01-decision-subagents-load-minimal-skills-stay-lean.md +29 -0
  50. package/dist/template/.opencode/memory/observations/2026-02-01-decision-user-approved-permission-upgrades-in-ope.md +15 -0
  51. package/dist/template/.opencode/memory/observations/2026-02-01-discovery-verify-command-already-implemented.md +28 -0
  52. package/dist/template/.opencode/memory/observations/2026-02-01-feature-openspec-phase-b-complete-template-upgra.md +43 -0
  53. package/dist/template/.opencode/memory/observations/2026-02-01-learning-build-agent-should-use-dynamic-lsp-not-f.md +14 -0
  54. package/dist/template/.opencode/memory/observations/2026-02-01-learning-kimi-k2-5-model-requires-temperature-1-0.md +22 -0
  55. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-already-imple.md +27 -0
  56. package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-uses-instruct.md +35 -0
  57. package/dist/template/.opencode/memory/observations/2026-02-01-learning-update-build-agent-prompt-to-use-context.md +14 -0
  58. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-using-opencode-expert-.md +14 -0
  59. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-g.md +14 -0
  60. package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-r.md +14 -0
  61. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-prefers-copilot-gpt-5-2-codex-mediu.md +14 -0
  62. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-contextu.md +15 -0
  63. package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-reviewed.md +15 -0
  64. package/dist/template/.opencode/memory/project/command-rules.md +122 -0
  65. package/dist/template/.opencode/memory/project/tech-stack.md +50 -0
  66. package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
  67. package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
  68. package/dist/template/.opencode/opencode.json +916 -803
  69. package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
  70. package/package.json +1 -1
  71. package/dist/template/.opencode/command/accessibility-check.md +0 -331
  72. package/dist/template/.opencode/command/agent-browser.md +0 -21
  73. package/dist/template/.opencode/command/analyze-mockup.md +0 -423
  74. package/dist/template/.opencode/command/analyze-project.md +0 -295
  75. package/dist/template/.opencode/command/brainstorm.md +0 -373
  76. package/dist/template/.opencode/command/cloudflare.md +0 -70
  77. package/dist/template/.opencode/command/commit.md +0 -245
  78. package/dist/template/.opencode/command/complete-next-task.md +0 -77
  79. package/dist/template/.opencode/command/design-audit.md +0 -480
  80. package/dist/template/.opencode/command/edit-image.md +0 -242
  81. package/dist/template/.opencode/command/finish.md +0 -255
  82. package/dist/template/.opencode/command/fix-ci.md +0 -109
  83. package/dist/template/.opencode/command/fix-types.md +0 -104
  84. package/dist/template/.opencode/command/fix-ui.md +0 -117
  85. package/dist/template/.opencode/command/fix.md +0 -168
  86. package/dist/template/.opencode/command/frontend-design.md +0 -21
  87. package/dist/template/.opencode/command/generate-diagram.md +0 -349
  88. package/dist/template/.opencode/command/generate-icon.md +0 -283
  89. package/dist/template/.opencode/command/generate-image.md +0 -246
  90. package/dist/template/.opencode/command/generate-pattern.md +0 -247
  91. package/dist/template/.opencode/command/generate-storyboard.md +0 -250
  92. package/dist/template/.opencode/command/implement.md +0 -609
  93. package/dist/template/.opencode/command/import-plan.md +0 -406
  94. package/dist/template/.opencode/command/index-knowledge.md +0 -25
  95. package/dist/template/.opencode/command/integration-test.md +0 -424
  96. package/dist/template/.opencode/command/issue.md +0 -102
  97. package/dist/template/.opencode/command/new-feature.md +0 -651
  98. package/dist/template/.opencode/command/opensrc.md +0 -58
  99. package/dist/template/.opencode/command/quick-build.md +0 -238
  100. package/dist/template/.opencode/command/ralph.md +0 -41
  101. package/dist/template/.opencode/command/research-and-implement.md +0 -148
  102. package/dist/template/.opencode/command/research-ui.md +0 -466
  103. package/dist/template/.opencode/command/restore-image.md +0 -424
  104. package/dist/template/.opencode/command/revert-feature.md +0 -386
  105. package/dist/template/.opencode/command/skill-create.md +0 -517
  106. package/dist/template/.opencode/command/skill-optimize.md +0 -556
  107. package/dist/template/.opencode/command/summarize.md +0 -412
  108. package/dist/template/.opencode/command/triage.md +0 -398
  109. package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
  110. package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
  111. package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
  112. package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
  113. package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
  114. package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
  115. package/dist/template/.opencode/tool/notebooklm.ts +0 -488
  116. package/dist/template/.opencode/tool/oracle.ts +0 -240
@@ -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` |
@@ -1,295 +0,0 @@
1
- ---
2
- description: Analyze project health, quality standards, and ready work
3
- argument-hint: "[--quick|--deep]"
4
- agent: build
5
- ---
6
-
7
- # Analyze Project
8
-
9
- Comprehensive project analysis with stack-specific best practices.
10
-
11
- ## Arguments
12
-
13
- $ARGUMENTS
14
-
15
- ---
16
-
17
- ## Phase 1: Environment Detection
18
-
19
- Detect project type to determine analysis strategy:
20
-
21
- ```bash
22
- # Check config files
23
- ls -la package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle 2>/dev/null || true
24
-
25
- # Check lock files for package manager
26
- ls -la bun.lockb yarn.lock pnpm-lock.yaml package-lock.json 2>/dev/null || true
27
-
28
- # Check for monorepo
29
- ls -la pnpm-workspace.yaml lerna.json nx.json turbo.json 2>/dev/null || true
30
- ```
31
-
32
- Read the main config file to detect framework:
33
-
34
- ```typescript
35
- read({ filePath: "package.json" }); // or pyproject.toml, Cargo.toml, etc.
36
- ```
37
-
38
- ---
39
-
40
- ## Phase 2: Parallel Research & Discovery
41
-
42
- Once stack is detected, launch parallel subagent tasks using the Task tool.
43
- Run all three in parallel (single message with multiple Task calls):
44
-
45
- ```typescript
46
- // Scout: Research best practices for detected stack
47
- Task({
48
- subagent_type: "scout",
49
- description: "Best practices research",
50
- prompt: `Research best practices for [DETECTED_STACK]:
51
- - Code quality standards and linting rules
52
- - Testing patterns and coverage expectations
53
- - Project structure conventions
54
- - Common anti-patterns to avoid
55
- Return as actionable checklist with specific recommendations.`,
56
- });
57
-
58
- // Scout: Framework-specific quality standards
59
- Task({
60
- subagent_type: "scout",
61
- description: "Quality standards research",
62
- prompt: `Research quality standards for [DETECTED_FRAMEWORK]:
63
- - Recommended ESLint/Biome/Ruff rules
64
- - Type safety requirements
65
- - Performance best practices
66
- - Security checklist
67
- Return as comparison criteria checklist.`,
68
- });
69
-
70
- // Explore: Analyze codebase architecture
71
- Task({
72
- subagent_type: "explore",
73
- description: "Architecture analysis",
74
- prompt: `Analyze this codebase architecture thoroughly:
75
- - Directory structure pattern (feature-based, layer-based, etc.)
76
- - Key modules and their responsibilities
77
- - Entry points and data flow
78
- - Test organization and coverage patterns
79
- Return as detailed architecture summary with file paths.`,
80
- });
81
- ```
82
-
83
- **Fallback:** If Task tool fails or network is unavailable, use local tools:
84
-
85
- - `memory-search` for existing project knowledge
86
- - Use `glob` + `read` to explore structure
87
- - Skip external research phases
88
-
89
- ---
90
-
91
- ## Phase 3: Git & Version Control Health
92
-
93
- ```bash
94
- # Current state
95
- git status --short
96
- git branch --show-current
97
- git log --oneline -5
98
-
99
- # Commits ahead/behind
100
- git rev-list --left-right --count origin/main...HEAD 2>/dev/null || true
101
-
102
- # Recent activity
103
- git log -1 --format="%h %s (%cr by %an)"
104
-
105
- # Uncommitted changes
106
- git diff --stat
107
- ```
108
-
109
- ---
110
-
111
- ## Phase 4: Code Quality Checks
112
-
113
- Run quality checks based on detected stack:
114
-
115
- ### For TypeScript/JavaScript:
116
-
117
- ```bash
118
- # Type errors
119
- npm run typecheck 2>/dev/null || npx tsc --noEmit 2>/dev/null || true
120
-
121
- # Linting
122
- npm run lint 2>/dev/null || npx biome check . 2>/dev/null || npx eslint . 2>/dev/null || true
123
-
124
- # TODO/FIXME count
125
- grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" 2>/dev/null | wc -l || echo "0"
126
- ```
127
-
128
- ### For Python:
129
-
130
- ```bash
131
- # Type checking
132
- mypy . 2>/dev/null || true
133
-
134
- # Linting
135
- ruff check . 2>/dev/null || pylint **/*.py 2>/dev/null || true
136
-
137
- # TODO count
138
- grep -r "TODO\|FIXME" . --include="*.py" 2>/dev/null | wc -l || echo "0"
139
- ```
140
-
141
- ### For Rust:
142
-
143
- ```bash
144
- cargo check 2>/dev/null || true
145
- cargo clippy 2>/dev/null || true
146
- ```
147
-
148
- ---
149
-
150
- ## Phase 5: Test Health
151
-
152
- ```bash
153
- # Run tests with coverage if available
154
- npm test -- --coverage 2>/dev/null || \
155
- bun test --coverage 2>/dev/null || \
156
- pytest --cov 2>/dev/null || \
157
- cargo test 2>/dev/null || \
158
- go test ./... 2>/dev/null || \
159
- echo "No test runner detected"
160
- ```
161
-
162
- ---
163
-
164
- ## Phase 6: Dependency & Security Health
165
-
166
- ```bash
167
- # Outdated dependencies
168
- npm outdated 2>/dev/null || pnpm outdated 2>/dev/null || pip list --outdated 2>/dev/null || true
169
-
170
- # Security audit
171
- npm audit 2>/dev/null || pip-audit 2>/dev/null || cargo audit 2>/dev/null || true
172
- ```
173
-
174
- ---
175
-
176
- ## Phase 7: CI/CD & Documentation Health
177
-
178
- ```bash
179
- # CI status (GitHub Actions)
180
- gh run list --limit 3 2>/dev/null || true
181
-
182
- # Documentation presence
183
- ls -la README.md CHANGELOG.md CONTRIBUTING.md AGENTS.md docs/ 2>/dev/null || true
184
-
185
- # README freshness
186
- git log -1 --format="%cr" -- README.md 2>/dev/null || true
187
- ```
188
-
189
- ---
190
-
191
- ## Phase 8: Task/Work Health (if Beads configured)
192
-
193
- ```bash
194
- bd status 2>/dev/null || echo "Beads not configured"
195
- bd ready 2>/dev/null || true
196
- bd blocked 2>/dev/null || true
197
- ```
198
-
199
- ---
200
-
201
- ## Phase 9: Integrate Research Results
202
-
203
- Task tool returns results directly - no collection needed.
204
- Integrate findings from Phase 2 subagents into the report:
205
-
206
- 1. **Best practices checklist** → Compare against Phase 4 quality results
207
- 2. **Quality standards** → Use as criteria for Health Score calculation
208
- 3. **Architecture summary** → Include in report Architecture section
209
-
210
- If subagents failed in Phase 2, use fallback data:
211
-
212
- - Check `memory-read({ file: "project/architecture" })` for cached architecture
213
- - Use `glob` + `read` to explore structure
214
- - Skip best practices comparison (mark as "N/A - offline mode")
215
-
216
- ---
217
-
218
- ## Phase 10: Generate Report
219
-
220
- Compile all findings into a comprehensive report:
221
-
222
- ```markdown
223
- # Project Analysis Report
224
-
225
- **Generated:** [DATE]
226
- **Stack:** [DETECTED_STACK]
227
- **Framework:** [DETECTED_FRAMEWORK]
228
-
229
- ## Health Score: X/100
230
-
231
- | Category | Score | Status | Notes |
232
- | ------------- | ----- | ------- | ----------------- |
233
- | Security | X/20 | OK/Warn | X vulnerabilities |
234
- | Code Quality | X/20 | OK/Warn | X lint errors |
235
- | Test Coverage | X/20 | OK/Warn | X% coverage |
236
- | Dependencies | X/20 | OK/Warn | X outdated |
237
- | Documentation | X/20 | OK/Warn | X missing |
238
-
239
- ## Current State vs Best Practices
240
-
241
- Based on [FRAMEWORK] best practices research:
242
-
243
- | Practice | Expected | Actual | Status |
244
- | ------------------- | ----------- | -------- | ------ |
245
- | Type Safety | Strict mode | ... | ✓/✗ |
246
- | Test Coverage | >80% | X% | ✓/✗ |
247
- | Linting | Zero errors | X errors | ✓/✗ |
248
- | Dependency Security | No vulns | X vulns | ✓/✗ |
249
-
250
- ## Architecture Summary
251
-
252
- [From explore agent]
253
-
254
- ## Priority Recommendations
255
-
256
- 1. **[HIGH]** [Action based on findings]
257
- 2. **[MEDIUM]** [Action based on findings]
258
- 3. **[LOW]** [Action based on findings]
259
-
260
- ## Ready Work
261
-
262
- | ID | Title | Priority | Type |
263
- | --- | ----- | -------- | ---- |
264
- | ... | ... | ... | ... |
265
- ```
266
-
267
- ---
268
-
269
- ## Phase 11: Save to Memory
270
-
271
- Save report for trend tracking:
272
-
273
- ```typescript
274
- memory_update({
275
- file: "project/analysis-[YYYY-MM-DD]",
276
- content: "[GENERATED_REPORT]",
277
- mode: "replace",
278
- });
279
- ```
280
-
281
- ---
282
-
283
- ## Output Modes
284
-
285
- ### --quick (Default)
286
-
287
- - Phase 1, 3, 8 only
288
- - ~30 seconds
289
- - Basic status dashboard
290
-
291
- ### --deep
292
-
293
- - All phases including subagent research
294
- - ~3-5 minutes
295
- - Full analysis with best practices comparison