Skip to main content

Knowledge > Runbooks > Agent Ops > Pre-Deployment Checklist

Pre-Deployment Checklist

Run through every item on this list before merging to the deploy branch and triggering a production deployment. Fix ALL issues — never defer.

Prerequisites

  • Feature branch checked out with all changes committed
  • Tests passing locally (if applicable)

Checklist

Build and Type Safety

  • pnpm build passes with zero errors
    cd /c/dev/churchwiseai-web # or pewsearch/web or sermon-illustrations
    pnpm build
  • No TypeScript errors (tsc --noEmit if not caught by build)
  • No ESLint errors that could affect production behavior
  • No new console.error or unhandled promise rejections in production code paths

Client/Server Boundary (Next.js)

  • No server-only modules imported from 'use client' components
  • No process.env.SECRET_* variables referenced in client components
  • Client-safe types and constants use premium-shared.ts (or equivalent) — not imported directly from server modules

Database Safety

  • No new Supabase queries are missing the directory_visible = true filter on churches
  • No new queries fetch unlimited rows from large tables (always use .range() pagination)
  • Any new write operations (INSERT/UPDATE/DELETE) have founder approval if affecting production data
  • Migration file committed to pewsearch/migrations/ if schema changed

Security

  • No API keys, secrets, or tokens committed to the code (check git diff before push)
  • New API routes require appropriate authentication before returning sensitive data
  • No RLS policies weakened or bypassed without explicit intent

Marketing Copy and Product Claims

If you changed any marketing page, landing page, or UI making product claims:

  • Verified all feature claims against knowledge/data/features.yaml
  • Verified all pricing figures against knowledge/data/pricing.yaml or PRICING.md
  • Verified claims against live product_knowledge table:
    SELECT question, answer FROM product_knowledge WHERE is_active = true ORDER BY priority DESC;
  • Church count uses 218K (visible), not 261K (total) — if mentioned anywhere

Environment Variables

  • All new environment variables have been added to Vercel production:
    echo "value" | vercel env add NEW_VAR_NAME production
  • Env var names follow the project's existing naming conventions
  • No env vars reference localhost URLs in production values

Knowledge Documentation

  • Ran pnpm derive --check from C:\dev\knowledge\ — no drift detected
    cd /c/dev/knowledge && pnpm derive --check
  • Knowledge docs that reference changed code files have been updated (same commit)
  • product_knowledge table updated if flows, pricing, or features changed

Git Safety

  • Working on a feature branch (NOT directly on main/master)
  • git fetch origin && git rebase origin/main completed (or origin/master)
  • No merge conflicts left unresolved
  • Commit messages are clear and follow the portfolio convention

Decision Log

  • C:\dev\DECISION_LOG.md updated if this change involves a significant decision, technology choice, or newly discovered constraint

QA Review

  • Ran through C:\dev\QA_CHECKLIST.md fully (all 9 sections)
  • Tested as a user, not just an engineer — does it make sense? Is the data correct?
  • Tested at least one edge case persona (tiny church, new visitor, no KB content)

After Deploying

  • Vercel deployment succeeded (check Vercel dashboard or vercel logs)
  • Spot-check the deployed pages that were changed — fetch them directly, don't trust dev server
  • No new P0 errors appear in ops_error_reports within 15 minutes of deployment
    SELECT * FROM ops_error_reports
    WHERE severity = 'P0' AND created_at > now() - interval '15 minutes';

See Also