Skip to content

: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.

chore(signals): scope the report-channel opt-in to report-producing scouts (#113655)

posthog[bot]5d0368dec1fc
diff --git a/posthog/test/repo_invariants/signals_scout_tool_citations_baseline.txt b/posthog/test/repo_invariants/signals_scout_tool_citations_baseline.txt
index 4699d78e1921..c8635ed562bd 100644
--- a/posthog/test/repo_invariants/signals_scout_tool_citations_baseline.txt
+++ b/posthog/test/repo_invariants/signals_scout_tool_citations_baseline.txt
@@ -47,6 +47,7 @@ scout-trial-report
scout-trial-start
survey-stats
surveys-global-stats
+switch-project
view-run-history
vision-observations-create-task
vision-observations-retry
diff --git a/products/signals/skills/authoring-scouts/SKILL.md b/products/signals/skills/authoring-scouts/SKILL.md
index cc9e01013a4b..f7e0bb6f57f6 100644
--- a/products/signals/skills/authoring-scouts/SKILL.md
+++ b/products/signals/skills/authoring-scouts/SKILL.md
@@ -22,8 +22,9 @@ A **scout** is a scheduled agent that wakes on its own interval, looks at one Po
PostHog ships a fleet of **canonical scouts** (a cross-product generalist plus per-surface specialists).
This skill helps you and your agent **adapt those canonical scouts to a specific project**, or **author new scouts from scratch** for a use case the fleet doesn't cover.
-A scout's output is the **report channel**: it lists `emit_report` / `edit_report` in its frontmatter `allowed_tools` and authors or edits full inbox reports 1:1 directly.
-The canonical fleet runs this way, and **every new scout should too** — always include the `allowed_tools` opt-in when authoring one.
+A report-producing scout's output is the **report channel**: it lists `emit_report` / `edit_report` in its frontmatter `allowed_tools` and authors or edits full inbox reports 1:1 directly.
+Most of the canonical fleet runs this way, and **every new report-producing scout should too** — include the `allowed_tools` opt-in when you author one.
+A scout whose output is a product surface (for example, suggestions on a workflow page) omits both tools; see [Scouts with a product-specific output](references/report-contract.md#scouts-with-a-product-specific-output).
Where that output _lands_ is a separate, per-scout config decision: the report goes to the Signals inbox, and the same report can be delivered to a Slack channel or DM at the same time (`output_destinations` under Run posture) — so don't rule a scout out of a job because the user wants the result in Slack.
(A historical signal-emitting channel — weak `emit-signal` findings a pipeline consolidated — still exists in the harness for scouts that never opted in, but it is deprecated: don't author new scouts on it, and opt an old one in rather than extending it.)
@@ -84,7 +85,7 @@ And where a built-in signals source already covers the surface (GitHub and Linea
A scout does not have to stop at describing a fix: the **maintainer / steward** pattern is how a scout holding `write_scopes` keeps a family of dashboards, alerts, warehouse views, or scanner prompts healthy itself, with a write ladder that says which changes it applies, which it verifies and reports, and which it hands to a human.
Find the closest pattern, then write the body.
-Follow [`references/scout-anatomy.md`](references/scout-anatomy.md) — it has the frontmatter schema (including the `allowed_tools` report-channel opt-in every scout needs), the canonical body structure (quick close-out → orient → domain discriminator → explore patterns → save-memory → decide → disqualifiers → close-out), the lean-body rule, and copy-ready skeleton templates for both a specialist and the generalist.
+Follow [`references/scout-anatomy.md`](references/scout-anatomy.md) — it has the frontmatter schema (including the `allowed_tools` report-channel opt-in every report-producing scout needs; a scout with a [product-specific output](references/report-contract.md#scouts-with-a-product-specific-output) omits it), the canonical body structure (quick close-out → orient → domain discriminator → explore patterns → save-memory → decide → disqualifiers → close-out), the lean-body rule, and copy-ready skeleton templates for both a specialist and the generalist.
**Write the body feature-forward.** The body is a prompt a run reads in full, every run, for as long as the scout lives — so it states what the scout watches and how it decides, and nothing else. Four things do not belong in it:
@@ -128,6 +129,7 @@ A scout's schedule and emit behavior live on its `SignalScoutConfig`, separate f
For a **brand-new scout**, pass these settings in the nested `config` object of the `posthog:scout-create` call, including creating it disabled or in dry-run **before it ever runs**.
When creating a scout to test an idea, set `config.enabled=false` so scheduled runs cannot interfere with the trial.
The endpoint creates the skill and config atomically, always opts the scout into the report channel, and safely re-applies config fields when the same definition is retried.
+A scout with a product-specific output must stay off the report channel, so create it with `skill-create` and `scout-config-create` instead; see [Scouts with a product-specific output](references/report-contract.md#scouts-with-a-product-specific-output).
Otherwise the coordinator auto-registers an enabled config on the default every-24-hours schedule on its next tick (up to ~30 min).
For an **existing scout**, tune with `posthog:scout-config-update` (find the `id` via `-config-list`):
diff --git a/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.md b/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.md
index 2b0708573496..ffaa0b12f2dd 100644
--- a/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.md
+++ b/products/signals/skills/authoring-scouts/references/lifecycle-and-testing.md
@@ -45,6 +45,15 @@ posthog:skill-get {"skill_name": "signals-scout-error-tracking"}
# New idea to test: create the complete definition and config, paused.
posthog:scout-create {"name": "signals-scout-<scope>", "description": "...", "body": "...", "config": {"enabled": false, "run_interval_minutes": 120}}
+# New scout with a product-specific output: scout-create always grants the report tools,
+# so create the skill without them and register its config separately, with the write grant
+# its output needs (see report-contract.md). Make both calls on the parent project: from a child
+# environment, select the parent project first. Where switch-project is not exposed, connect to the parent
+# project directly (see report-contract.md).
+posthog:switch-project {"projectId": <parent project id>} # only when the active context is a child environment
+posthog:skill-create {"name": "<scope>-scout", "description": "...", "body": "..."}
+posthog:scout-config-create {"skill_name": "<scope>-scout", "run_interval_minutes": 120, "write_scopes": ["<object>:write"]}
+
# Adapt an existing per-team scout — use the SMALLEST primitive (find/replace, not full-body)
posthog:skill-get {"skill_name": "signals-scout-<scope>"} # get current version first
posthog:skill-update {"skill_name": "signals-scout-<scope>", "base_version": N, "edits": [{"old": "...", "new": "..."}]}
diff --git a/products/signals/skills/authoring-scouts/references/report-contract.md b/products/signals/skills/authoring-scouts/references/report-contract.md
index 87ccedd00000..6f4fa176ee4c 100644
--- a/products/signals/skills/authoring-scouts/references/report-contract.md
+++ b/products/signals/skills/authoring-scouts/references/report-contract.md
@@ -658,3 +658,19 @@ A report on a workflow change could autostart a code PR for a change that is onl
Before you add the report tools to a scout that does not have them, read its description and output section.
If the scout states a product-specific output, keep it off the report channel.
+
+To create such a scout per team, do not use `scout-create`, because it always grants both report tools.
+Make both calls below on the parent project, not on a child environment.
+`skill-create` stores the skill in the active environment, but `scout-config-create` looks for the skill in the parent project.
+From a child environment, registration fails, or it registers a different skill with the same name from the parent project.
+If the active context is a child environment, select the parent project with `switch-project` first.
+Some MCP contexts do not expose `switch-project`, for example a connection with a filtered tool set.
+In such a context, connect to the parent project directly.
+If you cannot, do not use this path from that context.
+Create the skill with `skill-create` and leave `allowed_tools` empty.
+Then register it with `scout-config-create`, and set its schedule, `enabled`, and `emit` on that call.
+Also set `write_scopes` on that call to the scope that writes the product output, for example `["hog_flow_proposal:write"]` for workflow suggestions.
+Without that grant, the scout cannot write its output.
+A dry run (`emit: false`) never holds the grant, so the scout writes no output in a dry run.
+Give the skill a name without the `signals-scout-` prefix.
+The coordinator auto-registers an enabled config for a prefixed skill that has no config, so a prefixed scout can run on the defaults before your `scout-config-create` call.
diff --git a/products/signals/skills/authoring-scouts/references/scout-anatomy.md b/products/signals/skills/authoring-scouts/references/scout-anatomy.md
index c5c0656138c0..10d27f4eb8c5 100644
--- a/products/signals/skills/authoring-scouts/references/scout-anatomy.md
+++ b/products/signals/skills/authoring-scouts/references/scout-anatomy.md
@@ -18,10 +18,14 @@ Any valid skill name works: lowercase letters, numbers, and hyphens.
The `SignalScoutConfig` row is what makes a skill a scout.
Name it in lowercase kebab-case after the surface or question the scout watches: `error-tracking`, `checkout-funnel`, `mcp-feedback`.
The canonical fleet keeps the `signals-scout-` prefix, and a per-team scout can use it too.
-The prefix only controls whether the coordinator auto-registers a config for a skill that has none, so a scout named anything else comes in through `scout-create`, which writes the skill and its config in one call.
+The prefix only controls whether the coordinator auto-registers a config for a skill that has none, so a report-producing scout named anything else comes in through `scout-create`, which writes the skill and its config in one call.
+A scout with a product-specific output comes in through `skill-create` and `scout-config-create`, because `scout-create` always grants the report tools; see [Scouts with a product-specific output](report-contract.md#scouts-with-a-product-specific-output).
## Frontmatter
+This template is for a report-producing scout.
+A scout with a product-specific output omits both report tools and avoids the `signals-scout-` prefix; see [Scouts with a product-specific output](report-contract.md#scouts-with-a-product-specific-output) for how to create it.
+
```yaml
---
name: signals-scout-<scope>
@@ -50,7 +54,8 @@ metadata:
```
`name` and `description` are required and validated at build time.
-`allowed_tools` with `emit_report` / `edit_report` is what puts the scout on the report channel — **every scout needs it** (without it the scout falls back to a deprecated legacy signal-emitting channel and can't write reports).
+`allowed_tools` with `emit_report` / `edit_report` is what puts the scout on the report channel — **every report-producing scout needs it** (without it the scout falls back to a deprecated legacy signal-emitting channel and can't write reports).
+A scout with a product-specific output omits both tools; see [Scouts with a product-specific output](report-contract.md#scouts-with-a-product-specific-output).
`compatibility` and `metadata` are optional but conventional — `compatibility` documents the scopes/tools the scout assumes; `metadata.scope` gives downstream tooling a short label.
The `description` does double duty: beyond skill discovery, it is surfaced verbatim as the scout's `description` on the config API (`scout-config-list` / `-create` / `-update` responses) — it's how the fleet roster reads to agents and the UI without opening each scout's body.