From f650fef1e5182f1f1fab5b0f9d35deecb2e48fb3 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 20 Mar 2026 08:05:53 +0000 Subject: [PATCH] story-kit: create 330_refactor_consolidate_chat_transports_into_a_chat_module_with_transport_submodules --- ...a_chat_module_with_transport_submodules.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .story_kit/work/1_backlog/330_refactor_consolidate_chat_transports_into_a_chat_module_with_transport_submodules.md diff --git a/.story_kit/work/1_backlog/330_refactor_consolidate_chat_transports_into_a_chat_module_with_transport_submodules.md b/.story_kit/work/1_backlog/330_refactor_consolidate_chat_transports_into_a_chat_module_with_transport_submodules.md new file mode 100644 index 0000000..04313aa --- /dev/null +++ b/.story_kit/work/1_backlog/330_refactor_consolidate_chat_transports_into_a_chat_module_with_transport_submodules.md @@ -0,0 +1,35 @@ +--- +name: "Consolidate chat transports into a chat module with transport submodules" +--- + +# Refactor 330: Consolidate chat transports into a chat module with transport submodules + +## Current State + +- TBD + +## Desired State + +The chat/transport code is scattered across the codebase: transport.rs at the top level, matrix/ as a module, whatsapp.rs and slack.rs as top-level files. Consolidate into a unified chat/ module: + +- chat/mod.rs — ChatTransport trait, shared types, command dispatch registry +- chat/matrix/ — existing matrix/ module (bot.rs, commands/, htop.rs, transport_impl.rs, etc.) +- chat/whatsapp.rs — WhatsApp transport (moved from src/whatsapp.rs) +- chat/slack.rs — Slack transport (moved from src/slack.rs) + +This groups all chat-related code under one module with transport-specific implementations as submodules. The common code (trait, types, command registry) lives at the chat/ level and the platform-specific code lives in submodules. + +## Acceptance Criteria + +- [ ] transport.rs moved into chat/mod.rs (ChatTransport trait and shared types) +- [ ] whatsapp.rs moved to chat/whatsapp.rs +- [ ] slack.rs moved to chat/slack.rs +- [ ] matrix/ moved to chat/matrix/ +- [ ] Command registry (commands/) accessible from chat/ level, not matrix-specific +- [ ] All imports updated throughout the codebase +- [ ] All existing tests pass +- [ ] No public API changes from the perspective of main.rs and other modules + +## Out of Scope + +- TBD