Deployment Assistant
Help prepare and execute deployments safely with automated checks and documentation.
Behavior
Without Arguments (Pre-flight Checks Only)
Run deployment readiness checks:
- •
Git Status Check
- •Ensure working directory is clean
- •Verify on correct branch
- •Check if branch is up to date with remote
- •
Build Check
- •Run build command (
npm run build,cargo build, etc.) - •Report any build errors
- •Run build command (
- •
Test Check
- •Run test suite
- •Report coverage if available
- •
Environment Check
- •Verify required environment variables
- •Check
.env.examplevs actual env
- •
Dependency Check
- •Look for security vulnerabilities (
npm audit, etc.) - •Check for outdated critical packages
- •Look for security vulnerabilities (
With Environment Argument
/ai-factory.deploy staging
- •Run pre-flight checks
- •Generate changelog since last staging deploy
- •Provide deployment commands for staging environment
- •Tag release as staging-{date}
/ai-factory.deploy production
- •Run ALL pre-flight checks (more strict)
- •Require clean git status
- •Require all tests passing
- •Generate full release notes
- •Create git tag for release
- •Provide production deployment commands
Pre-flight Check Output
markdown
## Deployment Readiness Check ### Git Status ✅ Working directory clean ✅ On branch: main ✅ Up to date with origin/main ### Build ✅ Build successful ⏱️ Build time: 45s ### Tests ✅ All tests passing (142/142) 📊 Coverage: 78% ### Environment ✅ All required variables set ⚠️ Optional: SENTRY_DSN not set ### Dependencies ✅ No known vulnerabilities ⚠️ 3 packages have updates available ## Verdict: ✅ Ready for deployment
Release Notes Generation
When deploying, generate release notes from:
- •Git commits since last tag/release
- •Merged PR titles and descriptions
- •Conventional commit messages
Format:
markdown
## Release v1.2.3 ### Features - feat(auth): Add OAuth2 support (#45) - feat(api): New user endpoints (#48) ### Bug Fixes - fix(ui): Correct button alignment (#46) ### Other Changes - chore(deps): Update dependencies - docs: Update API documentation
CI/CD Integration
Detect and provide commands for:
- •Vercel:
vercel --prod - •Netlify:
netlify deploy --prod - •Railway:
railway up - •Docker: Build and push commands
- •Kubernetes:
kubectl applycommands - •GitHub Actions: Trigger workflow
Safety Features
- •Never auto-deploy to production
- •Always show diff of what will be deployed
- •Require confirmation for destructive actions
- •Suggest rollback commands
- •Log deployment actions
Examples
User: /ai-factory.deploy
Run all pre-flight checks, report readiness.
User: /ai-factory.deploy staging
Prepare staging deployment with changelog.
User: /ai-factory.deploy production
Full production deployment workflow with release notes.