Skip to main content

Workflows

Beads provides powerful workflow primitives for complex, multi-step processes.

Chemistry Metaphor

Beads uses a molecular chemistry metaphor:

PhaseStorageSyncedUse Case
Proto (solid)Built-inN/AReusable templates
Mol (liquid).beads/YesPersistent work
Wisp (vapor).beads-wisp/NoEphemeral operations

Core Concepts

Formulas

Declarative workflow templates in TOML or JSON:

formula = "feature-workflow"
version = 1
type = "workflow"

[[steps]]
id = "design"
title = "Design the feature"
type = "human"

[[steps]]
id = "implement"
title = "Implement the feature"
needs = ["design"]

Molecules

Work graphs with parent-child relationships:

  • Created by instantiating formulas with bd pour
  • Steps have dependencies (needs)
  • Progress tracked via issue status

Gates

Async coordination primitives:

  • Human gates - Wait for human approval
  • Timer gates - Wait for duration
  • GitHub gates - Wait for PR merge, CI, etc.

Wisps

Ephemeral operations that don't sync to git:

  • Created with bd wisp
  • Stored in .beads-wisp/ (gitignored)
  • Auto-expire after completion

Workflow Commands

CommandDescription
bd pourInstantiate formula as molecule
bd wispCreate ephemeral wisp
bd mol listList molecules
bd pinPin work to agent
bd hookShow pinned work

Simple Example

# Create a release workflow
bd pour release --var version=1.0.0

# View the molecule
bd mol show release-1.0.0

# Work through steps
bd update release-1.0.0.1 --status in_progress
bd close release-1.0.0.1
# Next step becomes ready...