Transform applications into production-ready deployments with systematic analysis, improvement, and framework-specific optimization
disable-model-invocation
true
context
fork
agent
general-purpose
Productionize App Agent Rules
When asked to productionize an application for deployment:
Overview
Transform development code into production-ready applications through systematic, methodical analysis, improvement, and deployment preparation. Supports multiple frameworks and deployment targets.
Quality Over Speed Mandate: Take time to be thorough and comprehensive. Focus on quality implementation over rapid completion. This is production-critical work that requires careful attention to detail.
Usage Patterns
/cmd-productionize # Auto-detect framework, general production prep
/cmd-productionize flutter testflight # Flutter app for TestFlight
/cmd-productionize react vercel # React app for Vercel deployment
/cmd-productionize nodejs docker # Node.js app for Docker deployment
/cmd-productionize python heroku
/cmd-productionize vue netlify
# Python app for Heroku
# Vue app for Netlify
Workflow
1. Initial Analysis & Planning
Always start with TodoWrite tool to create a comprehensive task list
Breadth AND Depth Navigation: Look beyond immediate scope to understand:
Related systems that might be affected
Broader architectural implications
Integration points and dependencies
Edge cases and potential failure modes
Long-term maintenance considerations
Analyze codebase structure and identify the framework/stack
Create systematic task breakdown covering all productionization phases
Proactive Question Analysis: Identify critical production questions the user hasn't asked yet
2. Codebase Analysis Phase
Architecture review: Analyze project structure, dependencies, and patterns with methodical thoroughness
Comprehensive Production Readiness Audit: Systematically identify potential issues:
Hardcoded values and missing environment configurations
Missing error handling and edge case coverage
Performance bottlenecks and optimization opportunities
Security vulnerabilities and data exposure risks
Missing caching and state management
API pagination and data fetching issues
UI/UX polish and accessibility concerns
Rate limiting and abuse protection
Offline support and network failure handling
Data validation and sanitization
Memory leaks and resource cleanup
Cross-platform compatibility issues
Third-party service dependencies and fallbacks
Framework-specific checks: Apply framework-appropriate best practices with deep domain knowledge
Critical Questions Analysis: Document what production concerns the user should consider but hasn't addressed
3. Implementation Phase
Execute improvements systematically with methodical attention to detail, updating TodoWrite progress frequently:
Quality Focus: Each implementation step should be thorough and well-tested. Don't rush through tasks - take time to implement robust, production-grade solutions.
# Project Name - Production Ready_Brief compelling description with value proposition_## Quick Start- One-command setup instructions
- Environment requirements
- Configuration steps
## Features- Core functionality overview
- Production-ready capabilities
- Toggle configurations
## Deployment- Platform-specific deployment guides
- Environment variable setup
- Testing and validation steps
## Development- Local development setup
- Testing procedures
- Contributing guidelines
## Architecture- High-level system overview
- Key design decisions
- Production considerations
Additional Documentation
Deployment checklists for each target platform
API documentation if applicable
Troubleshooting guides
Performance optimization notes
6. Deployment Preparation Phase
TestFlight (iOS)
Verify App Store Connect configurations
Test provisioning profiles and certificates
Validate Info.plist settings
Create build and upload scripts
Prepare app description and screenshots
Google Play (Android)
Configure Play Console settings
Test signing configurations
Validate manifest permissions
Create release notes and store listing
Test different device configurations
Web Deployment (Vercel/Netlify/AWS)
Configure build scripts and environment variables
Set up domain and SSL certificates
Test deployment pipeline
Configure CDN and caching headers
Set up monitoring and analytics
Container Deployment (Docker/Kubernetes)
Create optimized Dockerfiles
Configure health checks and resource limits
Set up environment variable management
Test scaling and load balancing
Configure logging and monitoring
7. Quality Assurance Checklist
Before marking productionization complete:
All configurations are environment-aware
Error handling covers edge cases
Caching is implemented and tested
Performance is optimized for target platforms
Security best practices are followed
Documentation is comprehensive and accurate
Deployment process is tested and reliable
Monitoring and logging are configured
User experience is polished and accessible
All TodoWrite tasks are completed
8. Proactive Question Analysis & Next Steps
After completing productionization, ALWAYS provide:
Critical Questions the User Should Have Asked
Systematically identify and present production concerns the user hasn't considered:
Example Framework-Specific Questions:
Flutter: "Have you considered rate limiting for API calls? What happens when the device goes offline? How will you handle app store review rejections?"
React/Web: "What's your strategy for SEO and social media previews? How will you handle bot traffic? What about GDPR compliance for user data?"
Node.js: "How will you monitor server health in production? What's your database backup strategy? How will you handle traffic spikes?"
Python: "What's your strategy for handling memory leaks in long-running processes? How will you manage database migrations in production?"
Actionable Next Steps Checklist
Provide a prioritized, concrete list of post-productionization actions:
## Immediate Next Steps (Complete within 48 hours)1. [ ] Test deployment pipeline end-to-end in staging environment
2. [ ] Set up monitoring alerts for critical metrics
3. [ ] Create rollback procedures and test them
4. [ ] Validate all environment variables are properly configured
## Short-term (Complete within 1 week)1. [ ] Implement comprehensive logging for production debugging
2. [ ] Set up automated backup procedures
3. [ ] Create incident response playbook
4. [ ] Conduct load testing with realistic traffic patterns
## Medium-term (Complete within 1 month)1. [ ] Establish performance benchmarking and alerting
2. [ ] Implement A/B testing framework if applicable
3. [ ] Create comprehensive user documentation
4. [ ] Plan for scaling based on usage growth projections