.tasks/core/LSYNC-001-design-library-sync-protocol.md
Design the detailed protocol for Library Sync using a leaderless hybrid model.
Architecture Update (Oct 2025): Moved from leader-based to peer-to-peer model based on data ownership analysis.
core/src/infra/sync/NEW_SYNC.md - Current leaderless designdocs/core/sync.mddocs/core/sync-setup.md - Library sync setup flow (still valid)docs/core/events.md - Unified event systemdocs/core/devices.md - Device system| Aspect | Old Design | New Design |
|---|---|---|
| Architecture | Leader/follower | Peer-to-peer |
| Ordering | Central sequences | HLC timestamps |
| Sync log | One central log | Per-device for shared changes only |
| Device-owned data | Goes through leader | Direct state broadcast |
| Complexity | High (election, heartbeats) | Low (simpler) |
core/src/infra/sync/NEW_SYNC.md - Complete new specification