# AI Marketing Automation Task Breakdown

Task breakdown for building the AI-driven multi-platform marketing automation system — covering campaign creation via chat, creative and landing page generation, cross-platform ad delivery (Meta, Google, TikTok, Taboola, LinkedIn), budget optimization, monitoring, and reporting. Priority P0 = must-have for MVP, P1 = fast-follow. Roles marked "Unassigned" are still to be staffed.

> Per-module breakdowns (for assigning a single module to one dev) also live alongside this file: [discovery-tasks.md](discovery-tasks.md), [campaign-tasks.md](campaign-tasks.md), [creative-tasks.md](creative-tasks.md), [platform-tasks.md](platform-tasks.md), [landingpage-tasks.md](landingpage-tasks.md), [security-tasks.md](security-tasks.md), [optimization-tasks.md](optimization-tasks.md), [reporting-tasks.md](reporting-tasks.md), [alerts-tasks.md](alerts-tasks.md), [observability-tasks.md](observability-tasks.md), [ai-quality-tasks.md](ai-quality-tasks.md). This file remains the full, authoritative list.

## Summary

| Phase | Tasks | Hours |
|---|---|---|
| Discovery | 1 | 12 |
| Architecture | 2 | 32 |
| Security | 1 | 24 |
| MVP | 17 | 578 |
| Optimization | 5 | 184 |
| Insights | 1 | 36 |
| Alerts | 1 | 24 |
| Platform | 1 | 28 |
| AI Quality | 1 | 36 |
| **Total** | **30** | **954** |

**By priority:** P0 = 830 hrs · P1 = 124 hrs

---

# Discovery

## Id: 01
- **Phase:** Discovery
- **Priority:** P0
- **Area:** Product & Architecture
- **Task:** Finalize product requirements, user journeys, roles, campaign lifecycle, approval gates, MVP scope
- **Description:** Nail down what the product actually does before any build work starts — who the users are (advertiser, approver, admin), what a campaign goes through from creation to completion, where a human has to approve an AI action, and what's explicitly out of scope for the first release. This is the reference every later task gets scoped against.
- **Primary Role/Assignee:** Kapil
- **Estimated Hours:** 12

---

# Architecture

## Id: 02
- **Phase:** Architecture
- **Priority:** P0
- **Area:** Product & Architecture
- **Task:** Define multi-platform campaign abstraction and normalized data model
- **Description:** Design a single internal representation of a "campaign" (budget, objective, targeting, schedule, creative, status) that can map to Meta, Google, TikTok, Taboola, and LinkedIn without leaking platform-specific quirks into the core app. This is the schema every adapter and every UI screen will read from.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 16

## Id: 03
- **Phase:** Architecture
- **Priority:** P0
- **Area:** Product & Architecture
- **Task:** Design platform adapter/MCP interface so Meta, Google, TikTok, Taboola, LinkedIn use one contract
- **Description:** Define a shared interface (create/read/update/report operations, auth, error shapes) that every platform integration implements, so the orchestration layer and optimization engine can call any ad platform the same way. This is what makes adding a 6th platform later a contained, additive change instead of a rewrite.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 16

---

# Security

## Id: 04
- **Phase:** Security
- **Priority:** P0
- **Area:** Security & Governance
- **Task:** Login, OAuth/token management, secrets, audit logs, consent and approval controls
- **Description:** Build authentication for internal users plus OAuth token storage/refresh for each connected ad platform, secure secrets handling, an audit trail of who (or which AI action) did what, and the consent/approval gates that let a human sign off before money is spent or a live campaign is changed.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 24

---

# MVP

## Id: 05
- **Phase:** MVP
- **Priority:** P0
- **Area:** Chat Interface
- **Task:** Chat UI, conversation state, structured campaign form extraction and confirmation
- **Description:** Build the conversational front-end where a user describes a campaign in natural language, the system keeps track of the conversation across turns, extracts that into a structured campaign form, and shows the user a confirmation summary before anything is created.
- **Primary Role/Assignee:** Shyam
- **Estimated Hours:** 28

## Id: 06
- **Phase:** MVP
- **Priority:** P0
- **Area:** AI Orchestration
- **Task:** Intent detection, slot filling, validation, missing-field questions and deterministic tool routing
- **Description:** Build the orchestration layer that figures out what the user is trying to do, fills in required campaign fields (asking follow-up questions for anything missing), validates the result, and routes to the correct deterministic tool/adapter call — keeping the LLM's job to understanding intent, not deciding what code runs.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 28

## Id: 07
- **Phase:** MVP
- **Priority:** P0
- **Area:** Campaign Validation
- **Task:** Validate brand, budget, platform, objective, targeting, dates, currency and platform constraints
- **Description:** Add a validation layer that catches problems before a campaign ever reaches a platform API — wrong currency for the account, budget below platform minimums, targeting that doesn't exist on the chosen platform, invalid date ranges, objective/platform mismatches, etc.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 24

## Id: 09
- **Phase:** MVP
- **Priority:** P0
- **Area:** Creative System
- **Task:** Creative generation workflow, variants, approval/rejection, versioning, storage and reuse
- **Description:** Build the pipeline that generates ad creative (copy/images/variants), lets a human approve or reject each one, keeps version history, stores approved assets, and allows a creative to be reused across future campaigns instead of being regenerated every time.
- **Primary Role/Assignee:** Koushik
- **Estimated Hours:** 36

## Id: 10
- **Phase:** MVP
- **Priority:** P0
- **Area:** Creative Selection
- **Task:** Match approved creatives to campaign/platform requirements; ask user to create if none exist
- **Description:** Given a new campaign's platform and format requirements, search the library of already-approved creatives for a match; if nothing fits, prompt the user to create one via the creative generation workflow (task 09) instead of silently failing.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 18

## Id: 11
- **Phase:** MVP
- **Priority:** P0
- **Area:** Budget Optimization
- **Task:** AI budget allocation across selected platforms with constraints, rationale and approval policy
- **Description:** Build the logic that splits a total campaign budget across the chosen platforms based on constraints (minimums, objective, historical performance), explains why it chose that split in plain language, and routes the allocation through an approval policy before it's applied.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 32

## Id: 12
- **Phase:** MVP
- **Priority:** P0
- **Area:** Campaign Builder
- **Task:** Generate title, description, copy, targeting, bids/settings and platform payloads
- **Description:** Assemble everything decided so far (creative, budget, targeting, validation) into the actual per-platform API payloads — titles, descriptions, ad copy, targeting rules, bid/budget settings — ready to hand off to each platform adapter.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 28

## Id: 13
- **Phase:** MVP
- **Priority:** P0
- **Area:** Meta Integration
- **Task:** Implement Meta MCP operations, mapping, error handling, retries and campaign creation
- **Description:** Build the Meta (Facebook/Instagram) adapter implementing the shared platform contract from task 03 — field mapping, campaign creation, error handling, and retry logic against Meta's Marketing API.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 36

## Id: 14
- **Phase:** MVP
- **Priority:** P0
- **Area:** Google Ads MCP
- **Task:** Build Google Ads MCP/adapter for campaign creation, reads, updates and reporting
- **Description:** Build the Google Ads adapter implementing the shared platform contract — campaign creation, reads/updates, and performance reporting against the Google Ads API.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 48

## Id: 15
- **Phase:** MVP
- **Priority:** P0
- **Area:** TikTok MCP
- **Task:** Build TikTok MCP/adapter for campaign creation, reads, updates and reporting
- **Description:** Build the TikTok Ads adapter implementing the shared platform contract — campaign creation, reads/updates, and performance reporting against the TikTok Marketing API.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 44

## Id: 16
- **Phase:** MVP
- **Priority:** P0
- **Area:** Taboola MCP
- **Task:** Build Taboola MCP/adapter for campaign creation, reads, updates and reporting
- **Description:** Build the Taboola adapter implementing the shared platform contract — campaign creation, reads/updates, and performance reporting against the Taboola Backstage API.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 44

## Id: 17
- **Phase:** MVP
- **Priority:** P0
- **Area:** LinkedIn MCP
- **Task:** Build LinkedIn MCP/adapter for campaign creation, reads, updates and reporting
- **Description:** Build the LinkedIn Ads adapter implementing the shared platform contract — campaign creation, reads/updates, and performance reporting against the LinkedIn Marketing API.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 44

## Id: 18
- **Phase:** MVP
- **Priority:** P0
- **Area:** Landing Page AI
- **Task:** Prompt-to-landing-page generation, HTML/CSS rendering sandbox, brand consistency and validation
- **Description:** Build the system that turns a prompt into a rendered landing page (HTML/CSS) in a safe sandbox, checks it against brand guidelines, and validates the output before it's shown to the user for approval.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 40

## Id: 19
- **Phase:** MVP
- **Priority:** P0
- **Area:** Landing Page Approval
- **Task:** Preview, approve, version, store, select and associate approved landing pages with campaigns
- **Description:** Build the approval workflow for generated landing pages — preview, approve/reject, version history, storage, and the ability to associate an approved page with one or more campaigns (mirroring the creative approval flow in tasks 09/10).
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 24

## Id: 20
- **Phase:** MVP
- **Priority:** P0
- **Area:** Campaign Dashboard
- **Task:** Show created campaigns, platform, budget, status, objective, creative, landing page and key KPIs
- **Description:** Build the dashboard listing all campaigns with their platform, budget, status, objective, associated creative/landing page, and headline KPIs — the main operational view for users to check what's running.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 32

## Id: 21
- **Phase:** MVP
- **Priority:** P0
- **Area:** Data Ingestion
- **Task:** Scheduled ingestion of platform metrics into normalized MySQL tables with idempotency
- **Description:** Build the scheduled jobs that pull performance metrics from every connected platform into normalized MySQL tables, written so re-running a job never creates duplicate or corrupted data.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 40

## Id: 22
- **Phase:** MVP
- **Priority:** P0
- **Area:** Internal Data Reconciliation
- **Task:** Compare platform data with MySQL/internal data, detect discrepancies and flag source confidence
- **Description:** Cross-check ingested platform metrics against internal records, flag discrepancies (e.g. spend mismatches, missing events), and surface a confidence score for which source to trust when they disagree.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 32


---

# Optimization

## 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


---

# Insights

## Id: 28
- **Phase:** Insights
- **Priority:** P0
- **Area:** Insights in Chat
- **Task:** Natural-language campaign Q&A, KPI summaries, comparisons, trends, root-cause analysis and recommendations
- **Description:** Let users ask questions about their campaigns in the chat interface ("why did CTR drop last week?") and get back KPI summaries, comparisons across campaigns/platforms, trend analysis, root-cause explanations, and next-step recommendations.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 36

## Id: 29
- **Phase:** Alerts
- **Priority:** P1
- **Area:** Alerts
- **Task:** Email/in-app/Slack-style alerts for anomalies, actions, wins, failures and threshold breaches
- **Description:** Build the notification system that pushes alerts through email, in-app, and Slack-style channels whenever an anomaly is detected, an AI action is taken, a campaign hits a win/failure state, or a configured threshold is breached.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 24

---

# Platform

## Id: 30
- **Phase:** Platform
- **Priority:** P1
- **Area:** Observability
- **Task:** Structured logs, metrics, traces, tool-call logs, AI decision logs and platform error dashboards
- **Description:** Instrument the whole system with structured logs, metrics, and traces, including a dedicated log of every AI tool call and decision, plus dashboards surfacing platform API errors — needed to debug issues and to audit what the AI actually did and why.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 28

---

# AI Quality

## Id: 31
- **Phase:** AI Quality
- **Priority:** P1
- **Area:** AI Evaluation
- **Task:** Test datasets, decision-quality evaluation, hallucination/tool-use checks, regression tests and prompt versioning
- **Description:** Build the evaluation harness for the AI components — curated test datasets, scoring for decision quality, checks for hallucinated data or incorrect tool use, regression tests to catch prompt/model changes that degrade behavior, and version tracking for prompts over time.
- **Primary Role/Assignee:** Unassigned
- **Estimated Hours:** 36
