- Removed broken LaunchSwarmDialog (formula-based) from TopBar/LeftPanel - All Rocket buttons (TopBar, LeftPanel, DAG nodes, social cards) now open AssignmentPanel (archetype-based) which actually works - Every Rocket clears taskId first so assignMode && !taskId condition passes - Conversation button priority: taskId always shows conversation, not assign panel - Added TelemetryStrip: minimized right sidebar with status dots when non-telemetry panel (conversation/assignment) is active - Live feed has minimize button → restores last taskId or assignMode - DAG nodes: Signal icon → restores telemetry feed - Social button on DAG nodes: single router.push to avoid race (setView + setTaskId) - Fixed social card message button: opens right panel with drawer:closed (no popup) Co-Authored-By: Oz <oz-agent@warp.dev>
8.1 KiB
Operative Protocol v1 (Session Constitution)
Date: 2026-02-14
Status: Approved for implementation (superseded for migration planning by docs/protocols/2026-02-28-bd-audit-coordination-schema.md)
Scope: bb-u6f.6.1
Applies to: bb-u6f.6.2, bb-u6f.6.3, bb-u6f.6.4, bb-u6f.6.5
1. Purpose and Boundaries
This protocol defines non-negotiable coordination behavior for multi-agent work in BeadBoard Sessions.
Boundaries:
- Work lifecycle state remains Beads-native (
bdcommands only). - Agent coordination state lives in
bb agentsurfaces and supporting local stores. - No direct writes to
.beads/issues.jsonl. - User-facing labels must stay plain language.
Migration note:
- New work should target the
coord.v1bd auditevent model documented indocs/protocols/2026-02-28-bd-audit-coordination-schema.md. bbcoordination semantics are legacy compatibility behavior pending removal after migration sign-off.
2. Normative Language
- MUST: required behavior.
- SHOULD: recommended unless explicit exception is justified.
- MAY: optional behavior.
3. Identity Trust Model
3.1 Identity primitives
Every active session has:
session_agent_id: unique working identity for the current runtime.logical_agent_id: persistent persona name used in coordination records.
For v1 implementation, both map to the same field (agent_id), but contract keeps room for split in future.
3.2 Adoption policy (resume prior identity)
Identity adoption is allowed only when at least one condition is true:
- Uncommitted changes exist in target scope (
git status --porcelaincontains files in claimed scope). - Target identity owns at least one
in_progressbead relevant to current scope.
If neither condition is true, adoption MUST be rejected in non-interactive mode and SHOULD require explicit confirmation in interactive mode.
3.3 Session uniqueness policy
- Each runtime session MUST start with a unique identity name for that session, unless valid adoption is selected.
- Reusing previous identity without adoption checks is forbidden.
- Recommended naming style is adjective-noun (for example,
amber-otter,cobalt-harbor).
3.4 Mandatory resume audit signal
Any successful identity adoption MUST emit a RESUME protocol event with:
- prior owner identity,
- adoption reason (
uncommitted_scopeorin_progress_ownership), - linked bead id(s) when known.
Event must be persisted in coordination history exposed to Sessions APIs.
4. Heartbeat and Liveness Contract
4.1 Environment and defaults
BB_AGENT_STALE_MINUTESdefault:15.- Stale threshold:
T_last_seen + stale_minutes. - Eviction threshold:
T_last_seen + (2 * stale_minutes); default30minutes.
4.2 Heartbeat behavior
bb agent heartbeat --agent <id>MUST updatelast_seen_atin UTC ISO-8601.- Heartbeat command MUST be idempotent and safe to run repeatedly.
- Heartbeat command MUST support JSON envelope output (
ok,command,data,error).
4.3 Liveness states
Derived states:
active: now < stale threshold.stale: stale threshold <= now < eviction threshold.evicted: now >= eviction threshold.
4.4 Reservation interaction rules
For scope takeover:
- If reservation owner is
active: takeover MUST fail. - If owner is
stale: takeover MAY succeed only when--takeover-staleis supplied. - If owner is
evicted: takeover SHOULD succeed with--takeover-stale; prior reservation must be archived as expired.
5. Path Overlap Canonicalization Contract
5.1 Normalization pipeline
All scope comparisons MUST use the same normalization pipeline:
- Resolve to absolute path (
path.resolve). - Normalize separators to
/. - On Windows, lowercase normalized path for comparisons.
- Remove trailing slash except root.
5.2 Scope classes
Given normalized A and B:
exact:A === B.partial:Ais parent ofBorBis parent ofA.disjoint: neither exact nor parent-child.
Wildcards:
- Prefix wildcard (
src/*) is treated as directory prefix match for overlap checks. - Glob semantics beyond suffix
*are out of scope for v1.
5.3 Required examples
src/*vssrc/lib/parser.ts=>partial.src/libvssrc/lib/parser.ts=>partial.src/lib/parser.tsvssrc/lib/parser.ts=>exact.src/libvssrc/components=>disjoint.
6. Protocol Event Schema (Stable JSON Contract)
6.1 Envelope (all protocol events)
{
"id": "proto_20260214_001",
"version": "v1",
"event_type": "HANDOFF",
"project_root": "C:/Users/Zenchant/codex/beadboard",
"bead_id": "bb-u6f.6.3",
"from_agent": "amber-otter",
"to_agent": "cobalt-harbor",
"scope": "src/components/sessions/*",
"created_at": "2026-02-14T18:05:11.000Z",
"payload": {}
}
Required fields:
idversion(must bev1for this protocol)event_typeproject_rootbead_idfrom_agent(nullable for system-originated events only)to_agent(nullable for system-originated events only)scope(nullable where not applicable)created_atpayload
6.2 Event-specific payloads
HANDOFF payload:
subject(required)summary(required)next_action(required)requires_ack(required, true by default)
BLOCKED payload:
subject(required)blocker(required)requested_action(required)urgency(required:low|medium|high)requires_ack(required, true)
INCURSION payload:
incursion_kind(required:exact|partial)owner_agent(required)incoming_agent(required)owner_liveness(required:active|stale|evicted)resolution_hint(required)
RESUME payload:
resume_reason(required:uncommitted_scope|in_progress_ownership)prior_session_agent(required)adopted_agent(required)evidence(required string summary of why adoption passed)
6.3 UI mapping requirements
Sessions UI mapping contract:
HANDOFFlabel:Passed toBLOCKEDlabel:Needs input- Read action label:
Seen - Ack action label:
Accepted
INCURSION and RESUME MUST render as first-class protocol rows in the conversation timeline, not hidden diagnostics.
7. CLI Contract Requirements for Implementers
Required commands for v1 rollout:
bb agent heartbeat --agent <id> [--json]node scripts/bb-init.mjs --non-interactive --jsonnode scripts/bb-init.mjs --adopt <agentId> --jsonnode scripts/bb-init.mjs --register <name> --json
Non-interactive requirements:
- MUST not prompt.
- MUST fail with structured error when decision cannot be made safely.
- MUST include deterministic recommendation reason in output.
8. Mapping to Existing Code Modules
8.1 Backend
src/lib/agent-registry.tssrc/lib/agent-reservations.tssrc/lib/realtime.tssrc/lib/agent-sessions.ts
8.2 API
src/app/api/sessions/route.tssrc/app/api/sessions/[beadId]/conversation/route.ts
8.3 UI
src/components/sessions/session-feed-card.tsxsrc/components/sessions/session-task-feed.tsxsrc/components/sessions/conversation-drawer.tsxsrc/components/sessions/sessions-page.tsxsrc/hooks/use-session-feed.tssrc/hooks/use-beads-subscription.ts
8.4 CLI and skill
tools/bb.tsscripts/bb-init.mjs(new)skills/beadboard-driver/SKILL.md
9. Acceptance Checklist for Downstream Beads
bb-u6f.6.2 MUST implement:
- heartbeat mutation,
- stale/evicted derivation,
- overlap classification,
- protocol event emission.
bb-u6f.6.3 MUST implement:
- heartbeat command,
- non-interactive
bb-initcontract and flags.
bb-u6f.6.4 MUST implement:
- protocol event rendering in Sessions,
- incursion/stale visibility,
- no-refresh-required update behavior.
bb-u6f.6.5 MUST implement:
- updated skill flow matching this protocol exactly.
10. Rejected Alternatives
-
Interactive-only bootstrap prompts. Reason: automation sessions require deterministic non-blocking behavior.
-
Implicit overlap inference without normalization contract. Reason: inconsistent behavior across Windows paths.
-
UI-first implementation before protocol schema. Reason: high risk of repeated API/UI contract churn.