2026-02-14 00:23:41 -08:00
---
name: beadboard-driver
2026-03-03 19:25:57 -08:00
description: Use when an agent is executing work in a non-BeadBoard repo while a human coordinates from BeadBoard, and you need reliable state, mail, assignment, and evidence flow from start to close.
2026-02-14 00:23:41 -08:00
---
2026-03-03 16:43:42 -08:00
# BeadBoard Driver
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
## Overview
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
This skill is the operator runbook for agent execution in external repos with BeadBoard as control plane.
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
Core principle: explicit state + explicit assignment + explicit evidence.
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
## The Iron Law
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
```
No bead claims, handoffs, or completion statements without:
1) assignee set,
2) coordination checked,
3) evidence recorded.
```
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
## Requirements
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
- `bd` must be installed and available on `PATH` .
- `bb` or `beadboard` must be installed globally and available on `PATH` .
- Work from the target repository root.
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
## Session Runbook (Do Not Skip Steps)
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
### Step 1: Preflight and Communication Validation
2026-02-14 00:23:41 -08:00
```bash
2026-03-03 16:43:42 -08:00
node skills/beadboard-driver/scripts/session-preflight.mjs
2026-03-03 19:25:57 -08:00
node skills/beadboard-driver/scripts/ensure-bb-mail-configured.mjs
2026-02-15 21:14:05 -08:00
```
2026-03-03 19:25:57 -08:00
Expected outcome:
- `bd` detected
- `bb` detected (global install)
- `mail.delegate` points to `bb-mail-shim.mjs`
- `BB_AGENT` or `BD_ACTOR` identity is available
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
If either script fails, stop and fix environment first.
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
### Step 2: Create Agent Bead Identity
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
```bash
bd create --title="Agent: < role-name > " --description="< scope > " --type=task --priority=0 --label="gt:agent,role:< orchestrator | ui | graph | backend | infra > "
```
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
Then set lifecycle state:
2026-03-03 16:43:42 -08:00
2026-02-15 21:14:05 -08:00
```bash
2026-03-03 19:25:57 -08:00
bd agent state < agent-bead-id > spawning
bd agent state < agent-bead-id > running
```
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
### Step 3: Initialize/Update `project.md`
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
`project.md` lives in the target repo root (not in the skill folder):
- first agent in repo creates it from `skills/beadboard-driver/project.template.md`
- later agents read and update it before work
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
Required updates each session:
- confirm whether `bd` and `bb/beadboard` are globally installed
- record shell/platform facts affecting execution
- record mail delegate/identity policy if changed
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
### Step 4: Read Hard Memory and Task Context
2026-03-03 16:43:42 -08:00
2026-02-14 00:23:41 -08:00
```bash
2026-03-03 19:25:57 -08:00
bd show beadboard-116 beadboard-60a beadboard-zas
2026-03-03 16:43:42 -08:00
bd ready
2026-03-03 19:25:57 -08:00
bd show < target-bead-id >
2026-02-14 00:23:41 -08:00
```
2026-03-03 19:25:57 -08:00
Minimum: read task contract, dependencies, success criteria, and blockers.
### Step 5: Claim Work with Assignee + Hook Slot
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
```bash
bd update < target-bead-id > --status in_progress --assignee < agent-bead-id >
bd slot set < agent-bead-id > hook < target-bead-id >
```
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
Never use `--claim` . Use explicit `--assignee` .
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
### Step 6: Execute + Heartbeat + Coordinate via Mail
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
During execution:
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
```bash
bd agent heartbeat < agent-bead-id >
```
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
Coordinate through delegated mail:
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
```bash
bd mail inbox
bd mail send --to < agent-or-role > --bead < bead-id > --category < HANDOFF | BLOCKED | DECISION | INFO > --subject "< short > " --body "< details > "
bd mail read < message-id >
bd mail ack < message-id >
```
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
When blocked:
- send `BLOCKED`
- set `bd agent state <agent-bead-id> stuck`
- resume only after intervention/response
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
### Step 7: Verification Gates (Code Changes)
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
```bash
npm run typecheck
npm run lint
npm run test
```
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
Do not claim fixed/done without fresh command output from this session.
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
### Step 8: Publish Evidence and Close
2026-03-03 16:43:42 -08:00
2026-02-14 00:23:41 -08:00
```bash
2026-03-03 19:25:57 -08:00
bd update < target-bead-id > --notes "< commands run + key outputs + files changed > "
bd close < target-bead-id > --reason "< what was completed > "
bd slot clear < agent-bead-id > hook
bd agent state < agent-bead-id > done
2026-02-14 00:23:41 -08:00
```
2026-03-03 19:25:57 -08:00
### Step 9: Memory Review
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
If reusable lesson exists:
- create/supersede canonical memory decision bead
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
If no reusable lesson:
- record: `Memory review: no new reusable memory.`
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
## Red Flags
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
Stop and correct if you are about to:
- close without `--assignee` history
- skip `bd mail` checks at session start/claim/close
- claim completion without gate output
- write project context inside skill folder instead of repo `project.md`
- use deprecated direct command patterns from old docs
2026-03-03 16:43:42 -08:00
2026-03-03 19:25:57 -08:00
## Use-The-Right-Doc Map
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
- `references/session-lifecycle.md` :
Full end-to-end session choreography.
- `references/agent-state-liveness.md` :
Agent states, heartbeat cadence, liveness interpretation.
- `references/coordination-system.md` :
Canonical bb-mail command surface and category semantics.
- `references/coord-events-sessions-ack.md` :
Trigger map, inbox polling protocol, blocked-to-resume walkthrough.
- `references/command-matrix.md` :
Exact command inventory for day-to-day operation.
- `references/failure-modes.md` :
Deterministic diagnosis and recovery paths.
- `references/memory-system.md` :
Memory anchors, injection protocol, promotion/supersede rules.
- `references/archetypes-templates-swarms.md` :
Swarm composition, molecule operations, worker dispatch patterns.
- `references/missions-realtime.md` :
Real-time/watcher/event troubleshooting.
2026-02-14 00:23:41 -08:00
2026-03-03 16:43:42 -08:00
## Bottom Line
2026-02-14 00:23:41 -08:00
2026-03-03 19:25:57 -08:00
If you follow this runbook exactly, any agent can enter cold, coordinate safely, and deliver auditable completion without drift.