| name | devops-advisor |
| description | Audits infrastructure setup — database config, caching, performance, and scaling patterns. Provides concrete detection commands and improvement steps. Use when the user asks about "infrastructure", "database setup", "caching", "scaling", "performance", or "architecture". Don't use for CI/CD setup (use deployment-engineer), monitoring (use monitoring-setup), or security (use security-auditor). |
DevOps Advisor
Assesses infrastructure maturity and provides actionable improvement steps with concrete detection commands.
How It Works
- Run detection commands to understand current infrastructure
- Assess each infrastructure dimension
- Generate prioritized recommendations with effort estimates
- Provide concrete implementation steps
Step-by-Step Procedure
Step 1: Detect Database Setup
grep -rn "prisma\|drizzle\|typeorm\|sequelize\|mongoose\|knex\|sqlalchemy\|diesel" package.json Cargo.toml requirements.txt pyproject.toml 2>/dev/null | head -10
grep -rn "connectionLimit\|pool\|pgbouncer\|connection_pool\|max_connections\|pool_size" --include="*.ts" --include="*.js" --include="*.py" --include="*.toml" . 2>/dev/null | head -10
ls -la prisma/migrations/ migrations/ alembic/ db/migrate/ 2>/dev/null
grep -rn "backup\|pg_dump\|mongodump\|mysqldump" --include="*.yml" --include="*.yaml" --include="*.sh" . 2>/dev/null | head -5
Step 2: Detect Caching Strategy
grep -rn "redis\|upstash\|memcached\|cache-control\|stale-while-revalidate\|@cacheable" --include="*.ts" --include="*.js" --include="*.py" . 2>/dev/null | head -10
grep -rn "cdn\|cloudfront\|cloudflare\|fastly\|images.*remotePatterns" --include="*.ts" --include="*.js" --include="*.json" . 2>/dev/null | head -5
grep -rn "revalidate\|getStaticProps\|getStaticPaths\|generateStaticParams" --include="*.ts" --include="*.tsx" . 2>/dev/null | head -5
Step 3: Detect Performance Setup
grep -rn "next/image\|sharp\|imagemin\|squoosh" --include="*.ts" --include="*.tsx" --include="*.js" package.json 2>/dev/null | head -5
grep -rn "analyze\|webpack-bundle-analyzer\|source-map-explorer\|bundlephobia" package.json 2>/dev/null
grep -rn "dynamic(\|lazy(\|React.lazy\|import(" --include="*.ts" --include="*.tsx" . 2>/dev/null | head -5
ls -lh .next/static/chunks/ 2>/dev/null | tail -5
Step 4: Detect Scaling Readiness
grep -rn "bullmq\|bull\|celery\|sidekiq\|inngest\|trigger.dev\|temporal" package.json requirements.txt 2>/dev/null
grep -rn "session\|cookie-session\|express-session\|JWT_SECRET\|NEXTAUTH" --include="*.ts" --include="*.js" . 2>/dev/null | head -5
cat docker-compose.yml 2>/dev/null | grep -A5 "replicas\|scale\|deploy"
Step 5: Check Database Indexing
grep -rn "@@index\|@@unique" --include="*.prisma" . 2>/dev/null | head -10
grep -rn "CREATE INDEX\|ADD INDEX" --include="*.sql" . 2>/dev/null | head -10
Output Format
## 🏗️ Infrastructure Assessment
### Database
- Connection pooling: {✅/⚠️/❌} {details}
- Migrations: {✅/⚠️/❌} {details}
- Backups: {✅/⚠️/❌} {details}
- Indexing: {✅/⚠️/❌} {details}
### Caching
- Redis/cache layer: {✅/⚠️/❌} {details}
- CDN: {✅/⚠️/❌} {details}
- Static generation: {✅/⚠️/❌} {details}
### Performance
- Image optimization: {✅/⚠️/❌} {details}
- Bundle analysis: {✅/⚠️/❌} {details}
- Code splitting: {✅/⚠️/❌} {details}
### Scaling
- Background jobs: {✅/⚠️/❌} {details}
- Stateless design: {✅/⚠️/❌} {details}
- Horizontal scaling: {✅/⚠️/❌} {details}
### Recommendations (Priority Order)
1. **{Recommendation}** — Impact: {High/Med/Low} — Effort: {Low/Med/High}
Why: {one sentence explaining business impact}
How: {one sentence with concrete first step}
Important
- Prioritize by business impact, not technical elegance
- Explain WHY each recommendation matters in plain English
- Always start with what's ALREADY working before listing gaps
- For databases: connection pooling > indexing > backups > read replicas
- For caching: CDN > static generation > application cache > Redis