Adding Dependencies
bd ready. Once issue-1
is closed, issue-2 unblocks automatically.
To add dependencies while creating an issue, bd create --deps and the
### Dependencies (or ### Deps) section of a bd create --file batch take
the same entries:
- a bare id,
depends-on:idorblocked-by:id: the new issue depends on id blocks:id: id depends on the new issue- any other type from the table below, written
type:id
Removing Dependencies
Dependency Types
Dependencies have a type that determines whether they block work. Blocking types (affectbd ready):
Non-blocking types (graph annotations only):
Specify with
--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:external_projects, then label a target
project issue provides:checkout-ready. The dependency blocks until an issue
with that label is closed. bd ready, bd blocked, and bd dep tree resolve
the capability at query time; an unconfigured or unavailable project remains
blocking.
A bare ID whose prefix names another rig (bd dep add bd-abc gt-123) is
stored even when bd cannot find it in this database or through routes. bd dep add then warns on stderr that the ID was not found, or says why it could not
be verified (the lookup itself failed, or the routed rig matches it only to
other IDs), and prints the bd dep remove command that deletes the edge if the
ID was a typo (--quiet silences the warning). Prefix routing cannot open a
rig in proxied-server mode yet
(#5861), so bd cannot check
an ID routed to such a rig and stores it without a warning.
bd doctor cannot check such an edge either: it counts it as a
cross-repository edge not verifiable here instead of reporting it as an
orphaned dependency, and bd doctor --fix keeps it. An edge whose target is
under this database’s own issue_prefix or allowed_prefixes and is gone is
still reported and removed.
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
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