---
name: "Auto-assign agents to available work"
---

# Story 88: Auto-assign agents to available work

## User Story

As a user, I want the server to automatically assign free agents to queued work items, both on startup and whenever an agent finishes its current task, so that work progresses continuously without manual intervention.

## Acceptance Criteria

- [ ] On server startup, scan work/2_current/ for stories with no running coder agent and auto-assign available coders
- [ ] On server startup, scan work/3_qa/ for items with no running QA agent and auto-start the QA agent
- [ ] On server startup, scan work/4_merge/ for items with no running mergemaster agent and auto-start the mergemaster agent
- [ ] When a coder agent completes (moves story to QA), check work/2_current/ for unassigned stories and assign the now-free coder to the next one
- [ ] When a QA or mergemaster agent completes, similarly check their respective queues for more work
- [ ] Auto-assignment respects the agent roster limits from project.toml (don't exceed max concurrent agents per role)
- [ ] Items in work/1_upcoming/ are NOT auto-started (they require explicit user action)
- [ ] Auto-assignment logs clearly which stories are being picked up and which agents are assigned

## Out of Scope

- Automatic promotion of items from upcoming to current (that remains a user decision)
- Priority ordering of queued work items (FIFO by filename is fine)
