Deploy to Production
Deployment Process
Verify -> Build;
Build -> Docker;
Docker -> Push;
Push -> Deploy;
Deploy -> Check;
Check -> Success [label="Health OK"];
Check -> Rollback [label="Errors"];
Rollback -> Verify [label="Fix & Retry"];
}
1. Pre-Deployment Verification
Complete the checklist above and verify all systems are ready.
2. Build Application
npm run build
npm test
3. Build Docker Image
docker build -t myapp:$VERSION .
docker tag myapp:$VERSION myapp:latest
4. Push to Registry
docker push myapp:$VERSION
docker push myapp:latest
5. Deploy to Kubernetes
kubectl apply -f manifests/production/
kubectl rollout status deployment/myapp
6. Verify Deployment
- Health checks passing
- Logs show no errors
- Metrics within normal range
- Smoke tests pass
7. Post-Deployment
- Update documentation
- Notify team of successful deployment
- Monitor for 30 minutes
- Update deployment tracker
Safety Features
This skill includes:
- Manual-only invocation - Cannot be auto-triggered
- XML-defined safety gates - Blocking checks with machine-readable validation
- Emergency rollback - Automated rollback procedure in XML
- Verification steps - Ensures deployment success
Rollback Procedure
- Health checks fail after 5 minutes
- Error rate exceeds 5% for 2 minutes
- Manual abort triggered
- Database migration failures
Integration
This skill integrates with:
ci-pipeline-manager- CI/CD pipeline integrationbackend-patterns- Deployment best practices
Absolute Constraints (Non-Negotiable)
- Run each check sequentially
- If ANY check fails, STOP and resolve
- NO exceptions, NO "looks good" rationalization
- Document why gate failed and how it was fixed
MANDATORY: Rollback procedure MUST be tested before deployment
- Verify rollback script exists
- Test rollback in staging
- Confirm previous version is stable
- Document rollback success criteria
MANDATORY: Monitor deployment for 30 minutes after success
- Health checks must remain passing
- Error rates must stay below threshold
- Logs must show no errors
- Team must be available for immediate response
MANDATORY: Document ALL deployments
- Update deployment tracker
- Document any issues or deviations
- Create incident report if rollback occurred
- Share lessons learned with team
DANGER ZONE: Production deployment is irreversible without rollback
- Treat every deployment as potentially breaking
- Assume rollback will be needed (hope for best, prepare for worst)
- Never deploy Friday afternoon or before holidays
- Always have team on standby during deployment window
No exceptions. No short-cuts. Production is not a place for "good enough."
Genetic Code
This component carries essential Seed System principles for context: fork isolation:
Delta Standard: Good Component = Expert Knowledge − What Claude Already Knows
Recognition Questions:
- "Would Claude know this without being told?" → Delete (zero delta)
- "Can this work standalone?" → Fix if no (non-self-sufficient)
- "Did I read the actual file, or just see it in grep?" → Verify before claiming