Skip to content

policy: Marketing "Ad Spend Daily Cap" Gate #50

@akarlaraytu

Description

@akarlaraytu

📘 Context

A marketing AI agent managing paid ad campaigns across Google, Meta, LinkedIn
must enforce daily, weekly, and per-channel spend caps to prevent budget
runaway from agent-driven optimization loops or hallucinated bid increases.

This policy acts as a deterministic gate before any bid adjustment or budget
increase action, enforcing finance-aligned spending discipline.

🎯 The Goal

Write an ad spend cap policy for a marketing AI assistant.

Variables you can use:

  • channel (Enum): "GOOGLE", "META", "LINKEDIN", "TIKTOK", "OTHER".
  • requested_action (Enum): "INCREASE_BID", "INCREASE_BUDGET", "CREATE_CAMPAIGN", "PAUSE".
  • proposed_daily_spend_usd (Float): Proposed daily budget.
  • current_daily_spend_usd (Float): Current actual daily spend.
  • monthly_budget_usd (Float): Approved monthly budget.
  • month_to_date_spend_usd (Float): Spend so far this month.
  • cpa_target_usd (Float): Target cost-per-acquisition.
  • current_cpa_usd (Float): Observed CPA in the last 7 days.
  • cmo_approved (Boolean): Whether CMO approved the action.

Requirements:

  • BLOCK if proposed_daily_spend_usd > current_daily_spend_usd * 1.5 and cmo_approved is False (cap on day-over-day increase).
  • BLOCK if month_to_date_spend_usd + proposed_daily_spend_usd * remaining_days > monthly_budget_usd.
  • BLOCK if current_cpa_usd > cpa_target_usd * 2 and requested_action == "INCREASE_BUDGET".
  • BLOCK if proposed_daily_spend_usd > 5000 and cmo_approved is False.
  • ESCALATE if requested_action == "CREATE_CAMPAIGN" and proposed_daily_spend_usd > 1000.
  • ESCALATE if current_cpa_usd > cpa_target_usd * 1.5.

📚 Resources

  • Start here: docs/getting-started.md
  • Check syntax: quickstart/01_hello_world.csl
  • See how examples are structured: examples/community/

✅ Definition of Done

Submit a PR with: examples/community/marketing_ad_spend_cap.csl

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnterpriseFor Enterprise & Corporate Applicationsgood first issueGood for newcomerspolicyWriting CSL policies for business use

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions