From dd75e9e0fa82240f7a751b43c204b148b9ca2f60 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 19 Mar 2026 10:08:26 +0000 Subject: [PATCH] story-kit: create 300_story_show_token_cost_badge_on_pipeline_board_work_items --- ...nd_with_live_updating_process_dashboard.md | 25 ------------------- ...cost_badge_on_pipeline_board_work_items.md | 20 +++++++++++++++ 2 files changed, 20 insertions(+), 25 deletions(-) delete mode 100644 .story_kit/work/1_backlog/298_story_bot_htop_command_with_live_updating_process_dashboard.md create mode 100644 .story_kit/work/1_backlog/300_story_show_token_cost_badge_on_pipeline_board_work_items.md diff --git a/.story_kit/work/1_backlog/298_story_bot_htop_command_with_live_updating_process_dashboard.md b/.story_kit/work/1_backlog/298_story_bot_htop_command_with_live_updating_process_dashboard.md deleted file mode 100644 index 657646a..0000000 --- a/.story_kit/work/1_backlog/298_story_bot_htop_command_with_live_updating_process_dashboard.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: "Bot htop command with live-updating process dashboard" ---- - -# Story 298: Bot htop command with live-updating process dashboard - -## User Story - -As a project owner in a Matrix room, I want to type "{bot_name} htop" and see a live-updating dashboard of system load and agent processes, so that I can monitor resource usage without needing terminal access. - -## Acceptance Criteria - -- [ ] '{bot_name} htop' sends an initial status message showing load average and per-agent process info (CPU, memory, story assignment) -- [ ] Message is edited every 5 seconds with updated stats -- [ ] Only shows processes related to the project (agent PIDs and their child process trees) -- [ ] '{bot_name} htop stop' stops the live updating and sends a final 'monitoring stopped' edit -- [ ] Works regardless of what language/toolchain the agents are using (monitors by PID tree, not by process name) -- [ ] Uses Matrix message editing (replacement events) to update in place -- [ ] Only one htop session per room at a time — a second '{bot_name} htop' stops the existing session and starts a fresh one -- [ ] Auto-stops after 5 minutes by default to prevent runaway editing -- [ ] Optional timeout override: '{bot_name} htop 10m' to set a custom duration - -## Out of Scope - -- TBD diff --git a/.story_kit/work/1_backlog/300_story_show_token_cost_badge_on_pipeline_board_work_items.md b/.story_kit/work/1_backlog/300_story_show_token_cost_badge_on_pipeline_board_work_items.md new file mode 100644 index 0000000..a751443 --- /dev/null +++ b/.story_kit/work/1_backlog/300_story_show_token_cost_badge_on_pipeline_board_work_items.md @@ -0,0 +1,20 @@ +--- +name: "Show token cost badge on pipeline board work items" +--- + +# Story 300: Show token cost badge on pipeline board work items + +## User Story + +As a project owner viewing the pipeline board, I want to see the total token cost for each work item displayed as a badge, so that I can quickly spot expensive stories at a glance. + +## Acceptance Criteria + +- [ ] Each work item on the pipeline board shows its total cost in USD as a small badge +- [ ] Cost is fetched from the token_usage.jsonl data via a new API endpoint +- [ ] Items with no recorded usage show no badge (not $0.00) +- [ ] Cost updates when the pipeline refreshes (e.g. after an agent completes) + +## Out of Scope + +- TBD