opencodekit 0.12.4 → 0.12.5

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 (60) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/template/.opencode/command/accessibility-check.md +7 -10
  3. package/dist/template/.opencode/command/analyze-mockup.md +3 -16
  4. package/dist/template/.opencode/command/analyze-project.md +57 -69
  5. package/dist/template/.opencode/command/brainstorm.md +3 -11
  6. package/dist/template/.opencode/command/commit.md +10 -18
  7. package/dist/template/.opencode/command/create.md +4 -8
  8. package/dist/template/.opencode/command/design-audit.md +24 -51
  9. package/dist/template/.opencode/command/design.md +10 -17
  10. package/dist/template/.opencode/command/finish.md +9 -9
  11. package/dist/template/.opencode/command/fix-ci.md +7 -28
  12. package/dist/template/.opencode/command/fix-types.md +3 -7
  13. package/dist/template/.opencode/command/fix-ui.md +5 -11
  14. package/dist/template/.opencode/command/fix.md +4 -10
  15. package/dist/template/.opencode/command/handoff.md +8 -14
  16. package/dist/template/.opencode/command/implement.md +13 -16
  17. package/dist/template/.opencode/command/import-plan.md +20 -38
  18. package/dist/template/.opencode/command/init.md +9 -13
  19. package/dist/template/.opencode/command/integration-test.md +11 -13
  20. package/dist/template/.opencode/command/issue.md +4 -8
  21. package/dist/template/.opencode/command/new-feature.md +20 -40
  22. package/dist/template/.opencode/command/plan.md +8 -12
  23. package/dist/template/.opencode/command/pr.md +29 -38
  24. package/dist/template/.opencode/command/quick-build.md +3 -7
  25. package/dist/template/.opencode/command/research-and-implement.md +4 -6
  26. package/dist/template/.opencode/command/research.md +10 -7
  27. package/dist/template/.opencode/command/resume.md +12 -24
  28. package/dist/template/.opencode/command/revert-feature.md +21 -56
  29. package/dist/template/.opencode/command/review-codebase.md +21 -23
  30. package/dist/template/.opencode/command/skill-create.md +1 -5
  31. package/dist/template/.opencode/command/skill-optimize.md +3 -10
  32. package/dist/template/.opencode/command/status.md +28 -25
  33. package/dist/template/.opencode/command/triage.md +19 -31
  34. package/dist/template/.opencode/command/ui-review.md +6 -13
  35. package/dist/template/.opencode/command.backup/analyze-project.md +465 -0
  36. package/dist/template/.opencode/command.backup/finish.md +167 -0
  37. package/dist/template/.opencode/command.backup/implement.md +143 -0
  38. package/dist/template/.opencode/command.backup/pr.md +252 -0
  39. package/dist/template/.opencode/command.backup/status.md +376 -0
  40. package/dist/template/.opencode/memory/project/SHELL_OUTPUT_MIGRATION_PLAN.md +551 -0
  41. package/dist/template/.opencode/memory/project/gotchas.md +33 -28
  42. package/dist/template/.opencode/opencode.json +14 -28
  43. package/dist/template/.opencode/package.json +1 -3
  44. package/dist/template/.opencode/plugin/compaction.ts +51 -129
  45. package/dist/template/.opencode/plugin/handoff.ts +18 -163
  46. package/dist/template/.opencode/plugin/notification.ts +1 -1
  47. package/dist/template/.opencode/plugin/package.json +7 -0
  48. package/dist/template/.opencode/plugin/sessions.ts +185 -651
  49. package/dist/template/.opencode/plugin/skill-mcp.ts +2 -1
  50. package/dist/template/.opencode/plugin/truncator.ts +19 -41
  51. package/dist/template/.opencode/plugin/tsconfig.json +14 -13
  52. package/dist/template/.opencode/tool/bd-inbox.ts +109 -0
  53. package/dist/template/.opencode/tool/bd-msg.ts +62 -0
  54. package/dist/template/.opencode/tool/bd-release.ts +71 -0
  55. package/dist/template/.opencode/tool/bd-reserve.ts +120 -0
  56. package/package.json +2 -2
  57. package/dist/template/.opencode/plugin/beads.ts +0 -1419
  58. package/dist/template/.opencode/plugin/compactor.ts +0 -107
  59. package/dist/template/.opencode/plugin/enforcer.ts +0 -190
  60. package/dist/template/.opencode/plugin/injector.ts +0 -150
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.12.4",
753
+ version: "0.12.5",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
755
  type: "module",
756
756
  repository: {
@@ -784,7 +784,7 @@ var package_default = {
784
784
  },
785
785
  dependencies: {
786
786
  "@clack/prompts": "^0.7.0",
787
- "@opencode-ai/plugin": "^1.0.141",
787
+ "@opencode-ai/plugin": "^1.1.2",
788
788
  "beads-village": "^1.3.3",
789
789
  cac: "^6.7.14",
790
790
  "cli-table3": "^0.6.5",
@@ -21,9 +21,7 @@ skill({ name: "accessibility-audit" });
21
21
 
22
22
  **Check for bead context:**
23
23
 
24
- ```typescript
25
- bd_show({ id: "$ARGUMENTS" }); // If bead ID provided
26
- ```
24
+ !`bd show $ARGUMENTS` # If bead ID provided
27
25
 
28
26
  Parse path and WCAG level from `$ARGUMENTS` (default: AA).
29
27
 
@@ -117,6 +115,8 @@ ast - grep({ pattern: "<input $$$>" }); // Check for id + matching label
117
115
 
118
116
  ### ARIA Pattern Checks
119
117
 
118
+ !`grep -r "role=" --include="*.tsx" --include="*.jsx" | head -20`
119
+
120
120
  | Pattern | Required ARIA |
121
121
  | --------------- | ------------------------------------------ |
122
122
  | Modal dialog | role="dialog", aria-modal, aria-labelledby |
@@ -137,11 +137,8 @@ ast - grep({ pattern: "<input $$$>" }); // Check for id + matching label
137
137
  | Focus restoration | Focus returns after modal closes |
138
138
  | Skip links | Skip to main content available |
139
139
 
140
- ```typescript
141
- // Check for focus styles
142
- grep({ pattern: ":focus", include: "*.css" });
143
- grep({ pattern: "focus:", include: "*.tsx" }); // Tailwind
144
- ```
140
+ !`grep -r ":focus" --include="*.css" | head -10`
141
+ !`grep -r "focus:" --include="*.tsx" | head -10` // Tailwind
145
142
 
146
143
  ## Phase 6: Keyboard Navigation Testing
147
144
 
@@ -292,8 +289,8 @@ Remaining:
292
289
 
293
290
  ## Phase 11: Sync
294
291
 
295
- ```typescript
296
- bd_sync({ reason: "Sync accessibility audit" });
292
+ ```bash
293
+ bd sync
297
294
  ```
298
295
 
299
296
  ## Output
@@ -360,22 +360,9 @@ skill({ name: "mockup-to-code" })
360
360
 
361
361
  **Create Implementation Tasks:**
362
362
 
363
- ```
364
- bd_add({
365
- title: "Implement design tokens from mockup",
366
- desc: "Extract CSS variables for colors, typography, spacing from [mockup]",
367
- type: "task",
368
- pri: 1,
369
- tags: ["frontend", "design-system"]
370
- })
371
-
372
- bd_add({
373
- title: "Implement [ComponentName] component",
374
- desc: "Build component matching mockup spec. Variants: [...], States: [...]",
375
- type: "task",
376
- pri: 2,
377
- tags: ["frontend", "component"]
378
- })
363
+ ```bash
364
+ bd create "Implement design tokens from mockup" -t task -p 1
365
+ bd create "Implement [ComponentName] component" -t task -p 2
379
366
  ```
380
367
 
381
368
  **Suggested Follow-up Commands:**
@@ -16,22 +16,22 @@ skill({ name: "beads" });
16
16
 
17
17
  Run these checks in parallel for speed:
18
18
 
19
- ```bash
19
+ ```
20
20
  # Git status
21
- git status --short
22
- git branch --show-current
23
- git log --oneline -3
21
+ !`git status --short`
22
+ !`git branch --show-current`
23
+ !`git log --oneline -3`
24
24
 
25
25
  # Beads status
26
- bd_status({ include_agents: false })
27
- bd_ls({ status: "open", limit: 5, offset: 0 })
28
- bd_ls({ status: "ready", limit: 5, offset: 0 })
26
+ !`bd status`
27
+ !`bd list --status open --limit 5`
28
+ !`bd list --status ready --limit 5`
29
29
 
30
30
  # CI/CD status (GitHub Actions)
31
- gh run list --limit 5
31
+ !`gh run list --limit 5`
32
32
 
33
33
  # Last commit info
34
- git log -1 --format="%h %s (%cr by %an)"
34
+ !`git log -1 --format="%h %s (%cr by %an)"`
35
35
  ```
36
36
 
37
37
  ### Status Dashboard Output
@@ -55,12 +55,12 @@ git log -1 --format="%h %s (%cr by %an)"
55
55
 
56
56
  Detect project technology:
57
57
 
58
- ```bash
58
+ ```
59
59
  # Package manager & framework
60
- ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle
60
+ !`ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle`
61
61
 
62
- # Read main config
63
- read package.json # or equivalent
62
+ # Read main config (instructional - agent must read this file)
63
+ # Read package.json # or equivalent
64
64
  ```
65
65
 
66
66
  ### Tech Stack Analysis
@@ -101,15 +101,15 @@ read package.json # or equivalent
101
101
 
102
102
  ```bash
103
103
  # Node.js
104
- npm outdated --json || pnpm outdated --json
105
- npm audit --json
104
+ !`npm outdated --json || pnpm outdated --json`
105
+ !`npm audit --json`
106
106
 
107
107
  # Python
108
- pip list --outdated
109
- pip-audit
108
+ !`pip list --outdated`
109
+ !`pip-audit`
110
110
 
111
111
  # Rust
112
- cargo outdated
112
+ !`cargo outdated`
113
113
  cargo audit
114
114
  ```
115
115
 
@@ -132,11 +132,11 @@ npm test -- --coverage --json
132
132
  # Python
133
133
  pytest --cov --cov-report=json
134
134
 
135
- # Check for coverage config
136
- glob pattern="**/jest.config.*"
137
- glob pattern="**/vitest.config.*"
138
- glob pattern="**/pytest.ini"
139
- glob pattern="**/pyproject.toml"
135
+ # Check for coverage config (instructional - agent uses glob tool)
136
+ glob({ pattern: "**/jest.config.*" })
137
+ glob({ pattern: "**/vitest.config.*" })
138
+ glob({ pattern: "**/pytest.ini" })
139
+ glob({ pattern: "**/pyproject.toml" })
140
140
  ```
141
141
 
142
142
  **Coverage Dashboard:**
@@ -153,13 +153,13 @@ glob pattern="**/pyproject.toml"
153
153
 
154
154
  ```bash
155
155
  # TypeScript type errors
156
- npx tsc --noEmit 2>&1 | wc -l
156
+ !`npx tsc --noEmit 2>&1 | wc -l`
157
157
 
158
158
  # Linting issues
159
- npm run lint -- --format json 2>/dev/null || npx biome check --reporter=json
159
+ !`npm run lint -- --format json 2>/dev/null || npx biome check --reporter=json`
160
160
 
161
161
  # TODO/FIXME count
162
- grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" | wc -l
162
+ !`grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" | wc -l`
163
163
  ```
164
164
 
165
165
  **Quality Dashboard:**
@@ -174,15 +174,15 @@ grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" | wc -l
174
174
 
175
175
  ### 3.4 Documentation Status
176
176
 
177
- ```bash
177
+ ```
178
178
  # Check for docs
179
- ls README.md CHANGELOG.md CONTRIBUTING.md docs/ 2>/dev/null
179
+ !`ls README.md CHANGELOG.md CONTRIBUTING.md docs/ 2>/dev/null`
180
180
 
181
181
  # README freshness
182
- git log -1 --format="%cr" -- README.md
182
+ !`git log -1 --format="%cr" -- README.md`
183
183
 
184
184
  # API docs
185
- ls docs/api/ openapi.yaml swagger.json 2>/dev/null
185
+ !`ls docs/api/ openapi.yaml swagger.json 2>/dev/null`
186
186
  ```
187
187
 
188
188
  **Documentation Dashboard:**
@@ -205,52 +205,51 @@ skill({ name: "gemini-large-context" })
205
205
 
206
206
  ### 4.1 Architecture Analysis
207
207
 
208
- ```bash
209
- gemini -p "@src/
208
+ ```typescript
209
+ gemini({ prompt: "@src/
210
210
  Describe:
211
211
  1. Overall architecture pattern (MVC, Clean, Hexagonal, etc.)
212
212
  2. Key modules and their responsibilities
213
213
  3. Data flow between components
214
214
  4. External dependencies and integrations
215
- 5. Areas of high complexity"
215
+ 5. Areas of high complexity" });
216
216
  ```
217
217
 
218
218
  ### 4.2 Test Gap Analysis
219
219
 
220
- ```bash
221
- gemini -p "@src/ @tests/
220
+ ```typescript
221
+ gemini({ prompt: "@src/ @tests/
222
222
  Assess test coverage:
223
223
  - Which modules have tests?
224
224
  - Which are missing tests?
225
225
  - Test quality (unit vs integration)
226
226
  - Edge cases covered
227
- - Critical paths without tests"
227
+ - Critical paths without tests" });
228
228
  ```
229
229
 
230
230
  ### 4.3 Code Smell Detection
231
231
 
232
- ```bash
233
- gemini -p "@src/
232
+ ```typescript
233
+ gemini({ prompt: "@src/
234
234
  Identify code smells:
235
235
  - Duplicated code
236
236
  - Long functions (>50 lines)
237
237
  - Deep nesting (>4 levels)
238
238
  - God objects/files
239
- - Dead code
240
- - Inconsistent patterns"
239
+ - Overly complex conditions" });
241
240
  ```
242
241
 
243
242
  ### 4.4 Security Analysis (--security)
244
243
 
245
244
  ```bash
246
245
  # Automated scans
247
- npm audit
248
- npx snyk test 2>/dev/null || true
246
+ !`npm audit`
247
+ !`npx snyk test 2>/dev/null || true`
249
248
 
250
249
  # Pattern-based detection
251
- grep -r "password\s*=" src/ --include="*.ts" || true
252
- grep -r "api_key\s*=" src/ --include="*.ts" || true
253
- grep -r "secret" src/ --include="*.ts" || true
250
+ !`grep -r "password\s*=" src/ --include="*.ts" || true`
251
+ !`grep -r "api_key\s*=" src/ --include="*.ts" || true`
252
+ !`grep -r "secret" src/ --include="*.ts" || true`
254
253
 
255
254
  # Deep analysis with Gemini
256
255
  gemini -p "@src/ @api/
@@ -279,8 +278,8 @@ Security review:
279
278
 
280
279
  Find actionable tasks with no blockers:
281
280
 
282
- ```typescript
283
- bd_ls({ status: "ready", limit: 10, offset: 0 });
281
+ ```
282
+ !`bd list --status ready --limit 10`
284
283
  ```
285
284
 
286
285
  ### Ready Work Table
@@ -293,8 +292,8 @@ bd_ls({ status: "ready", limit: 10, offset: 0 });
293
292
 
294
293
  **Blocked Work:**
295
294
 
296
- ```typescript
297
- bd_ls({ status: "blocked", limit: 5, offset: 0 });
295
+ ```
296
+ !`bd list --status blocked --limit 5`
298
297
  ```
299
298
 
300
299
  | ID | Title | Blocked By | Action Needed |
@@ -371,24 +370,12 @@ Based on analysis, generate actionable recommendations:
371
370
 
372
371
  For significant findings, create tracking issues:
373
372
 
374
- ```typescript
375
- // For security vulnerabilities
376
- bd_add({
377
- title: "[Security] Fix npm audit vulnerabilities",
378
- desc: "npm audit found 2 high severity vulnerabilities:\n- lodash: prototype pollution\n- axios: SSRF\n\nRun: npm audit fix --force",
379
- type: "bug",
380
- pri: 1,
381
- tags: ["security", "dependencies"],
382
- });
383
-
384
- // For test coverage
385
- bd_add({
386
- title: "[Quality] Increase test coverage to 80%",
387
- desc: "Current coverage: 78%\nTarget: 80%\n\nUncovered files:\n- src/auth/login.ts\n- src/api/users.ts",
388
- type: "task",
389
- pri: 2,
390
- tags: ["testing", "quality"],
391
- });
373
+ ```bash
374
+ # For security vulnerabilities
375
+ bd create "[Security] Fix npm audit vulnerabilities" -t bug -p 1 # Keep as instructional
376
+
377
+ # For test coverage
378
+ bd create "[Quality] Increase test coverage to 80%" -t task -p 2 # Keep as instructional
392
379
  ```
393
380
 
394
381
  ### Suggested Follow-up Commands
@@ -460,8 +447,9 @@ Save analysis to `.opencode/memory/project/analysis-[YYYY-MM-DD].md` for trend t
460
447
 
461
448
  Compare with previous analysis:
462
449
 
463
- ```bash
464
- read .opencode/memory/project/analysis-*.md
450
+ ```typescript
451
+ glob({ pattern: ".opencode/memory/project/analysis-*.md" });
452
+ // Then read each matched file
465
453
  ```
466
454
 
467
455
  ---
@@ -28,9 +28,7 @@ skill({ name: "brainstorming" });
28
28
 
29
29
  If `$ARGUMENTS` is a bead ID:
30
30
 
31
- ```typescript
32
- bd_show({ id: "$ARGUMENTS" });
33
- ```
31
+ !`bd show $ARGUMENTS`
34
32
 
35
33
  Load constraints from `.beads/artifacts/<bead-id>/spec.md` if it exists.
36
34
 
@@ -247,14 +245,8 @@ observation({
247
245
 
248
246
  For promising ideas that need more work:
249
247
 
250
- ```typescript
251
- bd_add({
252
- title: "[Idea name]",
253
- type: "task",
254
- pri: 2,
255
- desc: "From brainstorm: [topic]. Needs research/prototyping.",
256
- tags: ["brainstorm"],
257
- });
248
+ ```bash
249
+ bd create "[Idea name]" -t task -p 2
258
250
  ```
259
251
 
260
252
  ## Output
@@ -19,11 +19,9 @@ skill({ name: "verification-before-completion" });
19
19
 
20
20
  ## Phase 1: Check Git State
21
21
 
22
- ```bash
23
- git status --porcelain
24
- git diff --stat
25
- git diff --cached --stat
26
- ```
22
+ !`git status --porcelain`
23
+ !`git diff --stat`
24
+ !`git diff --cached --stat`
27
25
 
28
26
  Report:
29
27
 
@@ -48,9 +46,7 @@ If nothing staged: "No changes staged. Run `git add <files>` first."
48
46
 
49
47
  Detect project type and run gates:
50
48
 
51
- ```bash
52
- ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null
53
- ```
49
+ !`ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null`
54
50
 
55
51
  | Project | Test Command | Lint Command |
56
52
  | ------- | --------------- | ------------------------------------ |
@@ -78,10 +74,8 @@ Fix errors or use `git commit --no-verify` (not recommended).
78
74
 
79
75
  ## Phase 3: Analyze Changes for Message
80
76
 
81
- ```bash
82
- git diff --cached --stat
83
- git diff --cached
84
- ```
77
+ !`git diff --cached --stat`
78
+ !`git diff --cached`
85
79
 
86
80
  Determine:
87
81
 
@@ -186,8 +180,8 @@ Options:
186
180
 
187
181
  If bead ID was provided:
188
182
 
189
- ```typescript
190
- bd_sync({ reason: "Sync after commit" });
183
+ ```bash
184
+ bd sync
191
185
  ```
192
186
 
193
187
  ## Output
@@ -221,10 +215,8 @@ Create PR:
221
215
 
222
216
  **Safety checks before amend:**
223
217
 
224
- ```bash
225
- git log -1 --format='%H %s' # What we're amending
226
- git status # Check if pushed
227
- ```
218
+ !`git log -1 --format='%H %s'` # What we're amending
219
+ !`git status` # Check if pushed
228
220
 
229
221
  ```
230
222
  Amend Safety Check:
@@ -10,9 +10,7 @@ You're creating a new tracked task. Keep it simple unless complexity demands oth
10
10
 
11
11
  ## Check For Duplicates First
12
12
 
13
- ```bash
14
- bd list --status=all | grep -i "[keywords]"
15
- ```
13
+ !`bd list --status=all | grep -i "[keywords]"`
16
14
 
17
15
  If similar work exists, link to it or extend it instead of creating duplicate.
18
16
 
@@ -104,14 +102,12 @@ bd dep add bd-[second] bd-[first] --type blocks
104
102
 
105
103
  Visualize:
106
104
 
107
- ```bash
108
- bd dep tree bd-[epic]
109
- ```
105
+ !`bd dep tree bd-[epic]`
110
106
 
111
107
  ## Sync
112
108
 
113
- ```typescript
114
- bd_sync({ reason: "Sync new bead" });
109
+ ```bash
110
+ bd sync
115
111
  ```
116
112
 
117
113
  ## Output
@@ -40,17 +40,15 @@ Parse `$ARGUMENTS`:
40
40
 
41
41
  Search for design-related files:
42
42
 
43
- ```bash
44
- # Token/config files
45
- glob pattern="**/tailwind.config.{js,ts,mjs}"
46
- glob pattern="**/globals.css"
47
- glob pattern="**/variables.css"
48
- glob pattern="**/tokens.{json,js,ts}"
49
- glob pattern="**/theme.{js,ts}"
50
- glob pattern="**/*.css.ts" # vanilla-extract, etc.
51
-
52
- # Component files for pattern analysis
53
- glob pattern="**/components/**/*.{tsx,jsx,vue}"
43
+ ```typescript
44
+ glob({ pattern: "**/tailwind.config.{js,ts,mjs}" });
45
+ glob({ pattern: "**/globals.css" });
46
+ glob({ pattern: "**/variables.css" });
47
+ glob({ pattern: "**/tokens.{json,js,ts}" });
48
+ glob({ pattern: "**/theme.{js,ts}" });
49
+ glob({ pattern: "**/*.css.ts" }); // vanilla-extract, etc.
50
+
51
+ glob({ pattern: "**/components/**/*.{tsx,jsx,vue}" });
54
52
  ```
55
53
 
56
54
  **Detect design system in use:**
@@ -110,32 +108,20 @@ Analyze all images and extract:
110
108
 
111
109
  Search for hardcoded values using ast-grep and grep:
112
110
 
113
- ```bash
114
- # Hardcoded colors
115
- ast-grep pattern='color: "#$HEX"'
116
- ast-grep pattern='background: "#$HEX"'
117
- grep '#[0-9a-fA-F]{3,8}' --include="*.{css,scss,tsx,jsx}"
118
- grep 'rgb\(' --include="*.{css,scss,tsx,jsx}"
119
- grep 'hsl\(' --include="*.{css,scss,tsx,jsx}"
120
-
121
- # Hardcoded spacing
122
- grep '[0-9]+px' --include="*.{css,scss,tsx,jsx}"
123
- grep '[0-9]+rem' --include="*.{css,scss,tsx,jsx}"
124
-
125
- # Hardcoded typography
126
- grep 'font-size:' --include="*.css"
127
- grep 'fontSize:' --include="*.{tsx,jsx}"
128
-
129
- # Magic numbers in Tailwind classes
130
- ast-grep pattern='className="$$$"' # then analyze for arbitrary values like [16px]
131
- ```
111
+ ```typescript
112
+ ast - grep({ pattern: 'color: "#$HEX"' });
113
+ ast - grep({ pattern: 'background: "#$HEX"' });
114
+ grep({ pattern: "#[0-9a-fA-F]{3,8}", include: "*.{css,scss,tsx,jsx}" });
115
+ grep({ pattern: "rgb\\(", include: "*.{css,scss,tsx,jsx}" });
116
+ grep({ pattern: "hsl\\(", include: "*.{css,scss,tsx,jsx}" });
132
117
 
133
- **Read and analyze token files:**
118
+ grep({ pattern: "[0-9]+px", include: "*.{css,scss,tsx,jsx}" });
119
+ grep({ pattern: "[0-9]+rem", include: "*.{css,scss,tsx,jsx}" });
134
120
 
135
- ```
136
- read tailwind.config.js extract theme.extend
137
- read globals.css → extract :root CSS variables
138
- read tokens.json parse token structure
121
+ grep({ pattern: "font-size:", include: "*.css" });
122
+ grep({ pattern: "fontSize:", include: "*.{tsx,jsx}" });
123
+
124
+ ast - grep({ pattern: 'className="$$$"' }); // then analyze for arbitrary values like [16px]
139
125
  ```
140
126
 
141
127
  ---
@@ -438,22 +424,9 @@ Score interpretation:
438
424
 
439
425
  For high-priority findings:
440
426
 
441
- ```
442
- bd_add({
443
- title: "[Design] Consolidate duplicate blue colors",
444
- desc: "8 similar blue values found. Consolidate to --primary scale.\nLocations: Button.tsx, Link.tsx, Card.tsx",
445
- type: "task",
446
- pri: 1,
447
- tags: ["design-system", "cleanup"]
448
- })
449
-
450
- bd_add({
451
- title: "[Design] Add missing dark mode tokens",
452
- desc: "5 tokens missing dark mode values: --muted, --accent, --warning, --card, --popover",
453
- type: "task",
454
- pri: 1,
455
- tags: ["design-system", "dark-mode"]
456
- })
427
+ ```bash
428
+ bd create "[Design] Consolidate duplicate blue colors" -t task -p 1
429
+ bd create "[Design] Add missing dark mode tokens" -t task -p 1
457
430
  ```
458
431
 
459
432
  ---
@@ -30,15 +30,14 @@ Parse `$ARGUMENTS` to determine design task:
30
30
 
31
31
  ### Detect Existing Design System
32
32
 
33
- ```bash
34
- # Check for design system in use
35
- glob pattern="**/tailwind.config.{js,ts,mjs}"
36
- glob pattern="**/globals.css"
37
- glob pattern="**/components.json" # shadcn
38
-
39
- # Read existing styles
40
- read tailwind.config.js
41
- read src/styles/globals.css
33
+ ```typescript
34
+ glob({ pattern: "**/tailwind.config.{js,ts,mjs}" });
35
+ glob({ pattern: "**/globals.css" });
36
+ glob({ pattern: "**/components.json" }); // shadcn
37
+
38
+ // Read existing styles
39
+ read({ filePath: "tailwind.config.js" });
40
+ read({ filePath: "src/styles/globals.css" });
42
41
  ```
43
42
 
44
43
  **Identify component library:**
@@ -578,14 +577,8 @@ Before finalizing, verify design does NOT have ALL of these together:
578
577
 
579
578
  For component/page designs:
580
579
 
581
- ```
582
- bd_add({
583
- title: "Implement [component/page] design",
584
- desc: "Build [name] per design spec at .opencode/memory/design/specs/[file].md",
585
- type: "task",
586
- pri: 2,
587
- tags: ["frontend", "design"]
588
- })
580
+ ```bash
581
+ bd create "Implement [component/page] design" -t task -p 2
589
582
  ```
590
583
 
591
584
  ### Bead Integration
@@ -17,8 +17,8 @@ skill({ name: "verification-before-completion" });
17
17
 
18
18
  ## Verify The Task Exists
19
19
 
20
- ```bash
21
- bd show $ARGUMENTS
20
+ ```
21
+ !`bd show $ARGUMENTS`
22
22
  ```
23
23
 
24
24
  If not found, stop. Check `bd list --status=all` for the correct ID.
@@ -27,8 +27,8 @@ If not found, stop. Check `bd list --status=all` for the correct ID.
27
27
 
28
28
  Detect your project type and run everything:
29
29
 
30
- ```bash
31
- ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null
30
+ ```
31
+ !`ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null`
32
32
  ```
33
33
 
34
34
  **Node/TypeScript:**
@@ -70,8 +70,8 @@ If ANY gate fails, stop. Fix it first. Don't close broken work.
70
70
 
71
71
  Read the spec and check each criterion:
72
72
 
73
- ```bash
74
- cat .beads/artifacts/$ARGUMENTS/spec.md
73
+ ```
74
+ !`cat .beads/artifacts/$ARGUMENTS/spec.md`
75
75
  ```
76
76
 
77
77
  For each success criterion listed, run its verification. All must pass. If something's missing, go back and implement it.
@@ -91,11 +91,11 @@ Closes: $ARGUMENTS"
91
91
 
92
92
  ## Close The Task
93
93
 
94
- ```typescript
95
- bd_done({ id: "$ARGUMENTS", msg: "Completed: [1-line summary]" });
94
+ ```bash
95
+ bd close $ARGUMENTS --reason "Completed: [1-line summary]"
96
96
  ```
97
97
 
98
- This closes the task, releases any file locks, and syncs with git. Task is done.
98
+ This closes the task. Sync separately if needed.
99
99
 
100
100
  ## Create Review (Optional But Recommended)
101
101