The Deployment pack provides essential safety controls for AI agents that manage deployments, releases, or CI/CD workflows. It ensures production deployments are approved by humans and prevents dangerous force-deploy operations.Use this pack for:
Rule ID:deploy-require-approval-productionWhat it does: Requires explicit human approval before deploying to production environments.Detected production environment patterns:
arguments.environment === "production"
arguments.environment === "prod"
arguments.env === "production"
arguments.env === "prod"
arguments.target === "production"
Why it’s important: Production deployments can cause:
Service outages affecting customers
Data loss or corruption
Security vulnerabilities
Compliance violations
Revenue impact
AI agents should assist with deployment automation, but final production releases should be human-reviewed to ensure:
Correct version is being deployed
Rollback plan is ready
Timing is appropriate (not during peak hours)
All stakeholders are informed
Example:
// This requires human approval:await deploy({ environment: "production", version: "v2.5.0", service: "api-gateway"});// User sees approval request:// "Approve deployment of api-gateway v2.5.0 to production?"// Meanwhile, staging deploys are allowed automatically:await deploy({ environment: "staging", version: "v2.5.0", service: "api-gateway"});// ✓ Executes immediately (not production)
Rule ID:deploy-block-force-pushWhat it does: Blocks deployments that skip safety checks via flags like force, skip_checks, or skip_tests.Blocked flags:
arguments.force === true
arguments.skip_checks === true
arguments.skip_tests === true
Why it’s important: Force flags bypass critical safety mechanisms:
Tests - May deploy broken code
Checks - May violate security/compliance policies
Validation - May deploy incompatible versions
These flags exist for emergency recovery scenarios, but should never be used by automated agents.Example blocked calls:
// All of these are blocked:await deploy({ environment: "staging", version: "v2.5.0", force: true // BLOCKED});await publish({ package: "@myapp/core", skip_tests: true // BLOCKED});await release({ tag: "v1.0.0", skip_checks: true // BLOCKED});
When you might disable this rule:If your deployment system uses force for legitimate purposes (e.g., force-replacing a cache), you can:
Rename the parameter in your tool
Override the rule to only check production deploys
Prevent production deployments during peak traffic:
rules: - id: custom-block-business-hours-deploy name: Block production deploys during business hours action: block severity: high tools: - deploy - publish conditions: - field: arguments.environment operator: equals value: production # Note: Time-based conditions require custom validation logic # This is a simplified example