diff --git a/.story_kit/stories/upcoming/42_deterministic_worktree_management_via_rest_mcp_api.md b/.story_kit/stories/upcoming/42_deterministic_worktree_management_via_rest_mcp_api.md new file mode 100644 index 0000000..8ec0ed4 --- /dev/null +++ b/.story_kit/stories/upcoming/42_deterministic_worktree_management_via_rest_mcp_api.md @@ -0,0 +1,24 @@ +--- +name: Deterministic Worktree Management via REST/MCP API +test_plan: pending +--- + +# Story 42: Deterministic Worktree Management via REST/MCP API + +## User Story + +As a developer running multiple agents, I want worktree creation and management handled by the Rust binary through the REST/MCP API, so that worktree locations are deterministic and predictable rather than at the discretion of LLM agents. + +## Acceptance Criteria + +- [ ] Worktrees are created under `.story_kit/worktrees/` inside the project directory +- [ ] `.story_kit/worktrees/` contents are gitignored +- [ ] Worktree creation is exposed through the REST/MCP API with deterministic naming (e.g. based on story ID) +- [ ] Agents no longer create worktrees themselves — they call the API and receive the worktree path +- [ ] Existing `start_agent` flow uses the new worktree management instead of ad-hoc creation +- [ ] Worktree listing is available via API so users can see what worktrees exist +- [ ] Worktree cleanup/removal is available via API + +## Out of Scope + +- TBD