bd help --doc formula.
Manage workflow formulas - the source layer for molecule templates.
Formulas are TOML/JSON files that define workflows with composition rules.
Define formulas, cook them into protos, then pour or wisp them into work.
Search paths (in order):
- <resolved-beads-dir>/formulas/ (active project)
- <checkout-root>/.beads/formulas/ (repo-local formulas)
- ~/.beads/formulas/ (user)
- $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set)
bd formula convert
Convert formula files from JSON to TOML format. TOML format provides better ergonomics:- Multi-line strings without \n escaping
- Human-readable diffs
- Comments allowed
bd formula list
List all formulas from search paths. Search paths (in order of priority):- <resolved-beads-dir>/formulas/ (active project - highest priority)
- <checkout-root>/.beads/formulas/ (repo-local formulas)
- ~/.beads/formulas/ (user)
- $GT_ROOT/.beads/formulas/ (shared workspace root, if GT_ROOT set)
bd formula schema
Show the formula schema index: every exported struct declared in a .formula.toml/.formula.json, with field names, types, and tags. The index is generated from internal/formula/types.go via go:generate; the struct definitions are the source of truth, so this list cannot drift. It is structural reference, not proof that every declared runtime behavior is wired. Examples: bd formula schema # list every declared schema struct bd formula schema loop # show LoopSpec fields bd formula primitives gate # alias; shows Gate fields bd formula schema —json # machine-readable index Curated smoke-tested fixtures for wired primitives live in examples/formulas/primitives/ (with a smoke harness that proves they work).bd formula show
Show detailed information about a formula. Displays:- Formula metadata (name, type, description)
- Variables with defaults and constraints
- Steps with dependencies
- Composition rules (extends, aspects, expansions)
- Bond points for external composition