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