opencodekit 0.10.0 → 0.11.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.
Files changed (47) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/planner.md +3 -2
  3. package/dist/template/.opencode/command/accessibility-check.md +297 -30
  4. package/dist/template/.opencode/command/analyze-mockup.md +412 -20
  5. package/dist/template/.opencode/command/analyze-project.md +445 -30
  6. package/dist/template/.opencode/command/brainstorm.md +294 -5
  7. package/dist/template/.opencode/command/commit.md +231 -17
  8. package/dist/template/.opencode/command/create.md +415 -77
  9. package/dist/template/.opencode/command/design-audit.md +483 -29
  10. package/dist/template/.opencode/command/design.md +615 -6
  11. package/dist/template/.opencode/command/edit-image.md +223 -20
  12. package/dist/template/.opencode/command/finish.md +163 -71
  13. package/dist/template/.opencode/command/fix-ci.md +297 -24
  14. package/dist/template/.opencode/command/fix-types.md +351 -13
  15. package/dist/template/.opencode/command/fix-ui.md +299 -13
  16. package/dist/template/.opencode/command/fix.md +262 -9
  17. package/dist/template/.opencode/command/generate-diagram.md +327 -26
  18. package/dist/template/.opencode/command/generate-icon.md +266 -22
  19. package/dist/template/.opencode/command/generate-image.md +232 -12
  20. package/dist/template/.opencode/command/generate-pattern.md +234 -20
  21. package/dist/template/.opencode/command/generate-storyboard.md +231 -21
  22. package/dist/template/.opencode/command/handoff.md +208 -31
  23. package/dist/template/.opencode/command/implement.md +163 -50
  24. package/dist/template/.opencode/command/import-plan.md +253 -52
  25. package/dist/template/.opencode/command/init.md +154 -35
  26. package/dist/template/.opencode/command/integration-test.md +410 -24
  27. package/dist/template/.opencode/command/issue.md +177 -21
  28. package/dist/template/.opencode/command/new-feature.md +390 -54
  29. package/dist/template/.opencode/command/plan.md +394 -107
  30. package/dist/template/.opencode/command/pr.md +235 -29
  31. package/dist/template/.opencode/command/quick-build.md +234 -5
  32. package/dist/template/.opencode/command/research-and-implement.md +442 -12
  33. package/dist/template/.opencode/command/research-ui.md +444 -34
  34. package/dist/template/.opencode/command/research.md +179 -45
  35. package/dist/template/.opencode/command/restore-image.md +416 -22
  36. package/dist/template/.opencode/command/resume.md +447 -63
  37. package/dist/template/.opencode/command/revert-feature.md +347 -65
  38. package/dist/template/.opencode/command/review-codebase.md +199 -4
  39. package/dist/template/.opencode/command/skill-create.md +506 -14
  40. package/dist/template/.opencode/command/skill-optimize.md +487 -16
  41. package/dist/template/.opencode/command/status.md +326 -60
  42. package/dist/template/.opencode/command/summarize.md +374 -33
  43. package/dist/template/.opencode/command/triage.md +361 -0
  44. package/dist/template/.opencode/command/ui-review.md +296 -25
  45. package/dist/template/.opencode/skill/beads/SKILL.md +108 -3
  46. package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
  47. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
750
750
  // package.json
751
751
  var package_default = {
752
752
  name: "opencodekit",
753
- version: "0.10.0",
753
+ version: "0.11.1",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
755
  type: "module",
756
756
  repository: {
@@ -4,8 +4,8 @@ mode: subagent
4
4
  temperature: 0.2
5
5
  tools:
6
6
  bash: false
7
- edit: false
8
- write: false
7
+ edit: true
8
+ write: true
9
9
  patch: false
10
10
  glob: true
11
11
  grep: true
@@ -21,6 +21,7 @@ tools:
21
21
  gh_grep*: true
22
22
  memory-read: true
23
23
  memory-update: true
24
+ bd_*: true
24
25
  ---
25
26
 
26
27
  # Plan Agent
@@ -7,60 +7,327 @@ model: proxypal/gemini-3-flash-preview
7
7
 
8
8
  # Accessibility Check: $ARGUMENTS
9
9
 
10
- skill({ name: "accessibility-audit" })
10
+ ## Phase 1: Load Context
11
11
 
12
- Perform WCAG accessibility audit.
12
+ **Load skills:**
13
13
 
14
- ## Instructions
14
+ ````typescript
15
+ skill({ name: "beads" }); // Session protocol
16
+ skill({ name: "accessibility-audit" });
17
+
18
+ ```typescript
19
+ skill({ name: "accessibility-audit" });
20
+ ````
21
+
22
+ **Check for bead context:**
23
+
24
+ ```typescript
25
+ bd_show({ id: "$ARGUMENTS" }); // If bead ID provided
26
+ ```
15
27
 
16
28
  Parse path and WCAG level from `$ARGUMENTS` (default: AA).
17
29
 
18
- Determine input type:
30
+ ## Phase 2: Estimate Complexity
19
31
 
20
- - **Image/screenshot**: Visual accessibility analysis
21
- - **Component path**: Code accessibility patterns
32
+ | Signals | Estimate | Approach |
33
+ | ------------------------------ | -------- | --------------- |
34
+ | Single component, few elements | S (~10) | Quick audit |
35
+ | Page with multiple components | M (~30) | Full audit |
36
+ | Complex app, multiple pages | L (~100) | Comprehensive |
37
+ | Design system audit | XL | Systematic scan |
22
38
 
23
- ## Visual Analysis
39
+ ## Phase 3: Determine Input Type
24
40
 
25
- Check:
41
+ - **Image/screenshot**: Visual accessibility analysis (Phase 4)
42
+ - **Component path**: Code accessibility patterns (Phase 5)
43
+ - **URL**: Run automated + visual analysis (Phase 4 + 5)
26
44
 
27
- 1. **Color contrast** - Text/background ratios (AA: 4.5:1 normal, 3:1 large)
28
- 2. **Touch targets** - Interactive elements ≥44x44px
29
- 3. **Visual information** - Color-only cues, missing labels
30
- 4. **Content structure** - Heading hierarchy, reading order
31
- 5. **Interactive states** - Focus indicators, hover states
45
+ ## Phase 4: Visual Analysis
32
46
 
33
- ## Code Analysis
47
+ ### Color & Contrast
34
48
 
35
- Search for:
49
+ | Check | WCAG Ref | Requirement |
50
+ | ------------------------ | ----------- | ---------------------------- |
51
+ | Text contrast | 1.4.3 (AA) | 4.5:1 normal, 3:1 large text |
52
+ | UI component contrast | 1.4.11 (AA) | 3:1 against adjacent colors |
53
+ | Focus indicator contrast | 1.4.11 (AA) | 3:1 contrast |
54
+ | Color-only information | 1.4.1 (A) | Don't rely on color alone |
36
55
 
37
- - Missing alt text on images
38
- - Click handlers on non-interactive elements
39
- - Form inputs without labels
40
- - Missing ARIA attributes
56
+ ### Touch & Interaction
41
57
 
42
- ## Output
58
+ | Check | WCAG Ref | Requirement |
59
+ | ----------------- | ----------- | -------------------------- |
60
+ | Touch target size | 2.5.5 (AAA) | ≥44x44px (≥24x24 for AA) |
61
+ | Target spacing | 2.5.8 (AA) | Adequate spacing between |
62
+ | Pointer gestures | 2.5.1 (A) | Single pointer alternative |
63
+
64
+ ### Visual Structure
65
+
66
+ | Check | WCAG Ref | Requirement |
67
+ | ----------------- | ----------- | ----------------------------- |
68
+ | Heading hierarchy | 1.3.1 (A) | Logical heading order |
69
+ | Reading order | 1.3.2 (A) | Meaningful sequence |
70
+ | Text spacing | 1.4.12 (AA) | Adjustable without loss |
71
+ | Reflow | 1.4.10 (AA) | No horizontal scroll at 320px |
72
+
73
+ ### Motion & Animation
74
+
75
+ | Check | WCAG Ref | Requirement |
76
+ | ----------------------- | ----------- | ------------------------------- |
77
+ | Motion from interaction | 2.3.3 (AAA) | Can be disabled |
78
+ | Reduced motion | 2.3.3 | Respects prefers-reduced-motion |
79
+ | Auto-playing media | 1.4.2 (A) | Pause/stop/hide controls |
80
+ | Flashing content | 2.3.1 (A) | No more than 3 flashes/second |
81
+
82
+ ## Phase 5: Code Analysis
83
+
84
+ ### Automated Testing
85
+
86
+ Run axe-core or Lighthouse:
87
+
88
+ ```bash
89
+ # Using Lighthouse
90
+ npx lighthouse <url> --only-categories=accessibility --output=json
91
+
92
+ # Using axe-core in tests
93
+ npm install -D @axe-core/playwright # or jest-axe
94
+ ```
95
+
96
+ ```typescript
97
+ // Playwright + axe example
98
+ import { injectAxe, checkA11y } from "@axe-core/playwright";
99
+
100
+ await injectAxe(page);
101
+ await checkA11y(page);
102
+ ```
103
+
104
+ ### Semantic HTML Checks
105
+
106
+ ```typescript
107
+ // Find images without alt text
108
+ ast - grep({ pattern: "<img $$$>" }); // Check for alt attribute
109
+
110
+ // Find click handlers on non-interactive elements
111
+ ast - grep({ pattern: "<div onClick={$$$}>" });
112
+ ast - grep({ pattern: "<span onClick={$$$}>" });
113
+
114
+ // Find form inputs without labels
115
+ ast - grep({ pattern: "<input $$$>" }); // Check for id + matching label
116
+ ```
117
+
118
+ ### ARIA Pattern Checks
119
+
120
+ | Pattern | Required ARIA |
121
+ | --------------- | ------------------------------------------ |
122
+ | Modal dialog | role="dialog", aria-modal, aria-labelledby |
123
+ | Dropdown menu | role="menu", aria-expanded, aria-haspopup |
124
+ | Tab panel | role="tablist/tab/tabpanel", aria-selected |
125
+ | Accordion | aria-expanded, aria-controls |
126
+ | Alert | role="alert", aria-live="assertive" |
127
+ | Toast | role="status", aria-live="polite" |
128
+ | Loading spinner | aria-busy, aria-live |
129
+
130
+ ### Focus Management
131
+
132
+ | Check | Requirement |
133
+ | ------------------- | ----------------------------------- |
134
+ | Focus visible | All interactive elements show focus |
135
+ | Focus order | Logical tab sequence |
136
+ | Focus trap (modals) | Focus contained within modal |
137
+ | Focus restoration | Focus returns after modal closes |
138
+ | Skip links | Skip to main content available |
139
+
140
+ ```typescript
141
+ // Check for focus styles
142
+ grep({ pattern: ":focus", include: "*.css" });
143
+ grep({ pattern: "focus:", include: "*.tsx" }); // Tailwind
144
+ ```
145
+
146
+ ## Phase 6: Keyboard Navigation Testing
147
+
148
+ Test manually or with Playwright:
149
+
150
+ ```typescript
151
+ skill({ name: "playwright" });
152
+ skill_mcp({
153
+ skill_name: "playwright",
154
+ tool_name: "browser_press_key",
155
+ arguments: '{"key": "Tab"}',
156
+ });
157
+ ```
158
+
159
+ | Action | Expected Behavior |
160
+ | ---------- | ---------------------------------------- |
161
+ | Tab | Moves to next interactive element |
162
+ | Shift+Tab | Moves to previous element |
163
+ | Enter | Activates buttons, links |
164
+ | Space | Toggles checkboxes, activates buttons |
165
+ | Arrow keys | Navigate within components (tabs, menus) |
166
+ | Escape | Closes modals, dropdowns |
167
+
168
+ ```
169
+ Keyboard Navigation:
170
+ ━━━━━━━━━━━━━━━━━━━━
171
+
172
+ - Tab order: [logical/broken at X]
173
+ - Focus visible: [all/missing on X]
174
+ - Enter/Space: [working/broken on X]
175
+ - Escape: [working/not implemented]
176
+ - Skip link: [present/missing]
177
+ ```
178
+
179
+ ## Phase 7: Screen Reader Guidance
180
+
181
+ For manual testing, suggest:
43
182
 
44
- ```markdown
45
- ## Accessibility Audit
183
+ | Platform | Screen Reader | Command to Start |
184
+ | -------- | ------------- | ------------------------ |
185
+ | macOS | VoiceOver | Cmd + F5 |
186
+ | Windows | NVDA | Ctrl + Alt + N |
187
+ | Windows | Narrator | Win + Ctrl + Enter |
188
+ | iOS | VoiceOver | Settings > Accessibility |
189
+ | Android | TalkBack | Settings > Accessibility |
46
190
 
47
- **WCAG Level:** [level]
191
+ **Key things to verify:**
48
192
 
49
- ### Critical Issues
193
+ - [ ] All content is announced
194
+ - [ ] Images have meaningful alt text
195
+ - [ ] Form fields announce labels
196
+ - [ ] Error messages are announced
197
+ - [ ] Dynamic content updates are announced (aria-live)
50
198
 
51
- - [ ] Issue + WCAG ref + fix
199
+ ## Phase 8: Generate Report
200
+
201
+ ````markdown
202
+ ## Accessibility Audit: [Component/Page]
203
+
204
+ **WCAG Level:** [A/AA/AAA]
205
+ **Automated Score:** [Lighthouse score if available]
206
+
207
+ ### Summary
208
+
209
+ | Category | Critical | Major | Minor | Passed |
210
+ | -------------- | -------- | ----- | ----- | ------ |
211
+ | Perceivable | [N] | [N] | [N] | [N] |
212
+ | Operable | [N] | [N] | [N] | [N] |
213
+ | Understandable | [N] | [N] | [N] | [N] |
214
+ | Robust | [N] | [N] | [N] | [N] |
215
+
216
+ ### Critical Issues (Must Fix)
217
+
218
+ #### [Issue Title]
219
+
220
+ - **WCAG:** [criterion number and name]
221
+ - **Location:** [file:line or element description]
222
+ - **Problem:** [description]
223
+ - **Fix:**
224
+
225
+ ```[language]
226
+ [code fix]
227
+ ```
228
+ ````
52
229
 
53
230
  ### Major Issues
54
231
 
55
- - [ ] Issue + WCAG ref + fix
232
+ [Same format]
56
233
 
57
234
  ### Minor Issues
58
235
 
59
- - [ ] Issue + WCAG ref + fix
236
+ [Same format]
237
+
238
+ ### Passed Checks
239
+
240
+ - Color contrast: [ratio] meets [level]
241
+ - Touch targets: [size] meets requirement
242
+ - Heading structure: Logical hierarchy
243
+ - Keyboard navigation: All elements reachable
244
+ - Focus indicators: Visible on all elements
245
+
246
+ ````
247
+
248
+ ## Phase 9: Create Observation
249
+
250
+ If patterns discovered:
251
+
252
+ ```typescript
253
+ observation({
254
+ type: "pattern",
255
+ title: "A11y pattern: [name]",
256
+ content: `
257
+ ## Pattern
258
+ [Description of accessibility pattern]
259
+
260
+ ## Implementation
261
+ \`\`\`tsx
262
+ [Accessible code example]
263
+ \`\`\`
264
+
265
+ ## Common Mistakes
266
+ - [What to avoid]
267
+ `,
268
+ concepts: "accessibility, wcag, [specific area]",
269
+ bead_id: "<bead-id>",
270
+ });
271
+ ````
272
+
273
+ ## Phase 10: Verify Fixes
274
+
275
+ After fixes applied, re-run checks:
276
+
277
+ ```bash
278
+ npx lighthouse <url> --only-categories=accessibility
279
+ ```
280
+
281
+ ```
282
+ Verification:
283
+ ━━━━━━━━━━━━━
284
+
285
+ Before: [N] issues
286
+ After: [N] issues
287
+ Resolved: [N]
288
+
289
+ Remaining:
290
+ - [Any outstanding issues]
291
+ ```
292
+
293
+ ## Phase 11: Sync
294
+
295
+ ```typescript
296
+ bd_sync({ reason: "Accessibility audit for $ARGUMENTS" });
297
+ ```
298
+
299
+ ## Output
300
+
301
+ ```
302
+ Accessibility Audit Complete: $ARGUMENTS
303
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
304
+
305
+ WCAG Level: [AA]
306
+ Estimate: [S/M/L]
307
+
308
+ Results:
309
+ - Critical: [N]
310
+ - Major: [N]
311
+ - Minor: [N]
312
+ - Passed: [N]
60
313
 
61
- ### Passed
314
+ Automated Score: [N]/100 (Lighthouse)
62
315
 
63
- - What passed
316
+ Key Fixes Needed:
317
+ 1. [Most critical issue]
318
+ 2. [Second issue]
319
+ 3. [Third issue]
320
+
321
+ Report: .beads/artifacts/<bead-id>/a11y-audit.md (if bead)
64
322
  ```
65
323
 
66
- Include code fix snippets for each issue.
324
+ **Next steps:**
325
+
326
+ ```
327
+ Fix issues:
328
+ /fix-ui <bead-id> # Fix visual issues
329
+ /fix <bead-id> # Fix code issues
330
+
331
+ After fixing:
332
+ /accessibility-check <path> # Re-run audit
333
+ ```