From agenticops
Automates 4-stage canary deployments (1%→10%→50%→100%) for agents/skills on Kubernetes using Argo Rollouts/Flagger, with continuous-eval passes, Prometheus SLO gates, circuit breaker rollbacks, and human approval for full rollout.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agenticops:autopilot-deployclaude-sonnet-4-6This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- 새로운 agent 버전 또는 skill 수정이 `continuous-eval` golden dataset를 통과했고 프로덕션 반영이 필요할 때
continuous-eval golden dataset를 통과했고 프로덕션 반영이 필요할 때self-improving-loop가 생성한 PR이 머지되어 canary 검증이 필요할 때사용 제외:
cost-governance가 예산 초과 veto를 건 배포.incident-response가 SEV1 상태로 freeze한 클러스터.agent_request_latency_seconds, agent_error_rate, agent_tokens_total).@latest 금지, PyPI 버전 pin 필수).continuous-eval 리포트가 pass 상태여야 합니다..omao/plans/slo/${target}.yaml)이 존재해야 합니다.각 단계는 트래픽 비율 상승 → 30분 soak → SLO 검증 → gate 통과 시 다음 단계 순서로 진행됩니다. 4단계 전체는 약 2~3시간 소요됩니다.
트래픽의 1%를 candidate 버전으로 라우팅합니다. 이 단계의 목적은 런타임 실패(CrashLoopBackOff, image pull error, RBAC 거부)를 빠르게 감지하는 것입니다.
kubectl argo rollouts set image rollout/${TARGET} \
agent=${REGISTRY}/${TARGET}:${VERSION}
kubectl argo rollouts promote rollout/${TARGET} --stage canary-1
통과 조건:
rate(agent_errors_total{version="$VERSION"}[5m]) < 0.01 (에러율 1% 미만)histogram_quantile(0.99, agent_request_latency_seconds_bucket) < 5.0 (P99 5초 미만)트래픽 10% 전환. 이 단계에서는 continuous-eval를 1회 inline 실행하여 품질 지표를 확인합니다.
kubectl argo rollouts promote rollout/${TARGET} --stage canary-10
/continuous-eval ${TARGET}:${VERSION} --mode canary
통과 조건 (Stage 1 조건 + 다음):
faithfulness ≥ baselineanswer_relevance ≥ baselinetoxicity == 0 (tolerance 0)pii_leakage == 0 (tolerance 0)트래픽 50% 전환. 본격적인 프로덕션 부하에 노출되므로 soak 시간을 60분으로 늘립니다.
통과 조건:
user_feedback_positive_ratio ≥ baseline × 0.95본 skill은 50% 단계까지 자동 진행하며 100% 승격은 사람 승인을 요구합니다. GitHub Issue comment 또는 Slack approval workflow로 명시적 승인 후 다음 명령을 실행합니다.
kubectl argo rollouts promote rollout/${TARGET} --full
각 단계에서 다음 조건 중 하나가 감지되면 즉시 이전 단계로 롤백합니다.
| 트리거 | 임계값 | 반응 |
|---|---|---|
| 에러율 spike | rate(errors) > 5 × baseline for 2m | 즉시 롤백 + SEV2 trigger |
| Latency regression | P99 > 2 × baseline for 5m | 즉시 롤백 + SEV3 trigger |
| Evaluation regression | continuous-eval faithfulness < baseline - 5pp | 즉시 롤백 + SEV3 trigger |
| Toxicity/PII positive | 1건 이상 | 즉시 롤백 + SEV1 trigger |
| Pod crash loop | pod_restart_total > 3 within 10m | 즉시 롤백 + 인프라 팀 호출 |
롤백은 kubectl argo rollouts abort rollout/${TARGET} 로 실행되며 이전 stable revision으로 자동 복귀합니다.
본 skill은 진행 상태를 .omao/state/autopilot-deploy/${target}.json 에 실시간 기록합니다.
{
"target": "rag-qa-agent",
"version": "v2.3.1",
"current_stage": "canary-50",
"started_at": "2026-04-21T10:15:00Z",
"stage_history": [
{"stage": "canary-1", "started": "10:15Z", "completed": "10:45Z", "result": "pass"},
{"stage": "canary-10", "started": "10:45Z", "completed": "11:15Z", "result": "pass"}
],
"circuit_breaker_status": "armed",
"awaiting_human_approval": false
}
incident-response skill은 이 파일을 읽어 SEV1/SEV2 이벤트 발생 시 circuit_breaker_status를 tripped로 갱신하고 본 skill의 진행을 중단시킵니다.
Input: /autopilot-deploy rag-qa-agent:v2.3.1
Output (성공):
[10:15Z] Stage 1 (canary-1): STARTED
[10:45Z] Stage 1: PASS (error_rate=0.002, p99_latency=3.1s)
[10:45Z] Stage 2 (canary-10): STARTED
[11:12Z] continuous-eval: faithfulness=0.89 ≥ baseline 0.87 PASS
[11:15Z] Stage 2: PASS
[11:15Z] Stage 3 (canary-50): STARTED
[12:15Z] Stage 3: PASS (user_feedback_positive=0.73 ≥ 0.71)
[12:15Z] AWAITING HUMAN APPROVAL for 100% promotion
Review at: https://grafana.example.com/d/rollout/rag-qa-agent
Approve via: gh issue comment <issue-id> --body "/approve-promotion"
Output (회귀):
[10:15Z] Stage 1 (canary-1): STARTED
[10:22Z] CIRCUIT BREAKER TRIPPED: error_rate=0.08 > 0.01 threshold
[10:22Z] Automatic rollback initiated
[10:23Z] Rolled back to v2.3.0 (previous stable)
[10:23Z] SEV2 incident opened: see .omao/state/incident/sev2-20260421-1023.json
npx claudepluginhub aws-samples/sample-oh-my-aidlcops --plugin agenticopsPromotes approved releases in production using canary strategies (traffic-based, feature flag, blue-green) with continuous metric observation and automatic rollback to limit blast radius.
Deploys ADK agents to Agent Runtime, Cloud Run, or GKE. Covers CI/CD, secrets, service accounts, rollback, and production infrastructure.
Orchestrates multi-stage deployment pipelines with Kubernetes, CI/CD platforms, and strategies like blue-green, canary, rolling updates across dev/staging/prod.