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,558 @@
1
+ # CLI Command Reference
2
+
3
+ **For:** AI agents and developers using bd command-line interface
4
+ **Version:** 0.21.0+
5
+
6
+ ## Quick Navigation
7
+
8
+ - [Basic Operations](#basic-operations)
9
+ - [Issue Management](#issue-management)
10
+ - [Dependencies & Labels](#dependencies--labels)
11
+ - [Filtering & Search](#filtering--search)
12
+ - [Advanced Operations](#advanced-operations)
13
+ - [Database Management](#database-management)
14
+
15
+ ## Basic Operations
16
+
17
+ ### Check Status
18
+
19
+ ```bash
20
+ # Check database path and daemon status
21
+ bd info --json
22
+
23
+ # Example output:
24
+ # {
25
+ # "database_path": "/path/to/.beads/beads.db",
26
+ # "issue_prefix": "bd",
27
+ # "daemon_running": true
28
+ # }
29
+ ```
30
+
31
+ ### Find Work
32
+
33
+ ```bash
34
+ # Find ready work (no blockers)
35
+ bd ready --json
36
+
37
+ # Find stale issues (not updated recently)
38
+ bd stale --days 30 --json # Default: 30 days
39
+ bd stale --days 90 --status in_progress --json # Filter by status
40
+ bd stale --limit 20 --json # Limit results
41
+ ```
42
+
43
+ ## Issue Management
44
+
45
+ ### Create Issues
46
+
47
+ ```bash
48
+ # Basic creation
49
+ # IMPORTANT: Always quote titles and descriptions with double quotes
50
+ bd create "Issue title" -t bug|feature|task -p 0-4 -d "Description" --json
51
+
52
+ # Create with explicit ID (for parallel workers)
53
+ bd create "Issue title" --id worker1-100 -p 1 --json
54
+
55
+ # Create with labels (--labels or --label work)
56
+ bd create "Issue title" -t bug -p 1 -l bug,critical --json
57
+ bd create "Issue title" -t bug -p 1 --label bug,critical --json
58
+
59
+ # Examples with special characters (all require quoting):
60
+ bd create "Fix: auth doesn't validate tokens" -t bug -p 1 --json
61
+ bd create "Add support for OAuth 2.0" -d "Implement RFC 6749 (OAuth 2.0 spec)" --json
62
+
63
+ # Create multiple issues from markdown file
64
+ bd create -f feature-plan.md --json
65
+
66
+ # Create epic with hierarchical child tasks
67
+ bd create "Auth System" -t epic -p 1 --json # Returns: bd-a3f8e9
68
+ bd create "Login UI" -p 1 --json # Auto-assigned: bd-a3f8e9.1
69
+ bd create "Backend validation" -p 1 --json # Auto-assigned: bd-a3f8e9.2
70
+ bd create "Tests" -p 1 --json # Auto-assigned: bd-a3f8e9.3
71
+
72
+ # Create and link discovered work (one command)
73
+ bd create "Found bug" -t bug -p 1 --deps discovered-from:<parent-id> --json
74
+ ```
75
+
76
+ ### Update Issues
77
+
78
+ ```bash
79
+ # Update one or more issues
80
+ bd update <id> [<id>...] --status in_progress --json
81
+ bd update <id> [<id>...] --priority 1 --json
82
+
83
+ # Edit issue fields in $EDITOR (HUMANS ONLY - not for agents)
84
+ # NOTE: This command is intentionally NOT exposed via the MCP server
85
+ # Agents should use 'bd update' with field-specific parameters instead
86
+ bd edit <id> # Edit description
87
+ bd edit <id> --title # Edit title
88
+ bd edit <id> --design # Edit design notes
89
+ bd edit <id> --notes # Edit notes
90
+ bd edit <id> --acceptance # Edit acceptance criteria
91
+ ```
92
+
93
+ ### Close/Reopen Issues
94
+
95
+ ```bash
96
+ # Complete work (supports multiple IDs)
97
+ bd close <id> [<id>...] --reason "Done" --json
98
+
99
+ # Reopen closed issues (supports multiple IDs)
100
+ bd reopen <id> [<id>...] --reason "Reopening" --json
101
+ ```
102
+
103
+ ### View Issues
104
+
105
+ ```bash
106
+ # Show dependency tree
107
+ bd dep tree <id>
108
+
109
+ # Get issue details (supports multiple IDs)
110
+ bd show <id> [<id>...] --json
111
+ ```
112
+
113
+ ## Dependencies & Labels
114
+
115
+ ### Dependencies
116
+
117
+ ```bash
118
+ # Link discovered work (old way - two commands)
119
+ bd dep add <discovered-id> <parent-id> --type discovered-from
120
+
121
+ # Create and link in one command (new way - preferred)
122
+ bd create "Issue title" -t bug -p 1 --deps discovered-from:<parent-id> --json
123
+ ```
124
+
125
+ ### Labels
126
+
127
+ ```bash
128
+ # Label management (supports multiple IDs)
129
+ bd label add <id> [<id>...] <label> --json
130
+ bd label remove <id> [<id>...] <label> --json
131
+ bd label list <id> --json
132
+ bd label list-all --json
133
+ ```
134
+
135
+ ## Filtering & Search
136
+
137
+ ### Basic Filters
138
+
139
+ ```bash
140
+ # Filter by status, priority, type
141
+ bd list --status open --priority 1 --json # Status and priority
142
+ bd list --assignee alice --json # By assignee
143
+ bd list --type bug --json # By issue type
144
+ bd list --id bd-123,bd-456 --json # Specific IDs
145
+ ```
146
+
147
+ ### Label Filters
148
+
149
+ ```bash
150
+ # Labels (AND: must have ALL)
151
+ bd list --label bug,critical --json
152
+
153
+ # Labels (OR: has ANY)
154
+ bd list --label-any frontend,backend --json
155
+ ```
156
+
157
+ ### Text Search
158
+
159
+ ```bash
160
+ # Title search (substring)
161
+ bd list --title "auth" --json
162
+
163
+ # Pattern matching (case-insensitive substring)
164
+ bd list --title-contains "auth" --json # Search in title
165
+ bd list --desc-contains "implement" --json # Search in description
166
+ bd list --notes-contains "TODO" --json # Search in notes
167
+ ```
168
+
169
+ ### Date Range Filters
170
+
171
+ ```bash
172
+ # Date range filters (YYYY-MM-DD or RFC3339)
173
+ bd list --created-after 2024-01-01 --json # Created after date
174
+ bd list --created-before 2024-12-31 --json # Created before date
175
+ bd list --updated-after 2024-06-01 --json # Updated after date
176
+ bd list --updated-before 2024-12-31 --json # Updated before date
177
+ bd list --closed-after 2024-01-01 --json # Closed after date
178
+ bd list --closed-before 2024-12-31 --json # Closed before date
179
+ ```
180
+
181
+ ### Empty/Null Checks
182
+
183
+ ```bash
184
+ # Empty/null checks
185
+ bd list --empty-description --json # Issues with no description
186
+ bd list --no-assignee --json # Unassigned issues
187
+ bd list --no-labels --json # Issues with no labels
188
+ ```
189
+
190
+ ### Priority Ranges
191
+
192
+ ```bash
193
+ # Priority ranges
194
+ bd list --priority-min 0 --priority-max 1 --json # P0 and P1 only
195
+ bd list --priority-min 2 --json # P2 and below
196
+ ```
197
+
198
+ ### Combine Filters
199
+
200
+ ```bash
201
+ # Combine multiple filters
202
+ bd list --status open --priority 1 --label-any urgent,critical --no-assignee --json
203
+ ```
204
+
205
+ ## Global Flags
206
+
207
+ Global flags work with any bd command and must appear **before** the subcommand.
208
+
209
+ ### Sandbox Mode
210
+
211
+ **Auto-detection (v0.21.1+):** bd automatically detects sandboxed environments and enables sandbox mode.
212
+
213
+ When detected, you'll see: `ℹ️ Sandbox detected, using direct mode`
214
+
215
+ **Manual override:**
216
+
217
+ ```bash
218
+ # Explicitly enable sandbox mode
219
+ bd --sandbox <command>
220
+
221
+ # Equivalent to combining these flags:
222
+ bd --no-daemon --no-auto-flush --no-auto-import <command>
223
+ ```
224
+
225
+ **What it does:**
226
+ - Disables daemon (uses direct SQLite mode)
227
+ - Disables auto-export to JSONL
228
+ - Disables auto-import from JSONL
229
+
230
+ **When to use:** Sandboxed environments where daemon can't be controlled (permission restrictions), or when auto-detection doesn't trigger.
231
+
232
+ ### Staleness Control
233
+
234
+ ```bash
235
+ # Skip staleness check (emergency escape hatch)
236
+ bd --allow-stale <command>
237
+
238
+ # Example: access database even if out of sync with JSONL
239
+ bd --allow-stale ready --json
240
+ bd --allow-stale list --status open --json
241
+ ```
242
+
243
+ **Shows:** `⚠️ Staleness check skipped (--allow-stale), data may be out of sync`
244
+
245
+ **⚠️ Caution:** May show stale or incomplete data. Use only when stuck and other options fail.
246
+
247
+ ### Force Import
248
+
249
+ ```bash
250
+ # Force metadata update even when DB appears synced
251
+ bd import --force -i .beads/issues.jsonl
252
+ ```
253
+
254
+ **When to use:** `bd import` reports "0 created, 0 updated" but staleness errors persist.
255
+
256
+ **Shows:** `Metadata updated (database already in sync with JSONL)`
257
+
258
+ ### Other Global Flags
259
+
260
+ ```bash
261
+ # JSON output for programmatic use
262
+ bd --json <command>
263
+
264
+ # Force direct mode (bypass daemon)
265
+ bd --no-daemon <command>
266
+
267
+ # Disable auto-sync
268
+ bd --no-auto-flush <command> # Disable auto-export to JSONL
269
+ bd --no-auto-import <command> # Disable auto-import from JSONL
270
+
271
+ # Custom database path
272
+ bd --db /path/to/.beads/beads.db <command>
273
+
274
+ # Custom actor for audit trail
275
+ bd --actor alice <command>
276
+ ```
277
+
278
+ **See also:**
279
+ - [TROUBLESHOOTING.md - Sandboxed environments](TROUBLESHOOTING.md#sandboxed-environments-codex-claude-code-etc) for detailed sandbox troubleshooting
280
+ - [DAEMON.md](DAEMON.md) for daemon mode details
281
+
282
+ ## Advanced Operations
283
+
284
+ ### Cleanup
285
+
286
+ ```bash
287
+ # Clean up closed issues (bulk deletion)
288
+ bd admin cleanup --force --json # Delete ALL closed issues
289
+ bd admin cleanup --older-than 30 --force --json # Delete closed >30 days ago
290
+ bd admin cleanup --dry-run --json # Preview what would be deleted
291
+ bd admin cleanup --older-than 90 --cascade --force --json # Delete old + dependents
292
+ ```
293
+
294
+ ### Duplicate Detection & Merging
295
+
296
+ ```bash
297
+ # Find and merge duplicate issues
298
+ bd duplicates # Show all duplicates
299
+ bd duplicates --auto-merge # Automatically merge all
300
+ bd duplicates --dry-run # Preview merge operations
301
+
302
+ # Merge specific duplicate issues
303
+ bd merge <source-id...> --into <target-id> --json # Consolidate duplicates
304
+ bd merge bd-42 bd-43 --into bd-41 --dry-run # Preview merge
305
+ ```
306
+
307
+ ### Compaction (Memory Decay)
308
+
309
+ ```bash
310
+ # Agent-driven compaction
311
+ bd admin compact --analyze --json # Get candidates for review
312
+ bd admin compact --analyze --tier 1 --limit 10 --json # Limited batch
313
+ bd admin compact --apply --id bd-42 --summary summary.txt # Apply compaction
314
+ bd admin compact --apply --id bd-42 --summary - < summary.txt # From stdin
315
+ bd admin compact --stats --json # Show statistics
316
+
317
+ # Legacy AI-powered compaction (requires ANTHROPIC_API_KEY)
318
+ bd admin compact --auto --dry-run --all # Preview
319
+ bd admin compact --auto --all --tier 1 # Auto-compact tier 1
320
+
321
+ # Restore compacted issue from git history
322
+ bd restore <id> # View full history at time of compaction
323
+ ```
324
+
325
+ ### Rename Prefix
326
+
327
+ ```bash
328
+ # Rename issue prefix (e.g., from 'knowledge-work-' to 'kw-')
329
+ bd rename-prefix kw- --dry-run # Preview changes
330
+ bd rename-prefix kw- --json # Apply rename
331
+ ```
332
+
333
+ ## Database Management
334
+
335
+ ### Import/Export
336
+
337
+ ```bash
338
+ # Import issues from JSONL
339
+ bd import -i .beads/issues.jsonl --dry-run # Preview changes
340
+ bd import -i .beads/issues.jsonl # Import and update issues
341
+ bd import -i .beads/issues.jsonl --dedupe-after # Import + detect duplicates
342
+
343
+ # Handle missing parents during import
344
+ bd import -i issues.jsonl --orphan-handling allow # Default: import orphans without validation
345
+ bd import -i issues.jsonl --orphan-handling resurrect # Auto-resurrect deleted parents as tombstones
346
+ bd import -i issues.jsonl --orphan-handling skip # Skip orphans with warning
347
+ bd import -i issues.jsonl --orphan-handling strict # Fail if parent is missing
348
+
349
+ # Configure default orphan handling behavior
350
+ bd config set import.orphan_handling "resurrect"
351
+ bd sync # Now uses resurrect mode by default
352
+ ```
353
+
354
+ **Orphan handling modes:**
355
+
356
+ - **`allow` (default)** - Import orphaned children without parent validation. Most permissive, ensures no data loss even if hierarchy is temporarily broken.
357
+ - **`resurrect`** - Search JSONL history for deleted parents and recreate them as tombstones (Status=Closed, Priority=4). Preserves hierarchy with minimal data. Dependencies are also resurrected on best-effort basis.
358
+ - **`skip`** - Skip orphaned children with warning. Partial import succeeds but some issues are excluded.
359
+ - **`strict`** - Fail import immediately if a child's parent is missing. Use when database integrity is critical.
360
+
361
+ **When to use:**
362
+ - Use `allow` (default) for daily imports and auto-sync
363
+ - Use `resurrect` when importing from databases with deleted parents
364
+ - Use `strict` for controlled imports requiring guaranteed parent existence
365
+ - Use `skip` rarely - only for selective imports
366
+
367
+ See [CONFIG.md](CONFIG.md#example-import-orphan-handling) and [TROUBLESHOOTING.md](TROUBLESHOOTING.md#import-fails-with-missing-parent-errors) for more details.
368
+
369
+ ### Migration
370
+
371
+ ```bash
372
+ # Migrate databases after version upgrade
373
+ bd migrate # Detect and migrate old databases
374
+ bd migrate --dry-run # Preview migration
375
+ bd migrate --cleanup --yes # Migrate and remove old files
376
+
377
+ # AI-supervised migration (check before running bd migrate)
378
+ bd migrate --inspect --json # Show migration plan for AI agents
379
+ bd info --schema --json # Get schema, tables, config, sample IDs
380
+ ```
381
+
382
+ **Migration workflow for AI agents:**
383
+
384
+ 1. Run `--inspect` to see pending migrations and warnings
385
+ 2. Check for `missing_config` (like issue_prefix)
386
+ 3. Review `invariants_to_check` for safety guarantees
387
+ 4. If warnings exist, fix config issues first
388
+ 5. Then run `bd migrate` safely
389
+
390
+ **Migration safety invariants:**
391
+
392
+ - **required_config_present**: Ensures issue_prefix and schema_version are set
393
+ - **foreign_keys_valid**: No orphaned dependencies or labels
394
+ - **issue_count_stable**: Issue count doesn't decrease unexpectedly
395
+
396
+ These invariants prevent data loss and would have caught issues like GH #201 (missing issue_prefix after migration).
397
+
398
+ ### Daemon Management
399
+
400
+ See [docs/DAEMON.md](DAEMON.md) for complete daemon management reference.
401
+
402
+ ```bash
403
+ # List all running daemons
404
+ bd daemons list --json
405
+
406
+ # Check health (version mismatches, stale sockets)
407
+ bd daemons health --json
408
+
409
+ # Stop/restart specific daemon
410
+ bd daemons stop /path/to/workspace --json
411
+ bd daemons restart 12345 --json # By PID
412
+
413
+ # View daemon logs
414
+ bd daemons logs /path/to/workspace -n 100
415
+ bd daemons logs 12345 -f # Follow mode
416
+
417
+ # Stop all daemons
418
+ bd daemons killall --json
419
+ bd daemons killall --force --json # Force kill if graceful fails
420
+ ```
421
+
422
+ ### Sync Operations
423
+
424
+ ```bash
425
+ # Manual sync (force immediate export/import/commit/push)
426
+ bd sync
427
+
428
+ # What it does:
429
+ # 1. Export pending changes to JSONL
430
+ # 2. Commit to git
431
+ # 3. Pull from remote
432
+ # 4. Import any updates
433
+ # 5. Push to remote
434
+ ```
435
+
436
+ ## Issue Types
437
+
438
+ - `bug` - Something broken that needs fixing
439
+ - `feature` - New functionality
440
+ - `task` - Work item (tests, docs, refactoring)
441
+ - `epic` - Large feature composed of multiple issues (supports hierarchical children)
442
+ - `chore` - Maintenance work (dependencies, tooling)
443
+
444
+ **Hierarchical children:** Epics can have child issues with dotted IDs (e.g., `bd-a3f8e9.1`, `bd-a3f8e9.2`). Children are auto-numbered sequentially. Up to 3 levels of nesting supported.
445
+
446
+ ## Priorities
447
+
448
+ - `0` - Critical (security, data loss, broken builds)
449
+ - `1` - High (major features, important bugs)
450
+ - `2` - Medium (nice-to-have features, minor bugs)
451
+ - `3` - Low (polish, optimization)
452
+ - `4` - Backlog (future ideas)
453
+
454
+ ## Dependency Types
455
+
456
+ - `blocks` - Hard dependency (issue X blocks issue Y)
457
+ - `related` - Soft relationship (issues are connected)
458
+ - `parent-child` - Epic/subtask relationship
459
+ - `discovered-from` - Track issues discovered during work
460
+
461
+ Only `blocks` dependencies affect the ready work queue.
462
+
463
+ **Note:** When creating an issue with a `discovered-from` dependency, the new issue automatically inherits the parent's `source_repo` field.
464
+
465
+ ## Output Formats
466
+
467
+ ### JSON Output (Recommended for Agents)
468
+
469
+ Always use `--json` flag for programmatic use:
470
+
471
+ ```bash
472
+ # Single issue
473
+ bd show bd-42 --json
474
+
475
+ # List of issues
476
+ bd ready --json
477
+
478
+ # Operation result
479
+ bd create "Issue" -p 1 --json
480
+ ```
481
+
482
+ ### Human-Readable Output
483
+
484
+ Default output without `--json`:
485
+
486
+ ```bash
487
+ bd ready
488
+ # bd-42 Fix authentication bug [P1, bug, in_progress]
489
+ # bd-43 Add user settings page [P2, feature, open]
490
+ ```
491
+
492
+ ## Common Patterns for AI Agents
493
+
494
+ ### Claim and Complete Work
495
+
496
+ ```bash
497
+ # 1. Find available work
498
+ bd ready --json
499
+
500
+ # 2. Claim issue
501
+ bd update bd-42 --status in_progress --json
502
+
503
+ # 3. Work on it...
504
+
505
+ # 4. Close when done
506
+ bd close bd-42 --reason "Implemented and tested" --json
507
+ ```
508
+
509
+ ### Discover and Link Work
510
+
511
+ ```bash
512
+ # While working on bd-100, discover a bug
513
+
514
+ # Old way (two commands):
515
+ bd create "Found auth bug" -t bug -p 1 --json # Returns bd-101
516
+ bd dep add bd-101 bd-100 --type discovered-from
517
+
518
+ # New way (one command):
519
+ bd create "Found auth bug" -t bug -p 1 --deps discovered-from:bd-100 --json
520
+ ```
521
+
522
+ ### Batch Operations
523
+
524
+ ```bash
525
+ # Update multiple issues at once
526
+ bd update bd-41 bd-42 bd-43 --priority 0 --json
527
+
528
+ # Close multiple issues
529
+ bd close bd-41 bd-42 bd-43 --reason "Batch completion" --json
530
+
531
+ # Add label to multiple issues
532
+ bd label add bd-41 bd-42 bd-43 urgent --json
533
+ ```
534
+
535
+ ### Session Workflow
536
+
537
+ ```bash
538
+ # Start of session
539
+ bd ready --json # Find work
540
+
541
+ # During session
542
+ bd create "..." -p 1 --json
543
+ bd update bd-42 --status in_progress --json
544
+ # ... work ...
545
+
546
+ # End of session (IMPORTANT!)
547
+ bd sync # Force immediate sync, bypass debounce
548
+ ```
549
+
550
+ **ALWAYS run `bd sync` at end of agent sessions** to ensure changes are committed/pushed immediately.
551
+
552
+ ## See Also
553
+
554
+ - [AGENTS.md](../AGENTS.md) - Main agent workflow guide
555
+ - [DAEMON.md](DAEMON.md) - Daemon management and event-driven mode
556
+ - [GIT_INTEGRATION.md](GIT_INTEGRATION.md) - Git workflows and merge strategies
557
+ - [LABELS.md](../LABELS.md) - Label system guide
558
+ - [README.md](../README.md) - User documentation