# COMMS-PROTOCOL.md — Builder ↔ Rivet Communication Rules

*Established 2026-02-16 after the Great Inbox Collision of Feb 15.*

---

## The Two Files

| File | Who Writes | Who Reads | Location |
|------|-----------|-----------|----------|
| **BUILDER-INBOX.md** | Rivet | Builder | `/home/ccuser/rateright-growth/rivet/BUILDER-INBOX.md` |
| **RIVET-INBOX.md** | Builder | Rivet | `/home/ccuser/the-50-dollar-app/RIVET-INBOX.md` |

## Rules

### 1. Append-Only
- **Never overwrite or edit previous entries.** Only append new entries at the top.
- Each entry gets a timestamp header: `## 2026-02-16 14:30 AEDT — [Title]`
- If you need to correct something, append a correction — don't edit the original.

### 2. One Writer Per File
- BUILDER-INBOX.md: **Only Rivet writes.** Builder reads.
- RIVET-INBOX.md: **Only Builder writes.** Rivet reads.
- **Neither agent touches the other's file.** This is what caused the Feb 15 collision.

### 3. Acknowledgements
- When you read a task, write `ACK [timestamp]` in YOUR OWN inbox file.
- Example: Builder reads a task timestamped 15:30. Builder writes in RIVET-INBOX.md: `ACK 15:30 — picked up, starting now`
- If no ACK after 1 hour during business hours (08:00-22:00), re-send or escalate.

### 4. Task Status
Use these prefixes in your entries:
- `📋 NEW` — Fresh task, unacknowledged
- `✅ DONE` — Completed
- `🔧 WIP` — In progress
- `🚫 BLOCKED` — Waiting on someone/something
- `ACK` — Acknowledged, will start soon

## Daily Archive (Rivet's Job — 8am AEDT)

Every morning at 8am:
1. Read both inbox files
2. Write daily summary to `memory/comms/YYYY-MM-DD.md`
3. **Move completed items** to the archive
4. **Leave open/WIP/blocked items** in the live inbox (they carry forward)
5. The live inbox should always be a clean, current task list

### What Gets Archived
- ✅ DONE items that have been ACK'd by both sides
- Status updates that have been read
- Resolved discussions

### What Stays
- 📋 NEW tasks (unacknowledged)
- 🔧 WIP tasks (in progress)
- 🚫 BLOCKED items
- Anything less than 4 hours old

## Gateway Bridge

- **Secondary channel only.** Not the source of truth.
- Good for: real-time notifications, wake-ups, urgent pings
- Bad for: task delivery (proved unreliable Feb 15)
- If you send a task via bridge, **also write it to the inbox file.**

## Escalation

If inbox silence > 4 hours during business hours:
1. Check git log on the other agent's inbox file
2. If no commits → the agent may be down or stuck
3. Ping via gateway bridge
4. If still no response → alert Rocky

---

*This protocol exists because two AI agents overwrote each other's work and wasted 4 hours thinking the other was idle. Don't let it happen again.*
