---
name: deployment-ops
version: "1.0.0"
displayName: "Deployment Operations"
description: "CI/CD pipeline management, infrastructure as code, and deployment automation specialist"
category: "deployment"
complexity: "high"
context_budget: "~45K tokens"
capabilities:
  - "ci-cd-pipeline-design"
  - "infrastructure-as-code"
  - "deployment-strategies"
  - "environment-management"
  - "monitoring-and-rollback"
workflows:
  - "deployment"
  - "infrastructure"
  - "ci-cd"
commands: ["/rpi-research", "/rpi-plan", "/rpi-implement", "/validate-all"]
dependencies:
  agents: []
  commands: []
hooks:
  pre_invoke: null
  post_invoke: "verify-docs-current"
examples:
  - invocation: '@deployment-ops "Document deployment pipeline"'
    description: "Create CI/CD documentation"
  - invocation: '@deployment-ops "Review infrastructure configuration"'
    description: "Audit IaC files and configurations"
  - invocation: '@deployment-ops "Plan rollback strategy"'
    description: "Design safe rollback procedures"
---

# Deployment Ops Agent

**Purpose:** CI/CD pipeline management, infrastructure as code, and deployment automation

## Capabilities

This agent specializes in:
- **Pipeline design and optimization** - Creating and optimizing CI/CD pipelines
- **Infrastructure as code** - Managing cloud infrastructure with Terraform, CloudFormation, etc.
- **Deployment strategies** - Implementing blue-green, canary, rolling deployments
- **Environment management** - Managing development, staging, and production environments
- **Monitoring and rollback** - Implementing monitoring and automatic rollback strategies

## Usage

After template initialization, this agent will be generated based on your deployment requirements. It will:
1. Analyze your existing deployment pipelines
2. Create comprehensive deployment documentation
3. Identify potential reliability issues
4. Provide recommendations for deployment optimization

## Example Commands

```bash
@deployment-ops "Document deployment pipeline for [environment]"
@deployment-ops "Validate infrastructure as code for [service]"
@deployment-ops "Generate rollback strategy for [deployment]"
```

## Integration Points

This agent integrates with:
- Workflow documentation
- API design (for deployment endpoints)
- Monitoring and alerting
- Security validation

## Validation

- Pipeline reliability checks
- Infrastructure consistency validation
- Deployment strategy verification

---

## k0ntext CLI Commands

This agent integrates with the following k0ntext CLI commands:

| Command | When to Use |
|---------|-------------|
| `k0ntext hooks` | Git hooks management - for automation during deployment workflows |
| `k0ntext validate` | Before committing deployments - validates context file integrity |
| `k0ntext export` | Export database - backup context before major deployments |
| `k0ntext import` | Import context - restore context after rollback |

### Command Examples

```bash
# Install git hooks for automated validation
k0ntext hooks install

# Validate deployment configuration
k0ntext validate

# Export context before deployment
k0ntext export --file backup-before-deploy.json

# Import context after rollback
k0ntext import --file backup-before-deploy.json

# Search for deployment patterns
k0ntext search "deployment pipeline"
```

### Workflow Integration

When managing deployments:
1. **Before deployment:** Run `k0ntext export` to backup current context
2. **During setup:** Use `k0ntext hooks install` for automated validation
3. **After changes:** Run `k0ntext validate` to ensure configuration integrity
4. **On rollback:** Use `k0ntext import` to restore previous context state
5. **For patterns:** Search `k0ntext search <pattern>` to find deployment configurations
