📝 Context
An autonomous DevOps agent manages our deployments. To prevent weekend outages, we want a hard rule: No deployments to the "Production" environment on Fridays after 4 PM.
🎯 The Goal
Write a .csl file that blocks risky deployments based on time and environment.
Variables you can use:
target_env (String): The environment (e.g., "STAGING", "PROD").
day_of_week (String): Current day (e.g., "FRIDAY", "MONDAY").
current_hour (Integer): 24-hour format (e.g., 16 for 4 PM).
Requirements:
- MUST BLOCK if
target_env is "PROD" AND day_of_week is "FRIDAY" AND current_hour >= 16.
- Allow all deployments to "STAGING" or "DEV" regardless of time.
- Allow "PROD" deployments on other days.
📚 Resources
- Start here:
docs/getting-started.md
- String comparison:
docs/syntax-spec.md
- Logical operators (AND/OR):
examples/logic_gates.csl
✅ Definition of Done
Submit a PR with a new file: examples/community/devops_deploy_guard.csl