// Track complex, multi-session work with dependency graphs using bd (beads) issue tracker. Use when work spans multiple sessions, has complex dependencies, or requires persistent context across compaction cycles. For simple single-session linear tasks, TodoWrite remains appropriate.
| name | bd-issue-tracking |
| description | Track complex, multi-session work with dependency graphs using bd (beads) issue tracker. Use when work spans multiple sessions, has complex dependencies, or requires persistent context across compaction cycles. For simple single-session linear tasks, TodoWrite remains appropriate. |
bd is a graph-based issue tracker for persistent memory across sessions. Use for multi-session work with complex dependencies; use TodoWrite for simple single-session tasks.
Key insight: If resuming work after 2 weeks would be difficult without bd, use bd. If the work can be picked up from a markdown skim, TodoWrite is sufficient.
Ask these questions to decide:
Choose bd if:
Choose TodoWrite if:
When in doubt: Use bd. Better to have persistent memory you don't need than to lose context you needed.
For detailed decision criteria and examples, read: references/BOUNDARIES.md
Critical: Compaction events delete conversation history but preserve beads. After compaction, bd state is your only persistent memory.
What survives compaction:
What doesn't survive:
Writing notes for post-compaction recovery:
Write notes as if explaining to a future agent with zero conversation context:
Pattern:
notes field format:
- COMPLETED: Specific deliverables ("implemented JWT refresh endpoint + rate limiting")
- IN PROGRESS: Current state + next immediate step ("testing password reset flow, need user input on email template")
- BLOCKERS: What's preventing progress
- KEY DECISIONS: Important context or user guidance
After compaction: bd show <issue-id> reconstructs full context from notes field.
Before checkpointing (especially pre-compaction), verify your notes pass these tests:
❓ Future-me test: "Could I resume this work in 2 weeks with zero conversation history?"
❓ Stranger test: "Could another developer understand this without asking me?"
Good note example:
COMPLETED: JWT auth with RS256 (1hr access, 7d refresh tokens)
KEY DECISION: RS256 over HS256 per security review - enables key rotation
IN PROGRESS: Password reset flow - email service working, need rate limiting
BLOCKERS: Waiting on user decision: reset token expiry (15min vs 1hr trade-off)
NEXT: Implement rate limiting (5 attempts/15min) once expiry decided
Bad note example:
Working on auth. Made some progress. More to do.
For complete compaction recovery workflow, read: references/WORKFLOWS.md
bd is available when:
.beads/ directory (project-local database), OR~/.beads/ exists (global fallback database for any directory)At session start, always check for bd availability and run ready check.
Copy this checklist when starting any session where bd is available:
Session Start:
- [ ] Run bd ready --json to see available work
- [ ] Run bd list --status in_progress --json for active work
- [ ] If in_progress exists: bd show <issue-id> to read notes
- [ ] Report context to user: "X items ready: [summary]"
- [ ] If using global ~/.beads, mention this in report
- [ ] If nothing ready: bd blocked --json to check blockers
Pattern: Always check both bd ready AND bd list --status in_progress. Read notes field first to understand where previous session left off.
Report format:
This establishes immediate shared context about available and active work without requiring user prompting.
For detailed collaborative handoff process, read: references/WORKFLOWS.md
Note: bd auto-discovers the database:
.beads/*.db in current project if exists~/.beads/default.db otherwiseIf bd ready returns empty but issues exist:
bd blocked --json
Report blockers and suggest next steps.
Update bd notes at these checkpoints (don't wait for session end):
Critical triggers:
Proactive monitoring during session:
Current token usage: Check <system-warning>Token usage: messages to monitor proactively.
Checkpoint checklist:
Progress Checkpoint:
- [ ] Update notes with COMPLETED/IN_PROGRESS/NEXT format
- [ ] Document KEY DECISIONS or BLOCKERS since last update
- [ ] Mark current status (in_progress/blocked/closed)
- [ ] If discovered new work: create issues with discovered-from
- [ ] Verify notes are self-explanatory for post-compaction resume
Most important: When user says "running out of context" OR when you see >70% token usage - checkpoint immediately, even if mid-task.
Test yourself: "If compaction happened right now, could future-me resume from these notes?"
bd automatically selects the appropriate database:
.beads/ in project): Used for project-specific work~/.beads/): Used when no project-local database existsUse case for global database: Cross-project tracking, personal task management, knowledge work that doesn't belong to a specific project.
When to use --db flag explicitly:
bd --db /path/to/reference/terms.db listDatabase discovery rules:
.beads/*.db in current working directory~/.beads/default.dbFor complete session start workflows, read: references/WORKFLOWS.md
All bd commands support --json flag for structured output when needed for programmatic parsing.
Check ready work:
bd ready
bd ready --json # For structured output
bd ready --priority 0 # Filter by priority
bd ready --assignee alice # Filter by assignee
Create new issue:
IMPORTANT: Always quote title and description arguments with double quotes, especially when containing spaces or special characters.
bd create "Fix login bug"
bd create "Add OAuth" -p 0 -t feature
bd create "Write tests" -d "Unit tests for auth module" --assignee alice
bd create "Research caching" --design "Evaluate Redis vs Memcached"
# Examples with special characters (requires quoting):
bd create "Fix: auth doesn't handle edge cases" -p 1
bd create "Refactor auth module" -d "Split auth.go into separate files (handlers, middleware, utils)"
Update issue status:
bd update issue-123 --status in_progress
bd update issue-123 --priority 0
bd update issue-123 --assignee bob
bd update issue-123 --design "Decided to use Redis for persistence support"
Close completed work:
bd close issue-123
bd close issue-123 --reason "Implemented in PR #42"
bd close issue-1 issue-2 issue-3 --reason "Bulk close related work"
Show issue details:
bd show issue-123
bd show issue-123 --json
List issues:
bd list
bd list --status open
bd list --priority 0
bd list --type bug
bd list --assignee alice
For complete CLI reference with all flags and examples, read: references/CLI_REFERENCE.md
Quick guide for when and how to use each bd field:
| Field | Purpose | When to Set | Update Frequency |
|---|---|---|---|
| description | Immutable problem statement | At creation | Never (fixed forever) |
| design | Initial approach, architecture, decisions | During planning | Rarely (only if approach changes) |
| acceptance-criteria | Concrete deliverables checklist (- [ ] syntax) | When design is clear | Mark - [x] as items complete |
| notes | Session handoff (COMPLETED/IN_PROGRESS/NEXT) | During work | At session end, major milestones |
| status | Workflow state (open→in_progress→closed) | As work progresses | When changing phases |
| priority | Urgency level (0=highest, 3=lowest) | At creation | Adjust if priorities shift |
Key pattern: Notes field is your "read me first" at session start. See WORKFLOWS.md for session handoff details.
During exploration or implementation, proactively file issues for:
Pattern:
# When encountering new work during a task:
bd create "Found: auth doesn't handle profile permissions"
bd dep add current-task-id new-issue-id --type discovered-from
# Continue with original task - issue persists for later
Key benefit: Capture context immediately instead of losing it when conversation ends.
Mark issues in_progress when starting work:
bd update issue-123 --status in_progress
Update throughout work:
# Add design notes as implementation progresses
bd update issue-123 --design "Using JWT with RS256 algorithm"
# Update acceptance criteria if requirements clarify
bd update issue-123 --acceptance "- JWT validation works\n- Tests pass\n- Error handling returns 401"
Close when complete:
bd close issue-123 --reason "Implemented JWT validation with tests passing"
Important: Closed issues remain in database - they're not deleted, just marked complete for project history.
For complex multi-step work, structure issues with dependencies before starting:
Create parent epic:
bd create "Implement user authentication" -t epic -d "OAuth integration with JWT tokens"
Create subtasks:
bd create "Set up OAuth credentials" -t task
bd create "Implement authorization flow" -t task
bd create "Add token refresh" -t task
Link with dependencies:
# parent-child for epic structure
bd dep add auth-epic auth-setup --type parent-child
bd dep add auth-epic auth-flow --type parent-child
# blocks for ordering
bd dep add auth-setup auth-flow
For detailed dependency patterns and types, read: references/DEPENDENCIES.md
bd supports four dependency types:
For complete guide on when to use each type with examples and patterns, read: references/DEPENDENCIES.md
Both tools complement each other at different timescales:
TodoWrite (short-term working memory - this hour):
Beads (long-term episodic memory - this week/month):
After compaction: TodoWrite is gone forever, but bead notes reconstruct what happened.
TodoWrite:
[completed] Implement login endpoint
[in_progress] Add password hashing with bcrypt
[pending] Create session middleware
Corresponding bead notes:
bd update issue-123 --notes "COMPLETED: Login endpoint with bcrypt password
hashing (12 rounds). KEY DECISION: Using JWT tokens (not sessions) for stateless
auth - simplifies horizontal scaling. IN PROGRESS: Session middleware implementation.
NEXT: Need user input on token expiry time (1hr vs 24hr trade-off)."
Don't duplicate: TodoWrite tracks execution, Beads captures meaning and context.
For patterns on transitioning between tools mid-session, read: references/BOUNDARIES.md
Scenario: User asks "Help me write a proposal for expanding the analytics platform"
What you see:
$ bd ready
# Returns: bd-42 "Research analytics platform expansion proposal" (in_progress)
$ bd show bd-42
Notes: "COMPLETED: Reviewed current stack (Mixpanel, Amplitude)
IN PROGRESS: Drafting cost-benefit analysis section
NEXT: Need user input on budget constraints before finalizing recommendations"
What you do:
- [ ] Draft cost-benefit analysis
- [ ] Ask user about budget constraints
- [ ] Finalize recommendations
bd update bd-42 --notes "COMPLETED: Cost-benefit analysis drafted.
KEY DECISION: User confirmed $50k budget cap - ruled out enterprise options.
IN PROGRESS: Finalizing recommendations (Posthog + custom ETL).
NEXT: Get user review of draft before closing issue."
Outcome: TodoWrite disappears at session end, but bd notes preserve context for next session.
During main task, discover a problem:
bd create "Found: inventory system needs refactoring"bd dep add main-task new-issue --type discovered-frombd update main-task --status blocked, work on new issueStarting work after time away:
bd ready to see available workbd blocked to understand what's stuckbd list --status closed --limit 10 to see recent completionsbd show issue-id on issue to work onFor complete workflow walkthroughs with checklists, read: references/WORKFLOWS.md
Quick guidelines:
Copy when creating new issues:
Creating Issue:
- [ ] Title: Clear, specific, action-oriented
- [ ] Description: Problem statement (WHY this matters) - immutable
- [ ] Design: HOW to build (can change during work)
- [ ] Acceptance: WHAT success looks like (stays stable)
- [ ] Priority: 0=critical, 1=high, 2=normal, 3=low
- [ ] Type: bug/feature/task/epic/chore
Self-check for acceptance criteria:
❓ "If I changed the implementation approach, would these criteria still apply?"
Example:
For detailed guidance on when to ask vs create, issue quality, resumability patterns, and design vs acceptance criteria, read: references/ISSUE_CREATION.md
bd is primarily for work tracking, but can also serve as queryable database for static reference data (glossaries, terminology) with adaptations.
For guidance on using bd for reference databases and static data, read: references/STATIC_DATA.md
Check project health:
bd stats
bd stats --json
Returns: total issues, open, in_progress, closed, blocked, ready, avg lead time
Find blocked work:
bd blocked
bd blocked --json
Use stats to:
bd create "Title" -t task # Standard work item (default)
bd create "Title" -t bug # Defect or problem
bd create "Title" -t feature # New functionality
bd create "Title" -t epic # Large work with subtasks
bd create "Title" -t chore # Maintenance or cleanup
bd create "Title" -p 0 # Highest priority (critical)
bd create "Title" -p 1 # High priority
bd create "Title" -p 2 # Normal priority (default)
bd create "Title" -p 3 # Low priority
# Close multiple issues at once
bd close issue-1 issue-2 issue-3 --reason "Completed in sprint 5"
# Create multiple issues from markdown file
bd create --file issues.md
# Show full dependency tree for an issue
bd dep tree issue-123
# Check for circular dependencies
bd dep cycles
# Quick start guide (comprehensive built-in reference)
bd quickstart
# Command-specific help
bd create --help
bd dep --help
All bd commands support --json flag for structured output:
bd ready --json
bd show issue-123 --json
bd list --status open --json
bd stats --json
Use JSON output when you need to parse results programmatically or extract specific fields.
If bd command not found:
bd versionIf issues seem lost:
bd list to see all issuesbd list --status closedIf bd show can't find issue by name:
bd show requires issue IDs, not issue titlesbd list | grep -i "search term" to find ID firstbd show issue-id with the discovered IDIf dependencies seem wrong:
bd show issue-id to see full dependency treebd dep tree issue-id for visualizationbd dep add from-id to-id means from-id blocks to-idIf database seems out of sync:
bd export, bd importDetailed information organized by topic:
| Reference | Read When |
|---|---|
| references/BOUNDARIES.md | Need detailed decision criteria for bd vs TodoWrite, or integration patterns |
| references/CLI_REFERENCE.md | Need complete command reference, flag details, or examples |
| references/WORKFLOWS.md | Need step-by-step workflows with checklists for common scenarios |
| references/DEPENDENCIES.md | Need deep understanding of dependency types or relationship patterns |
| references/ISSUE_CREATION.md | Need guidance on when to ask vs create issues, issue quality, or design vs acceptance criteria |
| references/STATIC_DATA.md | Want to use bd for reference databases, glossaries, or static data instead of work tracking |