Deduplicate story numbers, add stories 52-56

- 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 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-20 16:11:28 +00:00
parent 9d41cdddd2
commit 94ec5ddf7d
6 changed files with 94 additions and 33 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -3,7 +3,7 @@ name: Cross-Platform Binary Distribution
test_plan: pending test_plan: pending
--- ---
# Story 49: Cross-Platform Binary Distribution # Story 54: Cross-Platform Binary Distribution
## User Story ## User Story

View File

@@ -3,7 +3,7 @@ name: WebSocket Push Notifications for Panel Auto-Refresh
test_plan: pending test_plan: pending
--- ---
# Story 53: WebSocket Push Notifications for Panel Auto-Refresh # Story 55: WebSocket Push Notifications for Panel Auto-Refresh
## User Story ## User Story

View File

@@ -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