--- id: TASK-118.6 title: Add Automerge persistence to rnetwork CRM data status: To Do assignee: [] created_date: '2026-03-16 00:06' labels: - multiplayer - tier-2 milestone: Multiplayer Everything dependencies: [] parent_task_id: TASK-118 priority: medium --- ## Description rnetwork currently uses server-stored CRM data with WebSocket visualization. Add Automerge doc for persistent CRM relationship data that syncs via local-first stack alongside the existing WebSocket graph updates. ## New files: - `modules/rnetwork/schemas.ts` — NetworkDoc with contacts, relationships, delegations - `modules/rnetwork/local-first-client.ts` — CRUD for CRM data ## Schema: ``` NetworkDoc { meta: { module: 'network', collection: 'crm', version: 1 } contacts: Record relationships: Record graphLayout: { positions: Record, zoom, pan } } ``` Note: Delegations already in PostgreSQL (trust-engine) — this is for CRM metadata only. ## Acceptance Criteria - [ ] #1 CRM contact metadata syncs via Automerge between space members - [ ] #2 Graph layout positions persist and sync - [ ] #3 Existing WebSocket delegation UI still works unchanged - [ ] #4 Demo mode works with local-only data