create-kuckit-app 2.0.2 → 2.1.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 (52) hide show
  1. package/README.md +24 -14
  2. package/package.json +1 -1
  3. package/templates/base/.claude/skills/beads/CLAUDE.md +87 -0
  4. package/templates/base/.claude/skills/beads/README.md +123 -0
  5. package/templates/base/.claude/skills/beads/SKILL.md +77 -715
  6. package/templates/base/.claude/skills/beads/adr/0001-bd-prime-as-source-of-truth.md +61 -0
  7. package/templates/base/.claude/skills/beads/resources/AGENTS.md +62 -0
  8. package/templates/base/.claude/skills/beads/resources/ASYNC_GATES.md +175 -0
  9. package/templates/base/.claude/skills/beads/resources/BOUNDARIES.md +520 -0
  10. package/templates/base/.claude/skills/beads/resources/CHEMISTRY_PATTERNS.md +197 -0
  11. package/templates/base/.claude/skills/beads/resources/CLI_REFERENCE.md +561 -0
  12. package/templates/base/.claude/skills/beads/resources/DEPENDENCIES.md +754 -0
  13. package/templates/base/.claude/skills/beads/resources/INTEGRATION_PATTERNS.md +438 -0
  14. package/templates/base/.claude/skills/beads/resources/ISSUE_CREATION.md +150 -0
  15. package/templates/base/.claude/skills/beads/resources/MOLECULES.md +370 -0
  16. package/templates/base/.claude/skills/beads/resources/PATTERNS.md +363 -0
  17. package/templates/base/.claude/skills/beads/resources/RESUMABILITY.md +239 -0
  18. package/templates/base/.claude/skills/beads/resources/STATIC_DATA.md +61 -0
  19. package/templates/base/.claude/skills/beads/resources/TROUBLESHOOTING.md +537 -0
  20. package/templates/base/.claude/skills/beads/resources/WORKFLOWS.md +638 -0
  21. package/templates/base/.claude/skills/beads/resources/WORKTREES.md +95 -0
  22. package/templates/base/.claude/skills/browser-skill/SKILL.md +72 -0
  23. package/templates/base/.claude/skills/knowledge/SKILL.md +155 -205
  24. package/templates/base/.claude/skills/knowledge/reference/doc-mapping.md +49 -0
  25. package/templates/base/.claude/skills/knowledge/reference/extraction-prompts.md +102 -0
  26. package/templates/base/.claude/skills/kuckit/SKILL.md +15 -9
  27. package/templates/base/.claude/skills/kuckit/references/MODULE-DEVELOPMENT.md +142 -0
  28. package/templates/base/.claude/skills/kuckit/references/PACKAGES.md +22 -17
  29. package/templates/base/.claude/skills/kuckit/references/PUBLISHING.md +92 -0
  30. package/templates/base/.claude/skills/module-testing/SKILL.md +1 -1
  31. package/templates/base/.claude/skills/planning/SKILL.md +26 -1
  32. package/templates/base/.env.example +1 -1
  33. package/templates/base/AGENTS.md +155 -418
  34. package/templates/base/apps/server/src/modules.ts +14 -1
  35. package/templates/base/apps/web/.env.example +1 -1
  36. package/templates/base/apps/web/src/routes/$.tsx +0 -1
  37. package/templates/base/apps/web/src/routes/dashboard.tsx +3 -1
  38. package/templates/base/docs/ARCHITECTURE.md +689 -0
  39. package/templates/base/docs/DEPENDENCY-INJECTION.md +871 -0
  40. package/templates/base/docs/DEPLOYMENT.md +573 -0
  41. package/templates/base/docs/INDEX.md +135 -0
  42. package/templates/base/docs/MIGRATION.md +989 -0
  43. package/templates/base/docs/MODULE_CSS.md +343 -0
  44. package/templates/base/docs/MODULE_TESTING.md +368 -0
  45. package/templates/base/docs/MULTI_AGENT_WORKFLOW.md +909 -0
  46. package/templates/base/docs/TESTING.md +579 -0
  47. package/templates/base/docs/TROUBLESHOOTING.md +360 -0
  48. package/templates/base/package.json +2 -0
  49. package/templates/base/packages/items-module/AGENTS.md +3 -1
  50. package/templates/base/packages/items-module/src/server/adapters/{item.drizzle.ts → item.repository.ts} +1 -13
  51. package/templates/base/packages/items-module/src/server/module.ts +2 -1
  52. package/templates/base/packages/items-module/src/server/schema/item.ts +13 -0
@@ -0,0 +1,537 @@
1
+ # Troubleshooting Guide
2
+
3
+ Common issues encountered when using bd and how to resolve them.
4
+
5
+ ## Interface-Specific Troubleshooting
6
+
7
+ **MCP tools (local environment):**
8
+
9
+ - MCP tools require bd daemon running
10
+ - Check daemon status: `bd daemon --status` (CLI)
11
+ - If MCP tools fail, verify daemon is running and restart if needed
12
+ - MCP tools automatically use daemon mode (no --no-daemon option)
13
+
14
+ **CLI (web environment or local):**
15
+
16
+ - CLI can use daemon mode (default) or direct mode (--no-daemon)
17
+ - Direct mode has 3-5 second sync delay
18
+ - Web environment: Install via `npm install -g @beads/cli`
19
+ - Web environment: Initialize via `bd init <prefix>` before first use
20
+
21
+ **Most issues below apply to both interfaces** - the underlying database and daemon behavior is the same.
22
+
23
+ ## Contents
24
+
25
+ - [Dependencies Not Persisting](#dependencies-not-persisting)
26
+ - [Status Updates Not Visible](#status-updates-not-visible)
27
+ - [Daemon Won't Start](#daemon-wont-start)
28
+ - [Database Errors on Cloud Storage](#database-errors-on-cloud-storage)
29
+ - [JSONL File Not Created](#jsonl-file-not-created)
30
+ - [Version Requirements](#version-requirements)
31
+
32
+ ---
33
+
34
+ ## Dependencies Not Persisting
35
+
36
+ ### Symptom
37
+
38
+ ```bash
39
+ bd dep add issue-2 issue-1 --type blocks
40
+ # Reports: ✓ Added dependency
41
+ bd show issue-2
42
+ # Shows: No dependencies listed
43
+ ```
44
+
45
+ ### Root Cause (Fixed in v0.15.0+)
46
+
47
+ This was a **bug in bd** (GitHub issue #101) where the daemon ignored dependencies during issue creation. **Fixed in bd v0.15.0** (Oct 21, 2025).
48
+
49
+ ### Resolution
50
+
51
+ **1. Check your bd version:**
52
+
53
+ ```bash
54
+ bd version
55
+ ```
56
+
57
+ **2. If version < 0.15.0, update bd:**
58
+
59
+ ```bash
60
+ # Via Homebrew (macOS/Linux)
61
+ brew upgrade bd
62
+
63
+ # Via go install
64
+ go install github.com/steveyegge/beads/cmd/bd@latest
65
+
66
+ # Via package manager
67
+ # See https://github.com/steveyegge/beads#installing
68
+ ```
69
+
70
+ **3. Restart daemon after upgrade:**
71
+
72
+ ```bash
73
+ pkill -f "bd daemon" # Kill old daemon
74
+ bd daemon # Start new daemon with fix
75
+ ```
76
+
77
+ **4. Test dependency creation:**
78
+
79
+ ```bash
80
+ bd create "Test A" -t task
81
+ bd create "Test B" -t task
82
+ bd dep add <B-id> <A-id> --type blocks
83
+ bd show <B-id>
84
+ # Should show: "Depends on (1): → <A-id>"
85
+ ```
86
+
87
+ ### Still Not Working?
88
+
89
+ If dependencies still don't persist after updating:
90
+
91
+ 1. **Check daemon is running:**
92
+
93
+ ```bash
94
+ ps aux | grep "bd daemon"
95
+ ```
96
+
97
+ 2. **Try without --no-daemon flag:**
98
+
99
+ ```bash
100
+ # Instead of: bd --no-daemon dep add ...
101
+ # Use: bd dep add ... (let daemon handle it)
102
+ ```
103
+
104
+ 3. **Check JSONL file:**
105
+
106
+ ```bash
107
+ cat .beads/issues.jsonl | jq '.dependencies'
108
+ # Should show dependency array
109
+ ```
110
+
111
+ 4. **Report to beads GitHub** with:
112
+ - `bd version` output
113
+ - Operating system
114
+ - Reproducible test case
115
+
116
+ ---
117
+
118
+ ## Status Updates Not Visible
119
+
120
+ ### Symptom
121
+
122
+ ```bash
123
+ bd --no-daemon update issue-1 --status in_progress
124
+ # Reports: ✓ Updated issue: issue-1
125
+ bd show issue-1
126
+ # Shows: Status: open (not in_progress!)
127
+ ```
128
+
129
+ ### Root Cause
130
+
131
+ This is **expected behavior**, not a bug. Understanding requires knowing bd's architecture:
132
+
133
+ **BD Architecture:**
134
+
135
+ - **JSONL files** (`.beads/issues.jsonl`): Human-readable export format
136
+ - **SQLite database** (`.beads/*.db`): Source of truth for queries
137
+ - **Daemon**: Syncs JSONL ↔ SQLite every 5 minutes
138
+
139
+ **What `--no-daemon` actually does:**
140
+
141
+ - **Writes**: Go directly to JSONL file
142
+ - **Reads**: Still come from SQLite database
143
+ - **Sync delay**: Daemon imports JSONL → SQLite periodically
144
+
145
+ ### Resolution
146
+
147
+ **Option 1: Use daemon mode (recommended)**
148
+
149
+ ```bash
150
+ # Don't use --no-daemon for CRUD operations
151
+ bd update issue-1 --status in_progress
152
+ bd show issue-1
153
+ # ✓ Status reflects immediately
154
+ ```
155
+
156
+ **Option 2: Wait for sync (if using --no-daemon)**
157
+
158
+ ```bash
159
+ bd --no-daemon update issue-1 --status in_progress
160
+ # Wait 3-5 seconds for daemon to sync
161
+ sleep 5
162
+ bd show issue-1
163
+ # ✓ Status should reflect now
164
+ ```
165
+
166
+ **Option 3: Manual sync trigger**
167
+
168
+ ```bash
169
+ bd --no-daemon update issue-1 --status in_progress
170
+ # Trigger sync by exporting/importing
171
+ bd export > /dev/null 2>&1 # Forces sync
172
+ bd show issue-1
173
+ ```
174
+
175
+ ### When to Use `--no-daemon`
176
+
177
+ **Use --no-daemon for:**
178
+
179
+ - Batch import scripts (performance)
180
+ - CI/CD environments (no persistent daemon)
181
+ - Testing/debugging
182
+
183
+ **Don't use --no-daemon for:**
184
+
185
+ - Interactive development
186
+ - Real-time status checks
187
+ - When you need immediate query results
188
+
189
+ ---
190
+
191
+ ## Daemon Won't Start
192
+
193
+ ### Symptom
194
+
195
+ ```bash
196
+ bd daemon
197
+ # Error: not in a git repository
198
+ # Hint: run 'git init' to initialize a repository
199
+ ```
200
+
201
+ ### Root Cause
202
+
203
+ bd daemon requires a **git repository** because it uses git for:
204
+
205
+ - Syncing issues to git remote (optional)
206
+ - Version control of `.beads/*.jsonl` files
207
+ - Commit history of issue changes
208
+
209
+ ### Resolution
210
+
211
+ **Initialize git repository:**
212
+
213
+ ```bash
214
+ # In your project directory
215
+ git init
216
+ bd daemon
217
+ # ✓ Daemon should start now
218
+ ```
219
+
220
+ **Prevent git remote operations:**
221
+
222
+ ```bash
223
+ # If you don't want daemon to pull from remote
224
+ bd daemon --global=false
225
+ ```
226
+
227
+ **Flags:**
228
+
229
+ - `--global=false`: Don't sync with git remote
230
+ - `--interval=10m`: Custom sync interval (default: 5m)
231
+ - `--auto-commit=true`: Auto-commit JSONL changes
232
+
233
+ ---
234
+
235
+ ## Database Errors on Cloud Storage
236
+
237
+ ### Symptom
238
+
239
+ ```bash
240
+ # In directory: /Users/name/Google Drive/...
241
+ bd init myproject
242
+ # Error: disk I/O error (522)
243
+ # OR: Error: database is locked
244
+ ```
245
+
246
+ ### Root Cause
247
+
248
+ **SQLite incompatibility with cloud sync filesystems.**
249
+
250
+ Cloud services (Google Drive, Dropbox, OneDrive, iCloud) don't support:
251
+
252
+ - POSIX file locking (required by SQLite)
253
+ - Consistent file handles across sync operations
254
+ - Atomic write operations
255
+
256
+ This is a **known SQLite limitation**, not a bd bug.
257
+
258
+ ### Resolution
259
+
260
+ **Move bd database to local filesystem:**
261
+
262
+ ```bash
263
+ # Wrong location (cloud sync)
264
+ ~/Google Drive/My Work/project/.beads/ # ✗ Will fail
265
+
266
+ # Correct location (local disk)
267
+ ~/Repos/project/.beads/ # ✓ Works reliably
268
+ ~/Projects/project/.beads/ # ✓ Works reliably
269
+ ```
270
+
271
+ **Migration steps:**
272
+
273
+ 1. **Move project to local disk:**
274
+
275
+ ```bash
276
+ mv ~/Google\ Drive/project ~/Repos/project
277
+ cd ~/Repos/project
278
+ ```
279
+
280
+ 2. **Re-initialize bd (if needed):**
281
+
282
+ ```bash
283
+ bd init myproject
284
+ ```
285
+
286
+ 3. **Import existing issues (if you had JSONL export):**
287
+ ```bash
288
+ bd import < issues-backup.jsonl
289
+ ```
290
+
291
+ **Alternative: Use global `~/.beads/` database**
292
+
293
+ If you must keep work on cloud storage:
294
+
295
+ ```bash
296
+ # Don't initialize bd in cloud-synced directory
297
+ # Use global database instead
298
+ cd ~/Google\ Drive/project
299
+ bd create "My task"
300
+ # Uses ~/.beads/default.db (on local disk)
301
+ ```
302
+
303
+ **Workaround limitations:**
304
+
305
+ - No per-project database isolation
306
+ - All projects share same issue prefix
307
+ - Manual tracking of which issues belong to which project
308
+
309
+ **Recommendation:** Keep code/projects on local disk, sync final deliverables to cloud.
310
+
311
+ ---
312
+
313
+ ## JSONL File Not Created
314
+
315
+ ### Symptom
316
+
317
+ ```bash
318
+ bd init myproject
319
+ bd --no-daemon create "Test" -t task
320
+ ls .beads/
321
+ # Only shows: .gitignore, myproject.db
322
+ # Missing: issues.jsonl
323
+ ```
324
+
325
+ ### Root Cause
326
+
327
+ **JSONL initialization coupling.** The `issues.jsonl` file is created by daemon on first startup, not by `bd init`.
328
+
329
+ ### Resolution
330
+
331
+ **Start daemon once to initialize JSONL:**
332
+
333
+ ```bash
334
+ bd daemon --global=false &
335
+ # Wait for initialization
336
+ sleep 2
337
+
338
+ # Now JSONL file exists
339
+ ls .beads/issues.jsonl
340
+ # ✓ File created
341
+
342
+ # Subsequent --no-daemon operations work
343
+ bd --no-daemon create "Task 1" -t task
344
+ cat .beads/issues.jsonl
345
+ # ✓ Shows task data
346
+ ```
347
+
348
+ **Why this matters:**
349
+
350
+ - Daemon owns the JSONL export format
351
+ - First daemon run creates empty JSONL skeleton
352
+ - `--no-daemon` operations assume JSONL exists
353
+
354
+ **Pattern for batch scripts:**
355
+
356
+ ```bash
357
+ #!/bin/bash
358
+ # Batch import script
359
+
360
+ bd init myproject
361
+ bd daemon --global=false & # Start daemon
362
+ sleep 3 # Wait for initialization
363
+
364
+ # Now safe to use --no-daemon for performance
365
+ for item in "${items[@]}"; do
366
+ bd --no-daemon create "$item" -t feature
367
+ done
368
+
369
+ # Daemon syncs JSONL → SQLite in background
370
+ sleep 5 # Wait for final sync
371
+
372
+ # Query results
373
+ bd stats
374
+ ```
375
+
376
+ ---
377
+
378
+ ## Version Requirements
379
+
380
+ ### Minimum Version for Dependency Persistence
381
+
382
+ **Issue:** Dependencies created but don't appear in `bd show` or dependency tree.
383
+
384
+ **Fix:** Upgrade to **bd v0.15.0+** (released Oct 2025)
385
+
386
+ **Check version:**
387
+
388
+ ```bash
389
+ bd version
390
+ # Should show: bd version 0.15.0 or higher
391
+ ```
392
+
393
+ **If using MCP plugin:**
394
+
395
+ ```bash
396
+ # Update Claude Code beads plugin
397
+ claude plugin update beads
398
+ ```
399
+
400
+ ### Breaking Changes
401
+
402
+ **v0.15.0:**
403
+
404
+ - MCP parameter names changed from `from_id/to_id` to `issue_id/depends_on_id`
405
+ - Dependency creation now persists correctly in daemon mode
406
+
407
+ **v0.14.0:**
408
+
409
+ - Daemon architecture changes
410
+ - Auto-sync JSONL behavior introduced
411
+
412
+ ---
413
+
414
+ ## MCP-Specific Issues
415
+
416
+ ### Dependencies Created Backwards
417
+
418
+ **Symptom:**
419
+ Using MCP tools, dependencies end up reversed from intended.
420
+
421
+ **Example:**
422
+
423
+ ```python
424
+ # Want: "task-2 depends on task-1" (task-1 blocks task-2)
425
+ beads_add_dependency(issue_id="task-1", depends_on_id="task-2")
426
+ # Wrong! This makes task-1 depend on task-2
427
+ ```
428
+
429
+ **Root Cause:**
430
+ Parameter confusion between old (`from_id/to_id`) and new (`issue_id/depends_on_id`) names.
431
+
432
+ **Resolution:**
433
+
434
+ **Correct MCP usage (bd v0.15.0+):**
435
+
436
+ ```python
437
+ # Correct: task-2 depends on task-1
438
+ beads_add_dependency(
439
+ issue_id="task-2", # Issue that has dependency
440
+ depends_on_id="task-1", # Issue that must complete first
441
+ dep_type="blocks"
442
+ )
443
+ ```
444
+
445
+ **Mnemonic:**
446
+
447
+ - `issue_id`: The issue that **waits**
448
+ - `depends_on_id`: The issue that **must finish first**
449
+
450
+ **Equivalent CLI:**
451
+
452
+ ```bash
453
+ bd dep add task-2 task-1 --type blocks
454
+ # Meaning: task-2 depends on task-1
455
+ ```
456
+
457
+ **Verify dependency direction:**
458
+
459
+ ```bash
460
+ bd show task-2
461
+ # Should show: "Depends on: task-1"
462
+ # Not the other way around
463
+ ```
464
+
465
+ ---
466
+
467
+ ## Getting Help
468
+
469
+ ### Debug Checklist
470
+
471
+ Before reporting issues, collect this information:
472
+
473
+ ```bash
474
+ # 1. Version
475
+ bd version
476
+
477
+ # 2. Daemon status
478
+ ps aux | grep "bd daemon"
479
+
480
+ # 3. Database location
481
+ echo $PWD/.beads/*.db
482
+ ls -la .beads/
483
+
484
+ # 4. Git status
485
+ git status
486
+ git log --oneline -1
487
+
488
+ # 5. JSONL contents (for dependency issues)
489
+ cat .beads/issues.jsonl | jq '.' | head -50
490
+ ```
491
+
492
+ ### Report to beads GitHub
493
+
494
+ If problems persist:
495
+
496
+ 1. **Check existing issues:** https://github.com/steveyegge/beads/issues
497
+ 2. **Create new issue** with:
498
+ - bd version (`bd version`)
499
+ - Operating system
500
+ - Debug checklist output (above)
501
+ - Minimal reproducible example
502
+ - Expected vs actual behavior
503
+
504
+ ### Claude Code Skill Issues
505
+
506
+ If the **bd-issue-tracking skill** provides incorrect guidance:
507
+
508
+ 1. **Check skill version:**
509
+
510
+ ```bash
511
+ ls -la ~/.claude/skills/bd-issue-tracking/
512
+ head -20 ~/.claude/skills/bd-issue-tracking/SKILL.md
513
+ ```
514
+
515
+ 2. **Report via Claude Code feedback** or user's GitHub
516
+
517
+ ---
518
+
519
+ ## Quick Reference: Common Fixes
520
+
521
+ | Problem | Quick Fix |
522
+ | ------------------------------- | ---------------------------------------------------------- |
523
+ | Dependencies not saving | Upgrade to bd v0.15.0+ |
524
+ | Status updates lag | Use daemon mode (not `--no-daemon`) |
525
+ | Daemon won't start | Run `git init` first |
526
+ | Database errors on Google Drive | Move to local filesystem |
527
+ | JSONL file missing | Start daemon once: `bd daemon &` |
528
+ | Dependencies backwards (MCP) | Update to v0.15.0+, use `issue_id/depends_on_id` correctly |
529
+
530
+ ---
531
+
532
+ ## Related Documentation
533
+
534
+ - [CLI Reference](CLI_REFERENCE.md) - Complete command documentation
535
+ - [Dependencies Guide](DEPENDENCIES.md) - Understanding dependency types
536
+ - [Workflows](WORKFLOWS.md) - Step-by-step workflow guides
537
+ - [beads GitHub](https://github.com/steveyegge/beads) - Official documentation