When to Use
Use this skill when a change affects any of these together:
backend/app/models/websocket_message.py
- backend WebSocket handlers or broadcasts
frontend/src/models/websocket-message/
frontend/src/services/wsMessageMapper.ts
- frontend gameplay hooks that react to socket events
Required Constraints
- Treat the backend message contract as the source event schema.
- Keep frontend models camelCase even if backend events are UPPER_CASE with snake_case payloads.
- Do not leave message additions half-wired across the stack.
- For a new server event, update all of: backend enum, backend sender, frontend enum, mapper, and consumer logic.
End-to-End Checklist
- Add or update the backend message enum.
- Emit the event from the correct backend orchestration point.
- Ensure the payload contains only the minimal data the client needs.