From bb801ba82694a80c449a9eeddc84b2ae13b56d49 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 24 Mar 2026 14:49:21 +0000 Subject: [PATCH] storkit: create 380_story_assign_command_restarts_coder_when_story_is_already_in_progress --- ...res_story_front_matter_agent_assignment.md | 34 ------------------- ...coder_when_story_is_already_in_progress.md | 20 +++++++++++ 2 files changed, 20 insertions(+), 34 deletions(-) delete mode 100644 .storkit/work/1_backlog/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md create mode 100644 .storkit/work/1_backlog/380_story_assign_command_restarts_coder_when_story_is_already_in_progress.md diff --git a/.storkit/work/1_backlog/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md b/.storkit/work/1_backlog/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md deleted file mode 100644 index d58e002..0000000 --- a/.storkit/work/1_backlog/379_bug_start_agent_ignores_story_front_matter_agent_assignment.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: "start_agent ignores story front matter agent assignment" ---- - -# Bug 379: start_agent ignores story front matter agent assignment - -## Description - -When a model is pre-assigned to a story via the `assign` command (which writes `agent: coder-opus` to the story's YAML front matter), the MCP `start_agent` tool ignores this field. It only looks at the `agent_name` argument passed directly in the tool call. If none is passed, it auto-selects the first idle coder (usually sonnet), bypassing the user's assignment. - -The auto-assign pipeline (`auto_assign.rs`) correctly reads and respects the front matter `agent` field, but the direct `tool_start_agent` path in `agent_tools.rs` does not. - -Additionally, the `show` (whatsup/triage) command should display the assigned agent from the story's front matter so users can verify their assignment took effect. - -## How to Reproduce - -1. Run `assign 368 opus` — this writes `agent: coder-opus` to story 368's front matter -2. Run `start 368` (without specifying a model) -3. Observe that a sonnet coder is assigned, not coder-opus -4. Run `show 368` — the assigned agent is not displayed - -## Actual Result - -The `start_agent` MCP tool ignores the `agent` field in the story's front matter and picks the first idle coder. The `show` command does not display the pre-assigned agent. - -## Expected Result - -When no explicit `agent_name` is passed to `start_agent`, it should read the story's front matter `agent` field and use that agent if it's available. The `show` command should display the assigned agent from front matter. - -## Acceptance Criteria - -- [ ] start_agent without an explicit agent_name reads the story's front matter `agent` field and uses it if the agent is idle -- [ ] If the preferred agent from front matter is busy, start_agent either waits or falls back to auto-selection (matching auto_assign behavior) -- [ ] The show/triage command displays the assigned agent from story front matter when present diff --git a/.storkit/work/1_backlog/380_story_assign_command_restarts_coder_when_story_is_already_in_progress.md b/.storkit/work/1_backlog/380_story_assign_command_restarts_coder_when_story_is_already_in_progress.md new file mode 100644 index 0000000..86720b7 --- /dev/null +++ b/.storkit/work/1_backlog/380_story_assign_command_restarts_coder_when_story_is_already_in_progress.md @@ -0,0 +1,20 @@ +--- +name: "Assign command restarts coder when story is already in progress" +--- + +# Story 380: Assign command restarts coder when story is already in progress + +## User Story + +As a user, I want `assign X opus` on a running story to stop the current coder, update the front matter, and start the newly assigned agent, so that I can switch models mid-flight without manually stopping and restarting. + +## Acceptance Criteria + +- [ ] When assign is called on a story with a running coder, the current coder agent is stopped +- [ ] The story's front matter `agent` field is updated to the new agent name +- [ ] The newly assigned agent is started on the story automatically +- [ ] When assign is called on a story with no running coder, it behaves as before (just updates front matter) + +## Out of Scope + +- TBD