diff --git a/.story_kit/stories/upcoming/45_deterministic_story_lifecycle_management.md b/.story_kit/stories/upcoming/45_deterministic_story_lifecycle_management.md new file mode 100644 index 0000000..914f1c6 --- /dev/null +++ b/.story_kit/stories/upcoming/45_deterministic_story_lifecycle_management.md @@ -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/REST endpoint moves a story from current/ to archived/ (human-only action, not available to coder agents) +- [ ] 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)