story-kit: create 330_refactor_consolidate_chat_transports_into_a_chat_module_with_transport_submodules

This commit is contained in:
Dave
2026-03-20 08:05:53 +00:00
parent dbc8849681
commit f650fef1e5

View File

@@ -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