: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
chore(signals): give the product analytics scout a stable dedupe key (#98793)
posthog[bot]d5e1441666da
diff --git a/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md b/products/signals/skills/authoring-scouts/references/dedupe-and-memory.mdindex acd89120458f..42ff39007d57 100644--- a/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md+++ b/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md@@ -46,6 +46,7 @@ And only ever forget keys under your own prefix that you created: `scout-scratch| `reviewer:` | A resolved owner (bare lowercase GitHub login), keyed `reviewer:<domain>:<area>`, so the next run sets `suggested_reviewers` without re-resolving. |Format: `<prefix>:<domain>:<entity>` — e.g. `pattern:error_tracking:baseline`, `noise:logs:rabbitmq-deploy-window`, `dedupe:csp_violations:a1b2c3d4`.+**Never put a date in a key.** Key off the stable identity of the thing and keep the dates in the content, so a re-confirming run updates one row rather than adding another the next run won't match.The self-driving implementation run writes here too, under `pattern:impl:<repository>:<area>`, recording what it worked out about that repository while acting on a report.Each canonical specialist has its own `<domain>` label (`error_tracking`, `logs`, `llm_analytics`, `experiments`, `feature-flags`, `session-replay`, `web-analytics`, `pipelines`, `health`, …) — not a closed set.A new scout introduces its own domain label and reuses the prefixes; match the label a surface's existing entries already use.@@ -66,14 +67,14 @@ A new scout introduces its own domain label and reuses the prefixes; match the lGood entries are **future-run actionable** — the next scout reads them and changes behavior:```text-key: dedupe:error_tracking:019de34e-2026-05-01+key: dedupe:error_tracking:019de34econtent: "2026-05-01: surfaced UndefinedTable on access_control_propertyaccesscontrol(issue 019de34e...) — 434 users hit it 11:31-13:22 UTC, then stopped. If a futurerun sees this issue still firing, escalate; if quiet since 13:22, treat asalready-surfaced."```-Why it works: dated, names the entity id, gives a clear conditional ("still firing → escalate; quiet → skip"), bounded by a precise time anchor, and the key prefix makes it findable.+Why it works: the key is the bare entity id and the dates live in the content, so re-confirming rewrites this same row instead of minting a second one the gate can't match. It names the entity id, gives a clear conditional ("still firing → escalate; quiet → skip"), bounded by a precise time anchor, and the key prefix makes it findable.Bad entry: key `note-1`, content "we have errors today, FYI" — no actionability, no entity, no condition, uncategorized key the next run can't find or act on.Give your scout 2–3 worked example entries scoped to its surface so each run matches the format instead of inventing its own.diff --git a/products/signals/skills/signals-scout-product-analytics/SKILL.md b/products/signals/skills/signals-scout-product-analytics/SKILL.mdindex 0bf4de42bd6d..184c84863471 100644--- a/products/signals/skills/signals-scout-product-analytics/SKILL.md+++ b/products/signals/skills/signals-scout-product-analytics/SKILL.md@@ -88,15 +88,15 @@ Maintain the watchlist and baselines as you work, encoding the category in the k- `watchlist:product_analytics:flow:<short_id>` — a curated flow: name, kind (funnel/retention/lifecycle/stickiness), the events/steps, cadence, `inferred?`, and `last_scored` + `next_due`.- `baseline:product_analytics:flow:<short_id>` — the learned normal: per-step conversion % band (median + MAD), or the retention curve band per day-offset, so the next run scores cheaply instead of recomputing the full baseline.-- `dedupe:product_analytics:flow:<short_id>:<date>` — a regression already surfaced, with the condition that should re-escalate it (a further drop, or recovery + relapse).+- `dedupe:product_analytics:flow:<short_id>:<rate>` — a regression already surfaced on this flow's specific rate (the affected step/cohort/state), with the condition that should re-escalate it (a further drop, or recovery + relapse). **One stable key per regression — never date the key.** A dated key mints a fresh row every run, so the gate never matches and the same regression files again. Keep the dates in the content instead: first seen, each later observation, and what would re-escalate. For example, key `dedupe:product_analytics:flow:aB3xY9z:step2` — _"Step-2 conversion regression on `Signup → activation` (62% → 48%, step-1 entrants steady ~5.2k/day). First seen 2026-06-09, re-confirmed 2026-06-16 at 47%. While it sits below the 60–64% baseline band, append the fresh window to the report and update this entry in place — do not author again. Re-escalate only if it drops another ~5 points, or recovers above the band and then relapses."_ Re-confirming rewrites this same row; a distinct rate on the same insight gets its own key, so separate regressions on one insight do not collide.- `report:product_analytics:flow:<short_id>:<rate>` — the `report_id` of a report you authored for a regression on this flow's specific rate (the affected step/cohort/state), so the next run edits _that rate's_ report (`append_evidence` with the fresh window) instead of duplicating; a distinct rate on the same insight gets its own pointer and its own report.- `reviewer:product_analytics:<area>` — a resolved owner (bare lowercase GitHub login) for a flow / product area, so reports route to a human faster.### Decide-Before you author, check whether this flow already has a report — the `report:product_analytics:flow:<short_id>` scratchpad pointer is the reliable path: it holds the `report_id`, so `inbox-reports-retrieve` it directly. Only with no pointer fall back to an `inbox-reports-list` search (`ordering=-updated_at`), and search the flow's _specific_ terms (its name, the step events, the `short_id`) — a broad word like `funnel` returns hundreds of unrelated reports on a busy project and buries yours. Classify each candidate against prior runs and the scratchpad (net-new / material-update / already-covered / addressed-or-noise), then:+Before you author, check whether this flow already has a report — the `report:product_analytics:flow:<short_id>:<rate>` scratchpad pointer is the reliable path: it holds the `report_id`, so `inbox-reports-retrieve` it directly. Only with no pointer fall back to an `inbox-reports-list` search (`ordering=-updated_at`), and search the flow's _specific_ terms (its name, the step events, the `short_id`) — a broad word like `funnel` returns hundreds of unrelated reports on a busy project and buries yours. Classify each candidate against prior runs and the scratchpad (net-new / material-update / already-covered / addressed-or-noise), then:-- **Edit** the existing report via `scout-edit-report` when the inbox already covers the flow. A regression is rarely brand-new — a funnel that's still sliding, a retention cliff that deepened, a flow that recovered then relapsed: use `append_evidence` for the fresh window's rate, baseline band, and entrant volumes (or rewrite the title/summary on a report you authored). This is the default when a match exists **and it's still live in the inbox**; don't mint a near-duplicate. **A persistent regression is one report across weeks:** when a new complete window confirms the flow is still below baseline (or has deepened), that's a _re-escalation_ — add the fresh week with `append_evidence`, and advance the `dedupe:…:<week>` gate. Do **not** author a fresh report per week. The same flow moving twice is one report, not two. **But scope the match to the same rate, not just the same `short_id`:** one funnel/retention insight carries several independent rates (step-2 vs step-5 conversion, one retention cohort vs another, one lifecycle state), and a drop on a _different_ step/cohort is its own regression with its own owner — keep the `report:product_analytics:flow:<short_id>` pointer keyed to the affected rate (e.g. `…:flow:<short_id>:step2`) and only `edit-report` when the matched report covers that same rate; a genuinely distinct rate gets a fresh report so it isn't buried under an unrelated thread. **And check the matched report's status first:** `edit-report` can't change status, so appending to a `resolved` / `suppressed` / `failed` report (one that won't surface in the inbox) buries a real relapse under a closed item. When the prior report is no longer live, **author a fresh report** for the relapse and repoint `report:product_analytics:flow:<short_id>` at the new id.+- **Edit** the existing report via `scout-edit-report` when the inbox already covers the flow. A regression is rarely brand-new — a funnel that's still sliding, a retention cliff that deepened, a flow that recovered then relapsed: use `append_evidence` for the fresh window's rate, baseline band, and entrant volumes (or rewrite the title/summary on a report you authored). This is the default when a match exists **and it's still live in the inbox**; don't mint a near-duplicate. **A persistent regression is one report across weeks:** when a new complete window confirms the flow is still below baseline (or has deepened), that's a _re-escalation_ — add the fresh week with `append_evidence`, and rewrite the flow's `dedupe:product_analytics:flow:<short_id>:<rate>` entry in place with the new observation. Do **not** author a fresh report per week. The same flow moving twice is one report, not two. **But scope the match to the same rate, not just the same `short_id`:** one funnel/retention insight carries several independent rates (step-2 vs step-5 conversion, one retention cohort vs another, one lifecycle state), and a drop on a _different_ step/cohort is its own regression with its own owner — keep the `report:product_analytics:flow:<short_id>:<rate>` pointer keyed to the affected rate (e.g. `…:flow:<short_id>:step2`) and only `edit-report` when the matched report covers that same rate; a genuinely distinct rate gets a fresh report so it isn't buried under an unrelated thread. **And check the matched report's status first:** `edit-report` can't change status, so appending to a `resolved` / `suppressed` / `failed` report (one that won't surface in the inbox) buries a real relapse under a closed item. When the prior report is no longer live, **author a fresh report** for the relapse and repoint that rate's `report:product_analytics:flow:<short_id>:<rate>` entry at the new id.- **Author** a fresh report via `scout-emit-report` when nothing in the inbox covers it (or a known regression has new evidence that changes the verdict). A **strong finding** here: the rate dropped clearly below the flow's seasonality-matched baseline (robust z ≥ ~3, or a conversion-point drop beyond the baseline band), the **entrant denominator held** (quantify both — "step-2 conversion 62%→48% while step-1 entrants steady at ~5.2k/day"), the move is broad across segments (not one known cohort), and it's not explained by a running experiment or a flow-definition edit. Put the flow `short_id`, the latest-window rate, the baseline band, the per-step/per-cohort numbers, the entrant volumes, and the time window in the `evidence`. A rate regression is chart-shaped — attach the regressed rate via `charts`, matched to the flow type: a funnel or retention rate with its steady entrant denominator alongside (the drop-on-steady-entrants shape), lifecycle as the state composition over time, stickiness as the frequency distribution against its population. A behavioral regression is an investigation with a starting point, not a question for a person: the flow, the step that moved, and the onset are where an agent begins, so set `actionability=immediately_actionable`, set `priority`, and name the `repository` that owns the flow (omit the field when you can't tell which repo that is, so selection can find it). Keep `actionability=requires_human_input` for a move whose next step is a product call — whether the new behavior was intended, which of several valid flows should win — and on those **leave `priority` and `repository` unset**, since they're PR-autostart fields and supplying `priority` + `suggested_reviewers` with no `repository` signals PR intent that spins up a repo-selection sandbox only to no-op (autostart needs `immediately_actionable`). Reach for them (P2 broad regression on a human-saved flow, P3 single-segment / `inferred`) only on the rare regression you'd actually want a draft PR for. **Set `suggested_reviewers` whenever you can confidently resolve one** — each entry is `{github_login?, user_uuid?}`, and the usual route here is to pass the flow's owning person as a `user_uuid`, or reuse a cached `reviewer:product_analytics:<area>` login. **`user_uuid` resolution is fail-loud: a `created_by` that is not an org member rejects the whole `emit-report`, not only the reviewer.** Do not pass a raw `created_by` if you cannot verify membership. Prefer a cached login or a `created_by` that routed before. You can also author the report without a reviewer and add one later. `scout-members-list` gives this project's members with their `user_uuid` and resolved `github_login`. Routing helps the report reach a human, so resolve an owner when you can. After authoring, write a rate-scoped `report:product_analytics:flow:<short_id>:<rate>` scratchpad entry with the `report_id`. Use a separate entry for each rate. The harness prompt carries the full report-channel contract.- **Remember** if suggestive but below that bar, or to refresh a baseline.- **Skip** if a `noise:` / `addressed:` / `dedupe:` entry, or an existing inbox report, already covers it.