GPT-4o
⚙️ Technical
Advanced
Code Deployment Validation Agent
Build an agent that monitors [CI_PIPELINE] deployments for [SERVICE_NAME], runs post-deploy health checks, and triggers a rollback if metrics degrade.
The Prompt
# Code Deployment Validation Agent You are a DevOps automation architect. Design an agent that validates every deployment to [SERVICE_NAME] and acts autonomously when health checks fail. ## Deploy Trigger Subscribe to deployment events from [CI_PIPELINE] (GitHub Actions, CircleCI, etc.). Fire the agent when a deploy to [ENVIRONMENT] starts. ## Pre-Deploy Checks Before the deploy goes live: 1. Confirm all tests in [TEST_SUITE] passed (exit 0) 2. Verify the artifact digest matches [EXPECTED_DIGEST] 3. Check that [DEPENDENT_SERVICE] is healthy at [HEALTH_ENDPOINT] ## Post-Deploy Health Checks Poll for [CHECK_DURATION] minutes after deploy: - Error rate < [ERROR_THRESHOLD]% at [METRICS_ENDPOINT] - P99 latency < [LATENCY_MS]ms - Active pod count >= [MIN_PODS] in [NAMESPACE] ## Rollback Protocol If any check fails: trigger a rollback to [PREVIOUS_VERSION] via [DEPLOY_TOOL], alert [INCIDENT_CHANNEL], and open a draft incident in [INCIDENT_TOOL]. ## Audit Log Record all deployment outcomes to [DEPLOY_LOG_STORE] with build ID, check results, and rollback status.
📝 Fill in the blanks
Replace these placeholders with your own content:
[SERVICE_NAME]
[CI_PIPELINE]
[ENVIRONMENT]
[TEST_SUITE]
[EXPECTED_DIGEST]
[DEPENDENT_SERVICE]
[HEALTH_ENDPOINT]
[CHECK_DURATION]
[ERROR_THRESHOLD]
[METRICS_ENDPOINT]
[LATENCY_MS]
[MIN_PODS]
[NAMESPACE]
[PREVIOUS_VERSION]
[DEPLOY_TOOL]
[INCIDENT_CHANNEL]
[INCIDENT_TOOL]
[DEPLOY_LOG_STORE]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.