# /launch-campaign — Multi-Channel Marketing Campaign Orchestrator

## Usage
```
/launch-campaign ship {ideaId}       # Full ship campaign
/launch-campaign milestone {kpiId}   # Milestone celebration campaign
/launch-campaign status              # List active/completed campaigns
```

## Input
- `$ARGUMENTS` — required: campaign type and parameters

## Process

Parse `$ARGUMENTS` to determine the campaign type.

### Type: `ship {ideaId}`

Orchestrate a full ship announcement campaign across all configured channels.

1. **Load Context**:
   - Read `data/ideas.json` — find the shipped idea by ID
   - Read `data/positioning.json` — for copy quality
   - Read `data/social.json` — check if X is configured
   - Check if Loops email is configured (LOOPS_API_KEY in env)
   - Check `data/business-context.json` — ContentFlow config

2. **Generate Campaign Plan**:
   Based on what channels are configured, queue these sub-tasks in TODO.md:
   - `generate-visual-{ideaId}` — Ship card PNG (if not already generated)
   - `video-render-ship-{ideaId}` — Ship video (if ContentFlow configured)
   - `copy-tweet-ship` — Generate positioning-driven tweet copy
   - `social-draft-ship-visual` — Create tweet draft with media (after card/video ready)
   - `email-campaign-feature-announcement` — Email announcement draft
   - `copy-social-linkedin` — LinkedIn post copy

3. **Write Campaign State**: Save to `data/campaigns/{ideaId}-{YYYY-MM-DD}.json`:
   ```json
   {
     "id": "campaign-{ideaId}-{date}",
     "type": "ship",
     "idea_id": "{ideaId}",
     "created_at": "{ISO date}",
     "status": "active",
     "sub_tasks": [
       { "task_id": "generate-visual-{ideaId}", "status": "queued" },
       { "task_id": "video-render-ship-{ideaId}", "status": "queued" },
       { "task_id": "copy-tweet-ship", "status": "queued" },
       { "task_id": "social-draft-ship-visual", "status": "queued" },
       { "task_id": "email-campaign-feature-announcement", "status": "queued" },
       { "task_id": "copy-social-linkedin", "status": "queued" }
     ],
     "channels": ["x", "email", "linkedin"]
   }
   ```

4. **Add Sub-Tasks to TODO.md**: Write each sub-task as a high-priority TODO item.
   Sub-tasks execute on subsequent heartbeats (natural pacing, not all at once).

5. **Print Campaign Summary**: What was queued, which channels, estimated timeline.

### Type: `milestone {kpiId}`

Orchestrate a milestone celebration campaign.

1. **Load KPI Data**: Find the KPI in `data/goals.json`
2. **Queue Sub-Tasks**:
   - `copy-tweet-milestone` — Milestone tweet copy
   - `social-draft-milestone` — Tweet draft
   - `email-campaign-milestone` — Celebration email
3. **Save Campaign State**: Same format as ship, but type "milestone"

### Type: `status`

List all campaigns and their sub-task completion status.

1. Read all files from `data/campaigns/`
2. For each campaign, check sub-task completion (cross-reference with TODO.md)
3. Print summary table

## Output
- Campaign state: `data/campaigns/{id}.json`
- Sub-tasks: Added to `TODO.md` as high-priority items
- Print: Campaign summary with channel list and task queue
