: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): bring the scout skills in line with the current harness (#99539)
Andrew Maguirec60c050c39f2
diff --git a/products/signals/skills/authoring-scouts/SKILL.md b/products/signals/skills/authoring-scouts/SKILL.mdindex a654d2e78752..5543831cdb3b 100644--- a/products/signals/skills/authoring-scouts/SKILL.md+++ b/products/signals/skills/authoring-scouts/SKILL.md@@ -118,6 +118,10 @@ For an **existing scout**, tune with `posthog:scout-config-update` (find the `id- `run_interval_minutes` — 30 to 43200.Default 1440 (every 24 hours).Slow a chatty or expensive scout by raising this.+- `run_cron_schedule`: a five-field cron expression (`'30 9 * * *'`, `'0 9 * * 1-5'`) evaluated in the project's timezone; occurrences must be at least 30 minutes apart.+ When set it takes precedence over `run_interval_minutes`, so a "slow it down" edit on a cron scout has to change or clear the cron (set `null` to return to the rolling interval).+ A new or edited schedule anchors on the edit time and waits for its next slot rather than catching up on a past one.+ Reach for it when the run should land at a wall-clock time: a digest before standup, a weekday-only watch.- `enabled` — `false` pauses the scout entirely (coordinator skips it).- `emit` — defaults to **`true`**: the scout writes its reports straight to the inbox.The standard flow is to make a scout and let it write — seeing what actually lands is the fastest way to calibrate it.@@ -141,10 +145,18 @@ For an **existing scout**, tune with `posthog:scout-config-update` (find the `idApplies from the scout's next run.- `output_destinations` — defaults to none.When adding Slack to an existing scout, first read `output_destinations`, then send the full object with every key preserved. Updates replace the object, so sending only `slack` removes an existing `webhook` pointer.- Set `slack` to deliver every report the scout emits to Slack as well as the inbox: an `integration_id` for the workspace, plus either a `channel` (`channel_id|#channel-name`) or up to five `users` to DM (`member_id|@display-name`), never both.+ Set `slack` to deliver every surfaced report the scout emits (`ready` or `pending_input`) to Slack as well as the inbox; a report the judge suppressed stays out of Slack by design: an `integration_id` for the workspace, plus either a `channel` (`channel_id|#channel-name`) or up to five `users` to DM (`member_id|@display-name`), never both.+ A scoped API key or OAuth token needs `integration:read` and `task:read` (or the matching write scopes) on top of `signal_scout:write` to set `slack`; a minimally scoped credential gets a permission error.`thread_reports: true` posts a report as a short lead message with the rest split into replies at the summary's section labels, so a long report isn't clipped; it doesn't change how findings post.Slack delivery is a firehose of that one scout's output — no priority filter, no reviewer routing — so it suits a scout whose bar is already tight rather than a chatty one you're still calibrating.A Slack-delivered scout is also exempt from the ignored-reports auto-pause, since consumption there isn't measurable.+- `display_name`: the name the UI shows for the scout. Leave blank to use the default derived from the skill name; it never changes `skill_name`, which stays fixed.+ The only setting here the nested `config` on `scout-create` does not take: set it with a `-config-update` after creation.+- `model`: pins the model the scout's runs use. Leave unset to follow the fleet default, which is what most scouts should do; set it when a scout's job needs a stronger model (long research) or a cheaper one (a frequent, mechanical probe) and say why in the body.+ Early access: on a project not enrolled in the `scouts-model-config` preview, any non-null value is rejected with "Choosing a scout model is not available on this project yet.", so only recommend pinning where that flag is on.+- `mcp_gateway_server_ids`: MCP store servers (by id) this scout's runs may mount, chosen from the connections members have shared with the whole team.+ Empty (the default) mounts none of the shared servers. The intent is that only team-shared connections back a scout run, so runs behave the same whoever edits the scout; where MCP gateway enforcement is not yet active on the project, the launch path may still mount the acting user's personal connections, so check the run's mounted servers in its transcript when that matters.+ Treat it like `network_access`: it hands the scout third-party tools with whatever access the shared connection carries, changes are activity-logged, and the body should name what the scout uses each server for.- `tags` — free-form labels grouping the fleet, e.g. `["revenue", "on-call"]`. Up to 10 per scout, normalized to lowercase kebab-case (`On Call` → `on-call`) and deduped.Set them at create time: a scout that lands already grouped saves a follow-up edit, and the desktop app's scout list filters on them.Prefer a tag that already exists on the fleet (`-config-list` shows every scout's tags) over minting a near-duplicate — `revenue` and `revenue-analytics` fragment the same group.@@ -173,8 +185,12 @@ The tools (reads on the public `signal_scout:read` scope; because scouts read no- `posthog:scout-notes-create {"content": "...", "skill_name": "signals-scout-web-analytics"}` — address one scout by its exact skill name (roster via `scout-config-list`; the skill must already exist, so a typo'd target is rejected instead of silently steering no one), or omit `skill_name` for a general note every scout sees.Optionally set `expires_at` so a time-boxed note ("watch closely this week") retires itself.+ `skill_name: "pipeline:report-research"` addresses the report pipeline's research stage instead of any scout, for guidance about how the reports it builds from clustered signals get researched, judged, and routed ("route billing-adjacent reports to the billing folks"). Reports a scout authors directly never pass through that stage, so a rule for them belongs in a fleet-wide note (omit `skill_name`) or a per-scout one. It is the only `pipeline:*` audience; any other value is rejected.- `posthog:scout-notes-list` — browse the active notes; pass `skill_name` to see what a given scout will read.+ Expect system-derived notes alongside the human ones: a dismissal or snooze note, a Discuss question, a thumbs-rating note, and a reviewer add/remove on a report are each forwarded to the relevant scout as a note, labelled by `origin` (`report_dismissal`, `report_discussion`, `report_feedback`, `report_reviewer_correction`; a note left directly is `human`). Derived notes expire on their own after ~30 days.+ Three caveats: a Discuss question or rating note only forwards when the person had the notes-write authorization themselves (skill-editor access plus, on a scoped credential, `signal_scout:write` and `llm_skill:write`); a reviewer correction only forwards when the person had skill-editor access on the canonical project (the reviewer change itself still lands on the report); and the list hides every derived origin from a caller without report read access (`task:read`), since they quote report content. A missing derived note can mean either. A dismissal note is still on the report and a Discuss question on its discussion task, but a rating note exists only as the forwarded scout note (plus an analytics event), so a rating note that did not forward is gone.- `posthog:scout-notes-delete {"id": "..."}` — retire a note that's been acted on or no longer applies.+- `posthog:scout-run-now {"id": <config_id>, "note": "..."}`: steer one run only. The note (up to 1,000 characters) is read by that run next to the durable notes and is never delivered to a later run as a note, so use it for "check this now" instead of a note every scheduled run would keep reading. It does stay visible in that run's metadata (`run_note`) when a later run reads its history, so phrase it as a dated one-off ("today only: ...") rather than standing policy. It needs skill-editor access and, on a scoped credential, `llm_skill:write` on top of the base `signal_scout:write`, the same two scopes as a durable note (a 403 otherwise; drop the note to run without it), and spends a run like any manual dispatch.How scouts treat notes: every run reads its notes in step 1 and is told to let a fresh note visibly shape what it investigates — but notes are **advisory**.They direct attention; they don't lower the scout's evidence bar or force a report, so a note saying "report X" still gets an honest investigation, not an automatic emit.@@ -210,7 +226,8 @@ The standard loop is **dogfood → run once ready → inspect**:1. Dogfood the discriminator + explore patterns yourself against the live project (above).Refine the body until the logic holds on real data — this is the cheap, iterable part.-2. Create the scout and its config together via `posthog:scout-create` (schedule and the default `emit=true` go in the nested `config`), then spend one `-run-now` to watch the whole scout execute end-to-end.+2. Create the scout and its config together via `posthog:scout-create` (schedule and the default `emit=true` go in the nested `config`; bundled reference files go in `files`), then spend one `-run-now` to watch the whole scout execute end-to-end.+ Pass a `note` on that call to point the run at the case you dogfooded ("focus on the checkout drop from Tuesday") so the first real run exercises the path you care about.Leave `run_interval_minutes` at a sustainable value — you no longer need a short interval to force an early run.3. After the run finishes, read what it did: `posthog:inbox-reports-list` (the reports it actually wrote), `posthog:scout-runs-list` (run summaries), `-runs-retrieve` (full reasoning for one run), and `-scratchpad-search` (the durable memory it wrote).4. If it needs work, go back to dogfooding the queries by hand for the iteration — only spend another `-run-now` once you've batched a meaningful change worth a fresh end-to-end run.diff --git a/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md b/products/signals/skills/authoring-scouts/references/dedupe-and-memory.mdindex 7cf059555d74..acd89120458f 100644--- a/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md+++ b/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md@@ -20,17 +20,20 @@ Bake this classifier into the scout's Decide section:## Scratchpad memoryThe scratchpad is durable, per-team prose keyed by string.-It has no tags or TTLs — **the category is encoded in the key prefix** so a future run finds an entry with a single `text=` search.+It has no tags: **the category is encoded in the key prefix** so a future run finds an entry with a single `text=` search.Re-using a key rewrites the entry in place (the idempotent refresh — use it to confirm a quiet observation without duplicating entries).+An entry can carry an optional `expires_at`: expired entries drop out of searches (unless `include_expired=true`) and a daily janitor deletes them two weeks past expiry, so set it on anything with a natural shelf life (a `watch:` on a live issue, a cursor) and leave baselines and allowlists unexpiring.**One keyspace, several writers.** Every scout on the team shares it, and so do the two report-pipeline stages: the research run and the self-driving implementation run.-Each search result carries `created_by_skill`, which reads a scout's skill name for a scout entry and `pipeline:report-research` or `pipeline:implementation` for a pipeline one, so a scout can tell its own memory from a sibling's before acting on it.+Each search result carries `created_by_skill`, which reads a scout's skill name for a scout entry and `pipeline:report-research` or `pipeline:implementation` for a pipeline one. It names the entry's original creator only: a rewrite of an existing key keeps the creator, so the field does not say who last wrote the content, and the current writer of a shared key is unknown.Two rules follow. Search the identity of the thing (the issue id, the flag key, the file path) rather than only your own prefix, or you find your own past work and nothing else.-And only ever forget keys you wrote: `scout-scratchpad-forget` deletes by exact key without checking the writer, so removing another writer's cursor or `dedupe:` row makes it repeat work or lose its place.+And only ever forget keys under your own prefix that you created: `scout-scratchpad-forget` deletes by exact key without checking the writer, so removing another writer's cursor or `dedupe:` row, or a key of yours a sibling has since taken over, makes it repeat work or lose its place.| Prefix | Use for || ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || `pattern:` | Durable observation about how this team's data normally shapes (baselines). |+| `watch:` | A live issue being tracked but still below the report bar: what to re-check and the condition that would clear the bar. |+| `followup:` | Harness-defined validation queue, keyed `followup:<skill-name>:<topic>`: a probe a later run should re-run to confirm a reported finding is fixed or still live. The run prompt tells every scout to read its own queue each run (`text=followup:<skill-name>:` with the trailing colon) and decide when a run becomes a validation run; write the probe and its state header so a future run can execute it cold. || `noise:` | Patterns to ignore (single-user, dev-only, recurring with no fix path). || `addressed:` | Team-confirmed fix shipped, or topic the team has moved on from. || `dedupe:` | Gates future runs on a specific issue / fingerprint so the scout doesn't re-file it. |diff --git a/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.md b/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.mdindex 0808cf406a79..e958c3b4e58f 100644--- a/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.md+++ b/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.md@@ -6,23 +6,26 @@ How scouts get discovered, scheduled, and dispatched; the two distribution paths- **Discovery.** A scout is a skill that holds a `SignalScoutConfig`, and the coordinator dispatches from those config rows.The `signals-scout-` name prefix is optional; it controls only auto-registration, below.-- **Config.** Each scout has one `SignalScoutConfig` per `(project, skill_name)` carrying `run_interval_minutes` (default 1440), `enabled`, `emit`, `network_access` (`trusted` default, `full` for scouts that read arbitrary external sites), and a `last_run_at` stamp.+- **Config.** Each scout has one `SignalScoutConfig` per `(project, skill_name)` carrying its schedule (`run_interval_minutes`, default 1440, or a project-local `run_cron_schedule` that takes precedence when set), `enabled`, `emit`, `network_access` (`trusted` default, `full` for scouts that read arbitrary external sites), the rest of the run posture (`output_destinations`, `structured_output_schema`, `write_scopes`, `mcp_gateway_server_ids`, `model`, `tags`, `auto_pause_exempt`, `display_name`), and a `last_run_at` stamp.A config is **auto-registered** the first time the coordinator sees a `signals-scout-*` skill without one, so authoring a prefixed skill is enough to get a scout.A skill named anything else needs its config created with it.- Create a fresh per-team scout and its config together with `posthog:scout-create`; the nested `config` object sets its schedule, emit posture, and destinations before it can run.+ Create a fresh per-team scout and its config together with `posthog:scout-create`; the nested `config` object sets its schedule, emit posture, and destinations before it can run, and `files` bundles reference files in the same call.The lower-level `posthog:scout-config-create` remains available when a skill already exists without a config.- Config responses also carry the scout's `description`, read live from the skill's frontmatter — not a config field you set.+ Config responses also carry the scout's `description`, read live from the skill's frontmatter (not a config field you set), plus `scout_origin` (`canonical` or `custom`) and `owners`.- **Coordinator.** A periodic Temporal workflow ticks (~every 30 min).- Each tick it bounds candidates to projects enrolled via the `signals-scout` feature-flag allowlist, then dispatches every **enabled** scout whose schedule is **due** (`last_run_at is None`, or `now - last_run_at ≥ run_interval_minutes`), most-overdue first, capped per tick.+ Each tick it bounds candidates to projects enrolled via the `signals-scout` feature-flag allowlist, then dispatches every **enabled** scout whose schedule is **due**, most-overdue first, capped per tick.+ On a rolling interval, due means `last_run_at is None` (a never-dispatched scout is maximally overdue; manual runs do not set the stamp) or `now - last_run_at ≥ run_interval_minutes`.+ On a cron schedule, due means the first slot after the latest of `last_run_at`, the last schedule edit, and the config's creation has passed, so a fresh or re-scheduled cron scout waits for its next slot instead of firing at once.There is no sampling — every due scout runs.`last_run_at` advances for everything dispatched.-- **Run.** Each dispatched scout becomes one sandboxed agent run with a short budget (single-digit minutes).+- **Run.** Each dispatched scout becomes one sandboxed agent run with a hard budget of 15 minutes; a run still going at the wall is killed and its row marked failed.The body is the system prompt; the agent orients, explores, files reports or remembers, and writes a one-paragraph summary to the run row.+ A streak of consecutive **scheduled** failures longer than a twelve-hour outage could explain trips a breaker that pauses the scout (`pause_reason=repeated_failures`): the threshold is one more than the runs the schedule fits in twelve hours, clamped to 5–25 (five for a daily scout, thirteen for a rolling hourly interval, fifteen for an hourly cron, whose slots are counted over a window padded for daylight-saving shifts). Manual (`scout-run-now`) and workflow-triggered failures never count toward the streak, while a clean run from any trigger clears it. The coordinator then probes a paused scout once a day and resumes it on a clean run, unless the project is at its enabled-scout cap, in which case it stays paused until another scout is paused or deleted; enabling it by hand is refused at the cap too.Pausing a scout = `enabled=false`.That records `status=paused_by_user`, which automatic lifecycle sweeps never resume or re-pause; `enabled=true` resumes from any pause, including a system-applied one (`status=paused_by_system`, cause in the read-only `pause_reason`).Config responses expose `status` and `pause_reason` read-only; writes flow through `enabled`.-Slowing it = a larger `run_interval_minutes`.+Slowing it = a larger `run_interval_minutes` (or, on a cron scout, a sparser `run_cron_schedule`; the cron wins while it is set).Dry-running it = `emit=false`.Letting it reach sites outside the trusted-domain allowlist = `network_access="full"`.All of these via `posthog:scout-config-update` (get the `id` from `-config-list`), or set at creation time in the nested `config` object passed to `posthog:scout-create`.@@ -87,7 +90,8 @@ Free and instant — refine the body, re-run the queries, repeat, until the logiOnly once you're happy do you spend a real run.`posthog:scout-run-now {"id": <config_id>}` dispatches one run of the scout immediately, regardless of its schedule (get the `id` from `-config-list`) — the **initial real run**, the scout executing end-to-end in the harness.-The run is **asynchronous** — the call returns a workflow id right away; poll `-runs-list` / `-runs-retrieve` for the result.+An optional `note` steers that run alone (read next to the durable notes and never delivered to a later run as a note, though it stays visible in that run's metadata; needs `llm_skill:write` and skill-editor access, like a durable note), so you can aim the first run at the case you dogfooded.+The run is **asynchronous**: the call returns a workflow id right away; poll `-runs-list` (pass `skill_name` to scope to this scout) / `-runs-retrieve` for the result.A disabled scout can still be run this way (test before enabling), and a manual run doesn't touch the schedule or `last_run_at`.It inherits the scheduled path's guards (403 not enabled, 429 over quota / daily run budget, 409 a run already in progress) and draws from the **same daily run budget** as scheduled runs — a dry-run (`emit=false`) counts too.There's no free test run, and it's slow (async, one run per call): firing the same scout repeatedly in a short window burns the project's daily allowance (and can starve its scheduled scouts).diff --git a/products/signals/skills/exploring-scouts/SKILL.md b/products/signals/skills/exploring-scouts/SKILL.mdindex 6ccc4a5a1c2c..78b835365a51 100644--- a/products/signals/skills/exploring-scouts/SKILL.md+++ b/products/signals/skills/exploring-scouts/SKILL.md@@ -41,16 +41,17 @@ For "what kind of run was this?" questions — did it author a self-improvementThere are six things you can observe about the fleet, each with its own tool:-| What you want to know | Tool | What it tells you |-| -------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |-| Which scouts run, how often, in what posture | `scout-config-list` | One row per scout: schedule, `enabled`, `status` / `pause_reason`, `emit`, `write_scopes`, `last_run_at`, `description`, `tags` |-| What the scouts actually did, run by run | `scout-runs-list` / `-retrieve` | Per-run status, timing, end-of-run summary, `emitted_report_ids` / `edited_report_ids`, deep-link |-| What the fleet has learned across runs | `scout-scratchpad-search` | Durable per-team memory (baselines, noise, allowlists) |-| What the team has told the fleet | `scout-notes-list` | Steering notes humans/agents left for scouts (per-scout or fleet-wide, newest first) |-| Which reports a run wrote or edited | the run row itself | `emitted_report_ids` / `edited_report_ids` — resolve each id via `inbox-reports-retrieve` |-| What the scouts surfaced to the user | `inbox-reports-list` | The scout-written reports, as the user sees them (filter `source_product: "signals_scout"`) |+| What you want to know | Tool | What it tells you |+| -------------------------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Which scouts run, how often, in what posture | `scout-config-list` | One row per scout: schedule (`run_interval_minutes` or `run_cron_schedule`), `enabled`, `status` / `pause_reason`, `emit`, `output_destinations`, `write_scopes`, `mcp_gateway_server_ids`, `last_run_at`, `consecutive_failure_count`, `description`, `scout_origin`, `owners`, `tags` |+| What the scouts actually did, run by run | `scout-runs-list` / `-retrieve` | Per-run status, timing, end-of-run summary, `emitted_report_ids` / `edited_report_ids`, `error` / `failure_reason` on a failed run, deep-link; scope with `skill_name` |+| What the fleet has learned across runs | `scout-scratchpad-search` | Durable per-team memory (baselines, noise, allowlists) |+| What the team has told the fleet | `scout-notes-list` | Steering notes humans/agents left for scouts (per-scout or fleet-wide, newest first) |+| Which reports a run wrote or edited | the run row itself | `emitted_report_ids` / `edited_report_ids`; resolve each id via `inbox-reports-retrieve` |+| What the scouts surfaced to the user | `inbox-reports-list` | The scout-written reports, as the user sees them (`scout: "<skill_name>"` for one scout; `source_product: "signals_scout"` for the fleet) |`scout-config-list` takes a `tags` parameter (comma-separated) to narrow the roster to the scouts carrying any of the given labels — useful on a large fleet when the question is scoped to one area, e.g. `tags=revenue`.+`scout-runs-list` takes `skill_name` (and optionally `skill_version`) to scope the dump to one scout, which is the normal way to answer any question about a single scout without paging through the fleet.The orienting tool is `scout-project-profile-get` — the deterministic snapshot of "what's true about this project" that every scout cold-starts from.When a scout found nothing, this is usually why.@@ -90,8 +91,9 @@ Read the result against three cases:Nothing is running.Tell the user which scouts exist and that they're all off — and say who switched each one off, which `status` carries: `paused_by_user` means a person (or a launch seed posture) turned it off, `paused_by_system` means an automatic pause with its cause in `pause_reason` (`no_output` / `ignored` / `repeated_failures`).Either kind resumes with `enabled: true` via `scout-config-update`.+ A `repeated_failures` pause is the failure breaker: the streak of scheduled failures (`consecutive_failure_count`; manual and workflow-triggered runs don't count) ran one past what the schedule fits in twelve hours, clamped to 5–25 (daily: 5, rolling hourly interval: 13, hourly cron: 15, since cron slots are counted over a window padded for daylight-saving shifts). It is half-open, so the coordinator probes the scout once a day and resumes it on a clean run (unless the project is at its enabled-scout cap, which leaves the row paused after a clean probe); read the newest run's `failure_reason` to say what kept failing.- **At least one `enabled: true`** — the fleet is registered and that scout is allowed to run.- For each enabled scout note its `run_interval_minutes` (cadence), `emit` (false = **dry-run**, runs but writes nothing to the inbox), and `last_run_at`.+ For each enabled scout note its cadence (`run_cron_schedule` when set, else `run_interval_minutes`; the cron wins), `emit` (false = **dry-run**, runs but writes nothing to the inbox), and `last_run_at`.A `status` of `pending_pause` means the scout still runs but the system has flagged it to pause soon (cause in `pause_reason`); any config edit clears the warning.One caveat before reporting "it's live": runs are gated by the `signals-scout` feature flag, not by `enabled`.A project that was enrolled and later drained from the flag keeps its `enabled: true` rows, but the coordinator no longer plans runs for it — so a stale or `null` `last_run_at` on an enabled scout usually means the project is no longer enrolled, not that the scout is idle.@@ -113,7 +115,7 @@ See [`references/scout-data-model.md`](references/scout-data-model.md) for every"What scouts do I have / what are they doing?" — lead with `config-list`, then enrich with the most recent run per scout so the user sees liveness, not just configuration.1. `scout-config-list` — the roster.-2. For each enabled scout, `scout-runs-list` and pick the newest run with a matching `skill_name` (runs come back newest-first across the whole fleet, so a single call usually covers everyone).+2. `scout-runs-list` once with a small `limit` and pick the newest run per `skill_name` (runs come back newest-first across the whole fleet, so one call usually covers everyone); for a scout that doesn't appear in that page, call again with `skill_name` set.Report `status` and how long ago it ran.Present it as a table the user can scan — scout, cadence, posture, last run, last outcome — and call out anything anomalous (never run, last run errored, stuck in dry-run for a long time).@@ -126,11 +128,13 @@ Present it as a table the user can scan — scout, cadence, posture, last run, l2. **Read its body** — `posthog:skill-get {"skill_name": "signals-scout-error-tracking"}` returns the team's actual instruction set (which may be a canonical default or a diverged, hand-edited row).This is what the agent is told to do every run — its signal-vs-noise discriminator, explore patterns, and disqualifiers.To understand _why_ a scout behaves the way it does, read its body.-3. **Read its recent runs** — `runs-list` with `text` set to the skill's domain, or just scan the newest runs and filter to its `skill_name`.- The end-of-run `summary` on each run is the scout's own account of what it looked at and decided.+3. **Read its recent runs**: `runs-list` with `skill_name` set to the scout (add `text` to search its summaries for a topic).+ The end-of-run `summary` on each run is the scout's own account of what it looked at and decided; a failed run carries `failure_reason` instead.4. **Read what it remembered** — `scratchpad-search` (see below).The memory entries a scout wrote reveal the baselines and noise it has internalized about this project.5. **Read what it was told** — `scout-notes-list {"skill_name": "signals-scout-error-tracking"}` returns the steering notes humans left for this scout plus the general fleet-wide ones — exactly what its runs read as prior context.+ Each note carries an `origin`: `human` for one left directly, or a derived kind the inbox forwarded automatically: `report_dismissal` (a dismiss/snooze note), `report_discussion` (a question typed into a report's Discuss box), `report_feedback` (a note left with a thumbs rating), `report_reviewer_correction` (someone added or removed a suggested reviewer). Derived notes expire after ~30 days, and the list hides them from a caller without report read access (`task:read`), since they quote report content, so a credential with only `signal_scout:read` sees the human notes alone.+ Notes addressed to `pipeline:report-research` steer the report pipeline's research stage, not this scout, so they won't appear here.A behavior change that doesn't trace to a skill edit or a scratchpad entry often traces to a note.When asked to _steer_ a scout with a note (rather than observe), hand off to the `authoring-scouts` skill, which covers the notes channel's write side.@@ -139,6 +143,7 @@ Present it as a table the user can scan — scout, cadence, posture, last run, l`scout-runs-list` returns the most recent runs across the whole fleet, newest first (capped at 100).Use it to answer "what happened lately?"+- **Scope to one scout** with `skill_name` (and `skill_version` to isolate the runs of one body version): the primary scoping path whenever the question is about a single scout.- **Scope to a window** with `date_from` / `date_to` (ISO-8601; inclusive lower, exclusive upper on `created_at`).Walk backwards by passing an earlier `date_to`.- **Search summaries** with `text` — a case-insensitive substring match on each run's end-of-run `summary`.@@ -147,7 +152,7 @@ Use it to answer "what happened lately?"This is the direct way to answer "which runs actually wrote something?" without parsing prose.One caveat: a run that only **edited** an existing report doesn't count as `emitted=true` — check `edited_report_ids` before calling such a run quiet.-Each summary row carries `run_id`, `skill_name`, `skill_version`, `status`, `started_at`, `completed_at`, `emitted_report_ids` / `edited_report_ids` (the reports the run wrote or edited — its output), `emitted_count` / `emitted_finding_ids` (the legacy signal-channel tally — `0` / empty on current scouts), `task_url` (a deep-link into the Tasks UI for the full transcript), and the `summary` prose.+Each summary row carries `run_id`, `skill_name`, `skill_version`, `status`, `started_at`, `completed_at`, `emitted_report_ids` / `edited_report_ids` (the reports the run wrote or edited, its output), `emitted_count` / `emitted_finding_ids` (the legacy signal-channel tally, `0` / empty on current scouts), `task_url` (a deep-link into the Tasks UI for the full transcript), the `summary` prose, and, on a run that didn't complete cleanly, `error` (the full TaskRun error) plus `failure_reason` (a concise derived one-liner).Lead with the `summary` when narrating to the user — it's the scout's own plain-language close-out — and always offer the `task_url` for the full reasoning.## Workflow: drill into a single run@@ -162,14 +167,16 @@ scout-runs-retrieveNote the field name flip: `runs-list` returns each run's id as `run_id`, but `runs-retrieve` takes it as `id`.Pass the `run_id` value through as `id`.-Returns the full run: `status`, `started_at` / `completed_at` (compute duration from these), `skill_name` / `skill_version` (what ran, at what body version), the end-of-run `summary`, `emitted_report_ids` / `edited_report_ids`, and `task_url`.+Returns the full run: `status`, `started_at` / `completed_at` (compute duration from these), `skill_name` / `skill_version` (what ran, at what body version), the end-of-run `summary`, `emitted_report_ids` / `edited_report_ids`, `metadata`, and `task_url`.The transcript — the actual tool calls and reasoning — lives in the Tasks UI behind `task_url`, not in this payload; hand the user that link when they want to see every step.-A **failed** run returns an empty `summary` and **no error field** — the payload looks the same as the list row, so to learn _why_ it failed you need the transcript.+A **failed** run has an empty `summary`; read `failure_reason` first (a one-line diagnosis: a timeout at the run budget, a tool that kept erroring, a sandbox that never started) and `error` for the full TaskRun error text.+Those two fields answer most "why did it fail?" questions on their own; reach for the transcript when the failure needs the sequence of calls that led to it.You don't have to open the UI for that: **`tasks-runs-session-logs-retrieve` returns the run's session log (every tool call, message, and reasoning step) as data** — handy when you're diagnosing a failure or want to trace exactly what a run did without leaving the conversation.Pass the run's `task_run_id` as `id` and its `task_id` (both are on the run row).The raw stream is large (hundreds of KB to a few MB) and will overflow inline, so **fetch it with `call --json` and let it spill to a file**, then run it through [`scripts/render_run_report.py`](#helper-scripts) rather than parsing it by hand.+The tool returns 100 entries by default and at most 5000 per call, and its pagination state is not in the body, so pass `limit: 5000` and repeat, advancing `offset` by the number of entries the previous page actually returned (not by `limit`), until a page comes back empty, then concatenate the pages before rendering; a short page is not the end, since a page also closes early at a byte cap, and stepping by `limit` past one would skip the entries it left out, so a single default page can drop the failure tail.⚠️ **Do not reach for `exclude_types: "tool_call_update,…"` to slim it down.** It is tempting — the stream is dominated by incremental `tool_call_update` chunks — but each tool's **actual input lives only in those chunks**: the base `tool_call` event carries an empty `rawInput`, and the streamed updates build the input (and the final `rawOutput`) token by token.Excluding them leaves you with tool _names_ but no idea what the scout actually queried.@@ -198,24 +205,26 @@ scout-scratchpad-search{ "text": "error_tracking" }```-Returns entries newest-first (capped at 100); `text` matches `content` and `key` case-insensitively.-Omit `text` to browse everything.+Returns entries newest-first: 20 by default, `limit` up to 1000; `text` matches `content` and `key` case-insensitively.+Omit `text` to browse everything; pass `keys_only=true` for a cheap scan of what memories exist, or `content_max_chars` to preview long bodies, and `date_to` set to the oldest entry's `updated_at` to walk past the cap.+Expired entries (an `expires_at` in the past) are excluded unless `include_expired=true`; every entry also carries `created_by_skill`, the original creator (a scout's skill name, or `pipeline:report-research` / `pipeline:implementation` for a pipeline stage). It is lineage, not authorship of the current text: an upsert by another writer on the same team-wide key keeps both the original creator and `created_by_run_id`, so neither field names the current writer of a shared key; treat it as unknown rather than attributing the content to that skill.Each entry's `key` carries a category prefix that tells you _what kind_ of learning it is:-| Prefix | Meaning |-| ------------- | -------------------------------------------------------------------------------------- |-| `pattern:` | A baseline — how this team's data normally shapes |-| `watch:` | A live issue being tracked but still below the report bar |-| `noise:` | A pattern the fleet has decided to ignore (dev-only, single-user…) |-| `addressed:` | Something the team fixed or moved on from |-| `dedupe:` | A gate on re-filing a specific issue / fingerprint |-| `allowlist:` | Vetted entities never to re-surface |-| `not-in-use:` | A product/surface this team doesn't use (close-out memo) |-| `mcp-gap:` | A tooling gap a scout noticed worth raising later |-| `improve:` | A custom scout's suggested change to its own skill body, awaiting owner review |-| `reported:` | A canonical scout's record of a skill gap already fed back upstream to PostHog |-| `report:` | A report a scout authored — stores the `report_id` so later runs edit/dedup against it |-| `reviewer:` | A resolved owner (GitHub login) for an area, cached for `suggested_reviewers` routing |+| Prefix | Meaning |+| ------------- | ---------------------------------------------------------------------------------------- |+| `pattern:` | A baseline: how this team's data normally shapes |+| `watch:` | A live issue being tracked but still below the report bar |+| `followup:` | A scout's validation queue: a probe a later run re-runs to confirm a fix or a recurrence |+| `noise:` | A pattern the fleet has decided to ignore (dev-only, single-user…) |+| `addressed:` | Something the team fixed or moved on from |+| `dedupe:` | A gate on re-filing a specific issue / fingerprint |+| `allowlist:` | Vetted entities never to re-surface |+| `not-in-use:` | A product/surface this team doesn't use (close-out memo) |+| `mcp-gap:` | A tooling gap a scout noticed worth raising later |+| `improve:` | A custom scout's suggested change to its own skill body, awaiting owner review |+| `reported:` | A canonical scout's record of a skill gap already fed back upstream to PostHog |+| `report:` | A report a scout authored: stores the `report_id` so later runs edit/dedup against it |+| `reviewer:` | A resolved owner (GitHub login) for an area, cached for `suggested_reviewers` routing |This is the common vocabulary, not a closed set — scouts coin their own prefixes and `<domain>` labels as needed (the live fleet uses `watch:` heavily, for example), so treat an unfamiliar prefix as just another category.Entries cross-reference each other with `[[key]]` wikilinks.@@ -234,16 +243,18 @@ Instead, a canonical scout routes skill-content gaps upstream to the PostHog tea## Workflow: see what scouts have writtenScout output reaches the user as inbox reports.-Filter the inbox to the scout source:+Filter the inbox to one scout by its skill name (comma-separate several):```jsoninbox-reports-list-{ "source_product": "signals_scout", "limit": 20 }+{ "scout": "signals-scout-error-tracking", "limit": 20 }```-This is the direct way to find the reports scouts **authored**.-Every report a scout authors carries backing signals tagged `source_product="signals_scout"`, and the inbox filter keeps any report whose contributing signals include that tag — so the result is the set of reports the fleet has authored.-It does **not** capture edit-only work: a scout that edits an existing non-scout report (appending a note to a pipeline report, say) adds no `signals_scout` signal, so that report won't match the filter — trace edits through the run rows' `edited_report_ids` instead.+Each row also carries `scout_name`, so a fleet-wide page tells you which scout authored what.+For the whole fleet at once, filter on the source instead: `{ "source_product": "signals_scout", "limit": 20 }`.+Every report a scout authors carries backing signals tagged `source_product="signals_scout"`, and that filter keeps any report whose contributing signals include the tag, so the result is the set of reports the fleet has authored.+Neither filter captures edit-only work: a scout that edits an existing non-scout report (appending a note to a pipeline report, say) adds no `signals_scout` signal, so that report won't match; trace edits through the run rows' `edited_report_ids` instead.+Suppressed reports are hidden by default, so add `include_all_statuses: true` (or `status: "suppressed"`) when judging how much of a scout's output got filtered. Even then both the `scout` and the `source_product` filter miss a report the safety judge suppressed, because each resolves reports through their signals and an unsafe report's signals are never indexed; the run rows' `emitted_report_ids` are the complete enumeration for a signal-to-noise audit.An empty result means the fleet hasn't authored any reports (yet), **not** that the filter is broken.Scouts hold a high bar — most runs close out without writing — so on a quiet or newly enrolled project zero scout reports is the normal, expected state.@@ -261,11 +272,12 @@ There's no single metric — judge a scout over a window of runs.Pull the runs (`runs-list` with a `date_from`), then reason across the dimensions below.The full playbook, including how to read each signal and the common failure modes, is in [`references/assessing-performance.md`](references/assessing-performance.md).-- **Cadence adherence** — are runs landing roughly every `run_interval_minutes`?+- **Cadence adherence**: are runs landing roughly every `run_interval_minutes`, or on each `run_cron_schedule` slot?+ Judge a cron scout against its slots, not its interval: a weekday-only scout's weekend gap is the schedule, not a stall, and `assess_health.py` skips interval-based scoring for it (its cadence column reads `cron`).Large gaps mean the coordinator is skipping it (disabled, drained from the flag, or capped out on busy ticks) — _or_ it's dispatching but the runs aren't materializing.Tell the two apart with `last_run_at`: if the config's `last_run_at` is also stale, the coordinator stopped planning it; if `last_run_at` is fresh but the newest run row is hours old, it's the dispatch-vs-execution divergence above (workers backed up / down, or runs stranded), which `runs-list` alone hides.- **Success rate** — how many runs reach a clean `status` vs. error out?- A run of errors is a broken scout, not a quiet one.+ A run of errors is a broken scout, not a quiet one; group the failed runs by `failure_reason` to see whether it is one cause repeating.- **Report rate** — what fraction of runs wrote or edited a report vs. closed out empty.Read it straight off `emitted_report_ids` / `edited_report_ids` per run (or split the window with `runs-list?emitted=true` / `?emitted=false`, remembering edit-only runs read as not-emitted).Near-zero over a long window on a live surface can mean the discriminator is too strict (or the surface really is quiet); near-100% usually means it's too noisy.@@ -295,7 +307,7 @@ Produces the kind of detailed write-up you'd want when inspecting a single run:```bash# fetch (note --json), saving each to a file:# call --json scout-runs-retrieve { "id": "<run_id>" } -> run.json-# call --json tasks-runs-session-logs-retrieve { "id": "<task_run_id>", "task_id": "<task_id>", "offset": 0 } -> log.json (FULL — no exclude_types)+# call --json tasks-runs-session-logs-retrieve { "id": "<task_run_id>", "task_id": "<task_id>", "limit": 5000, "offset": 0 } -> log.json (FULL, no exclude_types; page with offset until an empty page, then concatenate)# (optional) call --json scout-scratchpad-search { ... } -> mem.json# (optional) call --json scout-config-list {} -> cfg.jsonpython scripts/render_run_report.py --run run.json --log log.json \@@ -336,7 +348,7 @@ python scripts/assess_health.py --runs runs.json --config cfg.json \--scratchpad mem.json --now <current-ISO-time> [--skill signals-scout-general]```-`--config` is what lets it score cadence adherence (the expected interval) and staleness (the authoritative `last_run_at`, which the windowed runs can miss when the 100-row cap truncates the newest runs).+`--config` is what lets it score cadence adherence (the expected interval; a scout with a `run_cron_schedule` is marked `cron` and exempt from the interval-based adherence, stall, and staleness flags) and staleness (the authoritative `last_run_at`, which the windowed runs can miss when the 100-row cap truncates the newest runs).Without `--scratchpad` the memory column shows `n/a` and no memory flags fire.The report rate reads the run rows' `emitted_report_ids` / `edited_report_ids` directly, so it's exact — but it only counts _writes_; judge signal-to-noise by the resulting report statuses via `inbox-reports-list`.@@ -349,11 +361,12 @@ The report rate reads the run rows' `emitted_report_ids` / `edited_report_ids` dThe `source_product: "signals_scout"` inbox filter lists the _reports_ the fleet surfaced; an empty result there means it hasn't written anything yet (scouts hold a high bar), not that the filter is broken.- **`emitted_count: 0` does not mean "did nothing".** `emitted_count` / `emitted_finding_ids` are legacy signal-channel fields — they stay `0` / empty on report-channel scouts, productive or not.Judge output by the report columns; a non-zero legacy tally means the run came from a scout still on the legacy channel, and is that run's real output.-- **A ~30-min run that `failed` is usually a timeout, not a broken scout.** Completed runs finish in a couple of minutes.+- **A `failed` run that lasted ~15 minutes is usually a timeout, not a broken scout.** The per-run budget is 15 minutes; completed runs finish in a couple.+ `failure_reason` names a timeout outright, so check it before reasoning from duration.Most often the scout over-investigated and ran the full budget (the fleet self-corrects by writing "tight-run recipe" scratchpad entries) — but some are false timeouts where the scout actually finished in a few minutes and the run then hung on a dropped close-out.The session log (above) tells them apart: real over-investigation shows tool calls right up to the wall; a false timeout goes silent long before it.Don't assume over-investigation from duration alone.- **Lead with the run `summary`**, then offer `task_url` for the full transcript — don't dump raw run rows at the user.-- **`last_run_at: null`** means a scout has never fired — check it's enabled and the project is enrolled before digging further.+- **`last_run_at: null`** means the coordinator has never dispatched the scout, not that it has never run: manual (`scout-run-now`) and workflow-triggered runs leave the stamp untouched, so check `scout-runs-list` before calling a scout never-run. Then check it's enabled and the project is enrolled (a cron scout also simply waits for its first slot after creation).- **To explain a quiet scout, read the project profile.** `scout-project-profile-get` shows whether the surface it watches is even in use — a logs scout on a project with no logs has nothing to do.- **This skill is read-only.** To change a scout's schedule, posture, or body, hand off to the `authoring-scouts` skill — it covers `scout-config-update` and the skills-store edit path.diff --git a/products/signals/skills/exploring-scouts/references/assessing-performance.md b/products/signals/skills/exploring-scouts/references/assessing-performance.mdindex c57e8e21db33..831b2a1c8a59 100644--- a/products/signals/skills/exploring-scouts/references/assessing-performance.md+++ b/products/signals/skills/exploring-scouts/references/assessing-performance.md@@ -8,10 +8,10 @@ Pull the window first:```jsonscout-runs-list-{ "date_from": "2026-05-01T00:00:00Z", "limit": 100 }+{ "skill_name": "signals-scout-error-tracking", "date_from": "2026-05-01T00:00:00Z", "limit": 100 }```-Filter the result to the scout's `skill_name`, then reason across the dimensions, reading each run's `summary`.+Scope with `skill_name` (omit it for the whole fleet), then reason across the dimensions, reading each run's `summary`, and `failure_reason` on the failed ones.Learned memory comes from `scout-scratchpad-search`.Note up front: each run carries `emitted_report_ids` / `edited_report_ids` (and the list endpoint takes an `emitted` filter), so report volume is a clean metric off the runs themselves — and `inbox-reports-list { "source_product": "signals_scout" }` lists the reports the fleet surfaced.Read the two together: the runs tell you how often the scout wrote, the inbox filter what that output looks like to the user.@@ -20,7 +20,7 @@ Read the two together: the runs tell you how often the scout wrote, the inbox fi### 1. Cadence adherence — is it running on schedule?-Compare the gaps between consecutive `started_at` timestamps against `run_interval_minutes` from the config.+Compare the gaps between consecutive `started_at` timestamps against `run_interval_minutes` from the config; or, on a scout with a `run_cron_schedule`, against its slots, since its gaps are irregular by design (a weekday-only scout skips the weekend) and `assess_health.py` skips interval-based scoring for it.Roughly-on-schedule is healthy.Persistent large gaps mean the coordinator isn't dispatching it as often as configured.@@ -29,12 +29,14 @@ Persistent large gaps mean the coordinator isn't dispatching it as often as conf### 2. Success rate — are runs completing cleanly?-Count clean completions vs. `failed` runs over the window.-Distinguish failure modes by duration: a `failed` run that ran ~30 minutes (the per-run budget) before failing **timed out**; a `failed` run that died quickly is more likely genuinely broken.+Count clean completions vs. `failed` runs over the window, and group the failures by `failure_reason`: one cause repeating (an expired credential, a renamed table) is a different problem from scattered timeouts.+Distinguish failure modes by duration: a `failed` run that ran ~15 minutes (the per-run budget) before failing **timed out**; a `failed` run that died quickly is more likely genuinely broken.Most timeouts are over-investigation — the scout ran to the wall, common and semi-expected on high-volume surfaces (logs, error tracking), and the fleet self-corrects by writing "tight-run recipe" scratchpad entries.-But a timeout can also be a **false timeout**: the scout finished in a few minutes and the run then hung on a dropped close-out, so don't infer over-investigation from the ~30-minute duration alone.+But a timeout can also be a **false timeout**: the scout finished in a few minutes and the run then hung on a dropped close-out, so don't infer over-investigation from the duration alone.+A streak of scheduled failures longer than a twelve-hour outage could explain pauses the scout with `pause_reason=repeated_failures`: the threshold is one past the runs its schedule fits in twelve hours, clamped to 5–25 (daily: 5, rolling hourly interval: 13, hourly cron: 15 because cron slots are counted over a DST-padded window); the coordinator probes it once a day and resumes it when a probe succeeds, so a fixed cause clears itself (unless the project is at its enabled-scout cap, which leaves the row `paused_by_system` after a clean probe). Manual and workflow-triggered failures never feed the streak; a clean run from any trigger clears it.-- **Diagnosis:** read a failed run's transcript (the error is not in the run payload) — open `task_url`, or pull it as data with `tasks-runs-session-logs-retrieve` (filter out the noisy `tool_call_update` / `usage_update` events to get a readable action timeline).+- **Diagnosis:** start with the run's `failure_reason` and `error` fields; they carry the diagnosis and the full error text.+ When you need the sequence of calls, read the transcript: open `task_url`, or pull it as data with `tasks-runs-session-logs-retrieve` (fetch the full log: `limit: 5000`, paging with `offset` until a page comes back empty, since the default page is 100 entries and a byte cap can close a page early; the bundled `render_run_report.py` reassembles tool inputs from the `tool_call_update` chunks, which is why they can't be excluded).Tool calls right up to the wall mean genuine over-investigation; silence long before it means a false timeout.A quick failure from a query tool erroring, a body referencing an event/table that no longer exists, or a changed surface schema is an authoring fix — hand off to `authoring-scouts`.Recurring over-investigation timeouts on a firehose surface point at a too-broad body that needs a cheaper discriminator, also an authoring fix.diff --git a/products/signals/skills/exploring-scouts/references/scout-data-model.md b/products/signals/skills/exploring-scouts/references/scout-data-model.mdindex a845dacecf28..2fc6e3c89c7c 100644--- a/products/signals/skills/exploring-scouts/references/scout-data-model.md+++ b/products/signals/skills/exploring-scouts/references/scout-data-model.md@@ -9,21 +9,34 @@ One row per `(team, skill_name)`.Returned by `scout-config-list`.This is the scout's control surface, separate from its instruction body (the `LLMSkill`).-| Field | Meaning |-| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `id` | Config id — the handle `scout-config-update` takes to tune it. |-| `skill_name` | The `signals-scout-*` skill this config controls. Fixed; one config per skill per team. |-| `enabled` | `false` = paused. The coordinator skips disabled scouts entirely. Derived from `status`. |-| `status` | Who owns the pause: `active`, `pending_pause` (still runs, flagged to pause soon; any config edit clears it), `paused_by_system` (automatic — resumable with `enabled: true`), `paused_by_user` (a person switched it off; the system never overrides it). |-| `pause_reason` | Why the system paused or warned: `no_output`, `ignored`, or `repeated_failures`. Null outside `pending_pause` / `paused_by_system`. |-| `emit` | `false` = **dry-run**: the scout runs and reasons every tick but writes nothing to the inbox. |-| `run_interval_minutes` | Cadence, 30–43200. Default 1440 (daily). The coordinator dispatches when due. |-| `network_access` | What the run's sandbox can reach: `trusted` (default — the platform's trusted-domain allowlist: PostHog, GitHub, package registries) or `full` (any site, for skills that read external docs/papers). |-| `structured_output_schema` | Optional JSON Schema (object-rooted) describing one structured record the scout produces via `scout-record-output`. Null = the structured-output channel is off (it also needs `emit` on). When set, each run is shown the schema and its records are validated against it and recorded as `$scout_structured_output` events. |-| `last_run_at` | When it last fired. `null` = never run. Drives the due-check. |+| Field | Meaning |+| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `id` | Config id: the handle `scout-config-update` takes to tune it. |+| `skill_name` | The skill this config controls. Fixed; one config per skill per team. Usually `signals-scout-*`, but any skill name can hold a config. |+| `display_name` | The name the UI shows. Blank means the default derived from `skill_name`. |+| `description` | What the scout watches, read live from the skill's frontmatter. Empty when the skill is gone from the team (an orphan config) or has no description. |+| `scout_origin` / `owners` | `canonical` (PostHog seeded it) or `custom` (team-authored); `owners` lists the skill's owners. The value comes from the skill row's seed metadata, which survives an in-place edit, so a canonical scout the team has edited (diverged, no longer synced) still reads `canonical` here. |+| `enabled` | `false` = paused. The coordinator skips disabled scouts entirely. Derived from `status`. |+| `status` | Who owns the pause: `active`, `pending_pause` (still runs; an `ignored` warning pauses after a week, a `no_output` warning only ever warns; any config edit clears it), `paused_by_system` (automatic, resumable with `enabled: true`), `paused_by_user` (a person switched it off; the system never overrides it). |+| `pause_reason` | Why the system paused or warned: `no_output`, `ignored`, or `repeated_failures`. Null outside `pending_pause` / `paused_by_system`. |+| `status_changed_at` | When `status` last changed: for `pending_pause`, when the warning was issued (an `ignored` warning pauses about a week later; a `no_output` one never does). |+| `consecutive_failure_count` | Current streak of failed scheduled runs (manual and workflow-triggered failures don't count; a clean run from any trigger clears it). The failure breaker (`repeated_failures`) trips one failure past the runs the schedule fits in twelve hours, clamped to 5–25 (daily: 5, rolling hourly interval: 13, hourly cron: 15 because cron slots are counted over a DST-padded window); any config edit resets it. |+| `auto_pause_exempt` | `true` = the inactivity sweep never judges this scout (for a watchdog whose silence is the job, or output consumed where the inbox can't see it). |+| `emit` | `false` = **dry-run**: the scout runs and reasons every tick but writes nothing to the inbox. |+| `run_interval_minutes` | Rolling cadence, 30–43200. Default 1440 (daily). The coordinator dispatches when due. |+| `run_cron_schedule` | Optional five-field cron in the project timezone. When set it takes precedence over the interval; a new or edited schedule waits for its next slot rather than catching up. |+| `output_destinations` | Where reports go besides the inbox: `slack` (integration plus a channel or up to five DM targets, optional `thread_reports`) is the only destination Signals delivers to itself; a `webhook` entry is a pointer to a CDP destination the owning product manages, and says nothing about whether anything is delivered there. |+| `network_access` | What the run's sandbox can reach: `trusted` (default: the platform's trusted-domain allowlist: PostHog, GitHub, package registries) or `full` (any site, for skills that read external docs/papers). |+| `mcp_gateway_server_ids` | MCP store servers the scout's runs may mount, from connections shared with the whole team. Empty = no shared servers (where gateway enforcement is not yet active, the acting user's personal connections may still mount). Security-relevant like `network_access`, and activity-logged. |+| `write_scopes` | Extra project-wide write scopes a person granted this scout (`dashboard:write`, `insight:write`, `annotation:write`, `alert:write`, `llm_skill:write`, `warehouse_view:write`, `warehouse_table:write`). Empty = read-only beyond findings, memory, and notebooks. A dry run never holds them. |+| `model` | Pinned model for this scout's runs, or null to follow the fleet default. Setting one needs the `scouts-model-config` early-access flag on the project. |+| `structured_output_schema` | Optional JSON Schema (object-rooted) describing one structured record the scout produces via `scout-record-output`. Null = the structured-output channel is off (it also needs `emit` on). When set, each run is shown the schema and its records are validated against it and recorded as `$scout_structured_output` events. |+| `tags` | Free-form kebab-case labels (up to 10) grouping the fleet; `scout-config-list` filters on them. |+| `source_product` / `source_id` | Set when another product stood the scout up for one of its own objects (Replay Vision creates one per scanner) so it can find and clean up its scouts; null for a scout a person created directly. |+| `last_run_at` | When the coordinator last dispatched it. `null` = never dispatched by the coordinator, not never run: manual (`scout-run-now`) and workflow-triggered runs leave it untouched, so check `scout-runs-list` before calling a scout never-run. Drives the due-check (with `run_cron_schedule` and creation time on a cron scout). |A scout that is `enabled: true, emit: false` is alive and working — it just can't post reports.-This is the intended posture for a new or freshly-edited scout, and the most common cause of "my scout does nothing" reports.+It is the extra-careful rollout posture for a chatty or high-stakes scout (the default is `emit: true`), and the most common cause of "my scout does nothing" reports.## SignalScoutRun — one execution@@ -50,21 +63,24 @@ Pass the list's `run_id` value through as `id`.| `task_id`, `task_run_id` | Identifiers on the Tasks side. || `task_url` | Relative deep-link to the Tasks UI for this run — **the full transcript** (every tool call and reasoning step) lives here, not in the run payload. || `summary` | The scout's own one-paragraph end-of-run close-out. The primary thing to read and relay. Empty for runs that errored before close-out. |+| `error` | The full TaskRun error text on a run that didn't complete cleanly; null otherwise. |+| `failure_reason` | A concise, derived one-line diagnosis of why the run failed (timeout at the budget, a tool erroring, a sandbox that never started). Read this before the transcript. |### Run status values-`status` flows from the linked `tasks.TaskRun`.+`status` flows from the linked `tasks.TaskRun`: `not_started`, `queued`, `in_progress`, `completed`, `failed`, `cancelled`.Treat a completed run with an empty-handed summary as a **healthy quiet run**, not a failure — most runs should close out empty.-- in-flight / started — currently running (`completed_at` null).-- completed — finished cleanly.+- `not_started` / `queued` / `in_progress`: dispatched or running (`completed_at` null).+- `completed`: finished cleanly.May or may not have written anything; check `emitted_report_ids` / `edited_report_ids` (both empty = quiet, unless it's a measurement scout — then check `metadata.derived.has_structured_output`).-- failed — the run errored before closing out.- Its `summary` is empty and the payload exposes **no error field** — read the transcript to see what went wrong (open `task_url`, or pull it as data with `tasks-runs-session-logs-retrieve`).- In practice the common failure is a ~30-minute timeout (the per-run budget), not a logic-broken scout; a `failed` run whose duration ≈ the budget is almost always a timeout.+- `failed`: the run errored before closing out.+ Its `summary` is empty; `failure_reason` says why in one line and `error` carries the full text, so the transcript (open `task_url`, or pull it as data with `tasks-runs-session-logs-retrieve`) is only needed for the sequence of calls that led there.+ In practice the common failure is a timeout at the 15-minute per-run budget, not a logic-broken scout; a `failed` run whose duration ≈ the budget is a timeout, and `failure_reason` names it.The usual cause is over-investigation (the scout ran to the wall), but some are false timeouts — the scout finished quickly and the run then hung on a dropped close-out; the session log distinguishes the two (tool calls up to the wall vs. silence long before it).+- `cancelled`: the sandbox activity was cancelled mid-flight (a worker shutdown or deploy). Says nothing about the scout, so it doesn't count toward the failure breaker.-(The exact string set comes from the Tasks `TaskRun` model; match leniently — read the `summary` and `completed_at` together rather than keying on one status string.)+Read the `summary` and `completed_at` together rather than keying on one status string.## Run → report link@@ -108,14 +124,16 @@ Returned by `scout-scratchpad-search`.One row per `(team, key)`; re-using a key upserts.This is the fleet's cross-run memory — prose entries scouts write so future runs are smarter and quieter.-| Field | Meaning |-| --------------------------- | ---------------------------------------------------------------------- |-| `key` | Agent-chosen semantic key, unique per team. Carries a category prefix. |-| `content` | Prose, read verbatim into a future run's prompt. |-| `created_by_run_id` | Which run wrote it (`null` if the run was later deleted). |-| `created_at` / `updated_at` | When written / last rewritten. |+| Field | Meaning |+| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `key` | Agent-chosen semantic key, unique per team. Carries a category prefix. |+| `content` | Prose, read verbatim into a future run's prompt. |+| `created_by_run_id` | Which run wrote it (`null` if the run was later deleted). |+| `created_by_skill` | The original writer: a scout's skill name, or `pipeline:report-research` / `pipeline:implementation` for a report-pipeline stage. An upsert keeps the creator, so the last writer can differ. |+| `created_at` / `updated_at` | When written / last rewritten. |+| `expires_at` | Optional. Expired entries drop out of searches (unless `include_expired=true`) and a daily janitor deletes them two weeks past expiry. |-The `key` prefix tells you the kind of learning: `pattern:` (baseline), `watch:` (a live issue tracked but still below the report bar), `noise:` (ignore), `addressed:` (fixed/moved on), `dedupe:` (gate re-filing), `allowlist:` (never re-surface), `not-in-use:` (surface not used), `mcp-gap:` (tooling gap), `report:` (an authored report's `report_id`), `reviewer:` (a cached owner for reviewer routing).+The `key` prefix tells you the kind of learning: `pattern:` (baseline), `watch:` (a live issue tracked but still below the report bar), `followup:` (a validation probe a later run re-runs), `noise:` (ignore), `addressed:` (fixed/moved on), `dedupe:` (gate re-filing), `allowlist:` (never re-surface), `not-in-use:` (surface not used), `mcp-gap:` (tooling gap), `report:` (an authored report's `report_id`), `reviewer:` (a cached owner for reviewer routing).This vocabulary is open — scouts coin their own prefixes and `<domain>` labels, so treat an unfamiliar prefix as just another category.Entries link to each other with `[[key]]` wikilinks.The canonical prefix set and the four-state dedupe classifier the fleet reasons in terms of live in the `authoring-scouts` skill (`references/dedupe-and-memory.md`).@@ -132,7 +150,9 @@ The profile is ground truth from authoritative tables; the scratchpad is the fle## How the coordinator decides what runsUseful context when a scout's runs are sparser than its schedule implies.-A periodic Temporal coordinator ticks (~every 30 min) and, for each enrolled team, dispatches every enabled scout whose schedule is due (`last_run_at is None` or `now - last_run_at >= run_interval_minutes`), most-overdue first, capped per tick.+A periodic Temporal coordinator ticks (~every 30 min) and, for each enrolled team, dispatches every enabled scout whose schedule is due, most-overdue first, capped per tick.+On a rolling interval, due means `last_run_at is None` or `now - last_run_at >= run_interval_minutes`; on a `run_cron_schedule`, due means the first slot after the latest of `last_run_at`, the last schedule edit, and creation has passed, so a fresh cron scout waits for its first slot.Enrollment is via the `signals-scout` feature flag's allowlist.So a scout can be enabled yet run late if: the team was drained from the flag, the scout was disabled, or busy ticks hit the per-tick cap.There is no sampling — a due, enabled, enrolled scout runs.+Separately, a scout paused by the failure breaker (`repeated_failures`) gets one probe run a day and resumes on a clean one, unless the project is at its enabled-scout cap, in which case the row stays `paused_by_system` until another scout is paused or deleted (enabling it by hand is refused at the cap too).diff --git a/products/signals/skills/exploring-scouts/scripts/assess_health.py b/products/signals/skills/exploring-scouts/scripts/assess_health.pyindex c04f2b360c14..210814468dfb 100644--- a/products/signals/skills/exploring-scouts/scripts/assess_health.py+++ b/products/signals/skills/exploring-scouts/scripts/assess_health.py@@ -31,6 +31,7 @@ Stdlib only. Python 3.11+."""from __future__ import annotations+import reimport sysimport jsonimport argparse@@ -38,8 +39,8 @@ import statisticsfrom datetime import datetimefrom typing import Any-# a failed run whose wall-clock is this long or longer is timeout-shaped, not a fast crash-TIMEOUT_MINUTES = 20.0+# The per-run budget is 15 minutes (scout_harness/limits.py); a failed run past ~14 minutes ran to the wall.+TIMEOUT_MINUTES = 14.0# a gap larger than this multiple of the expected interval counts as a stallSTALL_FACTOR = 2.0@@ -120,21 +121,47 @@ def table(headers: list[str], body: list[list[str]]) -> list[str]:return out+_CANCELLED_ERROR = re.compile(r"^(asyncio\.)?cancell?ed(error)?\b")+++def _is_cancelled_as_failed(run: dict) -> bool:+ # A cancellation caught while the run was still starting is stored as `failed` with the+ # cancellation's own text as its error; one with an empty error is indistinguishable and stays in.+ # Match only an error that IS a cancellation, not one that merely mentions cancelling a statement.+ text = (run.get("failure_reason") or run.get("error") or "").strip().lower()+ return bool(_CANCELLED_ERROR.match(text)) and "timeout" not in text and "timed out" not in text+++def _is_timeout_reason(reason: str | None) -> bool:+ # The harness says "timed out after 900s"; other writers say "timeout".+ text = (reason or "").lower()+ return "timed out" in text or "timeout" in text++def assess_scout(name: str, runs: list[dict], interval: float | None, mem_count: int | None,now: datetime | None, config_last_run: str | None) -> dict:runs = sorted(runs, key=lambda r: r.get("started_at") or "")n = len(runs)- completed = sum(1 for r in runs if r.get("status") == "completed")- failed = sum(1 for r in runs if r.get("status") == "failed")-- durations = [m for r in runs if (m := minutes_between(r.get("started_at"), r.get("completed_at"))) is not None]+ # A cancelled (worker shutdown, deploy) or in-flight row has no scout outcome to score.+ settled = [+ r+ for r in runs+ if r.get("status") == "completed" or (r.get("status") == "failed" and not _is_cancelled_as_failed(r))+ ]+ completed = sum(1 for r in settled if r.get("status") == "completed")+ failed = sum(1 for r in settled if r.get("status") == "failed")+ durations = [+ m for r in settled if (m := minutes_between(r.get("started_at"), r.get("completed_at"))) is not None+ ]median_dur = round(statistics.median(durations), 1) if durations else None+ # A named credential or tool failure is not a timeout however long it ran.timeouts = sum(1- for r in runs+ for r in settledif r.get("status") == "failed"and (m := minutes_between(r.get("started_at"), r.get("completed_at"))) is not Noneand m >= TIMEOUT_MINUTES+ and (not r.get("failure_reason") or _is_timeout_reason(r.get("failure_reason"))))# cadence: consecutive gaps between run starts@@ -147,7 +174,8 @@ def assess_scout(name: str, runs: list[dict], interval: float | None, mem_count:expected = (int(span_min / interval) + 1) if interval and span_min > 0 else Noneadherence = pct(n, expected) if expected else "-"- wrote = sum(1 for r in runs if run_wrote(r))+ # Report ids land on the row before the run settles, so only settled writers count.+ wrote = sum(1 for r in settled if run_wrote(r))# Two different stalenesses — keep them apart. `last_run_at` is the coordinator's DISPATCH# stamp (advanced the moment a child is enqueued, before any worker runs it); the newest# observed run row's `started_at` is when a run actually EXECUTED. A fresh `last_run_at`@@ -168,9 +196,9 @@ def assess_scout(name: str, runs: list[dict], interval: float | None, mem_count:return {"name": name, "runs": n, "completed": completed, "failed": failed, "timeouts": timeouts,- "success_pct": pct(completed, n), "median_dur": median_dur, "median_gap": median_gap,- "interval": interval, "adherence": adherence, "stalls": stalls,- "wrote": wrote, "wrote_pct": pct(wrote, n), "mem_count": mem_count,+ "settled": len(settled), "success_pct": pct(completed, len(settled)), "median_dur": median_dur,+ "median_gap": median_gap, "interval": interval, "adherence": adherence, "stalls": stalls,+ "wrote": wrote, "wrote_pct": pct(wrote, len(settled)), "mem_count": mem_count,"stale_min": stale_min, "dispatch_stale_min": dispatch_stale_min,"run_stale_min": run_stale_min, "dispatch_run_gap_min": dispatch_run_gap_min,}@@ -190,7 +218,7 @@ def render(scouts: list[dict], window_note: str, has_mem: bool, *, art: bool = Tbody: list[list[str]] = []for s in sorted(scouts, key=lambda x: x["name"]):gap = f"{s['median_gap']}m" if s["median_gap"] is not None else "-"- interval = f"{int(s['interval'])}m" if s["interval"] else "?"+ interval = "cron" if s.get("cron") else (f"{int(s['interval'])}m" if s["interval"] else "?")dur = f"{s['median_dur']}m" if s["median_dur"] is not None else "-"runs_cell = f"{s['runs']}" + (f" ({s['failed']}F)" if s["failed"] else "")mem = "n/a" if s["mem_count"] is None else (str(s["mem_count"]) if s["mem_count"] else "0")@@ -202,14 +230,16 @@ def render(scouts: list[dict], window_note: str, has_mem: bool, *, art: bool = Tflags: list[str] = []for s in scouts:+ if s["runs"] and not s["settled"]:+ flags.append(f" * {s['name']}: {s['runs']} run(s) in the window but none settled (queued, in flight, or cancelled): NOT assessed, wait for an outcome.")if s["failed"] and s["completed"] == 0:- flags.append(f" * {s['name']}: EVERY run failed ({s['failed']}/{s['runs']}) — broken, not quiet.")+ flags.append(f" * {s['name']}: EVERY settled run failed ({s['failed']}/{s['settled']}): broken, not quiet.")elif s["timeouts"]:flags.append(f" * {s['name']}: {s['timeouts']} timeout-shaped failure(s) (>={int(TIMEOUT_MINUTES)}m) — likely over-investigation; read the session log.")if s["stalls"]:flags.append(f" * {s['name']}: {s['stalls']} cadence stall(s) (gap >{int(STALL_FACTOR)}x interval) — coordinator skipped it (paused / drained / capped).")- if has_mem and s["runs"] >= 5 and s["mem_count"] == 0:- flags.append(f" * {s['name']}: {s['runs']} runs but an EMPTY scratchpad — not learning.")+ if has_mem and s["settled"] >= 5 and s["mem_count"] == 0:+ flags.append(f" * {s['name']}: {s['settled']} settled runs but an EMPTY scratchpad: not learning.")# Dispatching but not running: the coordinator's last_run_at has marched a full interval+# past the newest run that actually materialized — children are queuing without executing# (workers backed up / down, or runs stranded). Distinct from a cadence stall (gap between@@ -220,22 +250,32 @@ def render(scouts: list[dict], window_note: str, has_mem: bool, *, art: bool = Telif s["stale_min"] is not None and s["interval"] and s["stale_min"] > STALL_FACTOR * s["interval"]:flags.append(f" * {s['name']}: last run {fmt_age(s['stale_min'])} ago vs a {int(s['interval'])}m cadence — may be drained from the flag.")+ for s in scouts:+ if s.get("cron"):+ flags.append(+ f" * {s['name']}: runs on a cron schedule, so cadence, stalls and staleness are NOT assessed here;"+ " compare last_run_at and the newest run against its slots by hand."+ )L += ["-" * 78, " worth a look", "-" * 78]L += sorted(set(flags)) if flags else [" (none — cadence, success, and memory all look nominal)"]L += ["", "-" * 78, " column key", "-" * 78," runs runs in the window; (NF) = N of them failed",- " ok success rate — % of runs that reached a clean 'completed' status",- " wrote report rate — % of runs that wrote or edited an inbox report (from",+ " ok success rate: % of settled runs (completed or failed; cancelled and",+ " in-flight rows are excluded, as is a failed row whose error names a",+ " cancellation) that reached a clean 'completed' status",+ " wrote report rate: % of settled runs that wrote or edited an inbox report (from"," emitted_report_ids / edited_report_ids on the run row; legacy"," signal-channel emits count too). Most healthy scouts write rarely —"," judge signal-to-noise against the report statuses in inbox-reports-list."," gap/ival median gap between consecutive run starts / the configured"," run_interval_minutes. gap well above ival = the scout is being skipped.",+ " 'cron' = the scout runs on run_cron_schedule; its gaps are irregular by",+ " design, so adherence, stall and staleness flags are skipped for it."," adher cadence adherence — runs observed / runs expected across the window"," span at that interval. 100% = fired on (nearly) every scheduled tick."," med median run duration (start -> finish). healthy runs finish in a couple",- " of minutes; a ~30m median is timeout-shaped over-investigation.",+ " of minutes; a ~15m median is timeout-shaped over-investigation."," mem durable scratchpad entries attributed to this scout (via the run that"," wrote them) in --scratchpad. 'n/a' = no --scratchpad passed; '0' = passed"," but none matched (often the writing run falls outside the runs window)."]@@ -258,7 +298,12 @@ def main() -> int:run_rows = [r for r in run_rows if r.get("skill_name") == args.skill]cfg_rows = rows(load(args.config)) if args.config else []- intervals = {r.get("skill_name"): r.get("run_interval_minutes") for r in cfg_rows}+ # A cron scout's gaps are irregular by design, so interval-based scoring would misflag it.+ intervals = {+ r.get("skill_name"): (None if r.get("run_cron_schedule") else r.get("run_interval_minutes"))+ for r in cfg_rows+ }+ cron_skills = {r.get("skill_name") for r in cfg_rows if r.get("run_cron_schedule")}last_run_by_skill = {r.get("skill_name"): r.get("last_run_at") for r in cfg_rows}now = parse_ts(args.now) if args.now else None@@ -281,6 +326,8 @@ def main() -> int:now, last_run_by_skill.get(name))for name, runs in by_skill.items()]+ for s in assessed:+ s["cron"] = s["name"] in cron_skillsstarts = [s for r in run_rows if (s := parse_ts(r.get("started_at")))]if starts:diff --git a/products/signals/skills/inbox-exploration/SKILL.md b/products/signals/skills/inbox-exploration/SKILL.mdindex f728594380ef..7e0ec3b9991f 100644--- a/products/signals/skills/inbox-exploration/SKILL.md+++ b/products/signals/skills/inbox-exploration/SKILL.md@@ -114,18 +114,25 @@ How the flag is produced:3. At read time, those GitHub logins are mapped back to PostHog users via each org member'slinked GitHub identity (social auth or GitHub integration). If the _current_ viewer'slinked GitHub login is one of them, `is_suggested_reviewer` flips to `true` for that- report.+ report. A reviewer can also be stored by PostHog `user_uuid` (a scout or a person naming+ an org member directly), which matches the viewer without any GitHub link.+ The flag is forced to `false` on a `failed` report and on a `ready` report judged+ `not_actionable`, whatever reviewers they carry, so read `suggested_reviewers` directly+ when auditing routing.Practical implications for triage:-- A `true` value means "you wrote (or recently touched) the code this report is about" — not- "you were assigned this." It's heuristic, not authoritative.+- A `true` value means "you are a suggested reviewer for this report": a plausible owner,+ not an assignee. When the pipeline derived the reviewers, that usually means you wrote (or+ recently touched) the relevant code; when a scout or a person named you by `user_uuid`, it+ means they judged you the owner. It's a recommendation, not authoritative.- A `false` value doesn't mean the report is irrelevant — it can mean (a) someone else owns- the code, (b) no one in the org has a linked GitHub account matching the suggested logins,- or (c) the source material wasn't tied to a specific repo / commits.+ the code, (b) the suggested logins came from commit history and no org member has that+ GitHub account linked (a reviewer set by `user_uuid` doesn't have this problem), or (c) the+ source material wasn't tied to a specific repo / commits.- If the user asks "what should _I_ look at?", lead with `is_suggested_reviewer: true`- reports — these are the ones where the user's name is on the relevant code. Mention the- rest as a secondary group rather than mixing them in.+ reports: these are the ones routed to the user as a likely owner. Mention the rest as a+ secondary group rather than mixing them in.- If the user has _no_ suggested reports but the inbox isn't empty, say so explicitly("nothing in the inbox is tied to code you've authored recently") rather than pretendingthe top of the list is personalized.diff --git a/products/signals/skills/working-with-scouts/SKILL.md b/products/signals/skills/working-with-scouts/SKILL.mdindex 995e6596719c..20b40ba5685a 100644--- a/products/signals/skills/working-with-scouts/SKILL.md+++ b/products/signals/skills/working-with-scouts/SKILL.md@@ -48,7 +48,8 @@ One access rule covers everything here: scout rows live on the project's **canonThe `description` on each row says what that scout watches — scan it to answer "which scout covers X?" without loading any skill bodies.(A row with an empty description is usually an orphan whose skill was since deleted — it can't run, so don't count it as coverage.)-PostHog ships specialists for most product surfaces (error tracking, logs, web analytics, AI observability, experiments, feature flags, session replay, surveys, revenue, and more) plus a cross-product generalist, and teams add custom `signals-scout-*` skills beyond that.+PostHog ships specialists for most product surfaces (error tracking, logs, web analytics, AI observability, experiments, feature flags, session replay, surveys, revenue, and more) plus a cross-product generalist, and teams add custom scouts beyond that (any skill name works; only the `signals-scout-` prefix gets a config auto-registered, so a scout named anything else comes in through `posthog:scout-create`).+Each row also carries `scout_origin` (`canonical` or `custom`), which tells a PostHog-seeded scout from a team-authored one. It cannot tell you whether a canonical scout has been edited in place and so diverged from upstream: that row still reads `canonical`. When divergence matters, compare the row's body with the canonical source in the PostHog repository (`products/signals/skills/<skill>/SKILL.md`); `posthog:skill-get` returns the team's live row, which is the edited copy.## The working loop@@ -68,14 +69,14 @@ An untended inbox doesn't just decay; it switches the fleet off.When you want something watched, pick the cheapest path that gets it watched — most jobs don't need a new scout:-| Situation | Do this |-| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| A canonical scout already covers the surface | Nothing to build — confirm it's enabled, and leave it a **note** if you want its attention pointed somewhere specific. |-| The surface is covered but you want a temporary or specific focus | Leave a **note** (optionally with `expires_at`) — "watch the EU signup funnel this week", "we shipped a new checkout Tuesday, shifts after that are expected". |-| A covered scout keeps missing (or over-reporting) something structural | **Adapt** it — a disqualifier, threshold, or scope edit via `authoring-scouts`. Prefer a new differently-named scout for purely additive behavior, since editing a canonical scout's row marks it diverged and stops upstream improvements. |-| No scout covers it (a custom event, a niche funnel, an external system) | **Author a custom scout** via `authoring-scouts` (`posthog:scout-create`). |-| You want a recurring **metric**, not reports — a subjective quality/classification score no query can compute | **Author a measurement scout** on the structured-output channel: it judges a sample every run and records schema-validated `$scout_structured_output` events you chart in insights (and a workflow can act on), filing a report only on a material shift. See the recurring measurement / LLM-judge pattern in `authoring-scouts`. |-| You want an answer _now_, once | Don't use a scout at all — just query the data directly. Scouts are for standing watches, not one-off questions. |+| Situation | Do this |+| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| A canonical scout already covers the surface | Nothing to build: confirm it's enabled, and leave it a **note** if you want its attention pointed somewhere specific. |+| The surface is covered but you want a temporary or specific focus | Leave a **note** (optionally with `expires_at`): "watch the EU signup funnel this week", "we shipped a new checkout Tuesday, shifts after that are expected". |+| A covered scout keeps missing (or over-reporting) something structural | **Adapt** it: a disqualifier, threshold, or scope edit via `authoring-scouts`. Prefer a new differently-named scout for purely additive behavior, since editing a canonical scout's row marks it diverged and stops upstream improvements. |+| No scout covers it (a custom event, a niche funnel, an external system) | **Author a custom scout** via `authoring-scouts` (`posthog:scout-create`). In the inbox's scouts tab, the "Suggested for this project" strip proposes scouts from the project's own data, and "Suggest a scout" opens a chat that drafts one. A custom suggestion lands on the same create call; a canonical suggestion is an existing PostHog scout that is switched off, so accepting it enables that config rather than creating a new scout. |+| You want a recurring **metric**, not reports: a subjective quality/classification score no query can compute | **Author a measurement scout** on the structured-output channel: it judges a sample every run and records schema-validated `$scout_structured_output` events you chart in insights (and a workflow can act on), filing a report only on a material shift. See the recurring measurement / LLM-judge pattern in `authoring-scouts`. |+| You want an answer _now_, once | Don't use a scout at all: just query the data directly. Scouts are for standing watches, not one-off questions. |[`references/delegation-recipes.md`](references/delegation-recipes.md) has worked recipes for the common asks — watching a freshly shipped event, a time-boxed funnel watch, a daily digest, an external status page, quieting a noisy fleet, and more.@@ -91,26 +92,35 @@ Report triage mechanics live in `inbox-exploration`; what matters here is how ac- **Verify before implementing.** A scout report is an LLM diagnosis, not ground truth — confirm the cited entities and behavior against the live data or code before fixing.A report that doesn't hold up is a dismissal candidate, and dismissing it _well_ is valuable work (see below).- **Close every report with the honest state**: `resolved` when the work landed (PR-backed fixes resolve themselves on merge — don't resolve at PR-open time), `suppressed` (dismissed) when it's not real or not worth fixing, `potential` (snoozed) when it's real but deferred.-- **The dismissal note is a steering message.** On a dismiss or snooze, the `dismissal_note` is forwarded to the scout that filed the report, and every future run reads it as prior context.+- **The dismissal note is a steering message.** On a dismiss, snooze, or restore, the `dismissal_note` is forwarded to the scout that filed the report, and every future run reads it as prior context (a `wrong_repo` dismissal forwards even without a note, since the repositories it names are the feedback).Write it for that reader: name the evidence that settles it ("staging traffic — hosts match `*.dev.example.com`, ignore this pattern"), not just the verdict.A well-written dismissal is the cheapest scout edit you will ever make; a bare dismissal teaches nothing and the report comes back.- One caveat: forwarding is best-effort and requires the dismisser to hold scout-steering (skill-editor) access — without it the note still lands on the report but never reaches the scout, so for a steer that must stick, confirm it arrived (`posthog:scout-notes-list`) or have someone authorized leave a note directly.+ Two caveats: forwarding is best-effort and requires the dismisser to hold scout-steering (skill-editor) access on the canonical project, and a dismissal made on a child environment's report never forwards at all; in both cases the note still lands on the report but never reaches the scout, so for a steer that must stick, confirm it arrived (`posthog:scout-notes-list`, with a credential that also holds `task:read`, since derived notes are hidden without it) or have someone authorized leave a note directly.The forwarded note also expires after ~30 days — it becomes durable only if the scout folds it into scratchpad memory, so a steer that must outlive that belongs up the ladder as a skill edit.+- **Three more inbox actions steer the same way.** A question typed into a report's "Discuss" box, a note left with a thumbs rating on a report, and adding or removing a suggested reviewer each also become a scout note (visible in `posthog:scout-notes-list` with an `origin` of `report_discussion`, `report_feedback`, or `report_reviewer_correction`).+ A reviewer correction is the strongest routing evidence the fleet gets: it reaches the scouts that filed or edited the report and the scouts whose `reviewer:` memory names a removed login (capped at twenty targets per correction, so on a very busy report a few can miss it), so fixing a misrouted report in place teaches the fleet who owns the surface.+ The forwarded note carries GitHub logins and is written only when the corrector holds skill-editor access on the canonical project, so a correction made without that access, or one that only adds or removes a `user_uuid` reviewer with no linked GitHub account, stays on the report and is not forwarded.+ The discussion and rating paths demand the full notes-write authorization (skill-editor access plus the `signal_scout:write` / `llm_skill:write` key scopes), so a note typed by someone without it is not forwarded: a discussion question still lives on the report's thread, but a rating note survives only in the analytics event, so if it must reach the scout, have someone authorized leave it as a scout note.- **Reports route to people.** A scout that can name a plausible owner sets `suggested_reviewers`, and the inbox floats those reports to the top of that person's view.- If reports for a surface keep landing unrouted or misrouted, that's fixable: make sure org members have linked GitHub identities, and steer the scout (note or skill edit) toward the right owner for the area.+ A reviewer is a PostHog user: a scout routes by `user_uuid` (any org member, no GitHub account needed) or by `github_login` (matched against the member's linked GitHub identity), and `is_suggested_reviewer` flips for the viewer on either match.+ If reports for a surface keep landing unrouted or misrouted, that's fixable: correct the reviewers on the report itself (the correction is forwarded as above), leave a fleet-wide routing note (`posthog:scout-notes-create` with no `skill_name`, "route billing-adjacent reports to Dana"), or steer the scout (note or skill edit) toward the right owner for the area. A `pipeline:report-research` note steers only the reports the pipeline builds from clustered signals; a scout that authors reports directly sets `suggested_reviewers` itself and never reads that audience.## The steering ladderWhen you want a scout to behave differently, climb this ladder from cheapest to most permanent — and stop at the lowest rung that does the job:-1. **React to its output.** Dismiss / snooze with a specific, evidence-bearing note (forwarded to the scout automatically).- Right for: one wrong report, a known-noise pattern surfacing for the first time.-2. **Leave a note** (`posthog:scout-notes-create`, per-scout or fleet-wide, optionally time-boxed with `expires_at`).+1. **React to its output.** Dismiss / snooze with a specific, evidence-bearing note, ask a question in its Discuss box, rate it with a note, or fix its reviewers (each forwarded to the scout automatically).+ Right for: one wrong report, a known-noise pattern surfacing for the first time, a misrouted report.+2. **Steer one run** (`posthog:scout-run-now` with a `note`).+ Right for: a one-off focus you want checked now ("look at the checkout regression") without leaving anything the scheduled runs will read later.+ The note steers that run only (up to 1,000 characters) and is never delivered to later runs as a note, though it stays visible in that run's metadata when a later run reads its history, so phrase it as a dated one-off ("today only: ..."). It spends a run from the daily budget like any manual run, and it needs `llm_skill:write` on top of `signal_scout:write` plus skill-editor access on the project (a 403 otherwise). A caller without that access can still run the scout without a note.+3. **Leave a note** (`posthog:scout-notes-create`, per-scout or fleet-wide, optionally time-boxed with `expires_at`).Right for: feedback, pointers, and context with a shelf life — "the spike you keep flagging is known noise", "dig into EU signups this week", "new checkout shipped Tuesday".Notes are advisory: they direct attention but never lower the evidence bar or force a report.-3. **Tune the config** (`posthog:scout-config-update`).- Right for: _when and whether_ it runs, not _what it looks at_ — slow a chatty scout (`run_interval_minutes`; if the config carries a `run_cron_schedule`, that takes precedence, so update or clear it too), pause one (`enabled=false`), dry-run a risky one (`emit=false`), grant external reach (`network_access=full`), or exempt a deliberately quiet watchdog from auto-pause (`auto_pause_exempt=true`).-4. **Edit the skill body, or author a new scout** (via `authoring-scouts`).+ Address `skill_name: "pipeline:report-research"` to steer how the pipeline researches, judges, and routes the reports it builds from clustered signals. Scout-authored reports never pass through that stage, so a routing rule for them goes in a fleet-wide note (no `skill_name`) or a per-scout note.+4. **Tune the config** (`posthog:scout-config-update`).+ Right for: _when, whether, and where_ it runs, not _what it looks at_; slow a chatty scout (`run_interval_minutes`; if the config carries a `run_cron_schedule`, that takes precedence, so update or clear it too), pause one (`enabled=false`), dry-run a risky one (`emit=false`), grant external reach (`network_access=full`), exempt a deliberately quiet watchdog from auto-pause (`auto_pause_exempt=true`), deliver its reports to a Slack channel or DM as well as the inbox (`output_destinations.slack`), or pin the model it runs on (`model`).+5. **Edit the skill body, or author a new scout** (via `authoring-scouts`).Right for: permanent policy — a disqualifier, a threshold, a scope change, a new surface.For a **custom scout** this is the strongest steer there is: the skill body is yours, edit it freely — it's where recurring notes and repeated dismissal reasons should end up.For a **canonical scout** the same edit **forks it**: your team's copy is marked diverged, PostHog's canonical sync leaves it alone from then on, and you stop receiving upstream improvements to that scout — you maintain it yourself.@@ -129,6 +139,10 @@ Some feedback loops run on their own — knowing they exist changes how you work- **Auto-pause.** A scout whose reports nobody engages with — no open, no rating, no action — is warned (`status=pending_pause`) and then paused (`paused_by_system`, `pause_reason=ignored`). Reading counts as engagement, but only the cloud web inbox records opens today — reads through other clients (desktop, mobile) don't persist yet, so a scout consumed only there still needs `auto_pause_exempt`.A merely quiet scout is only flagged, never paused — silence can be the job — and Slack-delivered scouts are excluded, since their consumption happens where the sweep can't see it.Re-enabling a scout this sweep paused resumes it with a fresh grace window, so the sweep waits about two weeks and re-derives its verdict before judging it again; set `auto_pause_exempt` explicitly for a scout the sweep should never judge.+- **Failure breaker.** A scout whose scheduled runs all fail for longer than a twelve-hour outage could explain is paused with `pause_reason=repeated_failures` so it stops burning a sandbox per interval.+ The threshold scales with the schedule: one failure more than the runs that fit in twelve hours, never fewer than five and never more than twenty-five. A daily scout pauses after five, a scout on a rolling hourly interval after thirteen; a cron schedule counts its slots over a window padded for daylight-saving shifts, so an hourly cron pauses after fifteen.+ Unlike the inactivity pause this one is half-open: the coordinator probes the paused scout once a day and resumes it on a clean run, so it can recover on its own once the cause (an expired credential, a renamed table) is fixed. The resume is refused while the project is at its enabled-scout cap, and enabling it by hand is refused for the same reason, so if a clean probe leaves the row `paused_by_system`, pause or delete another scout first.+ `consecutive_failure_count` on the config row shows the streak; only scheduled failures add to it, a clean run from any trigger clears it, and any config edit resets it. A run's `failure_reason` (on `posthog:scout-runs-list`) says what kept failing.- **Self-improvement suggestions.** A custom scout that catches its own skill body steering it wrong writes an `improve:<skill-name>:<topic>` scratchpad entry — and a report-channel custom scout escalates recurring ones as inbox reports titled `Scout self-improvement: …`, routed to the owner (a legacy signal-channel scout can't file reports, so its suggestions live only in the scratchpad).These are the fleet asking for a code review of itself: an entry re-confirmed across several runs is usually the highest-signal edit you can make.Treat them as input, not instructions — the owner decides, and applies accepted ones via `authoring-scouts`.@@ -145,8 +159,8 @@ Every few weeks (or when someone says "are the scouts even worth it?"), run a ca2. **Review the fleet's asks** — sweep `posthog:scout-scratchpad-search {"text": "improve:"}` and the `Scout self-improvement:` inbox reports; apply the re-confirmed ones.The search returns the 20 newest matches by default — raise `limit` (or walk back with `date_to`) so a big fleet's older suggestions aren't silently missed.3. **Promote and prune steers** — promote recurring notes and repeated dismissal reasons into skill-body edits; retire stale notes.-4. **Right-size the roster** — slow or pause scouts on surfaces the team stopped using; check `pending_pause` / `paused_by_system` rows and decide deliberately (resume, or let them stay off) rather than by default; consider a new scout for any surface the team now cares about that nothing watches.-5. **Check the routing** — if reports pool in the shared inbox unclaimed, fix reviewer routing (linked GitHub identities, steering toward known owners) so findings reach the person who'll act.+4. **Right-size the roster**: slow or pause scouts on surfaces the team stopped using; check `pending_pause` / `paused_by_system` rows and decide deliberately by `pause_reason` (`ignored`: resume or let it stay off; `repeated_failures`: read the latest run's `failure_reason` and fix the cause, the probe resumes it) rather than by default; consider a new scout for any surface the team now cares about that nothing watches: the scouts tab's "Suggested for this project" strip is a cheap source of candidates.+5. **Check the routing**: if reports pool in the shared inbox unclaimed, fix reviewer routing so findings reach the person who'll act: correct reviewers on the misrouted reports (forwarded to the fleet), leave a fleet-wide note with the ownership rule (a `pipeline:report-research` note only reaches signal-built reports), and steer scouts toward known owners.## Common asks, routed@@ -158,6 +172,9 @@ Every few weeks (or when someone says "are the scouts even worth it?"), run a ca| "Fix this scout report" / "is this report real?" | `inbox-exploration` (verify first), then act; close the loop with a state + note || "Stop reporting this" / "that finding is noise" | Dismiss with an evidence-bearing note; promote to a disqualifier edit if it recurs || "Focus on X this week" | A time-boxed note (`expires_at`) |+| "Check X right now" | `posthog:scout-run-now` with a one-run `note` |+| "Send this scout's reports to Slack" | `posthog:scout-config-update` with `output_destinations.slack`; mechanics in `authoring-scouts` |+| "Route these reports to <person>" | Fix the reviewers on the report; a fleet-wide or per-scout note for the standing rule || "The scouts are too noisy / too quiet" | Calibration pass above; then the steering ladder against the specific offender || "Write / edit / retune a scout" | `authoring-scouts` || "Why did the scout stop flagging X?" | Scratchpad first (`noise:` / `addressed:` / `dedupe:` / `allowlist:`), then notes, then config |diff --git a/products/signals/skills/working-with-scouts/references/delegation-recipes.md b/products/signals/skills/working-with-scouts/references/delegation-recipes.mdindex 0249c90da6d7..086dd80d7540 100644--- a/products/signals/skills/working-with-scouts/references/delegation-recipes.md+++ b/products/signals/skills/working-with-scouts/references/delegation-recipes.md@@ -86,17 +86,31 @@ Before loosening anything:Reports reach people via `suggested_reviewers` — the inbox floats a report to the top of the suggested reviewer's own view.-1. Routing depends on org members having **linked GitHub identities**; without them, no report can flag `is_suggested_reviewer` for anyone.-2. If a surface's reports keep landing unrouted, teach the fleet the owner: a note ("checkout belongs to Dana — route checkout findings to dana-gh"), or for permanence, the owner map in the scout's body.+1. A reviewer is a PostHog user, identified by `user_uuid` (any org member) or by `github_login` (matched against the member's linked GitHub identity). A `user_uuid` reviewer needs no GitHub link; a login-only reviewer matches nobody until that member links the account, so resolve a name or a login to a `user_uuid` before routing on it: inside a run a scout uses `scout-members-list`, which is a sandbox-only tool; from your own agent use `posthog:org-members-list` (and `posthog:org-member-get-github-login` for the linked login), which need the `organization_member:read` scope on a scoped credential; without it, ask the user for the person's PostHog user UUID or route by `github_login` when the account is linked. That list is visibility-filtered: unless you are an organization admin or the organization lets members see each other, it shows only you and the members who share a project with you, so a missing name is not proof the person does not exist. The reviewer write still accepts any org member, so on a project with restricted access confirm the person can open the project first (the project access tools, not the member list, answer that); a reviewer who cannot see the report is effectively unrouted even though the report looks assigned.+2. If a surface's reports keep landing unrouted, teach the fleet the owner: a note ("checkout belongs to Dana; route checkout findings to her"), or for permanence, the owner map in the scout's body.+ For a rule that spans scouts, leave a fleet-wide note (`posthog:scout-notes-create` with no `skill_name`), which every scout reads. The `pipeline:report-research` audience reaches only the stage that researches and routes reports built from clustered signals; a scout that authors reports directly sets its reviewers itself and never reads it.Scouts cache confirmed owners as `reviewer:` scratchpad entries, so one good steer compounds.-3. A live report routed to no one isn't stuck — a scout (or you, via the report tools) can set reviewers on it after the fact.+3. A live report routed to no one isn't stuck: a scout (or you, via the report tools) can set reviewers on it after the fact, and that correction is forwarded to the scouts involved as a note when the reviewers carry GitHub logins, so fixing the report is itself a steer.++## "Send this scout's reports to Slack"++Delivery is a config decision, not an authoring one: a surfaced report (`ready` or `pending_input`) goes to the inbox and to Slack, while a report the safety or actionability judge suppressed stays inbox-only, so a missing Slack message for a suppressed report is not a delivery failure.++1. `posthog:scout-config-update` with `output_destinations.slack`: the workspace `integration_id` plus either a `channel` or up to five `users` to DM, never both (field shapes and the threading option are in `authoring-scouts`, Run posture).+ From a scoped API key or OAuth token this write also needs `integration:read` and `task:read` (or the write scopes) alongside `signal_scout:write`; a minimally scoped credential gets a permission error.+ Read the existing `output_destinations` first and send the whole object back; the update replaces it, so sending only `slack` drops an existing `webhook` pointer.+2. Slack delivery is a firehose of that one scout's output (no priority filter, no reviewer routing), so it suits a scout whose bar is already tight.+ Calibrate in the inbox first, then add the destination.+3. A Slack-delivered scout is exempt from the ignored-reports auto-pause (consumption in Slack isn't measurable), so the fleet won't switch it off for you; review it yourself in the calibration pass.## "Try a risky watch safely"For a scout you expect to be chatty, expensive, or high-stakes:1. Create it with **both** `enabled: false` and `emit: false` in the nested config at `posthog:scout-create` time.- `emit: false` (dry-run) makes it log what it _would_ report without touching the inbox; `enabled: false` matters too, because a fresh enabled config has no `last_run_at` and the coordinator treats it as immediately due — it could burn a scheduled run (or 409 your manual one) before your controlled test.+ `emit: false` (dry-run) makes it log what it _would_ report without touching the inbox; `enabled: false` matters too, because a fresh enabled config on a rolling interval has no `last_run_at` and the coordinator treats it as immediately due; it could burn a scheduled run (or 409 your manual one) before your controlled test.+ (A `run_cron_schedule` anchors on the config's creation time and waits for its first slot, so a cron scout isn't immediately due, but disabling it is still the safer default.)2. Spend one `posthog:scout-run-now` (it works on a disabled scout), then read the run via `exploring-scouts` to see what it would have written.+ Pass a `note` on that call to point the test run at the case you want exercised ("focus on yesterday's checkout drop") without leaving a durable note behind.Runs are metered against the project's daily budget — dogfood the queries by hand for iteration and save real runs for end-to-end checks.3. Calibrate, then set `enabled: true` and `emit: true`, and let the normal act-and-feed-back loop take over.