CI/CD Pipeline Agent Blueprint
Claude agent that validates builds, runs tests, manages deployments, and routes production push approvals through Slack.
What This Blueprint Does
The CI/CD Pipeline Agent manages your entire deployment pipeline — from validating build artifacts to deploying staging to routing production approvals through Slack. It replaces brittle shell scripts with an intelligent agent that understands context, handles errors gracefully, and escalates ambiguity.
The key differentiator: production deploys require human approval. The agent pushes to feature branches and deploys to staging autonomously. Promoting to production always goes through a Slack gate.
Architecture
Three coordinated stages:
- Test Validation — Runs tests, validates artifacts, checks for regressions
- Deploy Agent — Pushes to staging autonomously; requests approval for production
- Notification Agent — Reports outcomes to Slack, updates dashboards
If tests fail, the deploy stage never runs. If staging fails, production approval is never requested.
Policy Configuration
project: acme-platform
agent: ci-cd-pipeline
policies:
# Git: push freely to feature branches
- git:read on repos/*
- git:push on repos/*/branches/feature/*
- git:push on repos/*/branches/hotfix/*
# Push to main requires approval
- git:push on repos/*/branches/main
requires_approval: true
approval_channel: slack:#deploy-approvals
approval_timeout: 30m
# AWS: staging deploys are autonomous
- aws:ecs:UpdateService on arn:aws:ecs:*:*:service/staging-*
- aws:ecr:PutImage on arn:aws:ecr:*:*:repository/acme-*
# Production requires approval
- aws:ecs:UpdateService on arn:aws:ecs:*:*:service/prod-*
requires_approval: true
approval_channel: slack:#deploy-approvals
budget:
max_tokens_per_session: 200000
notifications:
on_complete: slack:#deployments
on_failure: slack:#deploy-alerts
Approval Flow
When the agent needs production approval, it posts to Slack:
Production Deploy Approval Needed —
acme/api
3 commits · feat: add stripe webhook handler
Tests: 142/142 passed · Staging: verified
[Approve] [Reject] [View Diff]
One click approves or rejects. Timeout defaults to 60 minutes — no response cancels the deploy automatically.
Error Handling
- Test failures — Posts details, does not proceed to deploy
- Staging failure — Rolls back ECS service, alerts with logs
- Production failure — Immediate rollback, pages on-call via Slack
Deploy this blueprint
Get this agent running in 2 hours with Sentrely's managed control plane.