From a94e92212f61d7d197a7347a5fbecf4c927c7f97 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 25 Feb 2026 11:49:38 +0000 Subject: [PATCH] story-kit: create 175_story_live_pipeline_updates_in_matrix --- ...5_story_live_pipeline_updates_in_matrix.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .story_kit/work/1_upcoming/175_story_live_pipeline_updates_in_matrix.md diff --git a/.story_kit/work/1_upcoming/175_story_live_pipeline_updates_in_matrix.md b/.story_kit/work/1_upcoming/175_story_live_pipeline_updates_in_matrix.md new file mode 100644 index 0000000..5de1b37 --- /dev/null +++ b/.story_kit/work/1_upcoming/175_story_live_pipeline_updates_in_matrix.md @@ -0,0 +1,42 @@ +--- +name: Live Pipeline Updates in Matrix +--- + +# Live Pipeline Updates in Matrix + +## User Story + +As a developer in a Matrix room, I want to see live pipeline activity — agents starting, stories moving stages, failures — posted automatically so that I can monitor progress without asking. + +## Background + +Story Kit already broadcasts pipeline events internally via `watcher_tx` (work item changes) and `reconciliation_tx` (reconciliation progress). The web UI subscribes to these via WebSocket. This story subscribes the Matrix bot to the same channels and posts formatted updates to the room. + +This is the "social coding" feed — you're in a group chat and see things like: +- "coder-opus started on 42_story_dark_mode" +- "42 moved to QA" +- "QA passed on 42, moved to merge" +- "mergemaster merged 42 to master" +- "coder-1 failed on 38 — test suite errors" + +## Acceptance Criteria + +- [ ] Bot subscribes to `watcher_tx` broadcast channel for pipeline work item events +- [ ] Bot subscribes to agent state change events +- [ ] Story stage transitions (e.g., current → QA → merge → done) are posted to the room +- [ ] Agent assignments (started, completed, failed) are posted to the room +- [ ] Messages are concise and human-readable (not raw JSON dumps) +- [ ] Notification rate is reasonable — batch or debounce rapid successive events to avoid flooding the room +- [ ] Bot only posts updates when Matrix is configured and connected + +## Out of Scope +- Filtering which events to post (all events go to the room for now) +- Per-room event subscriptions +- Configurable verbosity levels +- Reconciliation progress events (keep it to pipeline + agent events) + +## Technical Notes +- Subscribe to `watcher_tx.subscribe()` in the matrix module's tokio task +- Format `WatcherEvent::WorkItem` and `WatcherEvent::AgentStateChanged` into human-readable strings +- Consider a short debounce (e.g., 2 seconds) to batch rapid events into a single message +- Depends on 174 (Matrix connection infrastructure)