panopticon-cli 0.4.6 → 0.4.7

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 (102) hide show
  1. package/package.json +2 -1
  2. package/skills/beads/README.md +120 -0
  3. package/skills/beads/SKILL.md +214 -0
  4. package/skills/beads/adr/0001-bd-prime-as-source-of-truth.md +59 -0
  5. package/skills/beads/resources/AGENTS.md +62 -0
  6. package/skills/beads/resources/ASYNC_GATES.md +168 -0
  7. package/skills/beads/resources/BOUNDARIES.md +469 -0
  8. package/skills/beads/resources/CHEMISTRY_PATTERNS.md +197 -0
  9. package/skills/beads/resources/CLI_REFERENCE.md +558 -0
  10. package/skills/beads/resources/DEPENDENCIES.md +747 -0
  11. package/skills/beads/resources/INTEGRATION_PATTERNS.md +407 -0
  12. package/skills/beads/resources/ISSUE_CREATION.md +139 -0
  13. package/skills/beads/resources/MOLECULES.md +354 -0
  14. package/skills/beads/resources/PATTERNS.md +341 -0
  15. package/skills/beads/resources/RESUMABILITY.md +207 -0
  16. package/skills/beads/resources/STATIC_DATA.md +54 -0
  17. package/skills/beads/resources/TROUBLESHOOTING.md +489 -0
  18. package/skills/beads/resources/WORKFLOWS.md +623 -0
  19. package/skills/beads/resources/WORKTREES.md +94 -0
  20. package/skills/beads-completion-check/SKILL.md +90 -0
  21. package/skills/beads-panopticon-guide/SKILL.md +171 -0
  22. package/skills/bug-fix/SKILL.md +32 -0
  23. package/skills/clear-writing/SKILL.md +105 -0
  24. package/skills/clear-writing/references/elements-of-style/01-introductory.md +3 -0
  25. package/skills/clear-writing/references/elements-of-style/02-elementary-rules-of-usage.md +214 -0
  26. package/skills/clear-writing/references/elements-of-style/03-elementary-principles-of-composition.md +398 -0
  27. package/skills/clear-writing/references/elements-of-style/04-a-few-matters-of-form.md +89 -0
  28. package/skills/clear-writing/references/elements-of-style/05-words-and-expressions-commonly-misused.md +342 -0
  29. package/skills/clear-writing/references/signs-of-ai-writing.md +901 -0
  30. package/skills/code-review/SKILL.md +37 -0
  31. package/skills/code-review-performance/SKILL.md +53 -0
  32. package/skills/code-review-security/SKILL.md +35 -0
  33. package/skills/dependency-update/SKILL.md +30 -0
  34. package/skills/feature-work/SKILL.md +39 -0
  35. package/skills/incident-response/SKILL.md +32 -0
  36. package/skills/knowledge-capture/SKILL.md +463 -0
  37. package/skills/onboard-codebase/SKILL.md +34 -0
  38. package/skills/opus-plan/SKILL.md +400 -0
  39. package/skills/pan-approve/SKILL.md +136 -0
  40. package/skills/pan-code-review/SKILL.md +249 -0
  41. package/skills/pan-config/SKILL.md +164 -0
  42. package/skills/pan-convoy-synthesis/SKILL.md +249 -0
  43. package/skills/pan-diagnose/SKILL.md +360 -0
  44. package/skills/pan-docker/SKILL.md +279 -0
  45. package/skills/pan-docs/SKILL.md +113 -0
  46. package/skills/pan-down/SKILL.md +434 -0
  47. package/skills/pan-health/SKILL.md +240 -0
  48. package/skills/pan-help/SKILL.md +237 -0
  49. package/skills/pan-install/SKILL.md +339 -0
  50. package/skills/pan-issue/SKILL.md +596 -0
  51. package/skills/pan-kill/SKILL.md +172 -0
  52. package/skills/pan-logs/SKILL.md +255 -0
  53. package/skills/pan-network/SKILL.md +320 -0
  54. package/skills/pan-oversee/SKILL.md +290 -0
  55. package/skills/pan-plan/SKILL.md +521 -0
  56. package/skills/pan-projects/SKILL.md +239 -0
  57. package/skills/pan-quickstart/SKILL.md +440 -0
  58. package/skills/pan-reload/SKILL.md +44 -0
  59. package/skills/pan-rescue/SKILL.md +271 -0
  60. package/skills/pan-restart/SKILL.md +53 -0
  61. package/skills/pan-setup/SKILL.md +478 -0
  62. package/skills/pan-skill-creator/SKILL.md +168 -0
  63. package/skills/pan-skill-creator/references/output-patterns.md +141 -0
  64. package/skills/pan-skill-creator/references/workflows.md +90 -0
  65. package/skills/pan-skill-creator/scripts/init_skill.py +176 -0
  66. package/skills/pan-status/SKILL.md +493 -0
  67. package/skills/pan-subagent-creator/SKILL.md +295 -0
  68. package/skills/pan-subagent-creator/assets/validate-readonly-query.sh +35 -0
  69. package/skills/pan-subagent-creator/references/example-agents.md +308 -0
  70. package/skills/pan-subagent-creator/scripts/init_agent.py +126 -0
  71. package/skills/pan-sync/SKILL.md +272 -0
  72. package/skills/pan-tell/SKILL.md +157 -0
  73. package/skills/pan-test-config/SKILL.md +208 -0
  74. package/skills/pan-tracker/SKILL.md +288 -0
  75. package/skills/pan-up/SKILL.md +458 -0
  76. package/skills/pan-workspace-config/SKILL.md +303 -0
  77. package/skills/refactor/SKILL.md +30 -0
  78. package/skills/refactor-radar/SKILL.md +475 -0
  79. package/skills/release/SKILL.md +25 -0
  80. package/skills/send-feedback-to-agent/SKILL.md +98 -0
  81. package/skills/session-health/SKILL.md +76 -0
  82. package/skills/session-health/scripts/check_sessions.py +166 -0
  83. package/skills/skill-creator/SKILL.md +92 -0
  84. package/skills/skill-creator/scripts/init_skill.py +152 -0
  85. package/skills/skill-creator/scripts/package_skill.py +123 -0
  86. package/skills/stitch-design-md/README.md +34 -0
  87. package/skills/stitch-design-md/SKILL.md +172 -0
  88. package/skills/stitch-design-md/examples/DESIGN.md +154 -0
  89. package/skills/stitch-react-components/README.md +36 -0
  90. package/skills/stitch-react-components/SKILL.md +47 -0
  91. package/skills/stitch-react-components/examples/gold-standard-card.tsx +80 -0
  92. package/skills/stitch-react-components/package-lock.json +231 -0
  93. package/skills/stitch-react-components/package.json +16 -0
  94. package/skills/stitch-react-components/resources/architecture-checklist.md +15 -0
  95. package/skills/stitch-react-components/resources/component-template.tsx +37 -0
  96. package/skills/stitch-react-components/resources/stitch-api-reference.md +14 -0
  97. package/skills/stitch-react-components/resources/style-guide.json +27 -0
  98. package/skills/stitch-react-components/scripts/fetch-stitch.sh +30 -0
  99. package/skills/stitch-react-components/scripts/validate.js +68 -0
  100. package/skills/stitch-setup/SKILL.md +94 -0
  101. package/skills/web-design-guidelines/SKILL.md +39 -0
  102. package/skills/work-complete/SKILL.md +79 -0
@@ -0,0 +1,623 @@
1
+ # Workflows and Checklists
2
+
3
+ Detailed step-by-step workflows for common bd usage patterns with checklists.
4
+
5
+ ## Contents
6
+
7
+ - [Session Start Workflow](#session-start) - Check bd ready, establish context
8
+ - [Compaction Survival](#compaction-survival) - Recovering after compaction events
9
+ - [Discovery and Issue Creation](#discovery) - Proactive issue creation during work
10
+ - [Status Maintenance](#status-maintenance) - Keeping bd status current
11
+ - [Epic Planning](#epic-planning) - Structuring complex work with dependencies
12
+ - [Side Quest Handling](#side-quests) - Discovery during main task, assessing blocker vs deferrable, resuming
13
+ - [Multi-Session Resume](#resume) - Returning after days/weeks away
14
+ - [Session Handoff Workflow](#session-handoff) - Collaborative handoff between sessions
15
+ - [Unblocking Work](#unblocking) - Handling blocked issues
16
+ - [Integration with TodoWrite](#integration-with-todowrite) - Using both tools together
17
+ - [Common Workflow Patterns](#common-workflow-patterns)
18
+ - Systematic Exploration, Bug Investigation, Refactoring with Dependencies, Spike Investigation
19
+ - [Checklist Templates](#checklist-templates)
20
+ - Starting Any Work Session, Creating Issues During Work, Completing Work, Planning Complex Features
21
+ - [Decision Points](#decision-points)
22
+ - [Troubleshooting Workflows](#troubleshooting-workflows)
23
+
24
+ ## Session Start Workflow {#session-start}
25
+
26
+ **bd is available when**:
27
+ - Project has `.beads/` directory (project-local), OR
28
+ - `~/.beads/` exists (global fallback for any directory)
29
+
30
+ **Automatic checklist at session start:**
31
+
32
+ ```
33
+ Session Start (when bd is available):
34
+ - [ ] Run bd ready --json
35
+ - [ ] Report: "X items ready to work on: [summary]"
36
+ - [ ] If using global ~/.beads, note this in report
37
+ - [ ] If none ready, check bd blocked --json
38
+ - [ ] Suggest next action based on findings
39
+ ```
40
+
41
+ **Pattern**: Always run `bd ready` when starting work where bd is available. Report status immediately to establish shared context.
42
+
43
+ **Database selection**: bd auto-discovers which database to use (project-local `.beads/` takes precedence over global `~/.beads/`).
44
+
45
+ ---
46
+
47
+ ## Compaction Survival {#compaction-survival}
48
+
49
+ **Critical**: After compaction events, conversation history is deleted but bd state persists. Beads are your only memory.
50
+
51
+ **Post-compaction recovery checklist:**
52
+
53
+ ```
54
+ After Compaction:
55
+ - [ ] Run bd list --status in_progress to see active work
56
+ - [ ] Run bd show <issue-id> for each in_progress issue
57
+ - [ ] Read notes field to understand: COMPLETED, IN PROGRESS, BLOCKERS, KEY DECISIONS
58
+ - [ ] Check dependencies: bd dep tree <issue-id> for context
59
+ - [ ] If notes insufficient, check bd list --status open for related issues
60
+ - [ ] Reconstruct TodoWrite list from notes if needed
61
+ ```
62
+
63
+ **Pattern**: Well-written notes enable full context recovery even with zero conversation history.
64
+
65
+ **Writing notes for compaction survival:**
66
+
67
+ **Good note (enables recovery):**
68
+ ```
69
+ bd update issue-42 --notes "COMPLETED: User authentication - added JWT token
70
+ generation with 1hr expiry, implemented refresh token endpoint using rotating
71
+ tokens pattern. IN PROGRESS: Password reset flow. Email service integration
72
+ working. NEXT: Need to add rate limiting to reset endpoint (currently unlimited
73
+ requests). KEY DECISION: Using bcrypt with 12 rounds after reviewing OWASP
74
+ recommendations, tech lead concerned about response time but benchmarks show <100ms."
75
+ ```
76
+
77
+ **Bad note (insufficient for recovery):**
78
+ ```
79
+ bd update issue-42 --notes "Working on auth feature. Made some progress.
80
+ More to do later."
81
+ ```
82
+
83
+ The good note contains:
84
+ - Specific accomplishments (what was implemented/configured)
85
+ - Current state (which part is working, what's in progress)
86
+ - Next concrete step (not just "continue")
87
+ - Key context (team concerns, technical decisions with rationale)
88
+
89
+ **After compaction**: `bd show issue-42` reconstructs the full context needed to continue work.
90
+
91
+ ---
92
+
93
+ ## Discovery and Issue Creation {#discovery}
94
+
95
+ **When encountering new work during implementation:**
96
+
97
+ ```
98
+ Discovery Workflow:
99
+ - [ ] Notice bug, improvement, or follow-up work
100
+ - [ ] Assess: Can defer or is blocker?
101
+ - [ ] Create issue with bd create "Issue title"
102
+ - [ ] Add discovered-from dependency: bd dep add current-id new-id --type discovered-from
103
+ - [ ] If blocker: pause and switch; if not: continue current work
104
+ - [ ] Issue persists for future sessions
105
+ ```
106
+
107
+ **Pattern**: Proactively file issues as you discover work. Context captured immediately instead of lost when session ends.
108
+
109
+ **When to ask first**:
110
+ - Knowledge work with fuzzy scope
111
+ - User intent unclear
112
+ - Multiple valid approaches
113
+
114
+ **When to create directly**:
115
+ - Clear bug found
116
+ - Obvious follow-up work
117
+ - Technical debt with clear scope
118
+
119
+ ---
120
+
121
+ ## Status Maintenance {#status-maintenance}
122
+
123
+ **Throughout work on an issue:**
124
+
125
+ ```
126
+ Issue Lifecycle:
127
+ - [ ] Start: Update status to in_progress
128
+ - [ ] During: Add design notes as decisions made
129
+ - [ ] During: Update acceptance criteria if requirements clarify
130
+ - [ ] During: Add dependencies if blockers discovered
131
+ - [ ] Complete: Close with summary of what was done
132
+ - [ ] After: Check bd ready to see what unblocked
133
+ ```
134
+
135
+ **Pattern**: Keep bd status current so project state is always accurate.
136
+
137
+ **Status transitions**:
138
+ - `open` → `in_progress` when starting work
139
+ - `in_progress` → `blocked` if blocker discovered
140
+ - `blocked` → `in_progress` when unblocked
141
+ - `in_progress` → `closed` when complete
142
+
143
+ ---
144
+
145
+ ## Epic Planning {#epic-planning}
146
+
147
+ **For complex multi-step features, think in Ready Fronts, not phases.**
148
+
149
+ ### The Ready Front Model
150
+
151
+ A **Ready Front** is the set of issues with all dependencies satisfied - what can be worked on *right now*. As issues close, the front advances. The dependency DAG IS the execution plan.
152
+
153
+ ```
154
+ Ready Front = Issues where all dependencies are closed
155
+ (no blockers remaining)
156
+
157
+ Static view: Natural topology in the DAG (sync points, bottlenecks)
158
+ Dynamic view: Current wavefront of in-progress work
159
+ ```
160
+
161
+ **Why Ready Fronts, not Phases?**
162
+
163
+ "Phases" trigger temporal reasoning that inverts dependencies:
164
+
165
+ ```
166
+ ⚠️ COGNITIVE TRAP:
167
+ "Phase 1 before Phase 2" → brain thinks "Phase 1 blocks Phase 2"
168
+ → WRONG: bd dep add phase1 phase2
169
+
170
+ Correct: "Phase 2 needs Phase 1" → bd dep add phase2 phase1
171
+ ```
172
+
173
+ **The fix**: Name issues by what they ARE, think about what they NEED.
174
+
175
+ ### Epic Planning Workflow
176
+
177
+ ```
178
+ Epic Planning with Ready Fronts:
179
+ - [ ] Create epic issue for high-level goal
180
+ - [ ] Walk backward from goal: "What does the end state need?"
181
+ - [ ] Create child issues named by WHAT, not WHEN
182
+ - [ ] Add deps using requirement language: "X needs Y" → bd dep add X Y
183
+ - [ ] Verify with bd blocked (tasks blocked BY prerequisites, not dependents)
184
+ - [ ] Use bd ready to work through in dependency order
185
+ ```
186
+
187
+ ### The Graph Walk Pattern
188
+
189
+ Walk **backward** from the goal to get correct dependencies:
190
+
191
+ ```
192
+ Start: "What's the final deliverable?"
193
+
194
+ "Integration tests passing" → gt-integration
195
+
196
+ "What does that need?"
197
+
198
+ "Streaming support" → gt-streaming
199
+ "Header display" → gt-header
200
+
201
+ "What do those need?"
202
+
203
+ "Message rendering" → gt-messages
204
+
205
+ "What does that need?"
206
+
207
+ "Buffer layout" → gt-buffer (foundation, no deps)
208
+ ```
209
+
210
+ This produces correct deps because you're asking "X needs Y", not "X before Y".
211
+
212
+ ### Ready Fronts Visualized
213
+
214
+ ```
215
+ Ready Front 1: gt-buffer (foundation)
216
+ Ready Front 2: gt-messages (needs buffer)
217
+ Ready Front 3: gt-streaming, gt-header (parallel, need messages)
218
+ Ready Front 4: gt-integration (needs streaming, header)
219
+ ```
220
+
221
+ At any moment, `bd ready` shows the current front. As issues close, blocked work becomes ready.
222
+
223
+ ### Example: OAuth Integration
224
+
225
+ ```bash
226
+ # Create epic (the goal)
227
+ bd create "OAuth integration" -t epic
228
+
229
+ # Walk backward: What does OAuth need?
230
+ bd create "Login/logout endpoints" -t task # needs token storage
231
+ bd create "Token storage and refresh" -t task # needs auth flow
232
+ bd create "Authorization code flow" -t task # needs credentials
233
+ bd create "OAuth client credentials" -t task # foundation
234
+
235
+ # Add deps using requirement language: "X needs Y"
236
+ bd dep add endpoints storage # endpoints need storage
237
+ bd dep add storage flow # storage needs flow
238
+ bd dep add flow credentials # flow needs credentials
239
+ # credentials has no deps - it's Ready Front 1
240
+
241
+ # Verify: bd blocked should show sensible blocking
242
+ bd blocked
243
+ # endpoints blocked by storage ✓
244
+ # storage blocked by flow ✓
245
+ # flow blocked by credentials ✓
246
+ # credentials ready ✓
247
+ ```
248
+
249
+ ### Validation
250
+
251
+ After adding deps, verify with `bd blocked`:
252
+ - Tasks should be blocked BY their prerequisites
253
+ - NOT blocked by their dependents
254
+
255
+ If `gt-integration` is blocked by `gt-setup` → correct
256
+ If `gt-setup` is blocked by `gt-integration` → deps are inverted, fix them
257
+
258
+ ---
259
+
260
+ ## Side Quest Handling {#side-quests}
261
+
262
+ **When discovering work that pauses main task:**
263
+
264
+ ```
265
+ Side Quest Workflow:
266
+ - [ ] During main work, discover problem or opportunity
267
+ - [ ] Create issue for side quest
268
+ - [ ] Add discovered-from dependency linking to main work
269
+ - [ ] Assess: blocker or can defer?
270
+ - [ ] If blocker: mark main work blocked, switch to side quest
271
+ - [ ] If deferrable: note in issue, continue main work
272
+ - [ ] Update statuses to reflect current focus
273
+ ```
274
+
275
+ **Example**: During feature implementation, discover architectural issue
276
+
277
+ ```
278
+ Main task: Adding user profiles
279
+
280
+ Discovery: Notice auth system should use role-based access
281
+
282
+ Actions:
283
+ 1. Create issue: "Implement role-based access control"
284
+ 2. Link: discovered-from "user-profiles-feature"
285
+ 3. Assess: Blocker for profiles feature
286
+ 4. Mark profiles as blocked
287
+ 5. Switch to RBAC implementation
288
+ 6. Complete RBAC, unblocks profiles
289
+ 7. Resume profiles work
290
+ ```
291
+
292
+ ---
293
+
294
+ ## Multi-Session Resume {#resume}
295
+
296
+ **Starting work after days/weeks away:**
297
+
298
+ ```
299
+ Resume Workflow:
300
+ - [ ] Run bd ready to see available work
301
+ - [ ] Run bd stats for project overview
302
+ - [ ] List recent closed issues for context
303
+ - [ ] Show details on issue to work on
304
+ - [ ] Review design notes and acceptance criteria
305
+ - [ ] Update status to in_progress
306
+ - [ ] Begin work with full context
307
+ ```
308
+
309
+ **Why this works**: bd preserves design decisions, acceptance criteria, and dependency context. No scrolling conversation history or reconstructing from markdown.
310
+
311
+ ---
312
+
313
+ ## Session Handoff Workflow {#session-handoff}
314
+
315
+ **Collaborative handoff between sessions using notes field:**
316
+
317
+ This workflow enables smooth work resumption by updating beads notes when stopping, then reading them when resuming. Works in conjunction with compaction survival - creates continuity even after conversation history is deleted.
318
+
319
+ ### At Session Start (Claude's responsibility)
320
+
321
+ ```
322
+ Session Start with in_progress issues:
323
+ - [ ] Run bd list --status in_progress
324
+ - [ ] For each in_progress issue: bd show <issue-id>
325
+ - [ ] Read notes field to understand: COMPLETED, IN PROGRESS, NEXT
326
+ - [ ] Report to user with context from notes field
327
+ - [ ] Example: "workspace-mcp-server-2 is in_progress. Last session:
328
+ completed tidying. No code written yet. Next step: create
329
+ markdown_to_docs.py. Should I continue with that?"
330
+ - [ ] Wait for user confirmation or direction
331
+ ```
332
+
333
+ **Pattern**: Notes field is the "read me first" guide for resuming work.
334
+
335
+ ### At Session End (Claude prompts user)
336
+
337
+ When wrapping up work on an issue:
338
+
339
+ ```
340
+ Session End Handoff:
341
+ - [ ] Notice work reaching a stopping point
342
+ - [ ] Prompt user: "We just completed X and started Y on <issue-id>.
343
+ Should I update the beads notes for next session?"
344
+ - [ ] If yes, suggest command:
345
+ bd update <issue-id> --notes "COMPLETED: X. IN PROGRESS: Y. NEXT: Z"
346
+ - [ ] User reviews and confirms
347
+ - [ ] Claude executes the update
348
+ - [ ] Notes saved for next session's resumption
349
+ ```
350
+
351
+ **Pattern**: Update notes at logical stopping points, not after every keystroke.
352
+
353
+ ### Notes Format (Current State, Not Cumulative)
354
+
355
+ ```
356
+ Good handoff note (current state):
357
+ COMPLETED: Parsed markdown into structured format
358
+ IN PROGRESS: Implementing Docs API insertion
359
+ NEXT: Debug batchUpdate call - getting 400 error on formatting
360
+ BLOCKER: None
361
+ KEY DECISION: Using two-phase approach (insert text, then apply formatting) based on reference implementation
362
+
363
+ Bad handoff note (not useful):
364
+ Updated some stuff. Will continue later.
365
+ ```
366
+
367
+ **Rules for handoff notes:**
368
+ - Current state only (overwrite previous notes, not append)
369
+ - Specific accomplishments (not vague progress)
370
+ - Concrete next step (not "continue working")
371
+ - Optional: Blockers, key decisions, references
372
+ - Written for someone with zero conversation context
373
+
374
+ ### Session Handoff Checklist
375
+
376
+ For Claude at session end:
377
+
378
+ ```
379
+ Session End Checklist:
380
+ - [ ] Work reaching logical stopping point
381
+ - [ ] Prompt user about updating notes
382
+ - [ ] If approved:
383
+ - [ ] Craft note with COMPLETED/IN_PROGRESS/NEXT
384
+ - [ ] Include blocker if stuck
385
+ - [ ] Include key decisions if relevant
386
+ - [ ] Suggest bd update command
387
+ - [ ] Execute approved update
388
+ - [ ] Confirm: "Saved handoff notes for next session"
389
+ ```
390
+
391
+ For user (optional, but helpful):
392
+
393
+ ```
394
+ User Tips:
395
+ - [ ] When stopping work: Let Claude suggest notes update
396
+ - [ ] When resuming: Let Claude read notes and report context
397
+ - [ ] Avoid: Trying to remember context manually (that's what notes are for!)
398
+ - [ ] Trust: Well-written notes will help next session pick up instantly
399
+ ```
400
+
401
+ ### Example: Real Session Handoff
402
+
403
+ **Scenario:** Implementing markdown→Docs feature (workspace-mcp-server-2)
404
+
405
+ **At End of Session 1:**
406
+ ```bash
407
+ bd update workspace-mcp-server-2 --notes "COMPLETED: Set up skeleton with Docs
408
+ API connection verified. Markdown parsing logic 80% done (handles *, _ modifiers).
409
+ IN PROGRESS: Testing edge cases for nested formatting. NEXT: Implement
410
+ batchUpdate call structure for text insertion. REFERENCE: Reference pattern at
411
+ docs/markdown-to-docs-reference.md. No blockers, moving well."
412
+ ```
413
+
414
+ **At Start of Session 2:**
415
+ ```bash
416
+ bd show workspace-mcp-server-2
417
+ # Output includes notes field showing exactly where we left off
418
+ # Claude reports: "Markdown→Docs feature is 80% parsed. We were testing
419
+ # edge cases and need to implement batchUpdate next. Want to continue?"
420
+ ```
421
+
422
+ Session resumes instantly with full context, no history scrolling needed.
423
+
424
+ ---
425
+
426
+ ## Unblocking Work {#unblocking}
427
+
428
+ **When ready list is empty:**
429
+
430
+ ```
431
+ Unblocking Workflow:
432
+ - [ ] Run bd blocked --json to see what's stuck
433
+ - [ ] Show details on blocked issues: bd show issue-id
434
+ - [ ] Identify blocker issues
435
+ - [ ] Choose: work on blocker, or reassess dependency
436
+ - [ ] If reassess: remove incorrect dependency
437
+ - [ ] If work on blocker: close blocker, check ready again
438
+ - [ ] Blocked issues automatically become ready when blockers close
439
+ ```
440
+
441
+ **Pattern**: bd automatically maintains ready state based on dependencies. Closing a blocker makes blocked work ready.
442
+
443
+ **Example**:
444
+
445
+ ```
446
+ Situation: bd ready shows nothing
447
+
448
+ Actions:
449
+ 1. bd blocked shows: "api-endpoint blocked by db-schema"
450
+ 2. Show db-schema: "Create user table schema"
451
+ 3. Work on db-schema issue
452
+ 4. Close db-schema when done
453
+ 5. bd ready now shows: "api-endpoint" (automatically unblocked)
454
+ ```
455
+
456
+ ---
457
+
458
+ ## Integration with TodoWrite
459
+
460
+ **Using both tools in one session:**
461
+
462
+ ```
463
+ Hybrid Workflow:
464
+ - [ ] Check bd for high-level context
465
+ - [ ] Choose bd issue to work on
466
+ - [ ] Mark bd issue in_progress
467
+ - [ ] Create TodoWrite from acceptance criteria for execution
468
+ - [ ] Work through TodoWrite items
469
+ - [ ] Update bd design notes as you learn
470
+ - [ ] When TodoWrite complete, close bd issue
471
+ ```
472
+
473
+ **Why hybrid**: bd provides persistent structure, TodoWrite provides visible progress.
474
+
475
+ ---
476
+
477
+ ## Common Workflow Patterns
478
+
479
+ ### Pattern: Systematic Exploration
480
+
481
+ Research or investigation work:
482
+
483
+ ```
484
+ 1. Create research issue with question to answer
485
+ 2. Update design field with findings as you go
486
+ 3. Create new issues for discoveries
487
+ 4. Link discoveries with discovered-from
488
+ 5. Close research issue with conclusion
489
+ ```
490
+
491
+ ### Pattern: Bug Investigation
492
+
493
+ ```
494
+ 1. Create bug issue
495
+ 2. Reproduce: note steps in description
496
+ 3. Investigate: track hypotheses in design field
497
+ 4. Fix: implement solution
498
+ 5. Test: verify in acceptance criteria
499
+ 6. Close with explanation of root cause and fix
500
+ ```
501
+
502
+ ### Pattern: Refactoring with Dependencies
503
+
504
+ ```
505
+ 1. Create issues for each refactoring step
506
+ 2. Add blocks dependencies for correct order
507
+ 3. Work through in dependency order
508
+ 4. bd ready automatically shows next step
509
+ 5. Each completion unblocks next work
510
+ ```
511
+
512
+ ### Pattern: Spike Investigation
513
+
514
+ ```
515
+ 1. Create spike issue: "Investigate caching options"
516
+ 2. Time-box exploration
517
+ 3. Document findings in design field
518
+ 4. Create follow-up issues for chosen approach
519
+ 5. Link follow-ups with discovered-from
520
+ 6. Close spike with recommendation
521
+ ```
522
+
523
+ ---
524
+
525
+ ## Checklist Templates
526
+
527
+ ### Starting Any Work Session
528
+
529
+ ```
530
+ - [ ] Check for .beads/ directory
531
+ - [ ] If exists: bd ready
532
+ - [ ] Report status to user
533
+ - [ ] Get user input on what to work on
534
+ - [ ] Show issue details
535
+ - [ ] Update to in_progress
536
+ - [ ] Begin work
537
+ ```
538
+
539
+ ### Creating Issues During Work
540
+
541
+ ```
542
+ - [ ] Notice new work needed
543
+ - [ ] Create issue with clear title
544
+ - [ ] Add context in description
545
+ - [ ] Link with discovered-from to current work
546
+ - [ ] Assess blocker vs deferrable
547
+ - [ ] Update statuses appropriately
548
+ ```
549
+
550
+ ### Completing Work
551
+
552
+ ```
553
+ - [ ] Implementation done
554
+ - [ ] Tests passing
555
+ - [ ] Close issue with summary
556
+ - [ ] Check bd ready for unblocked work
557
+ - [ ] Report completion and next available work
558
+ ```
559
+
560
+ ### Planning Complex Features
561
+
562
+ ```
563
+ - [ ] Create epic for overall goal
564
+ - [ ] Break into child tasks
565
+ - [ ] Create all child issues
566
+ - [ ] Link with parent-child dependencies
567
+ - [ ] Add blocks between children if order matters
568
+ - [ ] Work through in dependency order
569
+ ```
570
+
571
+ ---
572
+
573
+ ## Decision Points
574
+
575
+ **Should I create a bd issue or use TodoWrite?**
576
+ → See [BOUNDARIES.md](BOUNDARIES.md) for decision matrix
577
+
578
+ **Should I ask user before creating issue?**
579
+ → Ask if scope unclear; create if obvious follow-up work
580
+
581
+ **Should I mark work as blocked or just note dependency?**
582
+ → Blocked = can't proceed; dependency = need to track relationship
583
+
584
+ **Should I create epic or just tasks?**
585
+ → Epic if 5+ related tasks; tasks if simpler structure
586
+
587
+ **Should I update status frequently or just at start/end?**
588
+ → Start and end minimum; during work if significant changes
589
+
590
+ ---
591
+
592
+ ## Troubleshooting Workflows
593
+
594
+ **"I can't find any ready work"**
595
+ 1. Run bd blocked
596
+ 2. Identify what's blocking progress
597
+ 3. Either work on blockers or create new work
598
+
599
+ **"I created an issue but it's not showing in ready"**
600
+ 1. Run bd show on the issue
601
+ 2. Check dependencies field
602
+ 3. If blocked, resolve blocker first
603
+ 4. If incorrectly blocked, remove dependency
604
+
605
+ **"Work is more complex than expected"**
606
+ 1. Transition from TodoWrite to bd mid-session
607
+ 2. Create bd issue with current context
608
+ 3. Note: "Discovered complexity during implementation"
609
+ 4. Add dependencies as discovered
610
+ 5. Continue with bd tracking
611
+
612
+ **"I closed an issue but work isn't done"**
613
+ 1. Reopen with bd update status=open
614
+ 2. Or create new issue linking to closed one
615
+ 3. Note what's still needed
616
+ 4. Closed issues can't be reopened in some systems, so create new if needed
617
+
618
+ **"Too many issues, can't find what matters"**
619
+ 1. Use bd list with filters (priority, issue_type)
620
+ 2. Use bd ready to focus on unblocked work
621
+ 3. Consider closing old issues that no longer matter
622
+ 4. Use labels for organization
623
+
@@ -0,0 +1,94 @@
1
+ # Git Worktree Support
2
+
3
+ > Adapted from ACF beads skill
4
+
5
+ **v0.40+**: First-class worktree management via `bd worktree` command.
6
+
7
+ ## When to Use Worktrees
8
+
9
+ | Scenario | Worktree? | Why |
10
+ |----------|-----------|-----|
11
+ | Parallel agent work | Yes | Each agent gets isolated working directory |
12
+ | Long-running feature | Yes | Avoids stash/switch dance for interruptions |
13
+ | Quick branch switch | No | `git switch` is simpler |
14
+ | PR review isolation | Yes | Review without disturbing main work |
15
+
16
+ ## Why `bd worktree` over `git worktree`
17
+
18
+ **Always use `bd worktree`** instead of raw `git worktree` commands.
19
+
20
+ ```bash
21
+ bd worktree create .worktrees/{name} --branch feature/{name}
22
+ bd worktree remove .worktrees/{name}
23
+ ```
24
+
25
+ **Why?** `bd worktree` auto-configures:
26
+ - Beads database redirect files
27
+ - Proper gitignore entries
28
+ - Daemon bypass for worktree operations
29
+
30
+ ## Architecture
31
+
32
+ All worktrees share one `.beads/` database via redirect files:
33
+
34
+ ```
35
+ main-repo/
36
+ ├── .beads/ ← Single source of truth
37
+ └── .worktrees/
38
+ ├── feature-a/
39
+ │ └── .beads ← Redirect file (not directory)
40
+ └── feature-b/
41
+ └── .beads ← Redirect file
42
+ ```
43
+
44
+ **Key insight**: Daemon auto-bypasses for wisp operations in worktrees.
45
+
46
+ ## Commands
47
+
48
+ ```bash
49
+ # Create worktree with beads support
50
+ bd worktree create .worktrees/my-feature --branch feature/my-feature
51
+
52
+ # List worktrees
53
+ bd worktree list
54
+
55
+ # Show worktree info
56
+ bd worktree info .worktrees/my-feature
57
+
58
+ # Remove worktree cleanly
59
+ bd worktree remove .worktrees/my-feature
60
+ ```
61
+
62
+ ## Debugging
63
+
64
+ When beads commands behave unexpectedly in a worktree:
65
+
66
+ ```bash
67
+ bd where # Shows actual .beads location (follows redirects)
68
+ bd doctor --deep # Validates graph integrity across all refs
69
+ ```
70
+
71
+ ## Protected Branch Workflows
72
+
73
+ For repos with protected `main` branch:
74
+
75
+ ```bash
76
+ bd init --branch beads-metadata # Use separate branch for beads data
77
+ bd init --contributor # Auto-configure sync.remote=upstream for forks
78
+ ```
79
+
80
+ This creates `.git/beads-worktrees/` for internal management.
81
+
82
+ ## Multi-Clone Support
83
+
84
+ Multi-clone, multi-branch workflows:
85
+
86
+ - Hash-based IDs (`bd-abc`) eliminate collision across clones
87
+ - Each clone syncs independently via git
88
+ - See [WORKTREES.md](https://github.com/steveyegge/beads/blob/main/docs/WORKTREES.md) for comprehensive guide
89
+
90
+ ## External References
91
+
92
+ - **Official Docs**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
93
+ - **Sync Branch**: [PROTECTED_BRANCHES.md](https://github.com/steveyegge/beads/blob/main/docs/PROTECTED_BRANCHES.md)
94
+ - **Worktrees**: [WORKTREES.md](https://github.com/steveyegge/beads/blob/main/docs/WORKTREES.md)