story-kit: create 303_story_bot_cost_command_with_story_filter_for_detailed_breakdown
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
---
|
||||
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)
|
||||
- [ ] Expanded work item detail panel shows per-agent cost breakdown (coder, QA, mergemaster) with token counts
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
name: "Dedicated token usage page in web UI"
|
||||
---
|
||||
|
||||
# Story 301: Dedicated token usage page in web UI
|
||||
|
||||
## User Story
|
||||
|
||||
As a project owner, I want a dedicated token usage page in the web UI that shows per-story and per-agent cost breakdowns with totals, so that I can analyse where tokens are being spent and identify optimisation opportunities.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] New page/panel accessible from the main navigation
|
||||
- [ ] Shows a table of all recorded agent sessions with story, agent name, model, token counts, and cost
|
||||
- [ ] Sortable by cost, story, agent, or date
|
||||
- [ ] Shows summary totals: total cost, cost by agent type (coder vs QA vs mergemaster), cost by model (opus vs sonnet)
|
||||
- [ ] Data loads from the token_usage.jsonl log via API endpoint
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
name: "Bot cost command shows total and per-story token spend"
|
||||
---
|
||||
|
||||
# Story 302: Bot cost command shows total and per-story token spend
|
||||
|
||||
## User Story
|
||||
|
||||
As a project owner in a Matrix room, I want to type "{bot_name} cost" to see total token spend and the top most expensive stories, so that I can check burn rate from my phone.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] '{bot_name} cost' shows total spend for the last 24 hours
|
||||
- [ ] Shows top 5 most expensive stories from the last 24 hours with their costs
|
||||
- [ ] Shows cost breakdown by agent type (coder, QA, mergemaster) for the last 24 hours
|
||||
- [ ] Also shows an all-time total for context
|
||||
- [ ] Registered in the command registry so it appears in help output
|
||||
- [ ] Handled at bot level without LLM invocation
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
Reference in New Issue
Block a user