diff --git a/.storkit/work/5_done/403_bug_whatsapp_and_slack_missing_rmtree_command_handler.md b/.storkit/work/5_done/403_bug_whatsapp_and_slack_missing_rmtree_command_handler.md new file mode 100644 index 00000000..dccc76b6 --- /dev/null +++ b/.storkit/work/5_done/403_bug_whatsapp_and_slack_missing_rmtree_command_handler.md @@ -0,0 +1,37 @@ +--- +name: "WhatsApp and Slack missing rmtree command handler" +retry_count: 2 +blocked: true +--- + +# Bug 403: WhatsApp and Slack missing rmtree command handler + +## Description + +The rmtree command has a fallback handler in chat/commands/mod.rs that returns None. Only Matrix has pre-dispatch handling for this command. On WhatsApp and Slack, the command falls through to the LLM path. + +## Implementation Note + +Follow the **rebuild pattern** established in story 402. + +- `extract_rmtree_command` and `handle_rmtree` already exist in `server/src/chat/transport/matrix/rmtree.rs` +- Add an async intercept in `server/src/chat/transport/whatsapp.rs` (see rebuild intercept ~line 1107) and `server/src/chat/transport/slack.rs` (see rebuild intercept ~line 845) +- Call `crate::chat::transport::matrix::rmtree::extract_rmtree_command` to detect the command, then `crate::chat::transport::matrix::rmtree::handle_rmtree` to execute it +- The fallback handler in `chat/commands/mod.rs` (`handle_rmtree_fallback`) stays as-is — it exists only so `help` lists the command + +## How to Reproduce + +1. Configure bot with transport = "whatsapp" or "slack"\n2. Send "rmtree " to the bot\n3. Check server logs + +## Actual Result + +Command falls through to LLM instead of removing the worktree. + +## Expected Result + +The bot removes the worktree for the specified story and replies with confirmation. + +## Acceptance Criteria + +- [ ] WhatsApp transport handles rmtree command: removes worktree and replies with confirmation +- [ ] Slack transport handles rmtree command: removes worktree and replies with confirmation