Accept story 45: Deterministic Story Lifecycle Management

- accept_story MCP tool moves current/ to archived/
- move_story_to_archived helper with idempotent behavior
- start_agent auto-moves upcoming/ to current/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-20 15:09:39 +00:00
parent 42640fba6a
commit 5c164f4855
3 changed files with 61 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
---
name: Deterministic Story Lifecycle Management
test_plan: pending
---
# Story 45: Deterministic Story Lifecycle Management
## User Story
As a developer running autonomous agents, I want the server to manage story file movement (upcoming → current → archived) deterministically via the REST/MCP API, so that agents cannot skip steps, move stories prematurely, or leave the board in an inconsistent state.
## Acceptance Criteria
- [ ] `start_agent` automatically moves the story from upcoming/ to current/ if it isn't already there
- [ ] A new `accept_story` MCP tool AND REST endpoint moves a story from current/ to archived/ (available to any caller — the point is the server does the move, not the agent freestyle)
- [ ] Agents cannot move story files directly — the server is the single source of truth for story lifecycle
- [ ] If a story is already in current/, `start_agent` leaves it there (idempotent)
- [ ] If a story doesn't exist in upcoming/ or current/, `start_agent` returns a clear error
## Out of Scope
- Workflow state machine enforcement beyond file movement (e.g. blocking archived stories from being re-opened)