AI-Assisted Deployment
Using AI agents for deployment configuration and troubleshooting
The codebase includes deployment context files that help AI agents configure and troubleshoot deployments. This guide explains how to work with AI on deployment tasks.
Pro Tip
AI agents read llms/commands/deploy.md
for deployment workflows. Referencing this file helps AI set up deployments correctly.
Context Files for AI
llms/commands/deploy.md
Deployment workflow guide covering:
- Pre-deployment validation (
pnpm validate
) - Platform-specific build configurations
- Environment variable requirements
- Post-deployment verification steps
When working with AI on deployment:
"Read llms/commands/deploy.md and help me deploy to Vercel"
Effective AI Prompts
Clear and Specific
Common AI Workflows
Initial Deployment Setup
1. "Read llms/commands/deploy.md"
2. "Configure Vercel deployment for apps/marketing"
3. "List all required environment variables"
4. "Create deployment checklist"
AI will generate platform-specific configuration and environment variable lists.
Troubleshooting Build Failures
"The Vercel build is failing with 'Module not found: @workspace/ui'.
Read the build logs and suggest fixes."
AI will analyze error messages and suggest configuration changes.
Environment Variable Setup
"List all required environment variables for production deployment.
Include BetterAuth, Convex, and UseAutumn configuration."
Validation After AI Configuration
Verify Build Command
Check that AI used correct monorepo build command:
# Should be:
cd ../.. && pnpm turbo run build --filter=marketing
# Not:
pnpm build
Check Root Directory
Verify root directory points to correct app:
For marketing: apps/marketing
For dashboard: apps/dashboard
Validate Environment Variables
Ensure all required variables are set: APP_BASE_URL
, DASHBOARD_BASE_URL
, NEXT_PUBLIC_CONVEX_URL
, BETTER_AUTH_SECRET
, GOOGLE_CLIENT_ID
, GOOGLE_CLIENT_SECRET
, AUTUMN_SECRET_KEY
.
Common AI Mistakes
Best Practices with AI
1. Reference Deployment Context
"Read llms/commands/deploy.md and..."
Ensures AI follows established deployment patterns.
2. Specify Platform
"Deploy to Vercel..." or "Configure for AWS Amplify..."
Be explicit about target platform.
3. Request Checklist
"Create a deployment checklist for production"
AI will generate step-by-step verification list.
4. Validate Configuration
Always review AI-generated configuration before deploying. Check:
- Build commands use Turbo with
--filter
- Root directory points to correct app
- Environment variables include all required values
- OAuth callbacks updated for production domain
Deployment Checklist for AI
When AI configures deployment, verify:
- Build command uses monorepo Turbo pattern
- Root directory set to
apps/marketing
orapps/dashboard
- Install command includes
--prod=false
- All required environment variables configured
- Convex environment variables synced
- OAuth provider callbacks updated
-
pnpm validate
passes locally - Post-deployment health checks planned
Templates for AI
Point AI to these patterns:
Vercel Deployment
Git-integrated deployment with automatic previews
AWS Deployment
Amplify, ECS, or Lambda deployment options
Netlify Deployment
Edge functions and form handling
Release Checklist
Pre-deployment security verification
Related Documentation
- Overview - Deployment strategy overview
- Release Checklist - Security verification
- Vercel - Vercel deployment guide
- AWS - AWS deployment options