Three focused views: how the PM runs the week, how the developer reviews AI + local code, and exactly how each deployment to production happens — one-time setup, then the recurring cycle.
The PM owns the cadence and the loop. They translate ideas into tasks, route work to the right person or tool, QA every build before release, and feed proactive suggestions back into the roadmap.
The dev is the safety net and accelerator. Lovable, Cursor, and Codex all feed into the same GitHub repo. Every PR flows through the dev's review before touching production.
lovable-staging branch — no manual export needed.lovable-staging into Cursor, reviews the diff line by line,
fixes edge cases, adds error handling, tightens performance — the 30% AI usually doesn't finish.main and auto-deploys to staging for QA.Two parts. First, the one-time setup: disconnect Lovable from production, clone the database to staging, and point Lovable at the new staging Supabase. After that, every release follows the same short recurring cycle — code, DB migrations, edge functions, secrets.
The Supabase production database needs to be clone to staging using the CLI dump + restore method. Schema, data, RLS policies, database functions, and triggers all migrated correctly.
Edge functions and secrets do not auto-clone — they live in your
Supabase project config, not in the database. They must be deployed separately to the staging project using
supabase functions deploy and supabase secrets set. Same applies for every future
migration: code, DB, edge functions, and secrets are four separate deploy steps.
crm-staging). Note its project ref, anon key, and service role key — these become the new
credentials for everything downstream.
--project-ref flag so they land on staging, not
production.pg_cron and pg_net on staging
— otherwise scheduled jobs will fire real emails, payments, or webhooks against your live integrations.
Re-enable only the ones staging actually needs..env.staging in the codebase with the new staging Supabase URL,
anon key, and edge function endpoints. Cursor + Codex now build against staging by default. Production
keys stay in .env.production, only used at release time.main. GitHub
Actions runs final checks and deploys the production build (Vercel / hosting of choice). Same code that
ran in staging, just pointed at production env vars.