---
name: Deterministic Story Lifecycle Management
---

# 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)
