refactor: Update bd pour/wisp → bd mol pour/wisp

Beads CLI restructured: pour and wisp are now subcommands of mol.
- bd pour → bd mol pour
- bd wisp → bd mol wisp

Updated all documentation, templates, and code to use new command structure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-26 23:48:50 -08:00
parent 8298ee34b5
commit bb5a78c4fa
12 changed files with 82 additions and 17 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ This formula orchestrates a complete release cycle:
## Usage ## Usage
```bash ```bash
bd wisp create beads-release --var version=0.37.0 bd mol wisp create beads-release --var version=0.37.0
``` ```
Or assign to a polecat: Or assign to a polecat:
@@ -0,0 +1,62 @@
{
"formula": "mol-gastown-boot",
"description": "Mayor bootstraps Gas Town via a verification-gated lifecycle molecule.\n\n## Purpose\nWhen Mayor executes \"boot up gas town\", this proto provides the workflow.\nEach step has action + verification - steps stay open until outcome is confirmed.\n\n## Key Principles\n1. **Verification-gated steps** - Not \"command ran\" but \"outcome confirmed\"\n2. **gt peek for verification** - Capture session output to detect stalls\n3. **gt nudge for recovery** - Reliable message delivery to unstick agents\n4. **Parallel where possible** - Witnesses and refineries can start in parallel\n5. **Ephemeral execution** - Boot is a wisp, squashed to digest after completion\n\n## Execution\n```bash\nbd mol wisp mol-gastown-boot # Create wisp\n```",
"version": 1,
"steps": [
{
"id": "ensure-daemon",
"title": "Ensure daemon",
"description": "Verify the Gas Town daemon is running.\n\n## Action\n```bash\ngt daemon status || gt daemon start\n```\n\n## Verify\n1. Daemon PID file exists: `~/.gt/daemon.pid`\n2. Process is alive: `kill -0 $(cat ~/.gt/daemon.pid)`\n3. Daemon responds: `gt daemon status` returns success\n\n## OnFail\nCannot start daemon. Log error and continue - some commands work without daemon."
},
{
"id": "ensure-deacon",
"title": "Ensure deacon",
"needs": ["ensure-daemon"],
"description": "Start the Deacon and verify patrol mode is active.\n\n## Action\n```bash\ngt deacon start\n```\n\n## Verify\n1. Session exists: `tmux has-session -t gt-deacon 2>/dev/null`\n2. Not stalled: `gt peek deacon/` does NOT show \"> Try\" prompt\n3. Heartbeat fresh: `deacon/heartbeat.json` modified < 2 min ago\n\n## OnStall\n```bash\ngt nudge deacon/ \"Start patrol.\"\nsleep 30\n# Re-verify\n```"
},
{
"id": "ensure-witnesses",
"title": "Ensure witnesses",
"needs": ["ensure-deacon"],
"type": "parallel",
"description": "Parallel container: Start all rig witnesses.\n\nChildren execute in parallel. Container completes when all children complete.",
"children": [
{
"id": "ensure-gastown-witness",
"title": "Ensure gastown witness",
"description": "Start the gastown rig Witness.\n\n## Action\n```bash\ngt witness start gastown\n```\n\n## Verify\n1. Session exists: `tmux has-session -t gastown-witness 2>/dev/null`\n2. Not stalled: `gt peek gastown/witness` does NOT show \"> Try\" prompt\n3. Heartbeat fresh: Last patrol cycle < 5 min ago"
},
{
"id": "ensure-beads-witness",
"title": "Ensure beads witness",
"description": "Start the beads rig Witness.\n\n## Action\n```bash\ngt witness start beads\n```\n\n## Verify\n1. Session exists: `tmux has-session -t beads-witness 2>/dev/null`\n2. Not stalled: `gt peek beads/witness` does NOT show \"> Try\" prompt\n3. Heartbeat fresh: Last patrol cycle < 5 min ago"
}
]
},
{
"id": "ensure-refineries",
"title": "Ensure refineries",
"needs": ["ensure-deacon"],
"type": "parallel",
"description": "Parallel container: Start all rig refineries.\n\nChildren execute in parallel. Container completes when all children complete.",
"children": [
{
"id": "ensure-gastown-refinery",
"title": "Ensure gastown refinery",
"description": "Start the gastown rig Refinery.\n\n## Action\n```bash\ngt refinery start gastown\n```\n\n## Verify\n1. Session exists: `tmux has-session -t gastown-refinery 2>/dev/null`\n2. Not stalled: `gt peek gastown/refinery` does NOT show \"> Try\" prompt\n3. Queue processing: Refinery can receive merge requests"
},
{
"id": "ensure-beads-refinery",
"title": "Ensure beads refinery",
"description": "Start the beads rig Refinery.\n\n## Action\n```bash\ngt refinery start beads\n```\n\n## Verify\n1. Session exists: `tmux has-session -t beads-refinery 2>/dev/null`\n2. Not stalled: `gt peek beads/refinery` does NOT show \"> Try\" prompt\n3. Queue processing: Refinery can receive merge requests"
}
]
},
{
"id": "verify-town-health",
"title": "Verify town health",
"needs": ["ensure-witnesses", "ensure-refineries"],
"description": "Final verification that Gas Town is healthy.\n\n## Action\n```bash\ngt status\n```\n\n## Verify\n1. Daemon running: Shows daemon status OK\n2. Deacon active: Shows deacon in patrol mode\n3. All witnesses: Each rig witness shows active\n4. All refineries: Each rig refinery shows active\n\n## OnFail\nLog degraded state but consider boot complete. Some agents may need manual recovery.\nRun `gt doctor` for detailed diagnostics."
}
]
}
@@ -14,7 +14,7 @@ Each step has action + verification - steps stay open until outcome is confirmed
## Execution ## Execution
```bash ```bash
bd wisp mol-gastown-boot # Create wisp bd mol wisp mol-gastown-boot # Create wisp
```""" ```"""
formula = "mol-gastown-boot" formula = "mol-gastown-boot"
version = 1 version = 1
+1 -1
View File
@@ -98,7 +98,7 @@ needs = ["test"]
```bash ```bash
bd formula list # See available formulas bd formula list # See available formulas
bd cook shiny # Cook into a protomolecule bd cook shiny # Cook into a protomolecule
bd pour shiny --var feature=auth # Create runnable molecule bd mol pour shiny --var feature=auth # Create runnable molecule
gt sling gt-xyz myproject # Assign to worker gt sling gt-xyz myproject # Assign to worker
``` ```
+5 -5
View File
@@ -110,9 +110,9 @@ Formula (source TOML) ─── "Ice-9"
▼ bd cook ▼ bd cook
Protomolecule (frozen template) ─── Solid Protomolecule (frozen template) ─── Solid
├─▶ bd pour ──▶ Mol (persistent) ─── Liquid ──▶ bd squash ──▶ Digest ├─▶ bd mol pour ──▶ Mol (persistent) ─── Liquid ──▶ bd squash ──▶ Digest
└─▶ bd wisp ──▶ Wisp (ephemeral) ─── Vapor ──┬▶ bd squash ──▶ Digest └─▶ bd mol wisp ──▶ Wisp (ephemeral) ─── Vapor ──┬▶ bd squash ──▶ Digest
└▶ bd burn ──▶ (gone) └▶ bd burn ──▶ (gone)
``` ```
@@ -130,8 +130,8 @@ bd cook <formula> # Formula → Proto
# Molecules # Molecules
bd mol list # Available protos bd mol list # Available protos
bd mol show <id> # Proto details bd mol show <id> # Proto details
bd pour <proto> # Create mol bd mol pour <proto> # Create mol
bd wisp <proto> # Create wisp bd mol wisp <proto> # Create wisp
bd mol bond <proto> <parent> # Attach to existing mol bd mol bond <proto> <parent> # Attach to existing mol
bd mol squash <id> # Condense to digest bd mol squash <id> # Condense to digest
bd mol burn <id> # Discard wisp bd mol burn <id> # Discard wisp
@@ -237,7 +237,7 @@ Deacon, Witness, and Refinery run continuous patrol loops using wisps:
| **Refinery** | `mol-refinery-patrol` | Process merge queue, review PRs | | **Refinery** | `mol-refinery-patrol` | Process merge queue, review PRs |
``` ```
1. bd wisp mol-<role>-patrol 1. bd mol wisp mol-<role>-patrol
2. Execute steps (check workers, process queue, run plugins) 2. Execute steps (check workers, process queue, run plugins)
3. bd mol squash (or burn if routine) 3. bd mol squash (or burn if routine)
4. Loop 4. Loop
+3 -3
View File
@@ -459,7 +459,7 @@ func outputStartupDirective(ctx RoleContext) {
fmt.Println("2. Check mail: `gt mail inbox` - look for 🤝 HANDOFF messages") fmt.Println("2. Check mail: `gt mail inbox` - look for 🤝 HANDOFF messages")
fmt.Println("3. Check for attached patrol: `gt mol status`") fmt.Println("3. Check for attached patrol: `gt mol status`")
fmt.Println(" - If mol attached → **RUN IT** (resume from current step)") fmt.Println(" - If mol attached → **RUN IT** (resume from current step)")
fmt.Println(" - If no mol → create patrol: `bd wisp mol-witness-patrol`") fmt.Println(" - If no mol → create patrol: `bd mol wisp mol-witness-patrol`")
case RolePolecat: case RolePolecat:
fmt.Println() fmt.Println()
fmt.Println("---") fmt.Println("---")
@@ -480,7 +480,7 @@ func outputStartupDirective(ctx RoleContext) {
fmt.Println("2. Check mail: `gt mail inbox` - look for 🤝 HANDOFF messages") fmt.Println("2. Check mail: `gt mail inbox` - look for 🤝 HANDOFF messages")
fmt.Println("3. Check for attached patrol: `gt mol status`") fmt.Println("3. Check for attached patrol: `gt mol status`")
fmt.Println(" - If mol attached → **RUN IT** (resume from current step)") fmt.Println(" - If mol attached → **RUN IT** (resume from current step)")
fmt.Println(" - If no mol → create patrol: `bd wisp mol-refinery-patrol`") fmt.Println(" - If no mol → create patrol: `bd mol wisp mol-refinery-patrol`")
case RoleCrew: case RoleCrew:
fmt.Println() fmt.Println()
fmt.Println("---") fmt.Println("---")
@@ -502,7 +502,7 @@ func outputStartupDirective(ctx RoleContext) {
fmt.Println("3. Check mail: `gt mail inbox` - look for 🤝 HANDOFF messages") fmt.Println("3. Check mail: `gt mail inbox` - look for 🤝 HANDOFF messages")
fmt.Println("4. Check for attached patrol: `gt mol status`") fmt.Println("4. Check for attached patrol: `gt mol status`")
fmt.Println(" - If mol attached → **RUN IT** (resume from current step)") fmt.Println(" - If mol attached → **RUN IT** (resume from current step)")
fmt.Println(" - If no mol → create patrol: `bd wisp mol-deacon-patrol`") fmt.Println(" - If no mol → create patrol: `bd mol wisp mol-deacon-patrol`")
} }
} }
+3 -3
View File
@@ -124,15 +124,15 @@ func (c *WispGCCheck) countAbandonedWisps(rigPath string) int {
return count return count
} }
// Fix runs bd wisp gc in each rig with abandoned wisps. // Fix runs bd mol wisp gc in each rig with abandoned wisps.
func (c *WispGCCheck) Fix(ctx *CheckContext) error { func (c *WispGCCheck) Fix(ctx *CheckContext) error {
var lastErr error var lastErr error
for rigName := range c.abandonedRigs { for rigName := range c.abandonedRigs {
rigPath := filepath.Join(ctx.TownRoot, rigName) rigPath := filepath.Join(ctx.TownRoot, rigName)
// Run bd --no-daemon wisp gc // Run bd --no-daemon mol wisp gc
cmd := exec.Command("bd", "--no-daemon", "wisp", "gc") cmd := exec.Command("bd", "--no-daemon", "mol", "wisp", "gc")
cmd.Dir = rigPath cmd.Dir = rigPath
if output, err := cmd.CombinedOutput(); err != nil { if output, err := cmd.CombinedOutput(); err != nil {
lastErr = fmt.Errorf("%s: %v (%s)", rigName, err, string(output)) lastErr = fmt.Errorf("%s: %v (%s)", rigName, err, string(output))
+1
View File
@@ -42,6 +42,7 @@ Town ({{ .TownRoot }})
- Mail ALWAYS uses town beads - `gt mail` routes there automatically - Mail ALWAYS uses town beads - `gt mail` routes there automatically
- Project issues use your clone's beads - `bd` commands use local `.beads/` - Project issues use your clone's beads - `bd` commands use local `.beads/`
- Run `bd sync` to push/pull beads changes via the `beads-sync` branch - Run `bd sync` to push/pull beads changes via the `beads-sync` branch
- **GitHub URLs**: Use `git remote -v` to verify repo URLs - never assume orgs like `anthropics/`
## Prefix-Based Routing ## Prefix-Based Routing
+2 -2
View File
@@ -66,7 +66,7 @@ gt mail inbox
gt mol attach-from-mail <mail-id> gt mol attach-from-mail <mail-id>
# Step 3: Still nothing? Create patrol wisp (two-step: create then pin) # Step 3: Still nothing? Create patrol wisp (two-step: create then pin)
bd wisp create mol-deacon-patrol bd mol wisp create mol-deacon-patrol
bd update <wisp-id> --status=pinned --assignee=deacon bd update <wisp-id> --status=pinned --assignee=deacon
``` ```
@@ -135,7 +135,7 @@ Then squash and decide:
bd mol squash <wisp-id> --summary="Patrol complete: checked inbox, scanned health, no issues" bd mol squash <wisp-id> --summary="Patrol complete: checked inbox, scanned health, no issues"
# Option A: Loop (low context) # Option A: Loop (low context)
bd wisp create mol-deacon-patrol bd mol wisp create mol-deacon-patrol
bd update <wisp-id> --status=pinned --assignee=deacon bd update <wisp-id> --status=pinned --assignee=deacon
# Continue to first step... # Continue to first step...
+1
View File
@@ -68,6 +68,7 @@ Town ({{ .TownRoot }})
- **Rig beads**: Project work lives in git worktrees (crew/*, polecats/*) - **Rig beads**: Project work lives in git worktrees (crew/*, polecats/*)
- The rig-level `<rig>/.beads/` is **gitignored** (local runtime state) - The rig-level `<rig>/.beads/` is **gitignored** (local runtime state)
- Rig beads use `beads-sync` branch for multi-clone coordination - Rig beads use `beads-sync` branch for multi-clone coordination
- **GitHub URLs**: Use `git remote -v` to verify repo URLs - never assume orgs like `anthropics/`
## Prefix-Based Routing ## Prefix-Based Routing
+1
View File
@@ -39,6 +39,7 @@ Town ({{ .TownRoot }})
- You're in a project git worktree - your `.beads/` is tracked in the project repo - You're in a project git worktree - your `.beads/` is tracked in the project repo
- The rig-level `{{ .RigName }}/.beads/` is **gitignored** (local runtime state) - The rig-level `{{ .RigName }}/.beads/` is **gitignored** (local runtime state)
- Run `bd sync` to push/pull beads changes via the `beads-sync` branch - Run `bd sync` to push/pull beads changes via the `beads-sync` branch
- **GitHub URLs**: Use `git remote -v` to verify repo URLs - never assume orgs like `anthropics/`
## Prefix-Based Routing ## Prefix-Based Routing
+1 -1
View File
@@ -99,7 +99,7 @@ gt mail inbox
gt mol attach-from-mail <mail-id> gt mol attach-from-mail <mail-id>
# Step 4: Still nothing? Create patrol wisp # Step 4: Still nothing? Create patrol wisp
bd wisp mol-witness-patrol --assignee={{ .RigName }}/witness bd mol wisp mol-witness-patrol --assignee={{ .RigName }}/witness
``` ```
**Hook → Execute. No exceptions.** **Hook → Execute. No exceptions.**