Skip to content

policy: DevOps "No-Deploy Friday" Safety Lock #12

@akarlaraytu

Description

@akarlaraytu

📝 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:

  1. MUST BLOCK if target_env is "PROD" AND day_of_week is "FRIDAY" AND current_hour >= 16.
  2. Allow all deployments to "STAGING" or "DEV" regardless of time.
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions