Advanced prompting strategies for senior developers and complex projects
Design entire system architectures with AI by describing high-level requirements and constraints.
"Design a scalable e-commerce platform architecture that handles 100k+ users. Requirements: • Microservices architecture with API gateway • Event-driven communication between services • CQRS pattern for order management • Redis for caching and sessions • PostgreSQL for transactional data • Elasticsearch for product search • CDN for static assets • Docker containers with Kubernetes orchestration Non-functional requirements: • 99.9% uptime • Sub-200ms API response times • PCI compliance for payments • GDPR compliance for user data • Auto-scaling based on load Generate: 1. System architecture diagram 2. Service boundaries and responsibilities 3. Data flow diagrams 4. Deployment pipeline 5. Monitoring and observability strategy"
Generate comprehensive test suites alongside application code for robust, maintainable systems.
"Build a user authentication system using TDD principles. Requirements: • JWT-based authentication • Password hashing with bcrypt • Email verification • Password reset functionality • Rate limiting for security For each feature, generate: 1. Unit tests (Jest/Vitest) 2. Integration tests 3. End-to-end tests (Playwright) 4. Security tests 5. Performance tests Test coverage should be 95%+. Include edge cases, error scenarios, and security attack vectors. Make tests readable and maintainable with clear descriptions."
Transform existing codebases with AI assistance while maintaining functionality and improving architecture.
"Refactor this legacy jQuery application to modern React with TypeScript. [Paste your legacy code here] Refactoring goals: • Convert to functional React components with hooks • Add TypeScript for type safety • Implement proper state management (Context/Redux) • Replace jQuery DOM manipulation with React patterns • Add error boundaries and loading states • Implement proper testing • Maintain existing functionality exactly Provide: 1. Step-by-step migration plan 2. Refactored code with explanations 3. Test coverage for new implementation 4. Performance comparison 5. Deployment strategy for zero-downtime migration"
Identify and resolve performance bottlenecks with AI-guided analysis and optimization strategies.
"Analyze and optimize this React application for performance. [Paste your component code] Performance goals: • Lighthouse score 95+ • First Contentful Paint < 1.5s • Largest Contentful Paint < 2.5s • Cumulative Layout Shift < 0.1 • Time to Interactive < 3.5s Optimization areas: • Bundle size reduction • Code splitting and lazy loading • Image optimization • Caching strategies • Database query optimization • API response optimization • Memory leak prevention Provide specific optimizations with before/after metrics and implementation details."
Build security-first applications with comprehensive threat modeling and protection strategies.
"Implement comprehensive security for a financial application. Security requirements: • OWASP Top 10 protection • Multi-factor authentication • API rate limiting and DDoS protection • SQL injection prevention • XSS and CSRF protection • Data encryption at rest and in transit • Audit logging and monitoring • Secure session management • Input validation and sanitization • Security headers implementation Generate: 1. Threat model and risk assessment 2. Security architecture diagram 3. Implementation code with security controls 4. Security testing procedures 5. Incident response plan 6. Compliance documentation (SOX, PCI DSS)"
Create production-ready APIs with comprehensive documentation and developer experience.
"Design a RESTful API for a social media platform with excellent DX. API requirements: • RESTful design with clear resource modeling • OpenAPI 3.0 specification • Consistent error handling • Pagination for large datasets • Filtering, sorting, and searching • Versioning strategy • Rate limiting with clear feedback • Comprehensive documentation • SDK generation for multiple languages • Interactive API explorer Generate: 1. Complete OpenAPI specification 2. Implementation with validation 3. Error handling middleware 4. Documentation website 5. SDK examples (JavaScript, Python, Go) 6. Testing suite with example requests 7. Developer onboarding guide"