From 9cff3c753d02bff6bfa4271b25a398d406c682f2 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 27 Mar 2026 16:52:05 +0000 Subject: [PATCH] storkit: create 417_refactor_split_matrix_bot_rs_into_focused_modules --- ...plit_matrix_bot_rs_into_focused_modules.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .storkit/work/1_backlog/417_refactor_split_matrix_bot_rs_into_focused_modules.md diff --git a/.storkit/work/1_backlog/417_refactor_split_matrix_bot_rs_into_focused_modules.md b/.storkit/work/1_backlog/417_refactor_split_matrix_bot_rs_into_focused_modules.md new file mode 100644 index 00000000..1d839a61 --- /dev/null +++ b/.storkit/work/1_backlog/417_refactor_split_matrix_bot_rs_into_focused_modules.md @@ -0,0 +1,30 @@ +--- +name: "Split matrix/bot.rs into focused modules" +--- + +# Refactor 417: Split matrix/bot.rs into focused modules + +## Current State + +- TBD + +## Desired State + +Refactor the monolithic server/src/chat/transport/matrix/bot.rs (1926 lines) into focused submodules. + +## Acceptance Criteria + +- [ ] history.rs contains ConversationRole, ConversationEntry, RoomConversation, PersistedHistory, load_history, save_history and their unit tests +- [ ] context.rs contains BotContext struct +- [ ] run.rs contains run_bot main event loop +- [ ] messages.rs contains on_room_message, handle_message, format_user_prompt, is_permission_approval and their unit tests +- [ ] mentions.rs contains mentions_bot, contains_word, is_reply_to_bot and their unit tests +- [ ] verification.rs contains check_sender_verified, on_to_device_verification_request, handle_sas_verification and their unit tests +- [ ] format.rs contains markdown_to_html, format_startup_announcement and their unit tests +- [ ] mod.rs re-exports all public types +- [ ] Unit tests live in their respective module files +- [ ] No public API changes — all existing imports continue to work + +## Out of Scope + +- TBD