diff --git a/.beads/formulas/mol-gastown-boot.formula.json b/.beads/formulas/mol-gastown-boot.formula.json deleted file mode 100644 index 80f3db2e..00000000 --- a/.beads/formulas/mol-gastown-boot.formula.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "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." - } - ] -} diff --git a/internal/formula/embed.go b/internal/formula/embed.go index 22119f44..efbdddf0 100644 --- a/internal/formula/embed.go +++ b/internal/formula/embed.go @@ -9,7 +9,7 @@ import ( ) // Generate formulas directory from canonical source at .beads/formulas/ -//go:generate sh -c "rm -rf formulas && mkdir -p formulas && cp ../../.beads/formulas/*.formula.toml ../../.beads/formulas/*.formula.json formulas/ 2>/dev/null || cp ../../.beads/formulas/*.formula.toml formulas/" +//go:generate sh -c "rm -rf formulas && mkdir -p formulas && cp ../../.beads/formulas/*.formula.toml formulas/" //go:embed formulas/*.formula.toml var formulasFS embed.FS diff --git a/internal/formula/formulas/mol-gastown-boot.formula.json b/internal/formula/formulas/mol-gastown-boot.formula.json deleted file mode 100644 index 80f3db2e..00000000 --- a/internal/formula/formulas/mol-gastown-boot.formula.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "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." - } - ] -}