From 586d06b840343fdeb72a7a478339608414929753 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 19 Mar 2026 11:30:19 +0000 Subject: [PATCH] story-kit: create 306_story_replace_manual_qa_boolean_with_configurable_qa_mode_field --- ...ry_dedicated_token_usage_page_in_web_ui.md | 21 --------------- ...ith_story_filter_for_detailed_breakdown.md | 21 --------------- ...boolean_with_configurable_qa_mode_field.md | 26 +++++++++++++++++++ 3 files changed, 26 insertions(+), 42 deletions(-) delete mode 100644 .story_kit/work/1_backlog/301_story_dedicated_token_usage_page_in_web_ui.md delete mode 100644 .story_kit/work/1_backlog/303_story_bot_cost_command_with_story_filter_for_detailed_breakdown.md create mode 100644 .story_kit/work/1_backlog/306_story_replace_manual_qa_boolean_with_configurable_qa_mode_field.md diff --git a/.story_kit/work/1_backlog/301_story_dedicated_token_usage_page_in_web_ui.md b/.story_kit/work/1_backlog/301_story_dedicated_token_usage_page_in_web_ui.md deleted file mode 100644 index cd9743a..0000000 --- a/.story_kit/work/1_backlog/301_story_dedicated_token_usage_page_in_web_ui.md +++ /dev/null @@ -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 diff --git a/.story_kit/work/1_backlog/303_story_bot_cost_command_with_story_filter_for_detailed_breakdown.md b/.story_kit/work/1_backlog/303_story_bot_cost_command_with_story_filter_for_detailed_breakdown.md deleted file mode 100644 index a0614ad..0000000 --- a/.story_kit/work/1_backlog/303_story_bot_cost_command_with_story_filter_for_detailed_breakdown.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: "Bot cost command with story filter for detailed breakdown" ---- - -# Story 303: Bot cost command with story filter for detailed breakdown - -## User Story - -As a project owner in a Matrix room, I want to type "{bot_name} cost 293" to see a detailed token breakdown for a specific story, so that I can understand where the tokens went on an expensive item. - -## Acceptance Criteria - -- [ ] '{bot_name} cost {story_number}' shows all agent sessions for that story -- [ ] Each session shows agent name, model, input/output/cache tokens, and cost in USD -- [ ] Shows total cost for the story at the bottom -- [ ] Registered in the command registry (can share the 'cost' command with args parsing) -- [ ] Returns a friendly message if no usage data exists for the story - -## Out of Scope - -- TBD diff --git a/.story_kit/work/1_backlog/306_story_replace_manual_qa_boolean_with_configurable_qa_mode_field.md b/.story_kit/work/1_backlog/306_story_replace_manual_qa_boolean_with_configurable_qa_mode_field.md new file mode 100644 index 0000000..b08b3ac --- /dev/null +++ b/.story_kit/work/1_backlog/306_story_replace_manual_qa_boolean_with_configurable_qa_mode_field.md @@ -0,0 +1,26 @@ +--- +name: "Replace manual_qa boolean with configurable qa mode field" +--- + +# Story 306: Replace manual_qa boolean with configurable qa mode field + +## User Story + +As a project owner, I want to configure QA mode per-story and set a project-wide default, so that I can choose between human review, server-only gate checks, or full agent QA on a per-story basis. + +## Acceptance Criteria + +- [ ] Replace manual_qa: true/false front matter field with qa: human|server|agent +- [ ] qa: server — skip the QA agent entirely, rely on server's automated gate checks (clippy + tests + coverage). If gates pass, advance straight to merge +- [ ] qa: agent — current behavior, spin up a QA agent (Claude session) to review code and run gates +- [ ] qa: human — hold in QA for human approval after server gates pass (current manual_qa: true behavior) +- [ ] Default qa mode is configurable in project.toml (e.g. default_qa = "server") +- [ ] Set the initial default in project.toml to "server" +- [ ] Per-story front matter qa field overrides the project default +- [ ] Backwards compatible: existing stories without a qa field use the project default +- [ ] Remove the old manual_qa field handling and replace with the new qa field throughout pool.rs, story_metadata.rs, and any other references +- [ ] Update bot.toml.example and project.toml documentation to reflect the new field + +## Out of Scope + +- TBD