> ## Documentation Index
> Fetch the complete documentation index at: https://cofounder.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reviews & Crisis Mode

> Sentiment cliff detector that elevates 1-star spikes above the daily briefing.

Two layers of review intelligence.

## Layer 1 — Daily review summary

Every run pulls reviews from two sources and merges them:

* **Appeeky API** — public reviews scraped from the App Store (since `lastRunAt`)
* **App Store Connect** — `asc_reviews` table (richer: territory, response state, app version)

Surfaced in the briefing as:

```
## ASC Reviews (12 total)
Total in window: 12 | Avg: 3.2★ | Distribution: 1★×5 2★×2 3★×1 4★×1 5★×3
Unanswered: 8 (opportunity to respond and improve rating)
Top territories: US:5, GB:3, DE:2

Recent reviews:
[1★ ⚑ no reply | US, v3.2.1] "Crashes on launch": Opens then immediately closes...
[5★ ✓replied | DE, v3.2.0] "Lifesaver": Best screenshot tool I've found...
```

Unanswered reviews are flagged so the agent can propose `asc_review_reply` actions (in write mode).

## Layer 2 — Crisis Mode

A rolling 30-day baseline is maintained per app in `cofounder_review_baselines`:

```
sample_size:        78
avg_rating:         4.2
one_star_share:     0.083 (8.3%)
rating_distribution: { 1: 6, 2: 4, 3: 8, 4: 21, 5: 39 }
```

Each run we sample the **last 24 hours** and compare. A **crisis** is declared when:

1. ≥ 3 negative reviews (1-star) in 24h, AND
2. The 1-star share is ≥ 3× the baseline

When triggered, the agent surfaces it **above** the regular briefing:

```
## 🚨 CRITICAL CRISIS — Review sentiment shift
Last 24h: 9 reviews | 7 one-star (77.8% share)
Baseline (30d, n=78): 8.3% one-star
Affected versions: 3.2.1

Negative review excerpts:
  [1★ | US, v3.2.1] "App is broken": Won't even open after the latest update
  [1★ | DE, v3.2.1] "Crashes constantly": Was great, now unusable
  ...
```

When the share is elevated but doesn't meet the crisis threshold, the agent shows it as `⚠️ Elevated negativity` instead.

## What the LLM does with it

* `crisis` field in the structured `DailyReport` is populated with severity (`watch` / `elevated` / `critical`)
* The briefing leads with the crisis section
* A `prioritizedAction` is added with `priority: "critical"` recommending an immediate fix
* If a version is implicated, the agent proposes a hotfix path (e.g., a `linear_issue` or `github_issue` action)

## False-positive guard

The minimum-3-reviews floor prevents tiny apps from triggering crises off a single bad week. The 30-day window is rolling so the baseline naturally adapts to your app's normal review noise level.
