opencodekit 0.12.4 → 0.12.6

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 (62) hide show
  1. package/dist/index.js +17 -5
  2. package/dist/template/.opencode/agent/build.md +25 -11
  3. package/dist/template/.opencode/agent/rush.md +6 -4
  4. package/dist/template/.opencode/command/accessibility-check.md +7 -10
  5. package/dist/template/.opencode/command/analyze-mockup.md +3 -16
  6. package/dist/template/.opencode/command/analyze-project.md +57 -69
  7. package/dist/template/.opencode/command/brainstorm.md +3 -11
  8. package/dist/template/.opencode/command/commit.md +10 -18
  9. package/dist/template/.opencode/command/create.md +4 -8
  10. package/dist/template/.opencode/command/design-audit.md +24 -51
  11. package/dist/template/.opencode/command/design.md +10 -17
  12. package/dist/template/.opencode/command/finish.md +9 -9
  13. package/dist/template/.opencode/command/fix-ci.md +7 -28
  14. package/dist/template/.opencode/command/fix-types.md +3 -7
  15. package/dist/template/.opencode/command/fix-ui.md +5 -11
  16. package/dist/template/.opencode/command/fix.md +4 -10
  17. package/dist/template/.opencode/command/handoff.md +8 -14
  18. package/dist/template/.opencode/command/implement.md +13 -16
  19. package/dist/template/.opencode/command/import-plan.md +20 -38
  20. package/dist/template/.opencode/command/init.md +9 -13
  21. package/dist/template/.opencode/command/integration-test.md +11 -13
  22. package/dist/template/.opencode/command/issue.md +4 -8
  23. package/dist/template/.opencode/command/new-feature.md +20 -40
  24. package/dist/template/.opencode/command/plan.md +8 -12
  25. package/dist/template/.opencode/command/pr.md +29 -38
  26. package/dist/template/.opencode/command/quick-build.md +3 -7
  27. package/dist/template/.opencode/command/research-and-implement.md +4 -6
  28. package/dist/template/.opencode/command/research.md +10 -7
  29. package/dist/template/.opencode/command/resume.md +12 -24
  30. package/dist/template/.opencode/command/revert-feature.md +21 -56
  31. package/dist/template/.opencode/command/review-codebase.md +21 -23
  32. package/dist/template/.opencode/command/skill-create.md +1 -5
  33. package/dist/template/.opencode/command/skill-optimize.md +3 -10
  34. package/dist/template/.opencode/command/status.md +28 -25
  35. package/dist/template/.opencode/command/triage.md +19 -31
  36. package/dist/template/.opencode/command/ui-review.md +6 -13
  37. package/dist/template/.opencode/command.backup/analyze-project.md +465 -0
  38. package/dist/template/.opencode/command.backup/finish.md +167 -0
  39. package/dist/template/.opencode/command.backup/implement.md +143 -0
  40. package/dist/template/.opencode/command.backup/pr.md +252 -0
  41. package/dist/template/.opencode/command.backup/status.md +376 -0
  42. package/dist/template/.opencode/memory/project/SHELL_OUTPUT_MIGRATION_PLAN.md +551 -0
  43. package/dist/template/.opencode/memory/project/gotchas.md +33 -28
  44. package/dist/template/.opencode/opencode.json +24 -84
  45. package/dist/template/.opencode/package.json +1 -3
  46. package/dist/template/.opencode/plugin/compaction.ts +51 -129
  47. package/dist/template/.opencode/plugin/handoff.ts +18 -163
  48. package/dist/template/.opencode/plugin/notification.ts +1 -1
  49. package/dist/template/.opencode/plugin/package.json +7 -0
  50. package/dist/template/.opencode/plugin/sessions.ts +185 -651
  51. package/dist/template/.opencode/plugin/skill-mcp.ts +2 -1
  52. package/dist/template/.opencode/plugin/truncator.ts +19 -41
  53. package/dist/template/.opencode/plugin/tsconfig.json +14 -13
  54. package/dist/template/.opencode/tool/bd-inbox.ts +109 -0
  55. package/dist/template/.opencode/tool/bd-msg.ts +62 -0
  56. package/dist/template/.opencode/tool/bd-release.ts +71 -0
  57. package/dist/template/.opencode/tool/bd-reserve.ts +120 -0
  58. package/package.json +17 -5
  59. package/dist/template/.opencode/plugin/beads.ts +0 -1419
  60. package/dist/template/.opencode/plugin/compactor.ts +0 -107
  61. package/dist/template/.opencode/plugin/enforcer.ts +0 -190
  62. 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.6",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
755
  type: "module",
756
756
  repository: {
@@ -764,7 +764,10 @@ var package_default = {
764
764
  bin: {
765
765
  ock: "dist/index.js"
766
766
  },
767
- files: ["dist", "README.md"],
767
+ files: [
768
+ "dist",
769
+ "README.md"
770
+ ],
768
771
  scripts: {
769
772
  dev: "bun run src/index.ts",
770
773
  build: "bun build src/index.ts --outdir dist --target node && mkdir -p dist/template && rsync -av --exclude=node_modules --exclude=dist --exclude=.git --exclude=coverage --exclude=.next --exclude=.turbo --exclude=logs --exclude=package-lock.json .opencode/ dist/template/.opencode/",
@@ -776,7 +779,14 @@ var package_default = {
776
779
  lint: "biome check .",
777
780
  "lint:fix": "biome check --fix ."
778
781
  },
779
- keywords: ["cli", "opencodekit", "template", "agents", "mcp", "opencode"],
782
+ keywords: [
783
+ "cli",
784
+ "opencodekit",
785
+ "template",
786
+ "agents",
787
+ "mcp",
788
+ "opencode"
789
+ ],
780
790
  author: "OpenCodeKit",
781
791
  license: "MIT",
782
792
  engines: {
@@ -784,7 +794,7 @@ var package_default = {
784
794
  },
785
795
  dependencies: {
786
796
  "@clack/prompts": "^0.7.0",
787
- "@opencode-ai/plugin": "^1.0.141",
797
+ "@opencode-ai/plugin": "^1.1.2",
788
798
  "beads-village": "^1.3.3",
789
799
  cac: "^6.7.14",
790
800
  "cli-table3": "^0.6.5",
@@ -799,7 +809,9 @@ var package_default = {
799
809
  "@types/node": "^22.10.1",
800
810
  typescript: "^5.7.2"
801
811
  },
802
- trustedDependencies: ["@beads/bd"]
812
+ trustedDependencies: [
813
+ "@beads/bd"
814
+ ]
803
815
  };
804
816
 
805
817
  // src/commands/agent.ts
@@ -174,12 +174,20 @@ Build is a **leader agent** - owns the session and coordinates with beads.
174
174
 
175
175
  ### Session Workflow
176
176
 
177
+ ```bash
178
+ bd status # Check workspace status
179
+ bd ready # Find next ready task
180
+ bd update <id> --status in_progress # Claim task
177
181
  ```
178
- bd_init({ role: "build" }) # Join workspace
179
- bd_claim() # Get next ready task
180
- bd_reserve([files]) # Lock files before editing
182
+
183
+ ```typescript
184
+ bd-reserve({ paths: ["src/file.ts"], ttl: 600 }) # Lock files before editing
185
+ ```
186
+
187
+ ```bash
181
188
  [... do work, delegate to subagents ...]
182
- bd_done(id, "reason") # Complete and release locks
189
+ bd close <id> --reason "Completed: description" # Complete task
190
+ bd sync # Sync changes
183
191
  → RESTART SESSION
184
192
  ```
185
193
 
@@ -189,10 +197,10 @@ When claiming an **epic**:
189
197
 
190
198
  1. Delegate to @planner for breakdown
191
199
  2. Create sub-tasks in beads with appropriate tags:
192
- ```
193
- bd_add({ title: "Research X", tags: ["scout"], parent: epicId })
194
- bd_add({ title: "Design Y", tags: ["planner"], parent: epicId })
195
- bd_add({ title: "Implement Z", tags: ["build"], parent: epicId })
200
+ ```bash
201
+ bd create "Research X" -t task -p 2 --parent <epicId>
202
+ bd create "Design Y" -t task -p 2 --parent <epicId>
203
+ bd create "Implement Z" -t task -p 2 --parent <epicId>
196
204
  ```
197
205
  3. Execute sub-tasks yourself OR delegate via Task tool
198
206
  4. Close epic when all sub-tasks done
@@ -215,8 +223,14 @@ Results return to you (leader). You update beads accordingly.
215
223
 
216
224
  ### File Locking
217
225
 
218
- Only leader agents use `bd_reserve`:
226
+ Only leader agents use `bd-reserve` tool:
227
+
228
+ ```typescript
229
+ bd-reserve({ paths: ["src/file.ts"], ttl: 600 }); // Lock files
230
+ bd-release({ paths: ["src/file.ts"] }); // Release specific
231
+ bd-release(); // List active locks
232
+ ```
219
233
 
220
234
  - Reserve before editing shared files
221
- - Auto-released on `bd_done()`
222
- - Check `bd_reservations()` if conflicts
235
+ - Release after completing edits
236
+ - Check `bd-release()` (no args) to list active locks if conflicts
@@ -129,11 +129,13 @@ Rush should **skip beads** when:
129
129
 
130
130
  ### Minimal Workflow
131
131
 
132
- ```
133
- bd_init({ role: "rush" }) # Join workspace
134
- bd_claim() # Get next ready task (or skip if user gave direct task)
132
+ ```bash
133
+ bd status # Check workspace status
134
+ bd ready # Find ready tasks (or skip if user gave direct task)
135
+ bd update <id> --status in_progress # Claim task
135
136
  [... quick work ...]
136
- bd_done(id, "reason") # Complete
137
+ bd close <id> --reason "Done" # Complete
138
+ bd sync # Sync changes
137
139
  → RESTART SESSION
138
140
  ```
139
141
 
@@ -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
  ---