Accept story 50: migrate to unified .story_kit/current/, add stories 55-59

- Move stories/current/ → .story_kit/current/
- Archive story 50
- Add story 55: Live Story Panel Updates
- Add story 57: Live Test Gate Updates
- Add story 58: Live Agent Panel Updates
- Add story 59: Current Work Panel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-20 16:25:43 +00:00
parent 7f672cae5f
commit 8c7a2b9c83
7 changed files with 81 additions and 39 deletions

View File

@@ -0,0 +1,19 @@
---
name: Live Story Panel Updates
test_plan: pending
---
# Story 55: Live Story Panel Updates
## User Story
As a user, I want the Upcoming and Review panels to update automatically when stories are created, moved, or archived, so I don't have to manually refresh.
## Acceptance Criteria
- [ ] Server broadcasts a `{"type": "notification", "topic": "stories"}` event over the existing `/ws` WebSocket when a story mutation occurs (create, move to current, archive)
- [ ] UpcomingPanel auto-refreshes its data when it receives a `stories` notification
- [ ] ReviewPanel auto-refreshes its data when it receives a `stories` notification
- [ ] Manual refresh buttons continue to work
- [ ] Panels do not flicker or lose scroll position on auto-refresh
- [ ] End-to-end test: create a story via MCP, verify it appears in the Upcoming panel without manual refresh

View File

@@ -1,39 +0,0 @@
---
name: WebSocket Push Notifications for Panel Auto-Refresh
test_plan: pending
---
# Story 55: WebSocket Push Notifications for Panel Auto-Refresh
## User Story
As a user, I want the UI panels to update automatically when server-side state changes, so that I don't have to manually click Refresh to see current data.
## Context
The WebSocket at `/ws` already exists for chat streaming. Server-side deterministic commands (create_story, create_bug, close_bug, record_tests, ensure_acceptance, start_agent, etc.) mutate state that the panels display. Currently, panels only update on mount or manual refresh.
By pushing lightweight notification events over the existing WebSocket when mutations occur, the frontend can auto-refresh the affected panel without polling.
## Acceptance Criteria
- [ ] The server broadcasts a notification event over the WebSocket when any of these mutations occur:
- Story created, moved, or archived
- Bug created or closed
- Tests recorded or acceptance checked
- Coverage collected
- Agent started, completed, or failed
- [ ] Notification events are simple typed messages (e.g. `{"type": "notification", "topic": "stories"}`) — not full data payloads
- [ ] The frontend listens for notification events and auto-refreshes the relevant panel:
- `stories` → UpcomingPanel, ReviewPanel
- `bugs` → (future BugPanel, no-op for now)
- `tests` / `acceptance` → GatePanel, TodoPanel
- `agents` → AgentPanel
- [ ] Manual refresh buttons continue to work as before
- [ ] Panels do not flicker or lose scroll position on auto-refresh
## Out of Scope
- File-system watching (inotify/fsevents) for changes made outside the server
- Replacing the existing AgentPanel SSE with WebSocket (it works fine as-is)
- Debouncing rapid successive notifications (can be a follow-up)

View File

@@ -0,0 +1,19 @@
---
name: Live Test Gate Updates
test_plan: pending
---
# Story 57: Live Test Gate Updates
## User Story
As a user, I want the Gate and Todo panels to update automatically when tests are recorded or acceptance is checked, so I can see progress without manually refreshing.
## Acceptance Criteria
- [ ] Server broadcasts a `{"type": "notification", "topic": "tests"}` event over `/ws` when tests are recorded, acceptance is checked, or coverage is collected
- [ ] GatePanel auto-refreshes its data when it receives a `tests` notification
- [ ] TodoPanel auto-refreshes its data when it receives a `tests` notification
- [ ] Manual refresh buttons continue to work
- [ ] Panels do not flicker or lose scroll position on auto-refresh
- [ ] End-to-end test: record test results via MCP, verify Gate panel updates without manual refresh

View File

@@ -0,0 +1,18 @@
---
name: Live Agent Panel Updates
test_plan: pending
---
# Story 58: Live Agent Panel Updates
## User Story
As a user, I want the Agent panel to update automatically when agents start, complete, or fail, so I can monitor progress without manually refreshing.
## Acceptance Criteria
- [ ] Server broadcasts a `{"type": "notification", "topic": "agents"}` event over `/ws` when an agent is started, completes, or fails
- [ ] AgentPanel auto-refreshes its data when it receives an `agents` notification
- [ ] Manual refresh button continues to work
- [ ] Panel does not flicker or lose scroll position on auto-refresh
- [ ] End-to-end test: start an agent via MCP, verify Agent panel updates without manual refresh

View File

@@ -0,0 +1,25 @@
---
name: Current Work Panel
test_plan: pending
---
# Story 59: Current Work Panel
## User Story
As a user, I want a "Current" panel in the frontend that shows all work items (stories, bugs, spikes) currently being worked on and which coder is assigned to each, so I can see at a glance what's in progress.
## Acceptance Criteria
- [ ] New "Current" panel in the right-side panel area
- [ ] Panel lists all files in `.story_kit/current/` with their type (story/bug/spike) and name
- [ ] Each item shows which agent/coder is working on it (from agent pool state)
- [ ] Items without an assigned agent show as "unassigned"
- [ ] Panel auto-refreshes when an `agents` or `stories` notification is received (if live notifications exist)
- [ ] REST endpoint `GET /api/workflow/current` returns current work items with agent assignments
- [ ] Panel has a manual refresh button
## Out of Scope
- QA and Merge pipeline panels (follow-up stories)
- Actions from the panel (stop agent, reassign, etc.)