Accept story 42: Deterministic Worktree Management via REST/MCP API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-20 14:22:24 +00:00
parent a9d45bbcd5
commit 42c21f680b

View File

@@ -0,0 +1,25 @@
---
name: Deterministic Worktree Management via REST/MCP API
test_plan: approved
---
# 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
- [ ] `create_story` API optionally commits the new story file to the current branch
## Out of Scope
- TBD