From 92c53704f01dfba7c52341a47489d82eadf099ae Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 24 Mar 2026 17:40:36 +0000 Subject: [PATCH] storkit: create 383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules --- ...o_chat_module_with_transport_submodules.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .storkit/work/1_backlog/383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules.md diff --git a/.storkit/work/1_backlog/383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules.md b/.storkit/work/1_backlog/383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules.md new file mode 100644 index 0000000..e398f05 --- /dev/null +++ b/.storkit/work/1_backlog/383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules.md @@ -0,0 +1,41 @@ +--- +name: "Reorganize chat system into chat module with transport submodules" +--- + +# Refactor 383: Reorganize chat system into chat module with transport submodules + +## Current State + +- TBD + +## Desired State + +Currently chat-related code is scattered at the top level of `src/`: `transport.rs`, `whatsapp.rs`, `slack.rs`, plus `matrix/` as a directory module. This should be reorganized into a clean module hierarchy: + +``` +src/ + chat/ + mod.rs # Generic chat traits, types, ChatTransport etc. + transport/ + mod.rs + matrix/ # Existing matrix module moved here + whatsapp.rs # Existing whatsapp.rs moved here + slack.rs # Existing slack.rs moved here + twilio.rs # Future Twilio transport +``` + +The `ChatTransport` trait and shared chat types should live in `chat/mod.rs`. Each transport implementation becomes a submodule of `chat::transport`. + +## Acceptance Criteria + +- [ ] ChatTransport trait and shared chat types live in `chat/mod.rs` +- [ ] Matrix transport lives in `chat/transport/matrix/` +- [ ] WhatsApp transport lives in `chat/transport/whatsapp.rs` +- [ ] Slack transport lives in `chat/transport/slack.rs` +- [ ] Top-level `transport.rs`, `whatsapp.rs`, `slack.rs`, and `matrix/` are removed +- [ ] All existing tests pass without modification (or with only import path changes) +- [ ] No functional changes — pure file reorganization and re-exports + +## Out of Scope + +- TBD