# /sdd:story-full-check Comprehensive 5-minute validation suite for production-ready quality assurance. --- ## Meta **Category**: Testing & Validation **Format**: Imperative (Comprehensive) **Execution Time**: 4-6 minutes **Prerequisites**: Story in `/docs/stories/development/` or `/docs/stories/review/` **Destructive**: No (read-only analysis) **Related Commands**: - `/sdd:story-quick-check` - Fast 30s validation (run first) - `/sdd:story-test-integration` - Integration + E2E tests only - `/sdd:story-validate` - Final story validation before ship **Context Requirements**: - `/docs/project-context/technical-stack.md` (validation tools) - `/docs/project-context/coding-standards.md` (compliance rules) - `/docs/project-context/development-process.md` (quality gates) --- ## Parameters **Validation Scope**: ```bash # Full comprehensive check (default) /sdd:story-full-check # Scoped validation --scope=tests|quality|security|performance|all # Default: all --story-id=STORY-XXX-NNN # Specific story --export # Save report to file --compare= # Compare with previous state ``` **Test Configuration**: ```bash --coverage # Generate coverage reports --browsers=chrome,firefox # Multi-browser E2E testing --parallel=N # Parallel execution (default: 4) --strict # Fail on warnings (production mode) ``` **Examples**: ```bash /sdd:story-full-check # Full 5min check /sdd:story-full-check --export # Save detailed report /sdd:story-full-check --scope=tests --coverage # Tests + coverage only /sdd:story-full-check --compare=abc123 --strict # Compare + strict mode ``` --- ## Process ### Phase 1: Full Test Suite (2-3 min) **Execute All Tests**: ```bash # Run comprehensive test suite php artisan test --parallel --coverage # Includes: โœ“ Unit tests (all) โœ“ Feature tests (all) โœ“ Integration tests (API, database) โœ“ Browser tests (E2E workflows) ``` **Output**: ``` ๐Ÿงช COMPREHENSIVE TESTING ======================== Unit Tests โœ… 24/24 passed (0.8s) Coverage: 94% Feature Tests โœ… 18/18 passed (2.1s) Coverage: 88% Integration Tests ๐Ÿ”— API: 12/12 passed (1.4s) ๐Ÿ’พ Database: 8/8 passed (0.6s) Coverage: 85% Browser Tests (Chrome) ๐ŸŒ E2E: 6/7 passed, 1 skipped (12.3s) โš ๏ธ Skipped: Safari-specific test Coverage: 76% โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Test Type โ”‚ Passed โ”‚ Failed โ”‚ Skipped โ”‚ Coverage โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Unit โ”‚ 24 โ”‚ 0 โ”‚ 0 โ”‚ 94% โ”‚ โ”‚ Feature โ”‚ 18 โ”‚ 0 โ”‚ 0 โ”‚ 88% โ”‚ โ”‚ Integration โ”‚ 20 โ”‚ 0 โ”‚ 0 โ”‚ 85% โ”‚ โ”‚ Browser โ”‚ 6 โ”‚ 0 โ”‚ 1 โ”‚ 76% โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ TOTAL โ”‚ 68 โ”‚ 0 โ”‚ 1 โ”‚ 87% โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ Overall Coverage: 87% (target: 80%+) โœ… Lines: 1,247/1,432 Branches: 94/112 Functions: 156/178 Duration: 17.2s Status: โœ… ALL TESTS PASSING ``` --- ### Phase 2: Code Quality Analysis (1 min) **Static Analysis**: ```bash # Laravel Pint (formatting) vendor/bin/pint --test # PHPStan (static analysis) - if configured vendor/bin/phpstan analyse # Check: โœ“ Code formatting โœ“ Type safety โœ“ Complexity metrics โœ“ Duplicate code detection ``` **Output**: ``` ๐Ÿ“Š CODE QUALITY ANALYSIS ======================== Code Formatting (Pint) โœ… All files PSR-12 compliant โœ… No style violations Static Analysis โš ๏ธ 3 warnings found 1. TaskManager::updateOrder() - Missing return type Location: app/Livewire/TaskManager.php:87 2. Category::tasks() - @param missing Location: app/Models/Category.php:42 3. Unused variable $order Location: app/Http/Controllers/TaskController.php:23 Complexity Metrics โœ… Cyclomatic complexity: 4.2 avg (target: <10) โœ… Cognitive complexity: 6.8 avg (target: <15) โœ… No files over threshold Highest complexity: TaskManager::reorderTasks() - Complexity: 8 Code Duplication โœ… No duplicate code blocks detected โœ… Similar code: 2 locations (acceptable) - Task creation in TaskManager vs TaskController - Recommendation: Extract to service class Dependencies โœ… All dependencies up to date โœ… No vulnerabilities detected โœ… No unused dependencies Quality Score: B+ (88/100) ``` --- ### Phase 3: Performance Profiling (30-60s) **Build & Runtime Metrics**: ```bash # Frontend build analysis npm run build -- --analyze # Backend profiling php artisan route:list --compact php artisan optimize # Check: โœ“ Build size and timing โœ“ Route efficiency โœ“ Query performance โœ“ Memory usage ``` **Output**: ``` โšก PERFORMANCE PROFILING ======================== Frontend Build Bundle size: 248 KB (gzipped: 82 KB) โœ… Build time: 4.2s Chunks: - app.js: 156 KB - vendor.js: 92 KB Compared to baseline: Bundle: +8 KB (+3.3%) Build: -0.3s (faster) Backend Performance Routes: 24 registered Avg response time: 45ms โœ… Database Queries Average: 12ms Slowest: Task::with('categories', 'tags') - 48ms N+1 queries: None detected โœ… Memory Usage Average: 48 MB Peak: 72 MB โœ… Target: < 128 MB Page Load Metrics (E2E) Initial load: 680ms โœ… Time to interactive: 920ms โœ… First contentful paint: 340ms โœ… Performance Grade: A (94/100) โš ๏ธ Recommendations: - Consider lazy loading categories for large lists - Add index on tasks.order column for sorting ``` --- ### Phase 4: Security Audit (30s) **Security Scanning**: ```bash # Dependency vulnerabilities composer audit # Laravel security checks php artisan config:cache --check php artisan route:cache --check # Check: โœ“ Dependency vulnerabilities โœ“ Exposed secrets (.env validation) โœ“ CSRF protection โœ“ SQL injection prevention ``` **Output**: ``` ๐Ÿ”’ SECURITY AUDIT ================= Dependency Vulnerabilities โœ… 0 vulnerabilities found Last scan: 2025-10-01 14:45:22 Code Security โœ… No exposed secrets detected โœ… CSRF protection enabled โœ… SQL injection prevention (Eloquent ORM) โœ… XSS protection enabled Laravel Security โœ… Debug mode: OFF (production) โœ… APP_KEY set and secure โœ… HTTPS enforced โœ… Session secure: true Authentication โœ… Password hashing: bcrypt โœ… Rate limiting: configured โœ… Authorization policies: implemented โš ๏ธ Recommendations: - Enable Content Security Policy headers - Add rate limiting to API endpoints - Consider implementing 2FA Security Score: A- (92/100) ``` --- ### Phase 5: Standards Compliance (30s) **Validate Against Project Standards**: ```bash # Load coding standards source /docs/project-context/coding-standards.md # Check: โœ“ TALL stack conventions โœ“ Naming conventions โœ“ File organization โœ“ Error handling patterns โœ“ Accessibility requirements ``` **Output**: ``` ๐Ÿ“ STANDARDS COMPLIANCE ======================= TALL Stack Conventions โœ… Livewire components properly structured โœ… Alpine.js patterns followed โœ… Tailwind utility-first approach โœ… Laravel best practices Naming Conventions โœ… Models: PascalCase โœ… Controllers: PascalCase + Controller suffix โœ… Routes: kebab-case โœ… Variables: camelCase File Organization โœ… PSR-4 autoloading โœ… Livewire components in App\Livewire โœ… Tests mirror app structure โœ… Resources organized by type Error Handling โœ… Try-catch blocks where needed โœ… Validation using Form Requests โœ… User-friendly error messages โš ๏ธ Missing error logging in TaskManager::delete() Accessibility (WCAG AA) โœ… Semantic HTML โœ… ARIA attributes present โœ… Keyboard navigation โœ… Color contrast: 4.5:1+ โœ… Focus indicators Responsive Design โœ… Mobile-first approach โœ… Touch targets: 44px min โœ… Viewport meta tag โœ… Fluid typography Compliance Score: A (96/100) โš ๏ธ Minor Issues: - Add error logging to deletion operations - Document API endpoints in OpenAPI spec ``` --- ### Phase 6: Documentation Check (20s) **Documentation Validation**: ```bash # Check documentation completeness ls -la README.md CHANGELOG.md # Check inline docs grep -r "@param" app/ | wc -l grep -r "@return" app/ | wc -l # Check: โœ“ README completeness โœ“ Inline PHPDoc blocks โœ“ Story documentation โœ“ API documentation ``` **Output**: ``` ๐Ÿ“š DOCUMENTATION CHECK ====================== Project Documentation โœ… README.md: Present and updated โœ… CHANGELOG.md: Updated with v1.3.0 โš ๏ธ API documentation: Missing OpenAPI spec Story Documentation โœ… Story file: Complete with acceptance criteria โœ… Progress log: Updated โœ… Test results: Documented Code Documentation โœ… PHPDoc blocks: 156/178 methods (88%) โš ๏ธ Missing @param: 14 methods โš ๏ธ Missing @return: 8 methods Classes needing docs: - TaskManager::updateOrder() (missing @param) - Category::tasks() (missing @return) Inline Comments โœ… Complex logic documented โœ… TODOs tracked: 3 found - TODO: Add pagination to large lists - TODO: Implement caching for categories - TODO: Add bulk operations Documentation Score: B+ (87/100) Recommendations: - Add PHPDoc to remaining 22 methods - Generate OpenAPI spec for API endpoints - Document environment variables ``` --- ### Phase 7: Generate Full Report (10s) **Comprehensive Validation Report**: ``` ๐Ÿ“‹ FULL VALIDATION REPORT ========================= Story: STORY-DUE-002 - Due Date Management Validated: 2025-10-01 14:48:35 Duration: 4 minutes 52 seconds OVERALL GRADE: A- (91/100) STATUS: โœ… READY FOR PRODUCTION โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Validation Area โ”‚ Score โ”‚ Status โ”‚ Grade โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Test Suite โ”‚ 100% โ”‚ โœ… โ”‚ A+ โ”‚ โ”‚ Code Quality โ”‚ 88% โ”‚ โœ… โ”‚ B+ โ”‚ โ”‚ Performance โ”‚ 94% โ”‚ โœ… โ”‚ A โ”‚ โ”‚ Security โ”‚ 92% โ”‚ โœ… โ”‚ A- โ”‚ โ”‚ Standards โ”‚ 96% โ”‚ โœ… โ”‚ A โ”‚ โ”‚ Documentation โ”‚ 87% โ”‚ โš ๏ธ โ”‚ B+ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ OVERALL โ”‚ 91% โ”‚ โœ… โ”‚ A- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โœ… HIGHLIGHTS (23): โœ“ All 68 tests passing (1 skipped) โœ“ Test coverage: 87% (exceeds 80% target) โœ“ No security vulnerabilities โœ“ Performance within targets โœ“ WCAG AA accessibility compliant โœ“ Mobile-responsive design validated โœ“ No N+1 query issues โœ“ Code formatting compliant (Pint) โœ“ All dependencies up to date โœ“ CSRF/XSS protection enabled ... (13 more) โš ๏ธ WARNINGS (8): 1. Missing return type: TaskManager::updateOrder() Priority: LOW | Fix time: 2 min Impact: Type safety, IDE autocomplete 2. Missing @param docs: 14 methods Priority: LOW | Fix time: 10 min Impact: Developer experience 3. Bundle size +8KB from baseline Priority: LOW | Fix time: N/A Impact: Acceptable growth for new features 4. Missing OpenAPI spec for API Priority: MEDIUM | Fix time: 30 min Impact: API documentation ... (4 more) โŒ FAILURES (0): None - all critical checks passed! ๐Ÿ“ˆ COMPARED TO LAST CHECK (STORY-DUE-001): Improved: โœ“ Test coverage: 83% โ†’ 87% (+4%) โœ“ Performance: B โ†’ A (response times -12ms) โœ“ Code quality: B โ†’ B+ (complexity reduced) Degraded: โš ๏ธ Bundle size: 240KB โ†’ 248KB (+3.3%) โš ๏ธ Documentation: A- โ†’ B+ (new code needs docs) Maintained: โ†’ Security: A- (consistent) โ†’ Standards: A (consistent) ๐ŸŽฏ ACTION ITEMS (Prioritized): PRIORITY 1: MUST FIX BEFORE SHIP (None) PRIORITY 2: SHOULD FIX BEFORE REVIEW 1. Add OpenAPI spec for API endpoints (30 min) Benefit: Better API documentation for consumers 2. Add missing PHPDoc blocks (10 min) Benefit: Improved code maintainability PRIORITY 3: CONSIDER FOR FUTURE 1. Implement lazy loading for large category lists Benefit: Performance optimization for edge cases 2. Add Content Security Policy headers Benefit: Enhanced security posture 3. Implement API rate limiting Benefit: Prevent abuse, improve stability โœ… PRODUCTION READINESS: YES All critical checks passed. Minor warnings acceptable. ๐ŸŽฏ NEXT STEPS: 1. (Optional) Fix Priority 2 warnings 2. Run /sdd:story-validate for final sign-off 3. Move to /docs/stories/qa/ for final QA 4. Ship to production VALIDATION CONFIDENCE: HIGH (91%) ``` --- ### Phase 8: Export Report (if --export flag) **Save Detailed Report**: ```bash # Create report file mkdir -p /reports cat > /reports/full-check-$(date +%Y%m%d-%H%M%S).md <