:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(signals): port insight-alerts scout to the report channel (#67378)
Andrew Maguire6741f56e4dc6
diff --git a/products/signals/skills/signals-scout-insight-alerts/SKILL.md b/products/signals/skills/signals-scout-insight-alerts/SKILL.mdindex 57968bea75f9..8b4d9bdf3e2e 100644--- a/products/signals/skills/signals-scout-insight-alerts/SKILL.md+++ b/products/signals/skills/signals-scout-insight-alerts/SKILL.md@@ -2,14 +2,15 @@name: signals-scout-insight-alertsdescription: >Signals scout over a project's own configured insight alerts. Reads each alert's recent- firing history and surfaces the firings a human likely missed — especially ones the standard- notification path stayed silent on.+ firing history and files a report for the firings a human likely missed — especially ones+ the standard notification path stayed silent on.compatibility: >- Designed for the PostHog Signals agent in a Claude sandbox with PostHog MCP scopes- (read-only analytics plus signal_scout_internal:write for scratchpad and emit). Assumes the- signals-scout MCP family (project-profile-get, runs-list, runs-retrieve, scratchpad-search,- scratchpad-remember, scratchpad-forget, emit-signal) plus the alert tools (alerts-list,- alert-get), insight-get, and inbox-reports-list.+ PostHog Signals agent (Claude sandbox). Read-only analytics + signal_scout_internal:write+ (scratchpad) + signal_scout_report:write (report channel), plus the alert tools (alerts-list,+ alert-get), insight-get, and the inbox tools in the MCP tools section.+allowed_tools:+ - emit_report+ - edit_reportmetadata:owner_team: signalsscope: insight_alerts@@ -23,6 +24,15 @@ decided what's worth watching when they created each alert, so your job is **notanomalies — it's to read recent firing history, suppress the noise, and tell a human aboutthe few recent firings they **most likely missed**, once a day.+You author reports directly via the report channel (`signals-scout-emit-report` /+`signals-scout-edit-report`): you've triaged the firing history yourself, so you own each+report 1:1 end-to-end rather than firing weak signals for a pipeline to cluster. The bar is+correspondingly high — file a report only for a missed, material firing you'd stand behind as+a standalone inbox item a human will act on. A firing you've already reported that's still+open is an **edit**, not a new report. The harness prompt carries the full report-channel+contract (fields, status mapping, reviewer routing, dedupe, and the edit rules); this body+adds only the insight-alerts-specific framing.+**The discriminator.** A finding is a _recent firing the team likely missed_. Because theuser set the threshold themselves, a firing is presumptively meaningful — you triage, youdon't re-detect. Rank each recent firing by **missed-ness × materiality × persistence**:@@ -44,10 +54,10 @@ longer evaluating) is a blind spot worth a low-severity callout, but it is _not_## Quick close-out: are there even alerts firing?Cheap read first: `alerts-list`. If the project has **zero enabled alerts**, write one-`not-in-use:insight_alerts:team{team_id}` entry and close out empty. If every enabled alert is+`not-in-use:insight_alerts` entry and close out empty. If every enabled alert is`Not firing`, nothing was `last_notified_at` inside your window, and no alert is `Errored`,-write/refresh `pattern:insight_alerts:baseline-team{team_id}` and close out — the configured-alerts are all quiet, which is a real outcome. (Re-using either key idempotently refreshes it.)+write/refresh `pattern:insight_alerts:baseline` and close out — the configured alerts are all+quiet, which is a real outcome. (Re-using either key idempotently refreshes it.)## How a run works@@ -57,13 +67,19 @@ Cycle between these moves; skip what's not useful.- `signals-scout-scratchpad-search` (`text=insight_alerts`, `limit=100`) — your durablesteering: the baseline, which alerts you've already surfaced (`dedupe:`), which are known- flappy/test (`noise:`), and which the team has muted or fixed (`addressed:`/`allowlist:`).+ flappy/test (`noise:`), which the team has muted or fixed (`addressed:`/`allowlist:`), which+ report covers a firing (`report:`), and who owns an alert (`reviewer:`).- `signals-scout-runs-list` (last 7d) — what prior runs of this scout surfaced and ruled out,so you don't re-file yesterday's digest.- `alerts-list` — the cheap triage layer over **every** alert at once. Read each row's`state`, `enabled`, `snoozed_until`, `last_notified_at`, `last_checked_at`, `last_value`,`calculation_interval`, and threshold/`condition`/`detector_config`. This is your candidatefunnel — don't pull per-alert history for all of them.+- `inbox-reports-list` (`ordering=-updated_at`, `search`=the specific alert or insight name) —+ the reports already in the inbox. Your own report-channel reports persist their backing+ signals under `source_product=signals_scout`, so don't filter by product — you'd miss every+ report you authored. A firing on an alert you've reported before is an **edit**, not a fresh+ report; pull the closest matches with `inbox-reports-retrieve` before authoring.### Narrow to candidates (this matters on big projects)@@ -102,52 +118,65 @@ and compare them against the firing check's `calculated_value`, and pull the insWrite a scratchpad entry whenever a future run should change behavior. Encode the category inthe key prefix; key per-alert entries on the **alert id** (stable across firings).-- `pattern:insight_alerts:baseline-team{team_id}` — "~{N} enabled alerts, ~{X} firing/day,- mostly hourly; many owners. {timestamp}"-- `dedupe:insight_alerts:{alert_id}:{fired_date}` — "{date}: surfaced firing of '{name}'- (alert {alert_id}, insight {short_id}), value {v} vs bound {b}, silent. If still Firing next- run, escalate; if resolved + notified, treat as covered."+- `pattern:insight_alerts:baseline` — "~{N} enabled alerts, ~{X} firing/day, mostly hourly;+ many owners. {timestamp}"+- `dedupe:insight_alerts:{alert_id}` — "Surfaced firing of '{name}' (alert {alert_id}, insight+ {short_id}) on {date}, value {v} vs bound {b}, silent. If still Firing next run, edit the+ report; if resolved + notified, treat as covered."- `noise:insight_alerts:{alert_id}` — "flaps every few hours on a too-tight bound; the firingitself isn't signal. Only surface as a one-off tuning hygiene finding, never per-flap."- `addressed:insight_alerts:{alert_id}` / `allowlist:insight_alerts:{alert_id}` — team fixed/ acked it, or owner deliberately keeps it low-priority — skip.+- `report:insight_alerts:{alert_id}` — the `report_id` of a report you filed for a firing on+ this alert, so the next run edits it (append_note with the fresh firing) instead of+ duplicating.+- `reviewer:insight_alerts:{alert_id}` — a resolved owner (bare lowercase GitHub login) for an+ alert or its insight, so reports route to a human faster.### Decide-Classify each candidate firing against prior runs and the scratchpad (net-new /-material-update / already-covered / addressed-or-noise), then:--- **Emit** via `signals-scout-emit-signal` when a firing clears the bar. Because the alert- already did the detection, confidence is high once you've read the actual checks — a strong- finding is: an enabled, un-snoozed alert with a **material** firing (well past its bound or a- high anomaly score) inside the window that was **under-notified** (silent / suppressed) or is- **still open and unacted**, with the alert id, insight `short_id`, the firing- `calculated_value` vs the threshold bound, the fired-at time, and the notification status all- in the evidence; confidence ≥ 0.7. Cross-check `inbox-reports-list` first.-- **Cap and rank.** Emit at most ~5 firings per run, worst-first by the discriminator. If more- cleared the bar, say how many you dropped in the close-out — never silently truncate. (One- digest-style finding that bundles several minor firings is also fine when none individually- warrants its own entry; bundle the flapping/Errored hygiene items this way rather than one- finding each.)+The generic report mechanics — search the inbox first (via the `report:insight_alerts:{alert_id}`+pointer, else an `inbox-reports-list` search on the specific alert / insight name, not a broad+word like `alert`), edit-vs-author, the status rules, reviewer routing, non-idempotent dedup,+and the `priority` / `repository` fields — live in the harness prompt and in `authoring-scouts`+→ `references/report-contract.md`. Do not re-derive them here. Classify each candidate firing+against prior runs and the scratchpad (net-new / material-update / already-covered /+addressed-or-noise), then apply only the insight-alerts judgment:++- **Edit** when a still-live report already tracks the alert — a firing you surfaced that's+ still open, or a recurrence on the same alert. A persistent breach is one report across runs:+ `append_note` the fresh firing (`calculated_value` vs bound, the new fired-at, current+ notification status), not a fresh report per day.+- **Author** when nothing live covers the firing. A report-worthy finding is an enabled,+ un-snoozed alert with a **material** firing (well past its bound or a high anomaly score)+ inside the window that was **under-notified** (silent / suppressed) or is **still open and+ unacted**, with the alert id, insight `short_id`, the firing `calculated_value` vs the+ threshold bound, the fired-at time, and the notification status in the `evidence`. This is a+ triage callout, not a code fix → `actionability=requires_human_input`. Priority: a material,+ silent firing on a clearly important metric is **P1**; a material firing that was notified but+ is still open/unacted is **P2**; Errored-alert blind spots and flapping-threshold hygiene are+ **P3**.+- **Cap and rank.** File at most ~5 reports per run, worst-first by the discriminator. If more+ cleared the bar, say how many you dropped in the close-out — never silently truncate. One+ digest-style report that bundles several minor firings is fine when none individually warrants+ its own entry; bundle the flapping/Errored hygiene items this way rather than one report each.- **Remember** if it's suggestive but below the bar (a marginal breach, a single flap), or torefresh the baseline / record what you ruled out.-- **Skip** if a `noise:` / `addressed:` / `allowlist:` / `dedupe:` entry already covers it.--Severity: **P1** a material, silent firing on a clearly important metric; **P2** a material-firing that was notified but is still open/unacted; **P3** Errored-alert blind spots and-flapping-threshold hygiene.+- **Skip** if a `noise:` / `addressed:` / `allowlist:` / `dedupe:` entry, or an existing inbox+ report, already covers it.-dedupe_keys: `alert_firing:{alert_id}` plus `insight:{short_id}`. finding_id:-`insight-alert-{alert_id}-{date}`. A firing that recurs on a later day is a new finding that-cites the prior `finding_id`.+Sibling courtesy: `observability-gaps` recommends _creating_ alerts and `anomaly-detection`+scores the insights the team _views_ (whether or not they're alerted) — you own the firings of+alerts that already exist. Honor their `dedupe:` entries; your unique angle is the missed-firing+triage frame.### Close out-One paragraph: how many alerts you triaged, which firings you surfaced (and why those), what-you ruled out (flaps, snoozed, already-notified-and-resolved), and how many cleared the bar-but were dropped for the per-run cap. The harness saves this as the run summary. "Triaged the-candidates, everything firing was already notified and acted on" is a real outcome — do not-write a separate run-metadata scratchpad entry.+One paragraph: how many alerts you triaged, which reports you authored or edited (and why+those), what you ruled out (flaps, snoozed, already-notified-and-resolved), and how many cleared+the bar but were dropped for the per-run cap. The harness saves this as the run summary.+"Triaged the candidates, everything firing was already notified and acted on" is a real outcome+— do not write a separate run-metadata scratchpad entry.## Disqualifiers (skip these)@@ -160,13 +189,13 @@ write a separate run-metadata scratchpad entry.(`notification_sent_at` set), and it's back to `Not firing`. The team saw it and it's over;skip unless it's materially recurring across days.- **Marginal breaches on low-count/noisy series** — `calculated_value` sitting right on the- bound, or a tiny absolute count. Below the materiality floor; remember, don't emit.+ bound, or a tiny absolute count. Below the materiality floor; remember, don't report.- **Dev / test / internal-only alerts** — alerts on insights whose `$environment`/service is`dev`/`local`/`test`, or a single owner's sandbox alert. Not user-facing.- **Transient single-check errors** — an alert that errored once and recovered. Only flag**persistent** Errored state across consecutive checks.-When in doubt, refresh memory instead of emitting.+When in doubt, refresh memory instead of filing a report.## MCP tools@@ -178,12 +207,20 @@ Direct (read-only):history for one candidate: per-check `state`, `calculated_value`, `targets_notified`,`notification_sent_at`, `notification_suppressed_by_agent`, `error`, anomaly scores.- `insight-get` — what the alerted metric actually is (read when judging materiality).-- `inbox-reports-list` — check the firing isn't already reported before emitting.++Inbox & reviewer routing (mechanics in `authoring-scouts` → `references/report-contract.md`):++- `inbox-reports-list` / `inbox-reports-retrieve` — the reports already in the inbox; check+ before authoring so you edit instead of duplicating.+- `inbox-report-artefacts-list` — a comparable report's artefact log; reviewer precedent.+- `signals-scout-members-list` — the in-run roster for routing `suggested_reviewers` to an+ alert / insight owner.Harness-level: `signals-scout-project-profile-get`, `signals-scout-scratchpad-search`,`signals-scout-runs-list`, `signals-scout-runs-retrieve` (orientation + dedupe);-`signals-scout-emit-signal`, `signals-scout-scratchpad-remember`,-`signals-scout-scratchpad-forget` (emit + memory).+`signals-scout-emit-report` / `signals-scout-edit-report` (author / edit a report — the+report-channel contract is in the harness prompt); `signals-scout-scratchpad-remember`,+`signals-scout-scratchpad-forget` (memory).## When to stop