- Version: 2.0
Validates story completion against acceptance criteria and confirms production readiness.
/plugin marketplace add ninthspace/claude-code-marketplace/plugin install sdd@ninthspace-marketplacePurpose: Execute comprehensive final validation to ensure all acceptance criteria are met, all tests pass, and story is production-ready.
Syntax: /sdd:story-validate [story_id]
| Parameter | Type | Required | Default | Description | Validation |
|---|---|---|---|---|---|
| story_id | string | No | current branch | Story ID (STORY-YYYY-NNN) | Must match format STORY-YYYY-NNN |
/docs/project-context/ directory/docs/stories/qa/[story-id].md/docs/project-context/ directory exists/sdd:project-init first/docs/project-context/technical-stack.md - Testing tools and validation methods/docs/project-context/coding-standards.md - Quality thresholds and criteria/docs/project-context/development-process.md - Validation stage requirementsIF story_id NOT provided:
feature/STORY-2025-001-auth → ID STORY-2025-001VALIDATE story exists and is ready:
/docs/stories/qa/[story-id].md exists/docs/stories/development/ or /docs/stories/review//docs/stories/completed/:
READ story file for:
FOR each acceptance criterion:
✓ [Criterion]: PASSED/FAILED
How tested: [Discovered browser testing framework]
Evidence: [Test file path and line number]
Screenshots: [Screenshot path]
Validation method: [Automated browser test/Manual verification]
MAP criteria to browser tests:
tests/Browser/[StoryId]Test.phptests/e2e/[story-id].spec.jstests/browser/test_[story_id].pyVERIFY test evidence:
MARK criterion validation:
## Success Criteria
- [x] User can toggle dark mode
* Tested by: tests/Browser/DarkModeTest.php::line 45
* Evidence: Browser test passed, screenshot saved
* Validated: 2025-10-01
CHECK Implementation Checklist:
✅ Core Features (using discovered standards):
- [x] Feature implementation → Code complete and functional
- [x] Unit tests → 87% coverage (target: 80% from standards)
- [x] Integration tests → All feature tests passing
- [x] Browser test coverage → 100% of acceptance criteria
- [x] All discovered tests passing → Unit + Feature + Browser
VALIDATE each checklist item:
CHECK quality items:
✅ Quality Standards:
- [x] Error handling → Try/catch blocks, graceful failures
- [x] Loading states → Spinners, skeleton screens implemented
- [x] Documentation → Code comments, README updated
VALIDATE:
CHECK non-functional items:
✅ Non-Functional:
- [x] Performance → Response times meet targets
- [x] Accessibility → WCAG AA compliance
- [x] Security → No vulnerabilities, auth working
VALIDATE from QA results:
CHECK if Rollback Plan section is populated
IF empty or minimal:
VALIDATE rollback plan contains:
TEST rollback feasibility (if possible):
EXECUTE final readiness validation:
🚀 READY FOR PRODUCTION?
════════════════════════════════════════════════
☑ All acceptance criteria met
☑ All tests passing
☑ All acceptance criteria covered by automated browser tests
☑ Browser test suite passes completely
☑ Code reviewed and approved
☑ Documentation complete
☑ Performance acceptable
☑ Security verified
☑ Rollback plan ready
☑ Monitoring configured (if applicable)
CONFIDENCE LEVEL: [High/Medium/Low]
CALCULATE confidence level:
IDENTIFY remaining risks:
RISKS:
- [Risk 1]: [Description] - Mitigation: [How to handle]
- [Risk 2]: [Description] - Mitigation: [How to handle]
ASSESS risk levels:
CHECK external dependencies:
DEPENDENCIES:
- [Dependency 1]: [Status - Ready/Not Ready]
- [Dependency 2]: [Status - Ready/Not Ready]
VALIDATE:
COMPILE all validation results
DETERMINE overall status:
GENERATE validation report:
📄 VALIDATION SUMMARY
════════════════════════════════════════════════
Story: [STORY-ID] - [Title]
Validated: [Timestamp]
Validator: Claude Code (Automated)
RESULT: ✅ READY TO SHIP / ⚠️ NEEDS WORK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 ACCEPTANCE CRITERIA: 5/5 PASSED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ User can toggle dark mode
→ tests/Browser/DarkModeTest.php::line 45 ✅
✓ Theme persists across sessions
→ tests/Browser/DarkModeTest.php::line 67 ✅
✓ All UI components support both themes
→ tests/Browser/DarkModeTest.php::line 89 ✅
✓ Keyboard shortcut (Cmd+Shift+D) works
→ tests/Browser/DarkModeTest.php::line 112 ✅
✓ Preference syncs across browser tabs
→ tests/Browser/DarkModeTest.php::line 134 ✅
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 QUALITY METRICS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Passed Criteria: 5/5 (100%)
Test Coverage: 87% (target: 80% ✅)
Quality Score: 9.2/10
Performance: All targets met ✅
Security: No vulnerabilities ✅
Accessibility: WCAG AA compliant ✅
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 PRODUCTION READINESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ All acceptance criteria met
✅ All tests passing (76/76)
✅ Browser test coverage: 100%
✅ Code reviewed and approved
✅ Documentation complete
✅ Performance acceptable
✅ Security verified
✅ Rollback plan documented
CONFIDENCE LEVEL: ✅ HIGH
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ RISKS & MITIGATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Low Risk: CSS changes may affect custom themes
Mitigation: Browser tests cover theme switching,
rollback plan ready
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 DEPENDENCIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ No external dependencies
[IF NOT READY:]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ BLOCKING ISSUES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Acceptance criterion "X" not validated by browser test
→ Create browser test in tests/Browser/
2. Rollback plan not documented
→ Add rollback steps to story file
3. Performance target not met (450ms vs 200ms)
→ Optimize database queries
[IF READY:]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ SHIP CHECKLIST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. /sdd:story-ship [story-id] # Deploy to production
2. Monitor application after deployment
3. Be ready to execute rollback plan if needed
4. Document lessons learned after ship
UPDATE Success Criteria with validation evidence:
## Success Criteria
- [x] User can toggle dark mode
* Tested by: tests/Browser/DarkModeTest.php::line 45
* Evidence: Browser test passed on 2025-10-01
* Screenshot: /storage/screenshots/STORY-2025-003/toggle.png
- [x] Theme persists across sessions
* Tested by: tests/Browser/DarkModeTest.php::line 67
* Evidence: Browser test passed on 2025-10-01
MARK remaining checklist items:
[x] any newly validated items[x] any newly validated itemsADD validation entry to Progress Log:
- [Today]: Final validation completed
* All 5 acceptance criteria validated ✅
* Test coverage: 87% (exceeds 80% target)
* Performance: All targets met
* Security: No vulnerabilities
* Rollback plan: Documented and verified
* Confidence level: HIGH
* Status: READY TO SHIP
RECORD validation results:
💡 NEXT STEPS:
════════════════════════════════════════════════
[IF READY TO SHIP:]
✅ Story validated and ready for production
1. /sdd:story-ship [story-id] # Deploy to production
- Creates PR (if not created)
- Merges to main branch
- Moves story to completed
- Tags release
2. Post-Deployment Actions:
- Monitor application logs
- Watch performance metrics
- Be ready for rollback
- Document lessons learned
[IF NEEDS WORK:]
⚠️ X critical issues prevent shipping
1. /sdd:story-refactor [story-id] # Return to development
2. Address blocking issues:
- [Issue 1]
- [Issue 2]
3. /sdd:story-review [story-id] # Re-run review
4. /sdd:story-qa [story-id] # Re-run QA
5. /sdd:story-validate [story-id] # Re-validate
[MONITORING COMMANDS:]
# Laravel:
php artisan pail # Watch logs in real-time
php artisan telescope:clear # Clear old monitoring data
# System:
tail -f storage/logs/laravel.log # Follow application logs
/docs/stories/qa/[story-id].md with validation resultsINPUT:
/sdd:story-validate STORY-2025-003
OUTPUT:
→ Loading project context...
✓ technical-stack.md: Laravel + Pest + Playwright
✓ coding-standards.md: 80% coverage target
✓ development-process.md: Validation requirements
→ Loading story requirements...
✓ Story: STORY-2025-003 - Dark Mode Toggle
✓ Success Criteria: 5 criteria
✓ Implementation Checklist: 9/9 complete
✓ QA Checklist: 6/6 complete
→ Validating acceptance criteria...
✓ [1/5] User can toggle dark mode
→ tests/Browser/DarkModeTest.php::line 45 ✅
✓ [2/5] Theme persists across sessions
→ tests/Browser/DarkModeTest.php::line 67 ✅
✓ [3/5] All UI components support both themes
→ tests/Browser/DarkModeTest.php::line 89 ✅
✓ [4/5] Keyboard shortcut works
→ tests/Browser/DarkModeTest.php::line 112 ✅
✓ [5/5] Preference syncs across tabs
→ tests/Browser/DarkModeTest.php::line 134 ✅
→ Checking implementation completeness...
✓ Feature implementation: Complete
✓ Unit tests: 87% coverage (target: 80%)
✓ Browser tests: 100% criteria coverage
✓ All tests passing: 76/76
→ Verifying rollback plan...
✓ Rollback plan documented
✓ Migrations are reversible
→ Final production readiness checks...
✓ All acceptance criteria met
✓ All tests passing
✓ Code reviewed
✓ Documentation complete
✓ Performance acceptable
✓ Security verified
✓ Rollback plan ready
📄 VALIDATION SUMMARY
════════════════════════════════════════════════
Story: STORY-2025-003 - Dark Mode Toggle
Validated: 2025-10-01 17:45:23
RESULT: ✅ READY TO SHIP
Passed Criteria: 5/5 (100%)
Test Coverage: 87%
Quality Score: 9.2/10
CONFIDENCE LEVEL: ✅ HIGH
💡 NEXT STEPS:
════════════════════════════════════════════════
✅ Story validated and ready for production
1. /sdd:story-ship STORY-2025-003 # Deploy to production
2. Monitor application after deployment
3. Be ready to execute rollback if needed
INPUT:
/sdd:story-validate STORY-2025-004
OUTPUT:
→ Loading project context...
✓ technical-stack.md loaded
→ Loading story requirements...
✓ Story: STORY-2025-004 - Notification System
✓ Success Criteria: 4 criteria
→ Validating acceptance criteria...
✓ [1/4] Notifications appear on events
→ tests/Browser/NotificationTest.php::line 23 ✅
✓ [2/4] Notifications can be dismissed
→ tests/Browser/NotificationTest.php::line 45 ✅
✗ [3/4] Notifications persist across sessions
→ NO BROWSER TEST FOUND ❌
✗ [4/4] Email notifications sent
→ NO BROWSER TEST FOUND ❌
→ Checking rollback plan...
✗ Rollback plan not documented
📄 VALIDATION SUMMARY
════════════════════════════════════════════════
Story: STORY-2025-004 - Notification System
Validated: 2025-10-01 18:12:45
RESULT: ⚠️ NEEDS WORK
Passed Criteria: 2/4 (50%)
Test Coverage: 78% (below 80% target)
❌ BLOCKING ISSUES:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Acceptance criterion "Notifications persist across sessions" not validated
→ Create browser test in tests/Browser/NotificationTest.php
2. Acceptance criterion "Email notifications sent" not validated
→ Create browser test for email sending
3. Rollback plan not documented
→ Add rollback steps to story file
4. Test coverage 78% below target 80%
→ Add tests to increase coverage
💡 NEXT STEPS:
════════════════════════════════════════════════
⚠️ 4 critical issues prevent shipping
1. /sdd:story-refactor STORY-2025-004 # Return to development
2. Address blocking issues:
- Add browser test for session persistence
- Add browser test for email notifications
- Document rollback plan
- Increase test coverage to 80%+
3. /sdd:story-review STORY-2025-004 # Re-run review
4. /sdd:story-qa STORY-2025-004 # Re-run QA
5. /sdd:story-validate STORY-2025-004 # Re-validate
INPUT:
/sdd:story-validate
OUTPUT:
→ Detecting story from current branch...
✓ Current branch: feature/STORY-2025-005-search
✓ Story ID: STORY-2025-005
→ Loading story requirements...
✓ Success Criteria: 3 criteria
→ Validating acceptance criteria...
✓ All 3 criteria validated by browser tests
→ Assessing risks...
⚠️ Database migration changes column type
⚠️ Bundle size increased by 15KB
📄 VALIDATION SUMMARY
════════════════════════════════════════════════
Story: STORY-2025-005 - Advanced Search
Validated: 2025-10-01 19:23:11
RESULT: ✅ READY TO SHIP (with warnings)
Passed Criteria: 3/3 (100%)
Test Coverage: 91%
CONFIDENCE LEVEL: ⚠️ MEDIUM
⚠️ WARNINGS (non-blocking):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Database migration changes column type
Risk: Potential data loss on rollback
Mitigation: Backup database before deployment
2. Bundle size increased by 15KB
Risk: Slightly slower page loads
Mitigation: Monitor performance metrics
💡 NEXT STEPS:
════════════════════════════════════════════════
✅ Story validated - Ready to ship with awareness
1. /sdd:story-ship STORY-2025-005 # Deploy to production
2. Backup database before deployment
3. Monitor performance after deployment
/docs/project-context/ directory/sdd:project-init/docs/stories/development/ or /docs/stories/review//sdd:project-init, offer basic validation/sdd:story-qa [id] - Must complete before validation/sdd:story-ship [id] - Run after validation passes/sdd:story-refactor [id] - Return to development if validation fails/sdd:story-status [id] - Check current story state