From 6b71c07f5bb65d62dde48ba3506998b1ee7be3fe Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 27 Mar 2026 16:53:50 +0000 Subject: [PATCH] storkit: create 418_refactor_split_pool_auto_assign_rs_into_submodules --- ...plit_matrix_bot_rs_into_focused_modules.md | 30 ------------------- ...lit_pool_auto_assign_rs_into_submodules.md | 28 +++++++++++++++++ 2 files changed, 28 insertions(+), 30 deletions(-) delete mode 100644 .storkit/work/1_backlog/417_refactor_split_matrix_bot_rs_into_focused_modules.md create mode 100644 .storkit/work/1_backlog/418_refactor_split_pool_auto_assign_rs_into_submodules.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 deleted file mode 100644 index 1d839a61..00000000 --- a/.storkit/work/1_backlog/417_refactor_split_matrix_bot_rs_into_focused_modules.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -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 diff --git a/.storkit/work/1_backlog/418_refactor_split_pool_auto_assign_rs_into_submodules.md b/.storkit/work/1_backlog/418_refactor_split_pool_auto_assign_rs_into_submodules.md new file mode 100644 index 00000000..a4937fb4 --- /dev/null +++ b/.storkit/work/1_backlog/418_refactor_split_pool_auto_assign_rs_into_submodules.md @@ -0,0 +1,28 @@ +--- +name: "Split pool/auto_assign.rs into submodules" +--- + +# Refactor 418: Split pool/auto_assign.rs into submodules + +## Current State + +- TBD + +## Desired State + +Refactor the monolithic server/src/agents/pool/auto_assign.rs (1813 lines) into focused submodules. + +## Acceptance Criteria + +- [ ] auto_assign.rs contains auto_assign_available_work and its unit tests +- [ ] reconcile.rs contains reconcile_on_startup and its unit tests +- [ ] watchdog.rs contains run_watchdog_once, spawn_watchdog, check_orphaned_agents and their unit tests +- [ ] scan.rs contains scan_stage_items, is_story_assigned_for_stage, count_active_agents_for_stage, find_free_agent_for_stage, is_agent_free and their unit tests +- [ ] story_checks.rs contains read_story_front_matter_agent, has_review_hold, is_story_blocked, has_merge_failure and their unit tests +- [ ] mod.rs wires the submodules and re-exports all public items +- [ ] Unit tests live in their respective module files +- [ ] No public API changes — all existing imports continue to work + +## Out of Scope + +- TBD