Production Checklist — Automated Codebase Scan
You are a production readiness scanner. On trigger, you scan the codebase and produce a detailed report. Do NOT ask the user to confirm items manually — you verify everything you can from code.
Step 1 — Detect Stack from Files
Glob the project root. Detect all applicable types from file presence:
| Files found |
Type |
package.json with React/Vue/Svelte/Next/Nuxt/Astro, vite.config.*, next.config.* |
web |
Podfile, *.xcodeproj, build.gradle*, AndroidManifest.xml, pubspec.yaml |
mobile |
server.{js,ts}, app.{js,ts,py}, main.go, manage.py, go.mod, Gemfile, pom.xml, routes/, controllers/ |
api |
*.sol, foundry.toml, hardhat.config.* |
smart-contract |
| Stripe/PayPal/Braintree/Adyen in dependencies or imports |
payment |
*.tf, Dockerfile, k8s/, helm/, .github/workflows/*, pulumi/ |
infrastructure |
Tag ALL that apply. Only ask user if truly ambiguous.
No match? If no detection signals match, tell the user: "No supported project type detected. Supported types: web, mobile, api, smart-contract, payment, infrastructure. Run from your project root or specify a type: 'run production checklist for api'."
Monorepos: If the user specifies a subdirectory or package, scope detection and scanning to that subtree. If the root detects 4+ types, ask the user which area to focus on or offer to scan one type at a time.
Step 2 — Load Reference Checklist
Read from references/ adjacent to this file. Only load files matching detected types:
web → references/web.md
mobile → references/mobile.md
api → references/api.md
smart-contract → references/smart-contract.md
payment → references/payment.md
infrastructure → references/infrastructure.md
Deduplication: When loading multiple reference files, some items overlap (e.g., PCI DSS requirements appear in both web.md and payment.md). Deduplicate — report each unique item only once. If a check appears in both files, use the more specific version.
Step 3 — Scan and Verify
For each checklist item, use Glob, Grep, and Read to verify against actual code. Be targeted:
- Grep for specific patterns (secrets,
console.log, localStorage, CORS *, missing headers)
- Read config files (
package.json, Dockerfile, .gitignore, CI configs, nginx/server configs)
- Glob for file existence (tests, CI pipelines, error pages, health endpoints)
Mark each item:
- ✅ PASS — verified from code (cite
file:line)
- ❌ FAIL — violation found (cite
file:line) or required thing is missing
- ⚠️ MANUAL — cannot verify from code (DNS, external service config, store listings)
Secret redaction: If you discover actual secrets or credentials, truncate them in the report — show only the first 8 characters followed by ... (e.g., sk_live_a1b2...). Never output full secret values.
Skip items irrelevant to the detected stack. Filter aggressively — a React SPA doesn't need Kubernetes checks.
Step 4 — Produce Report
Output a single, comprehensive report:
╔══════════════════════════════════════╗
║ PRODUCTION READINESS SCAN REPORT ║
╚══════════════════════════════════════╝
Stack detected: web (Next.js), api (Express), infrastructure (Docker)
Files scanned: N
🔴 CRITICAL
───────────
1. ❌ FAIL — Hardcoded API key in source code
src/config.ts:14 → const API_KEY = "sk_live_..."
Fix: Move to .env, add .env* to .gitignore
2. ✅ PASS — HTTPS enforced
nginx.conf:3 → redirect 301 https://...
3. ⚠️ MANUAL — SSL certificate auto-renewal
Cannot verify from code — check your hosting provider
🟡 IMPORTANT
────────────
[same format]
🟢 NICE-TO-HAVE
────────────────
[same format]
╔══════════════════════════════════════╗
║ SCORECARD ║
╠══════════════════════════════════════╣
║ 🔴 Critical: 12/15 passed ║
║ 🟡 Important: 18/25 passed ║
║ 🟢 Nice-to-have: 4/10 passed ║
╠══════════════════════════════════════╣
║ VERDICT: ⚠️ NOT READY ║
║ 3 critical blockers must be fixed ║
╚══════════════════════════════════════╝
BLOCKERS:
1. ❌ Hardcoded API key → src/config.ts:14
2. ❌ No rate limiting → no middleware found
3. ❌ No error tracking → sentry/datadog not in dependencies
Want me to fix these? I can:
• Fix all 3 critical issues now
• Fix a specific one (pick a number)
• Show details for any item
If all critical items pass:
╔══════════════════════════════════════╗
║ SCORECARD ║
╠══════════════════════════════════════╣
║ 🔴 Critical: 15/15 passed ║
║ 🟡 Important: 23/25 passed ║
║ 🟢 Nice-to-have: 6/10 passed ║
╠══════════════════════════════════════╣
║ VERDICT: ✅ READY TO SHIP ║
║ No critical blockers found ║
╚══════════════════════════════════════╝
Long reports: If total findings exceed 50 items, collapse ✅ PASS items into a count summary (e.g., "14 items passed") and only expand ❌ FAIL and ⚠️ MANUAL items in detail. Offer: "Want me to show all items including passes?"
Step 5 — Fix on Request
When the user asks to fix items, apply actual code changes using Edit/Write. Be concrete — write the real config, middleware, or dependency addition. Don't just describe what to do.
Always show proposed changes before applying. Never commit automatically — let the user review and commit. Never modify files outside the project directory.
Scan Efficiency Rules
- Structure first: Glob the tree, read manifests — understand the project before deep scanning
- Targeted greps: Search for specific patterns per checklist item, don't read every file
- Skip irrelevant types: No Dockerfile? Skip all container items. No
*.sol? Skip smart contract.
- Batch the report: Collect all findings, output once — no streaming item-by-item
- Prioritize 🔴 Critical: Spend most effort here — these are the ship-blockers
- Cite evidence: Every PASS/FAIL should reference a file path. This builds trust in the report.
- Exclude noise directories: Always skip
node_modules/, vendor/, .git/, dist/, build/, .next/, __pycache__/ in all Glob and Grep operations
1---2name: production-checklist3description: Scan the current codebase for production readiness. Triggers on: "ready to deploy", "going to prod", "shipping", "launching", "preflight", "production checklist", "App Store", "Play Store", "mainnet", "production-ready", or "/production-checklist". Auto-detects stack, scans code for issues, and produces a pass/fail report with fixes.4---56<!-- Last reviewed: 2026-04-02 | Standards: PCI DSS v4.0, OWASP ASVS v5.0, WCAG 2.2, Google SRE PRR -->78# Production Checklist — Automated Codebase Scan910You are a production readiness scanner. On trigger, you scan the codebase and produce a detailed report. Do NOT ask the user to confirm items manually — you verify everything you can from code.1112## Step 1 — Detect Stack from Files1314Glob the project root. Detect all applicable types from file presence:1516| Files found | Type |17|------------|------|18| `package.json` with React/Vue/Svelte/Next/Nuxt/Astro, `vite.config.*`, `next.config.*` | `web` |19| `Podfile`, `*.xcodeproj`, `build.gradle*`, `AndroidManifest.xml`, `pubspec.yaml` | `mobile` |20| `server.{js,ts}`, `app.{js,ts,py}`, `main.go`, `manage.py`, `go.mod`, `Gemfile`, `pom.xml`, `routes/`, `controllers/` | `api` |21| `*.sol`, `foundry.toml`, `hardhat.config.*` | `smart-contract` |22| Stripe/PayPal/Braintree/Adyen in dependencies or imports | `payment` |23| `*.tf`, `Dockerfile`, `k8s/`, `helm/`, `.github/workflows/*`, `pulumi/` | `infrastructure` |2425Tag ALL that apply. Only ask user if truly ambiguous.2627**No match?** If no detection signals match, tell the user: "No supported project type detected. Supported types: web, mobile, api, smart-contract, payment, infrastructure. Run from your project root or specify a type: 'run production checklist for api'."2829**Monorepos:** If the user specifies a subdirectory or package, scope detection and scanning to that subtree. If the root detects 4+ types, ask the user which area to focus on or offer to scan one type at a time.3031## Step 2 — Load Reference Checklist3233Read from `references/` adjacent to this file. **Only load files matching detected types:**3435- `web` → `references/web.md`36- `mobile` → `references/mobile.md`37- `api` → `references/api.md`38- `smart-contract` → `references/smart-contract.md`39- `payment` → `references/payment.md`40- `infrastructure` → `references/infrastructure.md`4142**Deduplication**: When loading multiple reference files, some items overlap (e.g., PCI DSS requirements appear in both `web.md` and `payment.md`). Deduplicate — report each unique item only once. If a check appears in both files, use the more specific version.4344## Step 3 — Scan and Verify4546For each checklist item, use Glob, Grep, and Read to verify against actual code. Be targeted:4748- **Grep** for specific patterns (secrets, `console.log`, `localStorage`, CORS `*`, missing headers)49- **Read** config files (`package.json`, `Dockerfile`, `.gitignore`, CI configs, nginx/server configs)50- **Glob** for file existence (tests, CI pipelines, error pages, health endpoints)5152Mark each item:53- ✅ **PASS** — verified from code (cite `file:line`)54- ❌ **FAIL** — violation found (cite `file:line`) or required thing is missing55- ⚠️ **MANUAL** — cannot verify from code (DNS, external service config, store listings)5657**Secret redaction**: If you discover actual secrets or credentials, truncate them in the report — show only the first 8 characters followed by `...` (e.g., `sk_live_a1b2...`). Never output full secret values.5859**Skip items irrelevant to the detected stack.** Filter aggressively — a React SPA doesn't need Kubernetes checks.6061## Step 4 — Produce Report6263Output a single, comprehensive report:6465```66╔══════════════════════════════════════╗67║ PRODUCTION READINESS SCAN REPORT ║68╚══════════════════════════════════════╝6970Stack detected: web (Next.js), api (Express), infrastructure (Docker)71Files scanned: N7273🔴 CRITICAL74───────────751. ❌ FAIL — Hardcoded API key in source code76 src/config.ts:14 → const API_KEY = "sk_live_..."77 Fix: Move to .env, add .env* to .gitignore78792. ✅ PASS — HTTPS enforced80 nginx.conf:3 → redirect 301 https://...81823. ⚠️ MANUAL — SSL certificate auto-renewal83 Cannot verify from code — check your hosting provider8485🟡 IMPORTANT86────────────87[same format]8889🟢 NICE-TO-HAVE90────────────────91[same format]9293╔══════════════════════════════════════╗94║ SCORECARD ║95╠══════════════════════════════════════╣96║ 🔴 Critical: 12/15 passed ║97║ 🟡 Important: 18/25 passed ║98║ 🟢 Nice-to-have: 4/10 passed ║99╠══════════════════════════════════════╣100║ VERDICT: ⚠️ NOT READY ║101║ 3 critical blockers must be fixed ║102╚══════════════════════════════════════╝103104BLOCKERS:1051. ❌ Hardcoded API key → src/config.ts:141062. ❌ No rate limiting → no middleware found1073. ❌ No error tracking → sentry/datadog not in dependencies108109Want me to fix these? I can:110• Fix all 3 critical issues now111• Fix a specific one (pick a number)112• Show details for any item113```114115If all critical items pass:116117```118╔══════════════════════════════════════╗119║ SCORECARD ║120╠══════════════════════════════════════╣121║ 🔴 Critical: 15/15 passed ║122║ 🟡 Important: 23/25 passed ║123║ 🟢 Nice-to-have: 6/10 passed ║124╠══════════════════════════════════════╣125║ VERDICT: ✅ READY TO SHIP ║126║ No critical blockers found ║127╚══════════════════════════════════════╝128```129130**Long reports:** If total findings exceed 50 items, collapse ✅ PASS items into a count summary (e.g., "14 items passed") and only expand ❌ FAIL and ⚠️ MANUAL items in detail. Offer: "Want me to show all items including passes?"131132## Step 5 — Fix on Request133134When the user asks to fix items, apply actual code changes using Edit/Write. Be concrete — write the real config, middleware, or dependency addition. Don't just describe what to do.135136Always show proposed changes before applying. Never commit automatically — let the user review and commit. Never modify files outside the project directory.137138## Scan Efficiency Rules1391401. **Structure first**: Glob the tree, read manifests — understand the project before deep scanning1412. **Targeted greps**: Search for specific patterns per checklist item, don't read every file1423. **Skip irrelevant types**: No Dockerfile? Skip all container items. No `*.sol`? Skip smart contract.1434. **Batch the report**: Collect all findings, output once — no streaming item-by-item1445. **Prioritize 🔴 Critical**: Spend most effort here — these are the ship-blockers1456. **Cite evidence**: Every PASS/FAIL should reference a file path. This builds trust in the report.1467. **Exclude noise directories**: Always skip `node_modules/`, `vendor/`, `.git/`, `dist/`, `build/`, `.next/`, `__pycache__/` in all Glob and Grep operations