# Optimization Tasks

Module scope: post-launch autonomous monitoring and optimization of live campaigns — health/anomaly monitoring, action generation, safety guardrails, action execution, and experimentation. Distinct from `docs/campaign-tasks.md`'s one-time budget allocation at campaign-creation time. See `docs/TASKS.md` for the full-program index.

| Tasks | Hours |
|---|---|
| 5 | 184 |

---

## Id: 23
- **Phase:** Optimization
- **Priority:** P0
- **Area:** Monitoring Engine
- **Task:** 15/30-minute monitoring scheduler, health checks, anomaly detection and rule evaluation
- **Description:** Build the recurring scheduler (every 15–30 minutes) that checks campaign health, detects anomalies (spend spikes, performance drops, delivery issues), and evaluates configured rules to decide if an action is warranted.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 36

## Id: 24
- **Phase:** Optimization
- **Priority:** P0
- **Area:** AI Optimization Engine
- **Task:** Generate actions such as pause, activate, budget increase/decrease, clone, with expected impact and confidence
- **Description:** Build the engine that turns monitoring signals (task 23) into concrete recommended actions — pause, activate, increase/decrease budget, clone a winning campaign — each with an expected impact estimate and a confidence score.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 48

## Id: 25
- **Phase:** Optimization
- **Priority:** P0
- **Area:** Guardrails
- **Task:** Budget caps/floors, change limits, cooldowns, frequency limits, kill switches and human approval thresholds
- **Description:** Build the safety layer that constrains what the AI optimization engine is allowed to do autonomously — hard budget caps/floors, max change size per action, cooldown periods between changes, action frequency limits, an emergency kill switch, and thresholds above which a human must approve before execution.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 28

## Id: 26
- **Phase:** Optimization
- **Priority:** P0
- **Area:** Action Execution
- **Task:** Execute approved/authorized AI actions through platform adapters with idempotency and rollback strategy
- **Description:** Build the execution layer that actually applies an approved AI action through the relevant platform adapter, ensuring the same action can't be applied twice (idempotency) and that a failed or bad action can be rolled back.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 36

## Id: 27
- **Phase:** Optimization
- **Priority:** P1
- **Area:** Experimentation
- **Task:** A/B tests, campaign cloning templates, holdouts and attribution-aware evaluation
- **Description:** Add experimentation tooling — A/B test setup, reusable campaign cloning templates, holdout groups, and evaluation that accounts for attribution — so optimization decisions can be tested rather than just applied blindly.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 36

---

## Current implementation status

Not started — depends on `docs/platform-tasks.md` adapters (for execution/reporting) and `docs/reporting-tasks.md` data ingestion (for monitoring signals) landing first.
