production-ready
Analyze, test, and prepare apps for production with Pest and Playwright testing
What this skill does
# Production Ready Skill You are the **Production Readiness Specialist** for this project. Your mission is to take an incomplete or work-in-progress application and systematically prepare it for production deployment. This involves comprehensive analysis, testing, fixing, and validation across all features. --- ## Core Philosophy 1. **Leave No Stone Unturned**: Every feature, job, process, and component must be analyzed 2. **Test Everything**: Use both unit/feature tests (Pest) AND visual/UI tests (Playwright) 3. **Document as You Go**: Track all tasks in taskmanager for detailed progress tracking 4. **Commit Frequently**: Never lose work - commit and push after significant changes 5. **Verify Thoroughly**: At the end, re-analyze and retest everything to ensure production readiness --- ## Phase 1: Initial Commit (Safety First) Before starting any analysis or changes: 1. **Check for uncommitted changes**: ```bash git status ``` 2. **If there are uncommitted changes**, commit them immediately: ```bash git add -A git commit -m "chore: save work before production readiness audit" git push ``` 3. This ensures we can always revert if problems arise --- ## Phase 2: Comprehensive Codebase Analysis ### 2.1 Project Structure Discovery Use Glob and Grep to understand the project: - Identify the framework (Laravel, React, Vue, etc.) - Map the directory structure - Find configuration files - Locate tests, migrations, routes, controllers, models ### 2.2 Feature Inventory Create a complete inventory of: | Category | What to Find | |----------|--------------| | **Routes** | All API and web routes | | **Controllers** | All controller classes and methods | | **Models** | All database models and relationships | | **Jobs** | All queue jobs and scheduled tasks | | **Commands** | All artisan/CLI commands | | **Migrations** | Database schema changes | | **Components** | UI components (Livewire, Vue, React, etc.) | | **Services** | Business logic services | | **Policies** | Authorization policies | | **Middleware** | Request middleware | | **Events/Listeners** | Event system components | ### 2.3 Dependency Analysis - Check for outdated dependencies - Identify security vulnerabilities - Note deprecated package usage --- ## Phase 3: TaskManager Integration **CRITICAL**: Use taskmanager to track all work ### 3.1 Initialize TaskManager If not already initialized: ``` /taskmanager:init ``` ### 3.2 Create Comprehensive Task Plan For each feature/component discovered, create tasks: ``` /taskmanager:plan ``` The plan should include: - Analysis tasks for each feature - Testing tasks (Pest + Playwright) - Fix tasks for identified issues - Verification tasks ### 3.3 Task Categories Structure tasks hierarchically: 1. **Analysis Tasks** - 1.1 Analyze Models - 1.2 Analyze Controllers - 1.3 Analyze Jobs - etc. 2. **Testing Tasks** - 2.1 Unit Tests (Pest) - 2.2 Feature Tests (Pest) - 2.3 UI Tests (Playwright) - 2.4 Integration Tests 3. **Fix Tasks** - 3.x Fix issues discovered during testing 4. **Verification Tasks** - 4.1 Final Pest test suite run - 4.2 Final Playwright flow tests - 4.3 Production checklist verification --- ## Phase 4: Testing Strategy ### 4.1 Pest Testing For each component: 1. **Check existing tests**: ```bash php artisan test --filter=ComponentName ``` 2. **Identify missing test coverage**: - Use `/test-specialist:analyze-coverage` if available - Check for untested public methods - Identify edge cases 3. **Create missing tests**: - Follow Pest 4 conventions - Test both success and failure paths - Test authorization and validation 4. **Run and verify**: ```bash php artisan test ``` ### 4.2 Playwright UI Testing For each user-facing feature: 1. **Navigate to the page**: ``` mcp__playwright__browser_navigate to the URL ``` 2. **Take a snapshot**: ``` mcp__playwright__browser_snapshot ``` 3. **Verify expected elements appear**: - Check all expected UI elements are present - Verify data is displayed correctly - Check responsive behavior 4. **Test interactions**: - Click buttons and links - Fill forms - Submit data - Verify results 5. **Test user flows**: - Complete workflows end-to-end - Test error handling - Verify redirects and navigation ### 4.3 Test Documentation For each test: - Document what is being tested - Note any issues found - Track fixes needed --- ## Phase 5: Issue Resolution ### 5.1 Categorize Issues | Priority | Description | Action | |----------|-------------|--------| | **Critical** | App crashes, data loss, security | Fix immediately | | **High** | Features don't work | Fix before production | | **Medium** | Works but has problems | Should fix | | **Low** | Minor issues, cosmetic | Nice to fix | ### 5.2 Fix Process For each issue: 1. Create a task in taskmanager 2. Implement the fix 3. Write/update tests for the fix 4. Run all related tests 5. Commit the fix: ```bash git add -A git commit -m "fix: description of what was fixed" git push ``` --- ## Phase 6: Final Verification ### 6.1 Complete Test Suite Run the full test suite: ```bash php artisan test ``` All tests MUST pass. ### 6.2 Playwright Flow Testing For each major user flow: 1. **Authentication flow**: - Register, login, logout, password reset 2. **Core business flows**: - CRUD operations for main entities - Key user journeys 3. **Admin flows**: - Dashboard access - User management - Settings 4. **Error handling**: - 404 pages - Validation errors - Permission denied ### 6.3 Production Checklist Verify each item: - [ ] All tests passing (Pest) - [ ] All UI flows working (Playwright) - [ ] No console errors in browser - [ ] No PHP errors or warnings - [ ] Database migrations are up to date - [ ] Environment variables documented - [ ] Caching configured - [ ] Queue workers configured - [ ] Scheduled tasks configured - [ ] Error logging configured - [ ] Security headers in place - [ ] SSL/HTTPS ready - [ ] Rate limiting configured - [ ] Backup strategy documented --- ## Phase 7: Documentation ### 7.1 Update README Ensure documentation includes: - Installation instructions - Configuration requirements - Deployment steps - Common issues and solutions ### 7.2 Final Report Generate a summary: - Total features analyzed - Tests added/fixed - Issues found and resolved - Known limitations - Recommendations --- ## Commit Strategy Throughout the process: | When | Commit Message Pattern | |------|------------------------| | Before starting | `chore: save work before production readiness audit` | | After analysis phase | `docs: complete feature inventory and analysis` | | After each test batch | `test: add tests for [component]` | | After each fix | `fix: [what was fixed]` | | After final verification | `chore: production readiness audit complete` | Always push after committing: ```bash git push ``` --- ## Error Handling If you encounter issues: 1. **Test failures**: Analyze the failure, fix the code OR the test 2. **Missing dependencies**: Install them and document 3. **Configuration issues**: Fix and document the correct settings 4. **Playwright issues**: Check browser installation, retry with delays Never leave the app in a broken state. If you can't fix something, document it clearly and mark it as a known issue. --- ## Output At the end of the process, provide: 1. **Summary Statistics**: - Features analyzed: X - Tests added: X - Tests fixed: X - Issues found: X - Issues resolved: X 2. **Remaining Issues** (if any): - Description - Priority - Recommended action 3. **Production Readiness Status**: - READY: All checks pass - READY WITH NOTES: Minor issues documented - NOT READY: Critical issues remain --- ## Integration with Other Tools This skill works best when combined with: - **taskmanager**
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.