Skip to main content

Overview

The bd mol bond command is a polymorphic operation that combines formulas, protos (template issues), or molecules (instantiated workflows) into compound structures. Bonding supports sequential, parallel, and conditional execution patterns.

Usage

Arguments

  • <A> - First operand (formula name or issue ID)
  • <B> - Second operand (formula name or issue ID)

Options

  • --type <type> - Bond type: sequential (default), parallel, or conditional
  • --as <title> - Custom title for compound proto (proto+proto only)
  • --var key=value - Variable substitution when spawning protos (can be specified multiple times)
  • --ephemeral - Force spawn as vapor (ephemeral, excluded from Dolt sync)
  • --pour - Force spawn as liquid (persistent, synced via Dolt)
  • --ref <pattern> - Custom child reference with {{var}} substitution for dynamic IDs
  • --dry-run - Preview what would be created without making changes
  • --json - Output results in JSON format

Bond Types

Sequential (Default)

Second operand runs after first completes (any outcome):

Parallel

Both operands run concurrently:

Conditional

Second operand runs only if first fails:

Operand Type Combinations

The bond command is polymorphic and handles different operand types:

Phase Control

By default, spawned protos inherit the target’s phase:
  • Attaching to persistent molecule → spawns as persistent
  • Attaching to ephemeral wisp → spawns as ephemeral

Override Phase

Dynamic Bonding (Christmas Ornament Pattern)

Use --ref for predictable child IDs instead of random hashes:
This enables:
  • Readable IDs for debugging
  • Per-worker work tracking
  • Easy reference to specific spawned instances

Examples

Create Reusable Compound Proto

Bond two protos for reuse across projects:

Add Steps to Running Molecule

Attach additional work to an in-progress molecule:

Parallel Test Execution

Run multiple test suites concurrently:

Conditional Rollback

Add automatic rollback on deployment failure:

Dynamic Per-Worker Arms

Spawn custom work per agent with readable IDs:

Persist Important Findings

Convert ephemeral discovery to persistent issue:

Dry Run

Preview bonding without making changes:
Output:

JSON Output

Use Cases

Progressive Enhancement

Start with minimal molecule, add capabilities as needed:

Pipeline Composition

Build complex pipelines from simple formulas:

Patrol Workflows

Dynamically attach findings to patrol runs:

Error Handling

Common errors and solutions: