Previously SSE was only enabled in single project mode (allowMutations). Now auto-refresh works in all modes including aggregate.
5.6 KiB
RFC-001 Agent Coordination Protocol
Date: 2026-02-13
Owner: bb-dcv.1
Status: Draft
Scope: Define a CLI-first, issue-linked protocol for multi-agent coordination in BeadBoard.
0) Reference Position
mcp_agent_mail is used as a pattern reference only (identity registration, inbox/ack workflow, reservations).
We are not integrating MCP mail transport into BeadBoard for this phase.
Decision:
- Borrow concepts.
- Implement a local thin-layer
bb agentCLI. - Keep Beads as issue/dependency system of record.
1) Problem Statement
BeadBoard needs reliable agent-to-agent coordination that does not depend on chat context and does not mutate .beads/issues.jsonl directly. Today, ownership is partially covered by Beads (bd update --claim), but directed communication, acknowledgements, and short-lived work-surface reservations are not standardized.
This RFC defines:
- Agent identity conventions.
- Handoff/blocker/decision communication protocol.
- Assignment/claim expectations.
- The required thin-layer
bb agentCLI capabilities.
2) Design Goals and Non-Goals
Goals:
- Keep Beads as source of truth for issue lifecycle and dependencies.
- Add durable coordination metadata with clear auditability.
- Require explicit bead linkage for coordination events.
- Support parallel work without accidental overlap.
Non-goals:
- Replacing Beads issue state with a new tracker.
- Direct writes to Beads JSONL outside
bd. - Introducing MCP requirements for core local workflows.
3) Identity Standard
Each automation participant uses a stable agent_id (example: agent-ui-1, agent-graph-1).
Rules:
agent_idis globally unique within a repo.agent_idis immutable after registration.- Operator identity and agent identity are both retained in logs.
Canonical fields:
agent_iddisplay_namerole(ui,graph,infra,qa, etc.)created_atlast_seen_atstatus(idle,working,blocked,done)
4) Assignment and Ownership Protocol
Ownership remains Beads-native:
- Claim issue with
bd update <id> --claim. - Move lifecycle through normal
bdcommands. - Use Beads dependencies as execution truth.
Agent protocol requirements:
- Every coordination message includes
bead_id. - Any handoff sets a clear next owner or recipient.
- Any blocker message includes a requested action and urgency.
5) Communication Protocol
Message categories:
HANDOFF: work transition with current state and next action.BLOCKED: hard blocker requiring external action.DECISION: decision record with rationale.INFO: non-blocking operational context.
Required message envelope:
message_idthread_id(defaultbead:<id>)bead_idfrom_agentto_agent(orbroadcast)categorysubjectbodycreated_atstate(unread,read,acked)
Ack requirement:
BLOCKEDandHANDOFFmessages require acknowledgement.DECISIONandINFOacknowledgements are optional.
6) Reservation Protocol
Reservations are advisory by default with TTL:
- Reserve scope before edits on contested surfaces.
- Scope examples:
src/components/graph/*,kanban-surface,api/mutations. - Expired reservations are considered stale and available for takeover.
Required reservation fields:
reservation_idscopeagent_idbead_idcreated_atexpires_atstate(active,released,expired)
7) Gap Analysis (Current vs Required)
Available now:
bd update --claimprovides atomic issue claim.bddependency graph provides blocked/ready sequencing.bd agent state/heartbeatcan report liveness for agent beads.
Missing (must be added):
- Agent registration and identity registry commands.
- Directed message transport with unread/read/acked lifecycle.
- Reservation commands with TTL and stale handling.
- Unified status view tying claim + message + reservation state.
Command matrix:
- Have now:
bd update --claim,bd update,bd close,bd dep,bd comments. - Need build:
bb agent register/list/show. - Need build:
bb agent send/inbox/read/ack. - Need build:
bb agent reserve/release/status.
Failure modes to handle:
- Duplicate
agent_idregistration. - Unknown sender or recipient in send flow.
- Missing
bead_idon required message categories. - Reservation conflicts and stale-expiry takeover behavior.
- Ack on unknown or already terminal message state.
8) Required Thin-Layer CLI Surface
Proposed commands (bb agent):
register,list,showsend,inbox,read,ackreserve,release,status
Storage:
.beadboard/agent/agents/*.json.beadboard/agent/messages/*.jsonl.beadboard/agent/reservations/*.json.beadboard/agent/index/*.json(optional fast lookup)
Safety rules:
- No direct writes to
.beads/issues.jsonl. - Bead lifecycle mutations remain via
bd. - All timestamps are UTC ISO-8601.
9) Acceptance Criteria Mapping
Identity covered: Section 3.
Handoff covered: Sections 4 and 5 (HANDOFF).
Blocker signaling covered: Sections 5 and 6 (BLOCKED, reservation escalation).
Assignment covered: Section 4 (bd --claim as ownership source).
Gap analysis covered: Section 7.
10) Rejected Alternatives
-
Full MCP-native mail integration now. Reason: unnecessary platform dependency for immediate local workflow goals.
-
Keep coordination only in ad-hoc bead comments. Reason: no directed inbox/ack semantics and weak reservation signaling.
-
Replace Beads lifecycle with custom coordination store. Reason: duplicates existing dependency/lifecycle truth and raises migration risk.