Agent Selection Guide: CI/CD & Production Deployment
Agent Selection Guide: CI/CD & Production Deployment
Use Case: CI/CD pipeline implementation and production deployment for CODITECT Complexity: High - Multi-agent orchestration required
🎯 Executive Summary
Task: Implement complete CI/CD pipeline and production deployment infrastructure for CODITECT-CORE.
Recommended Agent Workflow
orchestrator (coordination)
↓
devops-engineer (CI/CD pipeline design)
↓
cloud-architect (infrastructure & deployment strategy)
↓
docker-specialist (containerization - if available) OR devops-engineer
↓
codi-documentation-writer (deployment documentation)
↓
security-specialist (security review)
Estimated Timeline: 2-3 days for complete implementation Agent Invocations: 5-7 agents sequentially
📋 Agent Breakdown by Phase
Phase 1: Planning & Architecture (orchestrator)
Agent: orchestrator
Purpose: Coordinate multi-agent workflow and create implementation plan
Invocation
Task(
subagent_type="orchestrator",
description="Plan CI/CD deployment workflow",
prompt="""Create comprehensive implementation plan for CODITECT-CORE CI/CD and production deployment.
Requirements:
- CI/CD pipeline (GitHub Actions)
- Local Docker development environment (Ubuntu LTS + XFCE)
- Production deployment strategy
- Multi-agent task breakdown
- Timeline and dependencies
Deliverable: project-plan.md with task assignments for each agent"""
)
Expected Output
- Complete project plan with phases
- Agent assignments for each task
- Dependency graph
- Timeline estimates
- Risk assessment
Phase 2: CI/CD Pipeline Design (devops-engineer)
Agent: devops-engineer or codi-devops-engineer
Purpose: Design and implement CI/CD pipelines
Invocation
Task(
subagent_type="devops-engineer",
description="Design CI/CD pipeline",
prompt="""Design comprehensive CI/CD pipeline for CODITECT-CORE using GitHub Actions.
Requirements:
1. Automated testing on push/PR
2. Docker image build and publish
3. Security scanning (containers, dependencies)
4. Deployment to staging/production
5. Rollback capabilities
6. Monitoring integration
Tech Stack:
- GitHub Actions
- Docker Hub or GHCR
- pytest for Python testing
- Security: Trivy, Snyk, or similar
Deliverables:
- .github/workflows/ci.yml
- .github/workflows/deploy.yml
- Dockerfile optimization
- Documentation: CI-CD-PIPELINE.md"""
)
Expected Output
- GitHub Actions workflow files
- Docker build optimization
- Test automation configuration
- Deployment pipeline
- Documentation
Phase 3: Infrastructure & Deployment (cloud-architect)
Agent: cloud-architect
Purpose: Design production infrastructure and deployment strategy
Invocation
Task(
subagent_type="cloud-architect",
description="Design production infrastructure",
prompt="""Design production deployment infrastructure for CODITECT-CORE.
Requirements:
1. Cloud platform selection (GCP/AWS/Azure)
2. Container orchestration (Docker Compose, K8s, or Cloud Run)
3. Scalability strategy (auto-scaling, load balancing)
4. Database setup (if needed)
5. Monitoring & logging (Prometheus, Grafana, CloudWatch)
6. Disaster recovery & backup
7. Cost optimization
Deliverables:
- Infrastructure as Code (Terraform or equivalent)
- Deployment architecture diagram (C4 model)
- Scaling strategy document
- Cost analysis
- Documentation: PRODUCTION-DEPLOYMENT.md"""
)
Expected Output
- IaC configuration files
- Architecture diagrams
- Deployment strategy
- Cost estimates
- Operations runbook
Phase 4: Docker Development Environment (devops-engineer)
Agent: devops-engineer
Purpose: Create local Docker development environment
Invocation
Task(
subagent_type="devops-engineer",
description="Create Docker dev environment",
prompt="""Create comprehensive Docker development environment for CODITECT-CORE.
Specifications:
Base Image: Ubuntu 22.04 LTS (Jammy Jellyfish)
Desktop: XFCE (lightweight)
Shell: zsh with oh-my-zsh (jonathan theme)
Required Tools:
- Python 3.10+ with pip, venv
- Node.js 18+ LTS with npm
- Git 2.40+
- Claude Code (npm version: @anthropic/claude-code)
- Docker CLI (for Docker-in-Docker)
- Essential dev tools (curl, wget, vim, nano)
- CODITECT framework pre-installed
User Experience:
- Non-root user 'developer' with sudo
- Pre-configured zsh with jonathan theme
- CODITECT components auto-activated
- Ready-to-use development environment
- Persistent volumes for work
Deliverables:
- Dockerfile
- docker-compose.yml
- entrypoint.sh script
- Documentation: LOCAL-DEVELOPMENT-DOCKER.md
- Quick start script: ./scripts/start-dev-container.sh"""
)
Expected Output
- Multi-stage Dockerfile
- Docker Compose configuration
- Startup scripts
- User-friendly documentation
- Volume management
Phase 5: Security Review (security-specialist)
Agent: security-specialist
Purpose: Security audit of containers and deployment
Invocation
Task(
subagent_type="security-specialist",
description="Security audit deployment",
prompt="""Perform comprehensive security audit of CODITECT-CORE deployment infrastructure.
Audit Scope:
1. Docker image security (base image, vulnerabilities)
2. CI/CD pipeline security (secrets management, access control)
3. Production deployment security (network, authentication)
4. Dependency vulnerabilities (Python, npm packages)
5. Container hardening (non-root user, minimal attack surface)
6. Secrets management (environment variables, vault)
Deliverables:
- Security audit report
- Vulnerability remediation plan
- Security best practices checklist
- Documentation: SECURITY-DEPLOYMENT.md"""
)
Expected Output
- Security audit report
- Remediation recommendations
- Hardening checklist
- Compliance validation
Phase 6: Documentation (codi-documentation-writer)
Agent: codi-documentation-writer
Purpose: Create comprehensive deployment documentation
Invocation
Task(
subagent_type="codi-documentation-writer",
description="Create deployment documentation",
prompt="""Create complete deployment documentation for CODITECT-CORE.
Documentation Sections:
1. LOCAL-DEVELOPMENT-DOCKER.md
- Quick start (5 minutes)
- Prerequisites
- Installation steps
- Configuration
- Troubleshooting
2. CI-CD-PIPELINE.md
- Pipeline overview
- Workflow triggers
- Build process
- Testing automation
- Deployment process
3. PRODUCTION-DEPLOYMENT.md
- Infrastructure overview
- Deployment steps
- Rollback procedures
- Monitoring setup
- Operations runbook
4. DEPLOYMENT-CHECKLIST.md
- Pre-deployment validation
- Deployment steps
- Post-deployment validation
- Health checks
Quality Standards:
- Clear step-by-step instructions
- Code examples for all commands
- Screenshots/diagrams where helpful
- Troubleshooting sections
- Security considerations"""
)
Expected Output
- 4 comprehensive documentation files
- Deployment checklists
- Troubleshooting guides
- Operations procedures
🔄 Complete Agent Invocation Sequence
Sequential Execution (Recommended)
# 1. PLANNING - Orchestrator coordinates overall workflow
Task(
subagent_type="orchestrator",
description="Plan deployment workflow",
prompt="Create implementation plan for CI/CD and deployment with agent assignments"
)
# Wait for plan, then proceed with phases:
# 2. CI/CD PIPELINE - DevOps engineer
Task(
subagent_type="devops-engineer",
description="Implement CI/CD pipeline",
prompt="Create GitHub Actions workflows for testing, building, and deployment"
)
# 3. INFRASTRUCTURE - Cloud architect
Task(
subagent_type="cloud-architect",
description="Design production infrastructure",
prompt="Create IaC and deployment architecture for production"
)
# 4. DOCKER DEV ENV - DevOps engineer
Task(
subagent_type="devops-engineer",
description="Create Docker development environment",
prompt="Build Ubuntu XFCE Docker image with CODITECT pre-installed"
)
# 5. SECURITY AUDIT - Security specialist
Task(
subagent_type="security-specialist",
description="Security audit",
prompt="Audit deployment security and provide hardening recommendations"
)
# 6. DOCUMENTATION - Documentation writer
Task(
subagent_type="codi-documentation-writer",
description="Create deployment docs",
prompt="Write comprehensive deployment documentation with examples"
)
🛠️ Alternative: Parallel Execution
Some tasks can run in parallel
# Phase 1: Planning (must complete first)
orchestrator_task = Task(subagent_type="orchestrator", ...)
# Phase 2: Parallel execution (after planning)
# Run these simultaneously:
ci_cd_task = Task(subagent_type="devops-engineer", prompt="CI/CD pipeline...")
infra_task = Task(subagent_type="cloud-architect", prompt="Infrastructure...")
docker_task = Task(subagent_type="devops-engineer", prompt="Docker dev env...")
# Phase 3: Sequential (after Phase 2 completes)
security_task = Task(subagent_type="security-specialist", ...)
docs_task = Task(subagent_type="codi-documentation-writer", ...)
Parallel execution saves time but requires coordination
📊 Agent Capabilities Matrix
| Agent | CI/CD | Docker | Infrastructure | Security | Docs |
|---|---|---|---|---|---|
| orchestrator | Plan | Plan | Plan | Plan | Plan |
| devops-engineer | ✅✅✅ | ✅✅✅ | ✅✅ | ✅ | - |
| codi-devops-engineer | ✅✅✅ | ✅✅✅ | ✅✅ | ✅ | - |
| cloud-architect | ✅ | ✅ | ✅✅✅ | ✅ | - |
| security-specialist | ✅ | ✅ | ✅ | ✅✅✅ | - |
| codi-documentation-writer | - | - | - | - | ✅✅✅ |
Legend: ✅✅✅ Expert | ✅✅ Proficient | ✅ Basic | - Not applicable
🎯 Expected Deliverables
Code & Configuration
.github/workflows/
├── ci.yml # CI pipeline (devops-engineer)
├── deploy-staging.yml # Staging deployment
└── deploy-production.yml # Production deployment
distribution/docker/
├── Dockerfile # Development container (devops-engineer)
├── docker-compose.yml # Local dev setup
└── entrypoint.sh # Container startup script
infrastructure/
├── terraform/ # IaC (cloud-architect)
│ ├── main.tf
│ ├── variables.tf
│ └── outputs.tf
└── kubernetes/ # K8s manifests (if applicable)
├── deployment.yml
└── service.yml
scripts/
├── start-dev-container.sh # Quick start for developers
├── deploy-to-staging.sh # Staging deployment
└── deploy-to-production.sh # Production deployment
Documentation
docs/05-deployment/
├── AGENT-SELECTION-CI-CD-DEPLOYMENT.md # This file
├── LOCAL-DEVELOPMENT-DOCKER.md # Docker dev env guide
├── CI-CD-PIPELINE.md # CI/CD documentation
├── PRODUCTION-DEPLOYMENT.md # Production guide
├── SECURITY-DEPLOYMENT.md # Security guidelines
├── DEPLOYMENT-CHECKLIST.md # Pre/post deployment
└── OPERATIONS-RUNBOOK.md # Day-2 operations
🚀 Quick Start for Implementation
Option 1: Full Orchestration (Recommended)
# Use orchestrator to coordinate everything
python3 -c "
from anthropic import Task
result = Task(
subagent_type='orchestrator',
description='Complete CI/CD deployment implementation',
prompt='''
Implement complete CI/CD and deployment infrastructure for CODITECT-CORE:
1. GitHub Actions CI/CD pipeline
2. Docker development environment (Ubuntu + XFCE + zsh)
3. Production deployment (IaC + architecture)
4. Security audit and hardening
5. Complete documentation
Use multi-agent coordination with:
- devops-engineer (CI/CD, Docker)
- cloud-architect (infrastructure)
- security-specialist (security)
- codi-documentation-writer (docs)
Deliver production-ready deployment infrastructure.
'''
)
print(result)
"
Option 2: Manual Agent Invocation
# Invoke agents one at a time, review output, then proceed to next
# See "Complete Agent Invocation Sequence" section above
📋 Pre-Implementation Checklist
Before invoking agents, ensure:
- ✅ GitHub repository created and configured
- ✅ Cloud platform account setup (GCP/AWS/Azure)
- ✅ Docker Hub or GHCR account for image registry
- ✅ Secrets configured (API keys, credentials)
- ✅ Production domain/subdomain reserved
- ✅ Monitoring tools accounts (if external)
- ✅ Budget approved for cloud resources
- ✅ Team members have required access
🎓 Best Practices
Agent Coordination
- Start with orchestrator - Let it create the overall plan
- Review each output - Don't blindly proceed to next agent
- Iterate if needed - Re-invoke agents for refinements
- Validate deliverables - Test each component before moving forward
- Document decisions - Keep track of why certain choices were made
Multi-Agent Tips
- Use orchestrator for task breakdown and coordination
- Invoke agents sequentially for dependent tasks
- Use parallel execution only for independent tasks
- Validate security at each step (not just at the end)
- Keep documentation updated as you go
Quality Gates
After each agent:
- ✅ Review code quality
- ✅ Test functionality
- ✅ Validate security
- ✅ Check documentation completeness
- ✅ Verify alignment with requirements
📞 Support & Resources
Agent Documentation
- See
.coditect/agents/for detailed agent capabilities - Read
AGENT-INDEX.mdfor complete agent catalog - Check
1-2-3-SLASH-COMMAND-quick-start.mdfor usage patterns
Related Guides
CLAUDE-4.5-BEST-PRACTICES.md- Multi-agent orchestrationMULTI-AGENT-ARCHITECTURE-BEST-PRACTICES.md- Coordination patterns1-2-3-QUICK-START-COMPONENT-ACTIVATION.md- Component management
Created: 2025-11-29 Status: Ready for use Quality: Production-grade agent coordination guide