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,754 @@
1
+ # Dependency Types Guide
2
+
3
+ Deep dive into bd's four dependency types: blocks, related, parent-child, and discovered-from.
4
+
5
+ ## Contents
6
+
7
+ - [Overview](#overview) - Four types at a glance, which affect bd ready?
8
+ - [blocks - Hard Blocker](#blocks---hard-blocker)
9
+ - [When to Use](#when-to-use) - Prerequisites, sequential steps, build order
10
+ - [When NOT to Use](#when-not-to-use) - Soft preferences, parallel work
11
+ - [Examples](#examples) - API development, migrations, library dependencies
12
+ - [Creating blocks Dependencies](#creating-blocks-dependencies)
13
+ - [Common Patterns](#common-patterns) - Build foundation first, migration sequences, testing gates
14
+ - [Automatic Unblocking](#automatic-unblocking)
15
+ - [related - Soft Link](#related---soft-link)
16
+ - [When to Use](#when-to-use-1) - Context, related features, parallel work
17
+ - [When NOT to Use](#when-not-to-use-1)
18
+ - [Examples](#examples-1) - Feature context, research links, parallel development
19
+ - [Creating related Dependencies](#creating-related-dependencies)
20
+ - [Common Patterns](#common-patterns-1) - Context clusters, research threads, feature families
21
+ - [parent-child - Hierarchical](#parent-child---hierarchical)
22
+ - [When to Use](#when-to-use-2) - Epics/subtasks, phases
23
+ - [When NOT to Use](#when-not-to-use-2)
24
+ - [Examples](#examples-2) - Epic with subtasks, phased projects
25
+ - [Creating parent-child Dependencies](#creating-parent-child-dependencies)
26
+ - [Combining with blocks](#combining-with-blocks)
27
+ - [Common Patterns](#common-patterns-2) - Epic decomposition, nested hierarchies
28
+ - [discovered-from - Provenance](#discovered-from---provenance)
29
+ - [When to Use](#when-to-use-3) - Side quests, research findings
30
+ - [Why This Matters](#why-this-matters)
31
+ - [Examples](#examples-3) - Bug discovered during feature work, research branches
32
+ - [Creating discovered-from Dependencies](#creating-discovered-from-dependencies)
33
+ - [Common Patterns](#common-patterns-3) - Discovery during implementation, research expansion
34
+ - [Combining with blocks](#combining-with-blocks-1)
35
+ - [Decision Guide](#decision-guide)
36
+ - [Decision Tree](#decision-tree)
37
+ - [Quick Reference by Situation](#quick-reference-by-situation)
38
+ - [Common Mistakes](#common-mistakes)
39
+ - Using blocks for preferences, using discovered-from for planning, not using dependencies, over-using blocks, wrong direction
40
+ - [Advanced Patterns](#advanced-patterns)
41
+ - Diamond dependencies, optional dependencies, discovery cascade, epic with phases
42
+ - [Visualization](#visualization)
43
+ - [Summary](#summary)
44
+
45
+ ## Overview
46
+
47
+ bd supports four dependency types that serve different purposes in organizing and tracking work:
48
+
49
+ | Type | Purpose | Affects `bd ready`? | Common Use |
50
+ | ------------------- | ------------ | ----------------------------- | ------------------------------ |
51
+ | **blocks** | Hard blocker | Yes - blocked issues excluded | Sequential work, prerequisites |
52
+ | **related** | Soft link | No - just informational | Context, related work |
53
+ | **parent-child** | Hierarchy | No - structural only | Epics and subtasks |
54
+ | **discovered-from** | Provenance | No - tracks origin | Side quests, research findings |
55
+
56
+ **Key insight**: Only `blocks` dependencies affect what work is ready. The other three provide structure and context.
57
+
58
+ ---
59
+
60
+ ## blocks - Hard Blocker
61
+
62
+ **Semantics**: Issue A blocks issue B. B cannot start until A is complete.
63
+
64
+ **Effect**: Issue B disappears from `bd ready` until issue A is closed.
65
+
66
+ ### When to Use
67
+
68
+ Use `blocks` when work literally cannot proceed:
69
+
70
+ - **Prerequisites**: Database schema must exist before endpoints can use it
71
+ - **Sequential steps**: Migration step 1 must complete before step 2
72
+ - **Build order**: Foundation must be done before building on top
73
+ - **Technical blockers**: Library must be installed before code can use it
74
+
75
+ ### When NOT to Use
76
+
77
+ Don't use `blocks` for:
78
+
79
+ - **Soft preferences**: "Should do X before Y but could do either"
80
+ - **Parallel work**: Both can proceed independently
81
+ - **Information links**: Just want to note relationship
82
+ - **Recommendations**: "Would be better if done in this order"
83
+
84
+ Use `related` instead for soft connections.
85
+
86
+ ### Examples
87
+
88
+ **Example 1: API Development**
89
+
90
+ ```
91
+ db-schema-1: "Create users table"
92
+ blocks
93
+ api-endpoint-2: "Add GET /users endpoint"
94
+
95
+ Why: Endpoint literally needs table to exist
96
+ Effect: api-endpoint-2 won't show in bd ready until db-schema-1 closed
97
+ ```
98
+
99
+ **Example 2: Migration Sequence**
100
+
101
+ ```
102
+ migrate-1: "Backup production database"
103
+ blocks
104
+ migrate-2: "Run schema migration"
105
+ blocks
106
+ migrate-3: "Verify data integrity"
107
+
108
+ Why: Each step must complete before next can safely proceed
109
+ Effect: bd ready shows only migrate-1; closing it reveals migrate-2, etc.
110
+ ```
111
+
112
+ **Example 3: Library Installation**
113
+
114
+ ```
115
+ setup-1: "Install JWT library"
116
+ blocks
117
+ auth-2: "Implement JWT validation"
118
+
119
+ Why: Code won't compile/run without library
120
+ Effect: Can't start auth-2 until setup-1 complete
121
+ ```
122
+
123
+ ### Creating blocks Dependencies
124
+
125
+ ```bash
126
+ bd dep add prerequisite-issue blocked-issue
127
+ # or explicitly:
128
+ bd dep add prerequisite-issue blocked-issue --type blocks
129
+ ```
130
+
131
+ **Direction matters**: `from_id` blocks `to_id`. Think: "prerequisite blocks dependent".
132
+
133
+ ### Common Patterns
134
+
135
+ **Pattern: Build Foundation First**
136
+
137
+ ```
138
+ foundation-1: "Set up authentication system"
139
+ blocks all of:
140
+ - feature-2: "Add user profiles"
141
+ - feature-3: "Add admin panel"
142
+ - feature-4: "Add API access"
143
+
144
+ One foundational issue blocks multiple dependent features.
145
+ ```
146
+
147
+ **Pattern: Sequential Pipeline**
148
+
149
+ ```
150
+ step-1 blocks step-2 blocks step-3 blocks step-4
151
+
152
+ Linear chain where each step depends on previous.
153
+ bd ready shows only current step.
154
+ ```
155
+
156
+ **Pattern: Parallel Then Merge**
157
+
158
+ ```
159
+ research-1: "Investigate option A"
160
+ research-2: "Investigate option B"
161
+ research-3: "Investigate option C"
162
+ All three block:
163
+ decision-4: "Choose approach based on research"
164
+
165
+ Multiple parallel tasks must complete before next step.
166
+ ```
167
+
168
+ ### Automatic Unblocking
169
+
170
+ When you close an issue that's blocking others:
171
+
172
+ ```
173
+ 1. Close db-schema-1
174
+ 2. bd automatically updates: api-endpoint-2 is now ready
175
+ 3. bd ready shows api-endpoint-2
176
+ 4. No manual unblocking needed
177
+ ```
178
+
179
+ This is why `blocks` is powerful - bd maintains ready state automatically.
180
+
181
+ ---
182
+
183
+ ## related - Soft Link
184
+
185
+ **Semantics**: Issues are related but neither blocks the other.
186
+
187
+ **Effect**: No impact on `bd ready`. Pure informational link.
188
+
189
+ ### When to Use
190
+
191
+ Use `related` for context and discoverability:
192
+
193
+ - **Similar work**: "These tackle the same problem from different angles"
194
+ - **Shared context**: "Working on one provides insight for the other"
195
+ - **Alternative approaches**: "These are different ways to solve X"
196
+ - **Complementary features**: "These work well together but aren't required"
197
+
198
+ ### When NOT to Use
199
+
200
+ Don't use `related` if:
201
+
202
+ - One actually blocks the other → use `blocks`
203
+ - One discovered the other → use `discovered-from`
204
+ - One is parent of the other → use `parent-child`
205
+
206
+ ### Examples
207
+
208
+ **Example 1: Related Refactoring**
209
+
210
+ ```
211
+ refactor-1: "Extract validation logic"
212
+ related to
213
+ refactor-2: "Extract error handling logic"
214
+
215
+ Why: Both are refactoring efforts, similar patterns, but independent
216
+ Effect: None on ready state; just notes the relationship
217
+ ```
218
+
219
+ **Example 2: Documentation and Code**
220
+
221
+ ```
222
+ feature-1: "Add OAuth login"
223
+ related to
224
+ docs-2: "Document OAuth setup"
225
+
226
+ Why: Docs and feature go together, but can be done in any order
227
+ Effect: Can work on either whenever; just notes they're connected
228
+ ```
229
+
230
+ **Example 3: Alternative Approaches**
231
+
232
+ ```
233
+ perf-1: "Investigate Redis caching"
234
+ related to
235
+ perf-2: "Investigate CDN caching"
236
+
237
+ Why: Both address performance, different approaches, explore both
238
+ Effect: Both show in bd ready; choosing one doesn't block the other
239
+ ```
240
+
241
+ ### Creating related Dependencies
242
+
243
+ ```bash
244
+ bd dep add issue-1 issue-2 --type related
245
+ ```
246
+
247
+ **Direction doesn't matter** for `related` - it's a symmetric link.
248
+
249
+ ### Common Patterns
250
+
251
+ **Pattern: Cluster Related Work**
252
+
253
+ ```
254
+ api-redesign related to:
255
+ - api-docs-update
256
+ - api-client-update
257
+ - api-tests-update
258
+ - api-versioning
259
+
260
+ Group of issues all related to API work.
261
+ Use related to show they're part of same initiative.
262
+ ```
263
+
264
+ **Pattern: Cross-Cutting Concerns**
265
+
266
+ ```
267
+ security-audit related to:
268
+ - auth-module
269
+ - api-endpoints
270
+ - database-access
271
+ - frontend-forms
272
+
273
+ Security audit touches multiple areas.
274
+ Related links show what areas it covers.
275
+ ```
276
+
277
+ ---
278
+
279
+ ## parent-child - Hierarchical
280
+
281
+ **Semantics**: Issue A is parent of issue B. Typically A is an epic, B is a subtask.
282
+
283
+ **Effect**: No impact on `bd ready`. Creates hierarchical structure.
284
+
285
+ ### When to Use
286
+
287
+ Use `parent-child` for breaking down large work:
288
+
289
+ - **Epics and subtasks**: Big feature split into smaller pieces
290
+ - **Hierarchical organization**: Logical grouping of related tasks
291
+ - **Progress tracking**: See completion of children relative to parent
292
+ - **Work breakdown structure**: Decompose complex work
293
+
294
+ ### When NOT to Use
295
+
296
+ Don't use `parent-child` if:
297
+
298
+ - Siblings need ordering → add `blocks` between children
299
+ - Relationship is equality → use `related`
300
+ - Just discovered one from the other → use `discovered-from`
301
+
302
+ ### Examples
303
+
304
+ **Example 1: Feature Epic**
305
+
306
+ ```
307
+ oauth-epic: "Implement OAuth integration" (epic)
308
+ parent of:
309
+ - oauth-1: "Set up OAuth credentials" (task)
310
+ - oauth-2: "Implement authorization flow" (task)
311
+ - oauth-3: "Add token refresh" (task)
312
+ - oauth-4: "Create login UI" (task)
313
+
314
+ Why: Epic decomposed into implementable tasks
315
+ Effect: Hierarchical structure; all show in bd ready (unless blocked)
316
+ ```
317
+
318
+ **Example 2: Research with Findings**
319
+
320
+ ```
321
+ research-epic: "Investigate caching strategies" (epic)
322
+ parent of:
323
+ - research-1: "Redis evaluation"
324
+ - research-2: "Memcached evaluation"
325
+ - research-3: "CDN evaluation"
326
+ - decision-4: "Choose caching approach"
327
+
328
+ Why: Research project with multiple investigation threads
329
+ Effect: Can track progress across all investigations
330
+ ```
331
+
332
+ ### Creating parent-child Dependencies
333
+
334
+ ```bash
335
+ bd dep add child-task-id parent-epic-id --type parent-child
336
+ ```
337
+
338
+ **Direction matters**: The child depends on the parent. Think: "child depends on parent" or "task is part of epic".
339
+
340
+ ### Combining with blocks
341
+
342
+ Parent-child gives structure; blocks gives ordering:
343
+
344
+ ```
345
+ auth-epic (parent of all)
346
+ ├─ auth-1: "Install library"
347
+ ├─ auth-2: "Create middleware" (blocked by auth-1)
348
+ ├─ auth-3: "Add endpoints" (blocked by auth-2)
349
+ └─ auth-4: "Add tests" (blocked by auth-3)
350
+
351
+ parent-child: Shows these are all part of auth epic
352
+ blocks: Shows they must be done in order
353
+ ```
354
+
355
+ ### Common Patterns
356
+
357
+ **Pattern: Epic with Independent Subtasks**
358
+
359
+ ```
360
+ Epic with no ordering between children:
361
+ All children show in bd ready immediately.
362
+ Work on any child in any order.
363
+ Close epic when all children complete.
364
+ ```
365
+
366
+ **Pattern: Epic with Sequential Subtasks**
367
+
368
+ ```
369
+ Epic with blocks dependencies between children:
370
+ bd ready shows only first child.
371
+ Closing each child unblocks next.
372
+ Epic provides structure, blocks provides order.
373
+ ```
374
+
375
+ **Pattern: Nested Epics**
376
+
377
+ ```
378
+ major-epic
379
+ ├─ sub-epic-1
380
+ │ ├─ task-1a
381
+ │ └─ task-1b
382
+ └─ sub-epic-2
383
+ ├─ task-2a
384
+ └─ task-2b
385
+
386
+ Multiple levels of hierarchy for complex projects.
387
+ ```
388
+
389
+ ---
390
+
391
+ ## discovered-from - Provenance
392
+
393
+ **Semantics**: Issue B was discovered while working on issue A.
394
+
395
+ **Effect**: No impact on `bd ready`. Tracks origin and provides context.
396
+
397
+ ### When to Use
398
+
399
+ Use `discovered-from` to preserve discovery context:
400
+
401
+ - **Side quests**: Found new work during implementation
402
+ - **Research findings**: Discovered issue while investigating
403
+ - **Bug found during feature work**: Context of discovery matters
404
+ - **Follow-up work**: Identified next steps during current work
405
+
406
+ ### Why This Matters
407
+
408
+ Knowing where an issue came from helps:
409
+
410
+ - **Understand context**: Why was this created?
411
+ - **Reconstruct thinking**: What led to this discovery?
412
+ - **Assess relevance**: Is this still important given original context?
413
+ - **Track exploration**: See what emerged from research
414
+
415
+ ### Examples
416
+
417
+ **Example 1: Bug During Feature**
418
+
419
+ ```
420
+ feature-10: "Add user profiles"
421
+ discovered-from leads to
422
+ bug-11: "Existing auth doesn't handle profile permissions"
423
+
424
+ Why: While adding profiles, discovered auth system inadequate
425
+ Context: Bug might not exist if profiles weren't being added
426
+ ```
427
+
428
+ **Example 2: Research Findings**
429
+
430
+ ```
431
+ research-5: "Investigate caching options"
432
+ discovered-from leads to
433
+ finding-6: "Redis supports persistence unlike Memcached"
434
+ finding-7: "CDN caching incompatible with our auth model"
435
+ decision-8: "Choose Redis based on findings"
436
+
437
+ Why: Research generated specific findings
438
+ Context: Findings only relevant in context of research question
439
+ ```
440
+
441
+ **Example 3: Refactoring Reveals Technical Debt**
442
+
443
+ ```
444
+ refactor-20: "Extract validation logic"
445
+ discovered-from leads to
446
+ debt-21: "Validation inconsistent across controllers"
447
+ debt-22: "No validation for edge cases"
448
+ improvement-23: "Could add validation library"
449
+
450
+ Why: Refactoring work revealed multiple related issues
451
+ Context: Issues discovered as side effect of refactoring
452
+ ```
453
+
454
+ ### Creating discovered-from Dependencies
455
+
456
+ ```bash
457
+ bd dep add original-work-id discovered-issue-id --type discovered-from
458
+ ```
459
+
460
+ **Direction matters**: `to_id` was discovered while working on `from_id`.
461
+
462
+ ### Common Patterns
463
+
464
+ **Pattern: Exploration Tree**
465
+
466
+ ```
467
+ spike-1: "Investigate API redesign"
468
+ discovered-from →
469
+ finding-2: "Current API mixes REST and GraphQL"
470
+ finding-3: "Authentication not consistent"
471
+ finding-4: "Rate limiting missing"
472
+
473
+ One exploration generates multiple findings.
474
+ Tree structure shows exploration process.
475
+ ```
476
+
477
+ **Pattern: Bug Investigation Chain**
478
+
479
+ ```
480
+ bug-1: "Login fails intermittently"
481
+ discovered-from →
482
+ bug-2: "Race condition in session creation"
483
+ discovered-from →
484
+ bug-3: "Database connection pool too small"
485
+
486
+ Investigation of one bug reveals root cause as another bug.
487
+ Chain shows how you got from symptom to cause.
488
+ ```
489
+
490
+ **Pattern: Feature Implementation Side Quests**
491
+
492
+ ```
493
+ feature-main: "Add shopping cart"
494
+ discovered-from →
495
+ improvement-a: "Product images should be cached"
496
+ bug-b: "Price formatting wrong for some locales"
497
+ debt-c: "Inventory system needs refactoring"
498
+
499
+ Main feature work generates tangential discoveries.
500
+ Captured for later without derailing main work.
501
+ ```
502
+
503
+ ### Combining with blocks
504
+
505
+ Can use both together:
506
+
507
+ ```
508
+ feature-10: "Add user profiles"
509
+ discovered-from →
510
+ bug-11: "Auth system needs role-based access"
511
+ blocks →
512
+ feature-10: "Add user profiles"
513
+
514
+ Discovery: Found bug during feature work
515
+ Assessment: Bug actually blocks feature
516
+ Actions: Mark feature blocked, work on bug first
517
+ ```
518
+
519
+ ---
520
+
521
+ ## Decision Guide
522
+
523
+ **"Which dependency type should I use?"**
524
+
525
+ ### Decision Tree
526
+
527
+ ```
528
+ Does Issue A prevent Issue B from starting?
529
+ YES → blocks
530
+ NO ↓
531
+
532
+ Is Issue B a subtask of Issue A?
533
+ YES → parent-child (A parent, B child)
534
+ NO ↓
535
+
536
+ Was Issue B discovered while working on Issue A?
537
+ YES → discovered-from (A original, B discovered)
538
+ NO ↓
539
+
540
+ Are Issues A and B just related?
541
+ YES → related
542
+ ```
543
+
544
+ ### Quick Reference by Situation
545
+
546
+ | Situation | Use |
547
+ | ------------------------------------- | --------------- |
548
+ | B needs A complete to start | blocks |
549
+ | B is part of A (epic/task) | parent-child |
550
+ | Found B while working on A | discovered-from |
551
+ | A and B are similar/connected | related |
552
+ | B should come after A but could start | related + note |
553
+ | A and B are alternatives | related |
554
+ | B is follow-up to A | discovered-from |
555
+
556
+ ---
557
+
558
+ ## Common Mistakes
559
+
560
+ ### Mistake 1: Using blocks for Preferences
561
+
562
+ **Wrong**:
563
+
564
+ ```
565
+ docs-1: "Update documentation"
566
+ blocks
567
+ feature-2: "Add new feature"
568
+
569
+ Reason: "We prefer to update docs first"
570
+ ```
571
+
572
+ **Problem**: Documentation doesn't actually block feature implementation.
573
+
574
+ **Right**: Use `related` or don't link at all. If you want ordering, note it in issue descriptions but don't enforce with blocks.
575
+
576
+ ### Mistake 2: Using discovered-from for Planning
577
+
578
+ **Wrong**:
579
+
580
+ ```
581
+ epic-1: "OAuth integration"
582
+ discovered-from →
583
+ task-2: "Set up OAuth credentials"
584
+
585
+ Reason: "I'm planning these tasks from the epic"
586
+ ```
587
+
588
+ **Problem**: `discovered-from` is for emergent discoveries, not planned decomposition.
589
+
590
+ **Right**: Use `parent-child` for planned task breakdown.
591
+
592
+ ### Mistake 3: Not Using Any Dependencies
593
+
594
+ **Symptom**: Long list of issues with no structure.
595
+
596
+ **Problem**: Can't tell what's blocked, what's related, how work is organized.
597
+
598
+ **Solution**: Add structure with dependencies:
599
+
600
+ - Group with parent-child
601
+ - Order with blocks
602
+ - Link with related
603
+ - Track discovery with discovered-from
604
+
605
+ ### Mistake 4: Over-Using blocks
606
+
607
+ **Wrong**:
608
+
609
+ ```
610
+ Everything blocks everything else in strict sequential order.
611
+ ```
612
+
613
+ **Problem**: No parallel work possible; `bd ready` shows only one issue.
614
+
615
+ **Right**: Only use `blocks` for actual technical dependencies. Allow parallel work where possible.
616
+
617
+ ### Mistake 5: Wrong Direction
618
+
619
+ **Wrong**:
620
+
621
+ ```bash
622
+ bd dep add api-endpoint database-schema
623
+
624
+ Meaning: api-endpoint blocks database-schema
625
+ ```
626
+
627
+ **Problem**: Backwards! Schema should block endpoint, not other way around.
628
+
629
+ **Right**:
630
+
631
+ ```bash
632
+ bd dep add database-schema api-endpoint
633
+
634
+ Meaning: database-schema blocks api-endpoint
635
+ ```
636
+
637
+ **Mnemonic**: "from_id blocks to_id" or "prerequisite blocks dependent"
638
+
639
+ ---
640
+
641
+ ## Advanced Patterns
642
+
643
+ ### Pattern: Diamond Dependencies
644
+
645
+ ```
646
+ setup
647
+ / \
648
+ impl-a impl-b
649
+ \ /
650
+ testing
651
+
652
+ setup blocks both impl-a and impl-b
653
+ both impl-a and impl-b block testing
654
+ ```
655
+
656
+ Both implementations must complete before testing can begin.
657
+
658
+ ### Pattern: Optional Dependencies
659
+
660
+ ```
661
+ core-feature (ready immediately)
662
+ related to
663
+ nice-to-have (ready immediately)
664
+
665
+ Both can be done, neither blocks the other.
666
+ Use related to show they're connected.
667
+ ```
668
+
669
+ ### Pattern: Discovery Cascade
670
+
671
+ ```
672
+ research-main
673
+ discovered-from → finding-1
674
+ discovered-from → finding-2
675
+ discovered-from → deep-finding-3
676
+
677
+ Research generates findings.
678
+ Findings generate deeper findings.
679
+ Tree shows discovery process.
680
+ ```
681
+
682
+ ### Pattern: Epic with Phases
683
+
684
+ ```
685
+ auth-epic
686
+ parent of phase-1-epic
687
+ parent of: setup-1, setup-2, setup-3
688
+ parent of phase-2-epic
689
+ parent of: implement-1, implement-2
690
+ parent of phase-3-epic
691
+ parent of: test-1, test-2
692
+
693
+ phase-1-epic blocks phase-2-epic blocks phase-3-epic
694
+
695
+ Nested hierarchy with phase ordering.
696
+ ```
697
+
698
+ ---
699
+
700
+ ## Visualization
701
+
702
+ When you run `bd show issue-id` on an issue, you see:
703
+
704
+ ```
705
+ Issue: feature-10
706
+ Dependencies (blocks this issue):
707
+ - setup-5: "Install library"
708
+ - config-6: "Add configuration"
709
+
710
+ Dependents (blocked by this issue):
711
+ - test-12: "Add integration tests"
712
+ - docs-13: "Document new feature"
713
+
714
+ Related:
715
+ - refactor-8: "Similar refactoring effort"
716
+
717
+ Discovered from:
718
+ - research-3: "API investigation"
719
+ ```
720
+
721
+ This shows the full dependency context for an issue.
722
+
723
+ ---
724
+
725
+ ## Summary
726
+
727
+ **Four dependency types, four different purposes:**
728
+
729
+ 1. **blocks**: Sequential work, prerequisites, hard blockers
730
+ - Affects bd ready
731
+ - Use for technical dependencies only
732
+
733
+ 2. **related**: Context, similar work, soft connections
734
+ - Informational only
735
+ - Use liberally for discoverability
736
+
737
+ 3. **parent-child**: Epics and subtasks, hierarchical structure
738
+ - Organizational only
739
+ - Use for work breakdown
740
+
741
+ 4. **discovered-from**: Side quests, research findings, provenance
742
+ - Context preservation
743
+ - Use to track emergence
744
+
745
+ **Key insight**: Only `blocks` affects what work is ready. The other three provide rich context without constraining execution.
746
+
747
+ Use dependencies to create a graph that:
748
+
749
+ - Automatically maintains ready work
750
+ - Preserves discovery context
751
+ - Shows project structure
752
+ - Links related work
753
+
754
+ This graph becomes the persistent memory that survives compaction and enables long-horizon agent work.