Adding Dependencies
bd ready. Once issue-1
is closed, issue-2 unblocks automatically.
Removing Dependencies
Dependency Types
Dependencies have a type that determines whether they block work. Blocking types (affectbd ready):
| Type | Meaning | Example |
|---|---|---|
blocks (default) | B cannot start until A closes | Task ordering |
parent-child | Children blocked when parent blocked | Epic hierarchies |
conditional-blocks | B runs only if A fails | Error handling paths |
waits-for | B waits for all of A’s children | Fanout aggregation |
| Type | Meaning |
|---|---|
related | Informational link |
tracks | Tracks progress of another issue |
discovered-from | Found during work on another issue |
caused-by | Root cause link |
validates | Test or verification link |
supersedes | Replaces another issue |
--type:
Finding Ready Work
bd ready shows issues with no open blocking dependencies:
Viewing Blocked Issues
Visualizing Dependencies
Dependency Tree
Dependency Graph
- Layer 0: No dependencies (can start immediately)
- Layer 1: Depends on layer 0
- Higher layers: Depend on lower layers
- Same layer: Can run in parallel
Dependency List
Cycle Detection
bd dep add checks for
cycles before committing.
Cross-Repo Dependencies
Dependencies can reference issues in other beads rigs:bd ready reflects the change (checked at query time).
Gates
Gates are special issues that block dependent work until an external condition is met. They bridge the gap between beads (which tracks work) and external systems (which track code, CI, or time).The Problem Gates Solve
When you use Dolt (server or embedded), issue state is decoupled from code state. Closing a beads issue means “work is done” but the code may still be on a feature branch, waiting for PR review:Gate Types
| Type | Condition | Auto-Resolution |
|---|---|---|
gh:pr | PR merged | gh pr view returns MERGED |
gh:run | CI passes | gh run view returns completed + success |
timer | Time elapsed | Current time exceeds timeout |
bead | Cross-rig issue closed | Remote bead status checked |
human | Manual approval | bd gate resolve <id> |
Creating Gates
Wiring Gates into Dependencies
A gate is an issue. Wire it into the dependency graph like any other:Checking Gates
bd gate check evaluates all open gates and closes resolved ones:
Listing and Inspecting Gates
Manual Resolution
Forhuman gates or overrides:
Discovering CI Run IDs
When you create agh:run gate before the run starts, bd gate discover
matches gates to GitHub Actions runs using heuristics (commit SHA, branch,
timing):
Automating Gate Checks
Runbd gate check periodically to auto-close resolved gates:
- CI step: Add to your GitHub Actions workflow
- Cron:
*/5 * * * * cd /path/to/repo && bd gate check - Agent hook: Run at session start or after PR operations
Recipes
PR Merge Gate (Common)
Agent A finishes work, opens PR, creates a gate so Agent B waits for merge:CI Gate Before Deploy
Epic with Ordered Phases
See Also
- Quick Start — First steps with dependencies
- Molecules — Molecule workflows using gates and dependencies
- Agent Coordination — Cross-repo dependency patterns
- Dolt Backend for Beads — Dolt backend configuration
- CLI Reference — Full command reference