Date: 2025-10-06 Reason: Prevent incomplete stories from being marked as complete Issue Found: Sprint 2 claimed CLI was "100% complete" but most commands were just stubs
Added 4 new strict enforcement rules under execution_phase:
- Requirement: Every story MUST be reviewed by a different agent before completion
- Details:
- Implementer agent CANNOT mark their own story as complete
- Reviewer must be different type (e.g., QA reviews dev work)
- PM assigns reviewer when story moves to 'review' status
- Review must be documented in story completion report
- Enforcement: Strict
- Penalty: Story marked incomplete, must be re-reviewed
- Requirement: Story completion requires verifiable evidence of 100% completion
- Details:
- NEVER mark story complete based on status reports alone
- Reviewer MUST read actual code/files to verify completion
- Reviewer MUST run tests to verify they pass
- If story says "implement command X", reviewer must verify command works
- Stub implementations with console.log/TODO are NOT complete
- 7-Step Verification Process:
- Read the story acceptance criteria
- Read the actual code files (not status reports)
- Run the tests for this story
- Test the feature manually if applicable
- Verify no stubs/placeholders remain
- Document verification results
- Only then mark as complete
- Enforcement: Strict
- Penalty: Story rejected, returned to implementer
- Requirement: Definition of Done must be met before story completion
- Categories:
- Code Implementation:
- All functions/classes from story exist (no stubs)
- Implementation matches acceptance criteria exactly
- No console.log placeholder messages
- No 'not yet implemented' or 'TODO' comments
- Code compiles without errors
- No TypeScript 'any' types without justification
- Testing:
- Unit tests written and passing
- Integration tests if applicable
- Test coverage meets project threshold
- Tests actually test the implementation (not mocks only)
- Reviewer runs tests and sees them pass
- Documentation:
- TSDoc/JSDoc for all public APIs
- README updated if needed
- Examples work when copy-pasted
- No placeholder sections
- Quality:
- Linting passes
- Build succeeds
- No regression in other tests
- Follows approved architecture
- Code Implementation:
- Enforcement: Strict
- Penalty: Story incomplete, must fix deficiencies
- Requirement: PM must verify story completion evidence before updating status
- Details:
- PM receives completion report from reviewer
- PM spot-checks by reading actual code
- PM runs build/tests to verify claims
- PM only updates status.yaml after verification
- If evidence is lacking, PM sends back to implementer
- Enforcement: Strict
- Penalty: Status update rejected, PM must re-verify
Added complete story lifecycle workflow:
todo → in_progress → code_review → testing → done
-
To Code Review:
- Developer claims work complete
- Required: Code committed, tests written, build passes
- Action: PM assigns different agent as reviewer
-
To Testing:
- Code reviewer approves
- Required: Reviewer verified code exists (no stubs), ran tests, completed checklist
- Action: PM assigns QA agent for final verification
-
To Done:
- QA verifies acceptance criteria
- Required: QA ran tests, verified feature works, PM spot-checked code
- Action: PM updates status.yaml
- Code review rejects → back to in_progress
- Testing rejects → back to in_progress
- Must go through review again
- Gate Review: Peer Code Review by different agent
- Gate QA: QA Verification
- Gate PM: PM Final Verification
Added comprehensive "Story Completion Rules" section:
- 3-Gate mandatory process
- Red flags for incomplete stories
- What "100% Complete" means
- PM responsibilities
Added prominent reminder to:
- Read Story Completion Rules before marking any story done
- Load rules.yaml and workflow.yaml
- Follow story completion enforcement process
Problem: Developer marks own work as "complete" without verification Solution: Different agent MUST review before completion Impact: Second pair of eyes will catch stub implementations
Problem: Stories marked complete based on status reports, not actual code Solution: Reviewer MUST read actual code files and run tests Impact: Stubs like "console.log('not yet implemented')" will be caught
Problem: Tests might exist but be empty or skipped Solution: QA MUST run tests and verify they pass Impact: Test quality is verified, not just existence
Problem: PM updates status.yaml without verifying reality Solution: PM MUST read code and run tests before updating status Impact: Final safety net catches any false completions
Problem: Unclear what "complete" means Solution: Documented red flags (e.g., "not yet implemented", TODO comments) Impact: Clear criteria for rejection
Problem: Stories can skip review steps Solution: Mandatory state transitions (must go through code_review → testing) Impact: No shortcuts possible
- Developer creates
init.tswith stub:console.log('not yet implemented') - Developer marks story "STORY-022: musicmcp init" as COMPLETE ❌
- PM updates status.yaml: "STORY-022 ✅"
- No one verifies actual code
- Result: 0% complete story marked as 100% complete
- Developer creates
init.tswith stub:console.log('not yet implemented') - Developer moves story to code_review (not complete)
- PM assigns QA agent as reviewer
- QA agent:
- Reads
packages/cli/src/commands/init.ts - Sees:
console.log(chalk.yellow('init command - not yet implemented')) - RED FLAG: Stub implementation detected
- Runs:
musicmcp init→ sees "not yet implemented" message - REJECTS story → moves back to in_progress
- Documents: "Story incomplete - stub implementation found, feature not working"
- Reads
- PM sees rejection → asks developer to actually implement it
- Developer implements real init functionality
- Goes through review again → this time passes
- QA verifies feature works
- PM spot-checks code → sees real implementation
- Only then updates status.yaml as complete ✅
Mitigation: CLAUDE.md now mandates reading rules before ANY story completion
Mitigation: Explicit 7-step verification checklist that must be documented
Mitigation: Strict enforcement - "PM MUST read code and run tests"
Mitigation: Review checklist must be documented; user can audit completion reports
Mitigation: This is intentional - quality over speed; prevents rework
Before marking ANY story as complete, PM must verify:
- Story went through code_review state
- Code review report exists and documents verification
- Code review found NO stub implementations
- Code reviewer ran tests and confirmed passing
- Story went through testing state
- QA report exists and documents verification
- QA ran tests and verified feature works
- PM read the actual code files
- PM ran build and tests
- PM verified no placeholders/stubs exist
- All Definition of Done items are met
- Only then update status.yaml
Changes Made:
- 4 new strict rules in rules.yaml
- Complete story lifecycle in workflow.yaml
- 3 mandatory quality gates
- Comprehensive verification checklists
- Updated CLAUDE.md for visibility
Will It Work? Yes, if the PM and reviewing agents follow the process. The multi-gate system with mandatory verification steps creates multiple checkpoints where incomplete work will be caught.
Key Success Factor: The PM must actually read the rules and follow them. The rules are now:
- Documented in 4 files
- Marked as MANDATORY in CLAUDE.md
- Include explicit checklists
- Define clear red flags
Result: Stories like "CLI commands" that are 30% complete (only stubs) cannot be marked as "100% complete" because:
- Code reviewer will see stubs and reject
- QA will run commands, see "not yet implemented", and reject
- PM will spot-check code, see stubs, and reject
This creates a fail-safe system with 3 independent verification points.