Rule of Claw
workflowVerified

DevOps Automation & CI/CD Workflow Rules

Comprehensive DevOps automation rules for CI/CD, infrastructure as code, and deployment workflows

content
# DevOps Automation & CI/CD Workflow Rules

## Infrastructure as Code (IaC) Principles
- Everything must be version controlled and reproducible
- Use declarative configuration over imperative scripts
- Implement proper separation of environments (dev/staging/prod)
- Automate infrastructure provisioning and management
- Use tools like Terraform, Ansible, or AWS CloudFormation
- Implement proper secrets management (never commit secrets to git)

## CI/CD Pipeline Best Practices
- Every commit should trigger automated builds and tests
- Implement fast feedback loops (< 10 minutes for basic pipeline)
- Use parallel execution where possible to reduce pipeline time
- Implement proper artifact management and versioning
- Automated deployment to staging environments
- Manual approval gates for production deployments
- Rollback strategies should be automated and tested

## Container & Orchestration
- Use Docker for consistent environments across development and production
- Implement proper container security scanning
- Use multi-stage builds to optimize image sizes
- Implement proper health checks and graceful shutdowns
- Use Kubernetes or similar orchestration for production workloads
- Implement proper resource limits and monitoring

## Monitoring & Observability
- Implement comprehensive logging, metrics, and tracing
- Use centralized logging with structured log formats
- Set up automated alerting for critical system failures
- Implement proper dashboards for system visibility
- Use tools like Prometheus, Grafana, ELK stack
- Implement synthetic monitoring for critical user journeys

## Security & Compliance
- Implement security scanning in CI/CD pipelines
- Regular dependency vulnerability scanning
- Use least privilege access principles
- Implement proper audit logging
- Regular security reviews and penetration testing
- Compliance automation where applicable (GDPR, SOC2, etc.)

## Disaster Recovery & Business Continuity
- Automated backups with regular restore testing
- Document and test disaster recovery procedures
- Implement proper failover mechanisms
- Regular chaos engineering exercises
- Incident response playbooks and automation

## Collaboration & Documentation
- Infrastructure changes should go through code review
- Document all operational procedures
- Implement proper change management processes
- Use GitOps workflows where appropriate
- Regular post-incident reviews and improvement cycles
devopscicdautomationinfrastructuremonitoring

Compatible with

openclawcursorclaude-code