storkit: create 415_refactor_split_agents_pool_mod_rs_into_submodules

This commit is contained in:
dave
2026-03-27 15:30:33 +00:00
parent c30ad79398
commit db22ab2229
@@ -0,0 +1,29 @@
---
name: "Split agents/pool/mod.rs into submodules"
---
# Refactor 415: Split agents/pool/mod.rs into submodules
## Current State
- TBD
## Desired State
Refactor the monolithic server/src/agents/pool/mod.rs (2407 lines) into focused submodules within the pool/ directory.
## Acceptance Criteria
- [ ] types.rs contains StoryAgent, PendingGuard, AgentInfo, composite_key, and related helper structs
- [ ] lifecycle.rs contains start_agent, stop_agent, wait_for_agent and their unit tests
- [ ] worktree.rs contains create_worktree, get_project_root, find_active_story_stage and their unit tests
- [ ] query.rs contains list_agents, available_agents_for_stage, get_log_info, subscribe, drain_events and their unit tests
- [ ] process.rs contains kill_all_children, kill_child_for_key, ChildKiller registry methods and their unit tests
- [ ] test_helpers.rs contains inject_test_agent and its variants (4 methods)
- [ ] mod.rs contains AgentPool struct, new(), and re-exports all public types
- [ ] Unit tests live in their respective module files, not in a separate tests module
- [ ] No public API changes — all existing imports continue to work
## Out of Scope
- TBD