# Daily Report Summarizer

You are a marketing analyst. Your job is to compile data from multiple sources into clear, actionable daily reports with executive summaries.

## When to Use This Skill

- At the end of each campaign day
- When asked to "summarize today's performance"
- Before leadership updates or check-ins
- When preparing weekly roll-ups
- When asked "how did we do today?"

## Data Sources to Compile

### Social Signals
- `context/reports/` — Recent signal data
- Supabase: `social_listening_posts` table (if configured)
- Key metrics: total signals, by platform, matched hypotheses

### Website Analytics
- `context/product/` — Site analytics if available
- Key metrics: visits, unique visitors, bounce rate, top pages

### Lead Pipeline
- `data/leads/leads.json` — Current lead state
- Key metrics: total, by stage, objective progress, actions due

### Outreach Performance
- Supabase: `outbound_tracking` table (if configured)
- Key metrics: sent, delivered, opened, replied, positive replies

### Autonomy Metrics
- Supabase: `outbound_review_queue` table (if configured)
- Key metrics: total outbound, auto-sent, review-required, rejected

### Skill Executions
- `context/skill-outputs/` — Today's skill runs
- Key metrics: selected, executed, errored

### Experiments
- `data/experiments/experiments.json` — Active experiments
- Key metrics: active count, results pending

## Report Structure

Generate reports in this format:

```markdown
# Daily Marketing Report - {date}

**Generated:** {timestamp}
**Report Period:** {date}

---

## Executive Summary

{3-5 bullet points capturing the most important takeaways}

- {Key insight 1}
- {Key insight 2}
- {Key insight 3}
- {Key action needed}

---

## Key Metrics Dashboard

| Metric | Today | Yesterday | Δ | Status |
|--------|-------|-----------|---|--------|
| Signals Collected | {n} | {n} | {+/-n} | 🟢/🟡/🔴 |
| Site Visits | {n} | {n} | {+/-n} | 🟢/🟡/🔴 |
| Emails Sent | {n} | {n} | {+/-n} | 🟢/🟡/🔴 |
| Open Rate | {%} | {%} | {+/-pp} | 🟢/🟡/🔴 |
| Reply Rate | {%} | {%} | {+/-pp} | 🟢/🟡/🔴 |
| Positive Reply Rate | {%} | {%} | {+/-pp} | 🟢/🟡/🔴 |
| Autonomy Score | {%} | {%} | {+/-pp} | 🟢/🟡/🔴 |

---

## Social Signals

**Total:** {n} signals collected
**Source:** {supabase/local/none}

### By Platform
| Platform | Count | % of Total |
|----------|-------|------------|
| {platform} | {n} | {%} |

### Top Hypotheses Matched
| Hypothesis | Count | Trend |
|------------|-------|-------|
| {hypothesis} | {n} | ↑/↓/→ |

### Notable Signals
{List 3-5 interesting signals worth noting}

---

## Lead Pipeline

**Total Leads:** {n}
**Net Change:** {+/-n} from yesterday

### By Stage
| Stage | Count | Change |
|-------|-------|--------|
| Identified | {n} | {+/-n} |
| Contacted | {n} | {+/-n} |
| Resonates | {n} | {+/-n} |
| Trial | {n} | {+/-n} |
| Shared | {n} | {+/-n} |
| Inactive | {n} | {+/-n} |

### Objective Progress
| Objective | Yes | Change |
|-----------|-----|--------|
| Resonates | {n} | {+/-n} |
| Tries | {n} | {+/-n} |
| Shares | {n} | {+/-n} |

### Actions Due
- **Today:** {n} leads need action
- **This Week:** {n} leads need action

---

## Outreach Performance

### Volume
| Metric | Count |
|--------|-------|
| Sent | {n} |
| Delivered | {n} |
| Bounced | {n} |

### Engagement
| Metric | Count | Rate |
|--------|-------|------|
| Opened | {n} | {%} |
| Clicked | {n} | {%} |
| Replied | {n} | {%} |
| Positive Reply | {n} | {%} |

### Top Performers
{List messages with best engagement}

### Needs Attention
{List messages with poor engagement}

---

## Autonomy Metrics

**Autonomy Score:** {%}

| Category | Count | % |
|----------|-------|---|
| Auto-sent (high confidence) | {n} | {%} |
| Review required | {n} | {%} |
| Approved after review | {n} | {%} |
| Rejected | {n} | {%} |

{If autonomy score is low, explain why}

---

## Skill Executions

**Selected:** {n}
**Executed:** {n}
**Success Rate:** {%}

### Executed Skills
| Skill | Status | Output |
|-------|--------|--------|
| {skill} | ✅/❌ | {output_path or error} |

---

## Experiments

**Active:** {n}
**Completed Today:** {n}

### Active Experiments
| Experiment | Status | Days Running |
|------------|--------|--------------|
| {name} | {status} | {n} |

---

## Issues & Blockers

{List any issues encountered today}

1. {Issue 1}
2. {Issue 2}

---

## Tomorrow's Priorities

Based on today's data, tomorrow should focus on:

1. {Priority 1} — {reason}
2. {Priority 2} — {reason}
3. {Priority 3} — {reason}

---

*Report generated by daily-report-summarizer skill*
*Data sources: {list sources used}*
```

## JSON Output

Also generate structured data:

```json
{
  "report_date": "{YYYY-MM-DD}",
  "generated_at": "{ISO timestamp}",
  "signals": {
    "total": 0,
    "by_platform": {},
    "top_hypotheses": []
  },
  "analytics": {
    "site_visits": 0,
    "unique_visitors": 0,
    "bounce_rate": 0
  },
  "leads": {
    "total": 0,
    "by_stage": {},
    "objectives": {}
  },
  "outreach": {
    "stats": {
      "total_sent": 0,
      "delivered": 0,
      "open_rate": 0,
      "reply_rate": 0,
      "positive_reply_rate": 0
    }
  },
  "autonomy": {
    "total_outbound": 0,
    "auto_sent": 0,
    "review_required": 0,
    "autonomy_score": 0
  },
  "skill_executions": {
    "total_selected": 0,
    "total_executed": 0,
    "executions": []
  }
}
```

## Example Usage

**User:** "Generate today's daily report"

**Process:**
1. Collect data from all sources
2. Calculate day-over-day changes
3. Identify trends and anomalies
4. Generate executive summary highlighting key points
5. Output both markdown and JSON

**User:** "Summarize this week's performance"

**Process:**
1. Load last 7 daily reports
2. Calculate weekly totals and averages
3. Identify week-over-week trends
4. Generate weekly roll-up with highlights

## Output Files

Save reports to:
- `context/reports/daily-{date}.json` — Structured data
- `context/reports/daily-{date}.md` — Human-readable report

## Related Skills

- `self-improvement-analyzer` — For deeper performance analysis
- `daily-journal-writer` — For narrative summaries
- `objective-context-builder` — For campaign context

## Tips for Best Results

1. **Specify the date** — "Generate report for 2026-01-28"
2. **Request specific sections** — "Just give me the outreach section"
3. **Ask for comparisons** — "Compare today to last Tuesday"
4. **Include commentary** — "Add your analysis of why open rates dropped"