# Fleet Communications Protocol — 3-Model Synthesis
*Created: 2026-02-17 17:10 AEDT*
*Models polled: DeepSeek, Opus 4.5, Sonnet 4 (Kimi fallback)*

## Question
What's the optimal inter-agent communication protocol for our 8-agent fleet?

## Universal Agreement (All 3 Models)
1. **Buddy system** with strategic pairing by complementary roles
2. **Staggered hourly cross-checks** (avoid thundering herd)
3. **Tiered context management** (70% warning → 85% compress → 95% force reset)
4. **Auto-task generation** when queues empty — role-based templates + contextual
5. **Escalation ladder** for stall recovery (buddy → cross-pair → chief → human)

## Best Ideas by Model

### Opus 4.5 (Best Overall — Most Practical)
- **Coordination clock**: Tick-based system where every agent checks a shared clock file every minute. Staggered sync times prevent collisions.
- **File locking protocol**: Prevents race conditions on shared JSON files
- **"Agents should never be idle without a task"**: Auto-generate from role templates, help a buddy, or pull from global queue
- **Context snapshots**: Periodic summaries to files so context can be rebuilt after reset
- **Task handoff with minimal context**: Don't transfer full history, just key facts + decisions + what's been tried
- **Per-agent task templates** (daily scheduled + idle fallback) — very implementable

### DeepSeek (Most Structured — Good Schemas)
- **Priority calculation formula**: Priority = Base × Urgency × Dependency — concrete and implementable
- **4-level escalation matrix** with time thresholds (buddy immediate → cross-pair 5min → chief 10min → restart 15min)
- **Health score per agent** (0-100) combining multiple factors
- **Circuit breakers** to prevent cascade failures when one agent keeps crashing

### Sonnet 4 / Kimi Fallback (Most Generic)
- Similar buddy pairs but less specific about implementation
- Docker-based deployment (not relevant — we use systemd)
- Good monitoring metrics list but no implementation path

## My Recommendation — What We Actually Build

### Phase 1: TODAY (Config Changes Only — No Code)
1. **Update all 6 agent HEARTBEAT.md files** with the 3 mandatory questions:
   - "What did I find that someone else needs?"
   - "Is my buddy alive? Check their status."
   - "What's in my queue from other agents?"
2. **Add buddy pairs to fleet-state.json** so stall detector knows who to wake
3. **Add role-based idle task templates** to each agent's HEARTBEAT.md

### Phase 2: THIS WEEK (Builder Builds)
1. **Auto-context monitoring**: Stall detector checks context % alongside heartbeat timing. At 85% → wake with compress instruction. At 95% → force session reset.
2. **Buddy wake automation**: When agent stalls >30min, buddy's next heartbeat auto-wakes them via bridge
3. **Global task queue in fleet-state.json**: `tasks.backlog` becomes a real queue agents pull from
4. **Coordination clock**: Simple tick counter in fleet-state.json, agents stagger their checks

### Phase 3: NEXT WEEK (Iterate)
1. **Per-agent task templates** (Opus's design — daily scheduled + idle fallback)
2. **Cross-agent help requests** via queue files
3. **Context handoff protocol** — when agent resets, buddy helps rebuild key context
4. **File locking** for concurrent JSON writes

## Key Insight
The fundamental problem isn't technical — it's behavioural. Agents need to be TOLD in their heartbeat instructions to actively communicate. The buddy system, cross-checks, and auto-tasks are all enforced through HEARTBEAT.md instructions, not custom code. Code just automates the safety net (stall detection, context monitoring, forced resets).

## Buddy Pairs (Consensus)
- Rivet ↔ Cog (Chief + Ops)
- Builder ↔ Sentinel (Code + DevOps)
- Susan ↔ Herald (Sales + Comms)
- Harper ↔ Radar (Finance + Intel)
