Write docs/api-versioning.md. The backend serves unversioned REST routes and socket events consumed by a client that updates independently, and the codebase has already made breaking changes (removing sequenceNumber, moving the key-bundle route, requiring device on verify) with no written compatibility policy.
Acceptance criteria:
- States the current position honestly — routes are unversioned today — and defines the intended policy going forward
- Defines what counts as a breaking change for REST responses, socket event payloads and database-backed shapes
- Gives the deprecation procedure: how a field or event is marked, how long it is supported, and how clients are notified
- Documents the capability-negotiation mechanism as the existing precedent for shipping a protocol change without breaking older clients
Write
docs/api-versioning.md. The backend serves unversioned REST routes and socket events consumed by a client that updates independently, and the codebase has already made breaking changes (removingsequenceNumber, moving the key-bundle route, requiringdeviceon verify) with no written compatibility policy.Acceptance criteria: