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,520 @@
1
+ # Boundaries: When to Use bd vs TodoWrite
2
+
3
+ This reference provides detailed decision criteria for choosing between bd issue tracking and TodoWrite for task management.
4
+
5
+ ## Contents
6
+
7
+ - [The Core Question](#the-core-question)
8
+ - [Decision Matrix](#decision-matrix)
9
+ - [Use bd for](#use-bd-for): Multi-Session Work, Complex Dependencies, Knowledge Work, Side Quests, Project Memory
10
+ - [Use TodoWrite for](#use-todowrite-for): Single-Session Tasks, Linear Execution, Immediate Context, Simple Tracking
11
+ - [Detailed Comparison](#detailed-comparison)
12
+ - [Integration Patterns](#integration-patterns)
13
+ - Pattern 1: bd as Strategic, TodoWrite as Tactical
14
+ - Pattern 2: TodoWrite as Working Copy of bd
15
+ - Pattern 3: Transition Mid-Session
16
+ - [Real-World Examples](#real-world-examples)
17
+ - Strategic Document Development, Simple Feature Implementation, Bug Investigation, Refactoring with Dependencies
18
+ - [Common Mistakes](#common-mistakes)
19
+ - Using TodoWrite for multi-session work, using bd for simple tasks, not transitioning when complexity emerges, creating too many bd issues, never using bd
20
+ - [The Transition Point](#the-transition-point)
21
+ - [Summary Heuristics](#summary-heuristics)
22
+
23
+ ## The Core Question
24
+
25
+ **"Could I resume this work after 2 weeks away?"**
26
+
27
+ - If bd would help you resume → **use bd**
28
+ - If markdown skim would suffice → **TodoWrite is fine**
29
+
30
+ This heuristic captures the essential difference: bd provides structured context that persists across long gaps, while TodoWrite excels at immediate session tracking.
31
+
32
+ ## Decision Matrix
33
+
34
+ ### Use bd for:
35
+
36
+ #### Multi-Session Work
37
+
38
+ Work spanning multiple compaction cycles or days where context needs to persist.
39
+
40
+ **Examples:**
41
+
42
+ - Strategic document development requiring research across multiple sessions
43
+ - Feature implementation split across several coding sessions
44
+ - Bug investigation requiring experimentation over time
45
+ - Architecture design evolving through multiple iterations
46
+
47
+ **Why bd wins**: Issues capture context that survives compaction. Return weeks later and see full history, design decisions, and current status.
48
+
49
+ #### Complex Dependencies
50
+
51
+ Work with blockers, prerequisites, or hierarchical structure.
52
+
53
+ **Examples:**
54
+
55
+ - OAuth integration requiring database setup, endpoint creation, and frontend changes
56
+ - Research project with multiple parallel investigation threads
57
+ - Refactoring with dependencies between different code areas
58
+ - Migration requiring sequential steps in specific order
59
+
60
+ **Why bd wins**: Dependency graph shows what's blocking what. `bd ready` automatically surfaces unblocked work. No manual tracking required.
61
+
62
+ #### Knowledge Work
63
+
64
+ Tasks with fuzzy boundaries, exploration, or strategic thinking.
65
+
66
+ **Examples:**
67
+
68
+ - Architecture decision requiring research into frameworks and trade-offs
69
+ - API design requiring research into multiple options
70
+ - Performance optimization requiring measurement and experimentation
71
+ - Documentation requiring understanding system architecture
72
+
73
+ **Why bd wins**: `design` and `acceptance_criteria` fields capture evolving understanding. Issues can be refined as exploration reveals more information.
74
+
75
+ #### Side Quests
76
+
77
+ Exploratory work that might pause the main task.
78
+
79
+ **Examples:**
80
+
81
+ - During feature work, discover a better pattern worth exploring
82
+ - While debugging, notice related architectural issue
83
+ - During code review, identify potential improvement
84
+ - While writing tests, find edge case requiring research
85
+
86
+ **Why bd wins**: Create issue with `discovered-from` dependency, pause main work safely. Context preserved for both tracks. Resume either one later.
87
+
88
+ #### Project Memory
89
+
90
+ Need to resume work after significant time with full context.
91
+
92
+ **Examples:**
93
+
94
+ - Open source contributions across months
95
+ - Part-time projects with irregular schedule
96
+ - Complex features split across sprints
97
+ - Research projects with long investigation periods
98
+
99
+ **Why bd wins**: Git-backed database persists indefinitely. All context, decisions, and history available on resume. No relying on conversation scrollback or markdown files.
100
+
101
+ ---
102
+
103
+ ### Use TodoWrite for:
104
+
105
+ #### Single-Session Tasks
106
+
107
+ Work that completes within current conversation.
108
+
109
+ **Examples:**
110
+
111
+ - Implementing a single function based on clear spec
112
+ - Fixing a bug with known root cause
113
+ - Adding unit tests for existing code
114
+ - Updating documentation for recent changes
115
+
116
+ **Why TodoWrite wins**: Simple checklist is perfect for linear execution. No need for persistence or dependencies. Clear completion within session.
117
+
118
+ #### Linear Execution
119
+
120
+ Straightforward step-by-step tasks with no branching.
121
+
122
+ **Examples:**
123
+
124
+ - Database migration with clear sequence
125
+ - Deployment checklist
126
+ - Code style cleanup across files
127
+ - Dependency updates following upgrade guide
128
+
129
+ **Why TodoWrite wins**: Steps are predetermined and sequential. No discovery, no blockers, no side quests. Just execute top to bottom.
130
+
131
+ #### Immediate Context
132
+
133
+ All information already in conversation.
134
+
135
+ **Examples:**
136
+
137
+ - User provides complete spec and asks for implementation
138
+ - Bug report with reproduction steps and fix approach
139
+ - Refactoring request with clear before/after vision
140
+ - Config changes based on user preferences
141
+
142
+ **Why TodoWrite wins**: No external context to track. Everything needed is in current conversation. TodoWrite provides user visibility, nothing more needed.
143
+
144
+ #### Simple Tracking
145
+
146
+ Just need a checklist to show progress to user.
147
+
148
+ **Examples:**
149
+
150
+ - Breaking down implementation into visible steps
151
+ - Showing validation workflow progress
152
+ - Demonstrating systematic approach
153
+ - Providing reassurance work is proceeding
154
+
155
+ **Why TodoWrite wins**: User wants to see thinking and progress. TodoWrite is visible in conversation. bd is invisible background structure.
156
+
157
+ ---
158
+
159
+ ## Detailed Comparison
160
+
161
+ | Aspect | bd | TodoWrite |
162
+ | ------------------- | ----------------------------------------- | ------------------------------------- |
163
+ | **Persistence** | Git-backed, survives compaction | Session-only, lost after conversation |
164
+ | **Dependencies** | Graph-based, automatic ready detection | Manual, no automatic tracking |
165
+ | **Discoverability** | `bd ready` surfaces work | Scroll conversation for todos |
166
+ | **Complexity** | Handles nested epics, blockers | Flat list only |
167
+ | **Visibility** | Background structure, not in conversation | Visible to user in chat |
168
+ | **Setup** | Requires `.beads/` directory in project | Always available |
169
+ | **Best for** | Complex, multi-session, explorative | Simple, single-session, linear |
170
+ | **Context capture** | Design notes, acceptance criteria, links | Just task description |
171
+ | **Evolution** | Issues can be updated, refined over time | Static once written |
172
+ | **Audit trail** | Full history of changes | Only visible in conversation |
173
+
174
+ ## Integration Patterns
175
+
176
+ bd and TodoWrite can coexist effectively in a session. Use both strategically.
177
+
178
+ ### Pattern 1: bd as Strategic, TodoWrite as Tactical
179
+
180
+ **Setup:**
181
+
182
+ - bd tracks high-level issues and dependencies
183
+ - TodoWrite tracks current session's execution steps
184
+
185
+ **Example:**
186
+
187
+ ```
188
+ bd issue: "Implement user authentication" (epic)
189
+ ├─ Child issue: "Create login endpoint"
190
+ ├─ Child issue: "Add JWT token validation" ← Currently working on this
191
+ └─ Child issue: "Implement logout"
192
+
193
+ TodoWrite (for JWT validation):
194
+ - [ ] Install JWT library
195
+ - [ ] Create token validation middleware
196
+ - [ ] Add tests for token expiry
197
+ - [ ] Update API documentation
198
+ ```
199
+
200
+ **When to use:**
201
+
202
+ - Complex features with clear implementation steps
203
+ - User wants to see current progress but larger context exists
204
+ - Multi-session work currently in single-session execution phase
205
+
206
+ ### Pattern 2: TodoWrite as Working Copy of bd
207
+
208
+ **Setup:**
209
+
210
+ - Start with bd issue containing full context
211
+ - Create TodoWrite checklist from bd issue's acceptance criteria
212
+ - Update bd as TodoWrite items complete
213
+
214
+ **Example:**
215
+
216
+ ```
217
+ Session start:
218
+ - Check bd: "issue-auth-42: Add JWT token validation" is ready
219
+ - Extract acceptance criteria into TodoWrite
220
+ - Mark bd issue as in_progress
221
+ - Work through TodoWrite items
222
+ - Update bd design notes as you learn
223
+ - When TodoWrite completes, close bd issue
224
+ ```
225
+
226
+ **When to use:**
227
+
228
+ - bd issue is ready but execution is straightforward
229
+ - User wants visible progress tracking
230
+ - Need structured approach to larger issue
231
+
232
+ ### Pattern 3: Transition Mid-Session
233
+
234
+ **From TodoWrite to bd:**
235
+
236
+ Recognize mid-execution that work is more complex than anticipated.
237
+
238
+ **Trigger signals:**
239
+
240
+ - Discovering blockers or dependencies
241
+ - Realizing work won't complete this session
242
+ - Finding side quests or related issues
243
+ - Needing to pause and resume later
244
+
245
+ **How to transition:**
246
+
247
+ ```
248
+ 1. Create bd issue with current TodoWrite content
249
+ 2. Note: "Discovered this is multi-session work during implementation"
250
+ 3. Add dependencies as discovered
251
+ 4. Keep TodoWrite for current session
252
+ 5. Update bd issue before session ends
253
+ 6. Next session: resume from bd, create new TodoWrite if needed
254
+ ```
255
+
256
+ **From bd to TodoWrite:**
257
+
258
+ Rare, but happens when bd issue turns out simpler than expected.
259
+
260
+ **Trigger signals:**
261
+
262
+ - All context already clear
263
+ - No dependencies discovered
264
+ - Can complete within session
265
+ - User wants execution visibility
266
+
267
+ **How to transition:**
268
+
269
+ ```
270
+ 1. Keep bd issue for historical record
271
+ 2. Create TodoWrite from issue description
272
+ 3. Execute via TodoWrite
273
+ 4. Close bd issue when done
274
+ 5. Note: "Completed in single session, simpler than expected"
275
+ ```
276
+
277
+ ## Real-World Examples
278
+
279
+ ### Example 1: Database Migration Planning
280
+
281
+ **Scenario**: Planning migration from MySQL to PostgreSQL for production application.
282
+
283
+ **Why bd**:
284
+
285
+ - Multi-session work across days/weeks
286
+ - Fuzzy boundaries - scope emerges through investigation
287
+ - Side quests - discover schema incompatibilities requiring refactoring
288
+ - Dependencies - can't migrate data until schema validated
289
+ - Project memory - need to resume after interruptions
290
+
291
+ **bd structure**:
292
+
293
+ ```
294
+ db-epic: "Migrate production database to PostgreSQL"
295
+ ├─ db-1: "Audit current MySQL schema and queries"
296
+ ├─ db-2: "Research PostgreSQL equivalents for MySQL features" (blocks schema design)
297
+ ├─ db-3: "Design PostgreSQL schema with type mappings"
298
+ └─ db-4: "Create migration scripts and test data integrity" (blocked by db-3)
299
+ ```
300
+
301
+ **TodoWrite role**: None initially. Might use TodoWrite for single-session testing sprints once migration scripts ready.
302
+
303
+ ### Example 2: Simple Feature Implementation
304
+
305
+ **Scenario**: Add logging to existing endpoint based on clear specification.
306
+
307
+ **Why TodoWrite**:
308
+
309
+ - Single session work
310
+ - Linear execution - add import, call logger, add test
311
+ - All context in user message
312
+ - Completes within conversation
313
+
314
+ **TodoWrite**:
315
+
316
+ ```
317
+ - [ ] Import logging library
318
+ - [ ] Add log statements to endpoint
319
+ - [ ] Add test for log output
320
+ - [ ] Run tests
321
+ ```
322
+
323
+ **bd role**: None. Overkill for straightforward task.
324
+
325
+ ### Example 3: Bug Investigation
326
+
327
+ **Initial assessment**: Seems simple, try TodoWrite first.
328
+
329
+ **TodoWrite**:
330
+
331
+ ```
332
+ - [ ] Reproduce bug
333
+ - [ ] Identify root cause
334
+ - [ ] Implement fix
335
+ - [ ] Add regression test
336
+ ```
337
+
338
+ **What actually happens**: Reproducing bug reveals it's intermittent. Root cause investigation shows multiple potential issues. Needs time to investigate.
339
+
340
+ **Transition to bd**:
341
+
342
+ ```
343
+ Create bd issue: "Fix intermittent auth failure in production"
344
+ - Description: Initially seemed simple but reproduction shows complex race condition
345
+ - Design: Three potential causes identified, need to test each
346
+ - Created issues for each hypothesis with discovered-from dependency
347
+
348
+ Pause for day, resume next session from bd context
349
+ ```
350
+
351
+ ### Example 4: Refactoring with Dependencies
352
+
353
+ **Scenario**: Extract common validation logic from three controllers.
354
+
355
+ **Why bd**:
356
+
357
+ - Dependencies - must extract before modifying callers
358
+ - Multi-file changes need coordination
359
+ - Potential side quest - might discover better pattern during extraction
360
+ - Need to track which controllers updated
361
+
362
+ **bd structure**:
363
+
364
+ ```
365
+ refactor-1: "Create shared validation module"
366
+ → blocks refactor-2, refactor-3, refactor-4
367
+
368
+ refactor-2: "Update auth controller to use shared validation"
369
+ refactor-3: "Update user controller to use shared validation"
370
+ refactor-4: "Update payment controller to use shared validation"
371
+ ```
372
+
373
+ **TodoWrite role**: Could use TodoWrite for individual controller updates as implementing.
374
+
375
+ **Why this works**: bd ensures you don't forget to update a controller. `bd ready` shows next available work. Dependencies prevent starting controller update before extraction complete.
376
+
377
+ ## Common Mistakes
378
+
379
+ ### Mistake 1: Using TodoWrite for Multi-Session Work
380
+
381
+ **What happens**:
382
+
383
+ - Next session, forget what was done
384
+ - Scroll conversation history to reconstruct
385
+ - Lose design decisions made during implementation
386
+ - Start over or duplicate work
387
+
388
+ **Solution**: Create bd issue instead. Persist context across sessions.
389
+
390
+ ### Mistake 2: Using bd for Simple Linear Tasks
391
+
392
+ **What happens**:
393
+
394
+ - Overhead of creating issue not justified
395
+ - User can't see progress in conversation
396
+ - Extra tool use for no benefit
397
+
398
+ **Solution**: Use TodoWrite. It's designed for exactly this case.
399
+
400
+ ### Mistake 3: Not Transitioning When Complexity Emerges
401
+
402
+ **What happens**:
403
+
404
+ - Start with TodoWrite for "simple" task
405
+ - Discover blockers and dependencies mid-way
406
+ - Keep using TodoWrite despite poor fit
407
+ - Lose context when conversation ends
408
+
409
+ **Solution**: Transition to bd when complexity signal appears. Not too late mid-session.
410
+
411
+ ### Mistake 4: Creating Too Many bd Issues
412
+
413
+ **What happens**:
414
+
415
+ - Every tiny task gets an issue
416
+ - Database cluttered with trivial items
417
+ - Hard to find meaningful work in `bd ready`
418
+
419
+ **Solution**: Reserve bd for work that actually benefits from persistence. Use "2 week test" - would bd help resume after 2 weeks? If no, skip it.
420
+
421
+ ### Mistake 5: Never Using bd Because TodoWrite is Familiar
422
+
423
+ **What happens**:
424
+
425
+ - Multi-session projects become markdown swamps
426
+ - Lose track of dependencies and blockers
427
+ - Can't resume work effectively
428
+ - Rotten half-implemented plans
429
+
430
+ **Solution**: Force yourself to use bd for next multi-session project. Experience the difference in organization and resumability.
431
+
432
+ ### Mistake 6: Always Asking Before Creating Issues (or Never Asking)
433
+
434
+ **When to create directly** (no user question needed):
435
+
436
+ - **Bug reports**: Clear scope, specific problem ("Found: auth doesn't check profile permissions")
437
+ - **Research tasks**: Investigative work ("Research workaround for Slides export")
438
+ - **Technical TODOs**: Discovered during implementation ("Add validation to form handler")
439
+ - **Side quest capture**: Discoveries that need tracking ("Issue: MCP can't read Shared Drive files")
440
+
441
+ **Why create directly**: Asking slows discovery capture. User expects proactive issue creation for clear-cut problems.
442
+
443
+ **When to ask first** (get user input):
444
+
445
+ - **Strategic work**: Fuzzy boundaries, multiple valid approaches ("Should we implement X or Y pattern?")
446
+ - **Potential duplicates**: Might overlap with existing work
447
+ - **Large epics**: Multiple approaches, unclear scope ("Plan migration strategy")
448
+ - **Major scope changes**: Changing direction of existing issue
449
+
450
+ **Why ask**: Ensures alignment on fuzzy work, prevents duplicate effort, clarifies scope before investment.
451
+
452
+ **Rule of thumb**: If you can write a clear, specific issue title and description in one sentence, create directly. If you need user input to clarify the work, ask first.
453
+
454
+ **Examples**:
455
+
456
+ - ✅ Create directly: "workspace MCP: Google Doc → .docx export fails with UTF-8 encoding error"
457
+ - ✅ Create directly: "Research: Workarounds for reading Google Slides from Shared Drives"
458
+ - ❓ Ask first: "Should we refactor the auth system now or later?" (strategic decision)
459
+ - ❓ Ask first: "I found several data validation issues, should I file them all?" (potential overwhelming)
460
+
461
+ ## The Transition Point
462
+
463
+ Most work starts with an implicit mental model:
464
+
465
+ **"This looks straightforward"** → TodoWrite
466
+
467
+ **As work progresses:**
468
+
469
+ ✅ **Stays straightforward** → Continue with TodoWrite, complete in session
470
+
471
+ ⚠️ **Complexity emerges** → Transition to bd, preserve context
472
+
473
+ The skill is recognizing the transition point:
474
+
475
+ **Transition signals:**
476
+
477
+ - "This is taking longer than expected"
478
+ - "I've discovered a blocker"
479
+ - "This needs more research"
480
+ - "I should pause this and investigate X first"
481
+ - "The user might not be available to continue today"
482
+ - "I found three related issues while working on this"
483
+
484
+ **When you notice these signals**: Create bd issue, preserve context, work from structured foundation.
485
+
486
+ ## Summary Heuristics
487
+
488
+ Quick decision guides:
489
+
490
+ **Time horizon:**
491
+
492
+ - Same session → TodoWrite
493
+ - Multiple sessions → bd
494
+
495
+ **Dependency structure:**
496
+
497
+ - Linear steps → TodoWrite
498
+ - Blockers/prerequisites → bd
499
+
500
+ **Scope clarity:**
501
+
502
+ - Well-defined → TodoWrite
503
+ - Exploratory → bd
504
+
505
+ **Context complexity:**
506
+
507
+ - Conversation has everything → TodoWrite
508
+ - External context needed → bd
509
+
510
+ **User interaction:**
511
+
512
+ - User watching progress → TodoWrite visible in chat
513
+ - Background work → bd invisible structure
514
+
515
+ **Resume difficulty:**
516
+
517
+ - Easy from markdown → TodoWrite
518
+ - Need structured history → bd
519
+
520
+ When in doubt: **Use the 2-week test**. If you'd struggle to resume this work after 2 weeks without bd, use bd.