From 94ec5ddf7df4bf6d8b8f6d8c8bdbe10039dc90fe Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 20 Feb 2026 16:11:28 +0000 Subject: [PATCH] Deduplicate story numbers, add stories 52-56 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove duplicate 52 (was renumbered copy of story 50) - Renumber agent-created stories: 50→54, 53→55 - Add story 52: Mergemaster Agent Role - Add story 53: QA Agent Role - Add story 56: Auto-Increment Work Item IDs Co-Authored-By: Claude Opus 4.6 --- .../upcoming/52_mergemaster_agent_role.md | 26 ++++++++++++ .../52_unified_current_work_directory.md | 31 -------------- .../stories/upcoming/53_qa_agent_role.md | 42 +++++++++++++++++++ ... 54_cross_platform_binary_distribution.md} | 2 +- ...55_websocket_push_notifications_for_ui.md} | 2 +- .../56_auto_increment_work_item_ids.md | 24 +++++++++++ 6 files changed, 94 insertions(+), 33 deletions(-) create mode 100644 .story_kit/stories/upcoming/52_mergemaster_agent_role.md delete mode 100644 .story_kit/stories/upcoming/52_unified_current_work_directory.md create mode 100644 .story_kit/stories/upcoming/53_qa_agent_role.md rename .story_kit/stories/upcoming/{50_cross_platform_binary_distribution.md => 54_cross_platform_binary_distribution.md} (96%) rename .story_kit/stories/upcoming/{53_websocket_push_notifications_for_ui.md => 55_websocket_push_notifications_for_ui.md} (96%) create mode 100644 .story_kit/stories/upcoming/56_auto_increment_work_item_ids.md diff --git a/.story_kit/stories/upcoming/52_mergemaster_agent_role.md b/.story_kit/stories/upcoming/52_mergemaster_agent_role.md new file mode 100644 index 0000000..7e2e40b --- /dev/null +++ b/.story_kit/stories/upcoming/52_mergemaster_agent_role.md @@ -0,0 +1,26 @@ +--- +name: Mergemaster Agent Role +test_plan: pending +--- + +# Story 52: Mergemaster Agent Role + +## User Story + +As a developer, I want a dedicated mergemaster agent that handles the full accept→merge→archive→cleanup pipeline, so that merging coder work to master is deterministic and doesn't require manual conflict resolution. + +## Acceptance Criteria + +- [ ] New `mergemaster` agent role in `.story_kit/project.toml` +- [ ] Mergemaster can cherry-pick or rebase a worktree branch onto master +- [ ] Mergemaster resolves merge conflicts (or reports them clearly if it can't) +- [ ] Mergemaster runs all quality gates after merge (cargo test, cargo clippy, pnpm test, pnpm build) +- [ ] Mergemaster moves the story/bug to archived and auto-commits +- [ ] Mergemaster cleans up the worktree and branch after successful merge +- [ ] MCP tool `merge_agent_work(agent_name, story_id)` triggers the mergemaster pipeline +- [ ] Mergemaster reports success/failure with details (conflicts found, tests passed/failed) + +## Out of Scope + +- Automated conflict resolution using AI (can follow later — start with simple cherry-pick/rebase) +- Running mergemaster as a persistent daemon diff --git a/.story_kit/stories/upcoming/52_unified_current_work_directory.md b/.story_kit/stories/upcoming/52_unified_current_work_directory.md deleted file mode 100644 index 7bb637b..0000000 --- a/.story_kit/stories/upcoming/52_unified_current_work_directory.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Unified Current Work Directory -test_plan: pending ---- - -# Story 50: Unified Current Work Directory - -## User Story - -As a developer, I want a single `.story_kit/current/` directory (outside of `stories/`) that holds whatever work items agents are actively working on — stories, bugs, or spikes — so I can always see at a glance what coders are doing. - -## Acceptance Criteria - -- [ ] New top-level `.story_kit/current/` directory replaces `.story_kit/stories/current/` -- [ ] `start_agent` moves work items into `.story_kit/current/` regardless of type (story, bug, spike) -- [ ] `accept_story` moves from `.story_kit/current/` to `.story_kit/stories/archived/` -- [ ] `close_bug` moves from `.story_kit/current/` to `.story_kit/bugs/archive/` -- [ ] All existing references to `.story_kit/stories/current/` are updated (server code, tests, MCP tools) -- [ ] Migrate any files currently in `.story_kit/stories/current/` to `.story_kit/current/` -- [ ] Auto-commits use deterministic messages for all moves -- [ ] Integration test: full story lifecycle — create_story → start_agent (moves to current/) → check_criterion → accept_story (moves to stories/archived/) -- [ ] Integration test: full bug lifecycle — create_bug → start_agent (moves to current/) → close_bug (moves to bugs/archive/) -- [ ] Integration test: full spike lifecycle — start_agent (moves to current/) → completion (moves back or archives) -- [ ] All deterministic MCP tools (`create_story`, `accept_story`, `close_bug`, `check_criterion`, `set_test_plan`, `start_agent`) resolve paths correctly against the new directory layout -- [ ] `list_current` MCP tool (or update `list_agents`) shows all items in `.story_kit/current/` with their type (story/bug/spike) - -- [ ] All agent prompts in `.story_kit/project.toml` (supervisor, coders) updated to reference correct directory paths and workflow steps - -## Out of Scope - -- UI changes to display current work items diff --git a/.story_kit/stories/upcoming/53_qa_agent_role.md b/.story_kit/stories/upcoming/53_qa_agent_role.md new file mode 100644 index 0000000..d3c9a01 --- /dev/null +++ b/.story_kit/stories/upcoming/53_qa_agent_role.md @@ -0,0 +1,42 @@ +--- +name: QA Agent Role +test_plan: pending +--- + +# Story 53: QA Agent Role + +## User Story + +As a developer, I want a dedicated QA agent that reviews coder work in worktrees before merge, so that obvious bugs, quality issues, and missing test coverage are caught before code reaches master. + +## Acceptance Criteria + +### Code Quality Scan +- [ ] QA agent scans the worktree diff for obvious coding mistakes (unused imports, dead code, unhandled errors, hardcoded values) +- [ ] QA agent runs `cargo clippy --all-targets --all-features` and reports any warnings +- [ ] QA agent runs `pnpm run build` (tsc + vite) and reports any TypeScript errors +- [ ] QA agent runs `biome check` and reports any linting issues + +### Test Verification +- [ ] QA agent runs `cargo test` and verifies all tests pass +- [ ] QA agent runs `pnpm run test` and verifies all frontend tests pass +- [ ] QA agent runs coverage collection and reports coverage percentage +- [ ] QA agent reviews test quality — flags tests that are trivial or don't assert meaningful behavior + +### Manual Testing Support +- [ ] QA agent builds the server and frontend in the worktree +- [ ] QA agent starts a test server on a free port +- [ ] QA agent generates a testing plan: URL to visit, things to check in the UI, curl commands to exercise endpoints +- [ ] QA agent presents the testing plan to the human via `report_completion` or a new MCP tool +- [ ] Human can approve or reject with feedback + +### Agent Configuration +- [ ] New `qa` agent role in `.story_kit/project.toml` +- [ ] MCP tool `request_qa(agent_name, story_id)` triggers QA review of a worktree +- [ ] QA agent produces a structured report (pass/fail per category, details, testing plan) + +## Out of Scope + +- Automated UI testing (Playwright, Cypress) +- Performance/load testing +- Security scanning diff --git a/.story_kit/stories/upcoming/50_cross_platform_binary_distribution.md b/.story_kit/stories/upcoming/54_cross_platform_binary_distribution.md similarity index 96% rename from .story_kit/stories/upcoming/50_cross_platform_binary_distribution.md rename to .story_kit/stories/upcoming/54_cross_platform_binary_distribution.md index 6cb6683..8a3f9c6 100644 --- a/.story_kit/stories/upcoming/50_cross_platform_binary_distribution.md +++ b/.story_kit/stories/upcoming/54_cross_platform_binary_distribution.md @@ -3,7 +3,7 @@ name: Cross-Platform Binary Distribution test_plan: pending --- -# Story 49: Cross-Platform Binary Distribution +# Story 54: Cross-Platform Binary Distribution ## User Story diff --git a/.story_kit/stories/upcoming/53_websocket_push_notifications_for_ui.md b/.story_kit/stories/upcoming/55_websocket_push_notifications_for_ui.md similarity index 96% rename from .story_kit/stories/upcoming/53_websocket_push_notifications_for_ui.md rename to .story_kit/stories/upcoming/55_websocket_push_notifications_for_ui.md index f70e5e7..64a4076 100644 --- a/.story_kit/stories/upcoming/53_websocket_push_notifications_for_ui.md +++ b/.story_kit/stories/upcoming/55_websocket_push_notifications_for_ui.md @@ -3,7 +3,7 @@ name: WebSocket Push Notifications for Panel Auto-Refresh test_plan: pending --- -# Story 53: WebSocket Push Notifications for Panel Auto-Refresh +# Story 55: WebSocket Push Notifications for Panel Auto-Refresh ## User Story diff --git a/.story_kit/stories/upcoming/56_auto_increment_work_item_ids.md b/.story_kit/stories/upcoming/56_auto_increment_work_item_ids.md new file mode 100644 index 0000000..a67dcf5 --- /dev/null +++ b/.story_kit/stories/upcoming/56_auto_increment_work_item_ids.md @@ -0,0 +1,24 @@ +--- +name: Auto-Increment Work Item IDs +test_plan: pending +--- + +# Story 56: Auto-Increment Work Item IDs + +## User Story + +As a developer, I want the server to automatically assign the next sequential ID when creating stories, bugs, or spikes, so that agents don't pick conflicting numbers and I don't have to deduplicate manually. + +## Acceptance Criteria + +- [ ] `create_story` scans all stories (upcoming, current, archived) to find the highest existing number and assigns N+1 +- [ ] `create_bug` scans all bugs (open and archived) to find the highest existing bug number and assigns N+1 +- [ ] `create_spike` scans all spikes (open and archived) to find the highest existing spike number and assigns N+1 +- [ ] The `name` parameter no longer needs a number prefix — the server prepends it (e.g. `create_story(name="Foo")` → `56_foo.md`) +- [ ] Race condition: if two agents create stories simultaneously, they get distinct IDs (simple file-system lock or retry) +- [ ] Existing `create_story` callers (MCP tool, REST API) continue to work with the new behavior + +## Out of Scope + +- Reserving ID ranges for parallel agents +- Non-numeric IDs