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.

fix(signals): mention the data catalog only to scouts that can use it (#102192)

Andrew Maguiredfc3c02742a6
diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.md
index f9e8371705d4..ac720101d900 100644
--- a/products/signals/backend/scout_harness/AGENTS.md
+++ b/products/signals/backend/scout_harness/AGENTS.md
@@ -173,8 +173,8 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e
## When editing this flow
- Keep the harness loop generic. Skill-specific logic belongs in the SKILL.md of the scout, not in `runner.py` or `prompt.py`.
-- **A value that varies by team or by run renders in the block at the end of the prompt, never in the prose above it.** `build_run_prompt` closes with the governed-metrics listing, the external MCP servers, the write grant, the structured-output schema, and the run identity, per-team values before per-run ones; everything above is identical across runs of the same channel. Both runtimes cache on prefix, so one interpolation moved back up the prompt leaves every section after it uncacheable, and the fleet pays for the whole body again on the first turn of every run. Where a stable section needs such a value, point at the block by section name (_First: read your skill_ and the reviewer-routing guidance both do) rather than interpolating it in place. `TestPromptCacheablePrefix` pins the split.
-- **A product-specific prompt injection has a bar to clear.** Every product team eventually wants its thing in the run prompt, and the prompt is already long enough that fleet-wide additions cost real cache. The data-catalog metric listing (`_METRICS_CATALOG_*` in `prompt.py`, pre-fetched in `runner.py`) is the reference: gated on that product's own feature flag, so a team not using it renders nothing; content follows actual usage, so an enabled team with an empty catalog renders one short sentence instead of a rule; token-capped, with the truncation case stated in the text; degrades to the previous prompt when the pre-fetch fails, so an outage can only cost steering; scoped to the run's acting user, so the injection is never wider than what the run could have queried for itself; and every rendered variant, including flag-off, pinned by a test. Anything reaching the prompt for one product should meet all six, or belong in that scout's SKILL.md instead.
+- **A value that varies by team or by run renders in the block at the end of the prompt, never in the prose above it.** `build_run_prompt` closes with the governed-metrics nudge, the external MCP servers, the write grant, the structured-output schema, and the run identity, per-team values before per-run ones; everything above is identical across runs of the same channel. Both runtimes cache on prefix, so one interpolation moved back up the prompt leaves every section after it uncacheable, and the fleet pays for the whole body again on the first turn of every run. Where a stable section needs such a value, point at the block by section name (_First: read your skill_ and the reviewer-routing guidance both do) rather than interpolating it in place. `TestPromptCacheablePrefix` pins the split.
+- **A product-specific prompt injection has a bar to clear.** Every product team eventually wants its thing in the run prompt, and the prompt is long enough that a fleet-wide addition costs every run tokens and cache. The data-catalog nudge (`_GOVERNED_METRICS_NUDGE` in `prompt.py`, resolved per run by `_project_has_governed_metrics` in `runner.py`) is the reference. It follows actual usage, not availability: a project with no approved metrics renders nothing, because a product being generally available does not mean a project uses it. Its text is fixed, with no per-team names or ids, so the prompt has two states and a project's data never reaches it. It is a nudge, not a rule: it says the capability exists and leaves the decision to the scout, and it never outranks the skill body. A failed check renders nothing, so an outage can only cost steering. The check runs as the run's acting user, so the prompt never points a run at something it cannot read. Every rendered state, including the empty one, is pinned by a test. No prompt text exists to satisfy an eval or a judge: if a judge cannot see compliance, fix what the judge reads. Anything reaching the prompt for one product meets all of these, or belongs in that scout's SKILL.md instead.
The business-knowledge section (`_BUSINESS_KNOWLEDGE`, resolved per run in `runner.py` via `business_knowledge.is_maintained_for_team`) follows the same shape: it renders only when that product's flag is on — which is also what puts its tools in the run's toolset — and the team's knowledge base looks maintained, so the section states the base as a fact instead of spending fleet-wide tokens on a self-check whose usual answer is "skip".
It reads `is_maintained_for_team` rather than the `is_available_for_team` that on-demand callers use, because a prompt section rides on every run of the lane: a base a team tried once and left alone is available forever, and would tax the lane forever. Business knowledge records no searches anywhere, so that predicate reads the source rows for upkeep instead (see its docstring); if search telemetry lands, gate on real use instead of the shape.
- New harness-internal tools: add the implementation under `tools/`, re-export it from `tools/__init__.py`, and add a corresponding scope check on the viewset in `views.py` so the MCP surface and the sandbox surface stay aligned.
diff --git a/products/signals/backend/scout_harness/prompt.py b/products/signals/backend/scout_harness/prompt.py
index 30649dc53f9f..ee28fb32f8ba 100644
--- a/products/signals/backend/scout_harness/prompt.py
+++ b/products/signals/backend/scout_harness/prompt.py
@@ -148,71 +148,27 @@ def _report_intro(*, can_emit: bool, can_edit: bool) -> str:
# Steps 1-3 are channel-agnostic (read prior context, check the fleet, investigate), so both personas
# share this head and append their own decide/close-out steps — keep run initialisation defined once.
-_HOW_A_RUN_WORKS_HEAD = """# How a run works
+_HOW_A_RUN_WORKS = """# How a run works
1. **Read your own prior context.** Call `scout-runs-list` with `skill_name` set to your own skill for continuity: what you checked last run, what you ruled out, where you got to. Call `scout-scratchpad-search` for durable team memories ("known noise", "already addressed", "ignore X"), and `scout-notes-list` with your own `skill_name` for steering notes humans left you (see *Notes left for you*). Prior context is a jumping-off point: fresh evidence on a known topic often beats fresh investigation on a stale one.
2. **Check what the rest of the fleet has seen.** Call `scout-runs-list` again without `skill_name`, passing `text=<the entity or topic>` once per thing you're about to investigate. That filter is load-bearing: the call returns 20 rows by default, so on a full fleet an unfiltered page covers barely a day and a relevant sibling sorts out of view before you read it. Nothing matches? Move on, rather than reading the fleet's whole recent output. On a match, follow that run's `emitted_report_ids` / `edited_report_ids` into `inbox-reports-retrieve`, or its `emitted_finding_ids` via `scout-runs-emissions-list` for a sibling still on the signal channel, and read the evidence rather than the prose summary. This read is context-gathering only: ignore the tool output's guidance about claiming a report, which applies to a run actually working a report and would staple your run onto a sibling's.
3. **Investigate.** Use the PostHog MCP read tools to gather evidence, discovering what's available at run time. Your skill body tells you *what* to look at."""
-# Rendered into the head's investigate step, steering hypotheses that rest on a named measure at
-# `system.information_schema.metrics` and `data-catalog-metric-run` instead of a hand-derived query.
-# The pointer is static prose; the catalog state itself is per-team, so the three mutually exclusive
-# variants below render in the per-run block at the end of the prompt (see `build_run_prompt`).
-_METRICS_CATALOG_SCOPE = "When a hypothesis rests on a named, reusable measure, business (revenue, MRR, churn, activation) or operational telemetry computed to monitor or report (cost per run, failure or error rates, latency, throughput),"
+# Worded as a nudge rather than a rule: the catalog is an optional product, so the harness only
+# says it exists and leaves the decision to use it with the scout and its skill body.
+_GOVERNED_METRICS_NUDGE = """# Governed metrics
-_METRICS_CATALOG_POINTER = f""" {_METRICS_CATALOG_SCOPE} run it through the governed metrics catalog rather than hand-deriving the number; *Governed metrics* at the end of this prompt says how this run reaches the catalog."""
+This project keeps approved metric definitions in its data catalog. When your work rests on a measure one of them may already define, `metric-list` shows what exists and `data-catalog-metric-run` runs one, so your number matches the one the team already reports."""
-_METRICS_CATALOG_RULE = """# Governed metrics
-Check the governed metrics catalog first – `SELECT name, description, status, is_drifted FROM system.information_schema.metrics` via `execute-sql` – and run an approved, non-drifted match with `data-catalog-metric-run` rather than hand-deriving it, even when your skill body ships its own SQL for that measure: a governed definition outranks a playbook query, and a number derived outside it must be labeled noncanonical. Cache the lookup outcome in your scratchpad (`catalog:<scope>:<measure>`, match or no-match plus date) and reuse a fresh entry instead of re-querying every run; re-verify an entry roughly a day old, and immediately when a canonical run reports drift or a status change. When the no-match came from a cached entry rather than an in-run lookup, open the derived query's stated context with `governed catalog consulted: no listed metric matched <measure> (noncanonical)` – the scratchpad is invisible to the trace. Schema, availability, and freshness checks stay schema-first; no catalog detour for those."""
+def _governed_metrics_section(project_has_governed_metrics: bool) -> str:
+ """The catalog nudge for a project that has approved metrics, and nothing for any other project.
-# Shared by both pre-fetched variants, so it has to read correctly with and without a listing above it.
-_METRICS_CATALOG_SUPERSEDES_CACHE = "What this run was handed above is the current catalog state and supersedes any `catalog:<scope>:<measure>` scratchpad entry an earlier run cached under the old probe-and-cache rule: where a cached entry disagrees, that entry is stale, so correct or forget it rather than acting on it."
-
-_METRICS_CATALOG_PREFETCHED = f"""# Governed metrics
-
-This run's catalog lookup is already done – the approved, non-drifted metrics right now are: {{listing}}. Do not re-run the lookup query for a measure a listed name already covers. When a listed name matches the measure you need, read its definition (`SELECT name, description, unit FROM system.information_schema.metrics WHERE name = '<name>'` via `execute-sql`) and run it with `data-catalog-metric-run` rather than hand-deriving it, even when your skill body ships its own SQL for that measure: a governed definition outranks a playbook query. A measure that matches nothing in the catalog has no canonical definition today – derive it by hand, and open that query's stated context with `governed catalog consulted: no listed metric matched <measure> (noncanonical)`. That opening line is the only trace-visible evidence of the listing this run was handed – a bare `noncanonical` label without it leaves the derivation unauditable. {_METRICS_CATALOG_SUPERSEDES_CACHE} Schema, availability, and freshness checks stay schema-first; no catalog detour for those."""
-
-_METRICS_CATALOG_EMPTY = f"""# Governed metrics
-
-This run's catalog lookup is already done and the governed metrics catalog holds no approved metrics right now: derive each measure by hand, open each such query's stated context with `governed catalog consulted: empty, no metric matches <measure> (noncanonical)`, and do not re-run the lookup query (`system.information_schema.metrics` via `execute-sql`) this run. {_METRICS_CATALOG_SUPERSEDES_CACHE}"""
-
-# Steps 1-3 with the catalog pointer appended to the investigate step. Static on every run.
-_HOW_A_RUN_WORKS = _HOW_A_RUN_WORKS_HEAD + _METRICS_CATALOG_POINTER
-
-_GOVERNED_METRIC_LISTING_CAP = 40
-
-
-def _governed_metric_listing(governed_metric_names: Sequence[str]) -> str:
- """The names, capped, with the truncation stated as the one case that still warrants a lookup.
-
- The cap keeps the injection to a handful of tokens. Past it the listing is no longer the whole
- catalog, so the overflow clause has to name the lookup as an exception; otherwise it would
- contradict the paragraph's rule against re-running the query.
- """
- listing = ", ".join(f"`{name}`" for name in governed_metric_names[:_GOVERNED_METRIC_LISTING_CAP])
- overflow = len(governed_metric_names) - _GOVERNED_METRIC_LISTING_CAP
- if overflow > 0:
- listing += (
- f", and {overflow} more this listing omits, so when a measure matches no name above, query "
- "`system.information_schema.metrics` for it before concluding it has no canonical definition"
- )
- return listing
-
-
-def _governed_metrics_section(governed_metric_names: Sequence[str] | None) -> str:
- """The catalog state this run was handed, as one of three mutually exclusive sections.
-
- Per-run composed and rendered at the end of the prompt, because the listing is per-team data
- rather than a template: interpolated into the investigate step, where the rule it qualifies
- lives, it would break the shared prefix a few hundred characters in and leave the stable prose
- after it uncacheable.
+ Rendered in the per-run block at the end of the prompt because it varies by team: in the
+ investigate step, where it would read most naturally, it would split the shared prefix and
+ leave the stable prose after it uncacheable.
"""
- if governed_metric_names is None:
- return _METRICS_CATALOG_RULE
- if not governed_metric_names:
- return _METRICS_CATALOG_EMPTY
- return _METRICS_CATALOG_PREFETCHED.format(listing=_governed_metric_listing(governed_metric_names))
+ return _GOVERNED_METRICS_NUDGE if project_has_governed_metrics else ""
# The close-out step is identical on every channel bar the word for what the run produces, and it is
@@ -1221,7 +1177,7 @@ def build_run_prompt(
github_read_access: bool = False,
structured_output_schema: dict | None = None,
write_scopes: Sequence[str] | None = None,
- governed_metric_names: Sequence[str] | None = None,
+ project_has_governed_metrics: bool = False,
mcp_server_names: Sequence[str] | None = None,
business_knowledge_maintained: bool = False,
run_note: str | None = None,
@@ -1286,10 +1242,10 @@ def build_run_prompt(
Empty or None renders nothing, so a scout with the fleet posture is never steered at a write the
MCP server would refuse.
- `governed_metric_names` is the harness-side pre-fetch of the team's approved, non-drifted metric
- names: a list (even empty) renders the injected listing so the run is catalog-aware without a
- probe query, and `None` means the lookup was unavailable, falling back to the prose
- probe-and-cache rule.
+ `project_has_governed_metrics` is the harness-side check that the team has at least one
+ approved, non-drifted metric the run's acting user may see. True renders a short nudge that the
+ catalog exists; False renders nothing, so a project that does not use the data catalog pays no
+ tokens for it. A failed check is False, because an outage must cost steering only.
`business_knowledge_maintained` must mirror `business_knowledge.is_maintained_for_team`: it
renders the business-knowledge section, which names tools that only exist in the run's toolset
@@ -1368,7 +1324,7 @@ def build_run_prompt(
run_block = "\n\n".join(
section
for section in (
- _governed_metrics_section(governed_metric_names),
+ _governed_metrics_section(project_has_governed_metrics),
_external_mcp_servers_paragraph(mcp_server_names) if mcp_server_names else "",
write_access_section,
checkout_section,
diff --git a/products/signals/backend/scout_harness/runner.py b/products/signals/backend/scout_harness/runner.py
index fb94e365c9f8..37d1d7db6348 100644
--- a/products/signals/backend/scout_harness/runner.py
+++ b/products/signals/backend/scout_harness/runner.py
@@ -562,18 +562,18 @@ def _business_knowledge_maintained_for_team(team: Team) -> bool:
return False
-def _governed_metric_names_for_team(team: Team, user_id: int) -> list[str] | None:
- """Approved metric names for prompt injection, or None when the read fails.
+def _project_has_governed_metrics(team: Team, user_id: int) -> bool:
+ """Whether the run's prompt should mention the data catalog.
Resolved as the run's acting user, the same identity the sandbox's MCP token carries, so the
- injected listing can never be wider than what the run could have queried for itself through
- `system.information_schema.metrics`.
+ prompt never points a run at metrics it could not read for itself. A failed read is False:
+ the mention is optional steering, so an outage must not fail the run or mis-steer it.
"""
try:
- return approved_metric_names_for_team(team, User.objects.get(id=user_id))
+ return bool(approved_metric_names_for_team(team, User.objects.get(id=user_id)))
except Exception as error:
capture_exception(error)
- return None
+ return False
def _granted_write_scopes(config: SignalScoutConfig) -> list[str]:
@@ -777,7 +777,7 @@ async def _spawn_and_run(
# Codex-only, and independent of the model pin: which OpenAI queue the run's turns join.
service_tier=service_tier,
)
- governed_metric_names = await database_sync_to_async(_governed_metric_names_for_team, thread_sensitive=False)(
+ project_has_governed_metrics = await database_sync_to_async(_project_has_governed_metrics, thread_sensitive=False)(
team, user_id
)
mcp_server_names = await database_sync_to_async(_mcp_server_names_for_run, thread_sensitive=False)(
@@ -789,7 +789,7 @@ async def _spawn_and_run(
team_id=team.id,
started_at=started_at,
github_read_access=github_guidance,
- governed_metric_names=governed_metric_names,
+ project_has_governed_metrics=project_has_governed_metrics,
# Names the external MCP servers the sandbox will mount, so *How to call tools* can carve
# them out of the exec-interface rule; empty renders nothing.
mcp_server_names=mcp_server_names,
diff --git a/products/signals/backend/test/test_scout_harness.py b/products/signals/backend/test/test_scout_harness.py
index d4cdca581c57..c379ed0b47a1 100644
--- a/products/signals/backend/test/test_scout_harness.py
+++ b/products/signals/backend/test/test_scout_harness.py
@@ -60,8 +60,6 @@ from products.signals.backend.scout_harness.limits import (
from products.signals.backend.scout_harness.model_selection import ScoutModel
from products.signals.backend.scout_harness.prompt import (
_EXTERNAL_MCP_LISTING_CAP,
- _GOVERNED_METRIC_LISTING_CAP,
- _METRICS_CATALOG_SUPERSEDES_CACHE as _SUPERSEDES_CACHED_ENTRIES,
_REPORT_CHARTS,
HARNESS_PROMPT_VERSION,
_checkout_section,
@@ -438,7 +436,7 @@ class TestPromptCacheablePrefix(SimpleTestCase):
started_at=datetime(2026, 5, 1, 12, 34, 56, tzinfo=UTC),
github_read_access=github_read_access,
business_knowledge_maintained=business_knowledge_maintained,
- governed_metric_names=["mrr_probe_metric"],
+ project_has_governed_metrics=True,
write_scopes=["dashboard:write"],
structured_output_schema={"type": "object", "properties": {"verdict": {"type": "string"}}},
mcp_server_names=["Datadog (EU)"],
@@ -466,7 +464,6 @@ class TestPromptCacheablePrefix(SimpleTestCase):
"2026-05-01T12:34:56+00:00",
"987654",
"signals-scout-prefix-probe",
- "mrr_probe_metric",
"Datadog",
"acme-co/service",
'"verdict"',
@@ -948,15 +945,15 @@ class TestPromptBuilder(BaseTest):
)
assert "Code-derived reviewer evidence" not in signal_prompt
- # The rule lives in the shared run-works head, and each channel assembles its own tail from
- # that head, so a channel can lose it independently.
@parameterized.expand(
[
("signal_channel", []),
("report_channel", ["emit_report", "edit_report"]),
]
)
- def test_catalog_rule_renders_on_every_channel(self, name: str, allowed_tools: list[str]) -> None:
+ def test_catalog_text_renders_only_for_a_project_with_governed_metrics(
+ self, name: str, allowed_tools: list[str]
+ ) -> None:
skill_name = f"signals-scout-catalog-{name}"
LLMSkill.objects.create(
team=self.team,
@@ -972,47 +969,18 @@ class TestPromptBuilder(BaseTest):
"started_at": datetime(2026, 5, 1, 12, 34, 56, tzinfo=UTC),
}
- prompt = build_run_prompt(loaded, **kwargs)
- assert "system.information_schema.metrics" in prompt
- assert "data-catalog-metric-run" in prompt
+ nudged = build_run_prompt(loaded, **kwargs, project_has_governed_metrics=True)
+ assert "# Governed metrics" in nudged
+ assert "data-catalog-metric-run" in nudged
- def test_prefetched_catalog_listing_replaces_the_probe_instruction(self) -> None:
- LLMSkill.objects.create(team=self.team, name="signals-scout-catalog-listing", description="s", body="watch")
- loaded = load_skill_for_run(self.team, "signals-scout-catalog-listing")
- kwargs: dict = {
- "run_id": "00000000-0000-0000-0000-000000000abc",
- "team_id": self.team.id,
- "started_at": datetime(2026, 5, 1, 12, 34, 56, tzinfo=UTC),
- }
- names = ["scout_cost_per_run", "scout_run_fail_pct"]
-
- listed = build_run_prompt(loaded, **kwargs, governed_metric_names=names)
- assert "`scout_run_fail_pct`" in listed
- assert "`scout_cost_per_run`" in listed
- assert "data-catalog-metric-run" in listed
- assert "Cache the lookup outcome" not in listed
- assert _SUPERSEDES_CACHED_ENTRIES in listed
- assert "governed catalog consulted: no listed metric matched" in listed
-
- empty = build_run_prompt(loaded, **kwargs, governed_metric_names=[])
- assert "no approved metrics" in empty
- assert "Cache the lookup outcome" not in empty
- assert _SUPERSEDES_CACHED_ENTRIES in empty
- assert "governed catalog consulted: empty, no metric matches" in empty
-
- fallback = build_run_prompt(loaded, **kwargs, governed_metric_names=None)
- assert "Cache the lookup outcome" in fallback
- assert _SUPERSEDES_CACHED_ENTRIES not in fallback
- assert "governed catalog consulted: no listed metric matched" in fallback
-
- # The cap is what keeps this injection to a handful of tokens in every run, and past it the
- # listing stops being the whole catalog, so it has to say a lookup is still warranted for an
- # unlisted measure.
- overflowing = [f"metric_{index:03d}" for index in range(_GOVERNED_METRIC_LISTING_CAP + 3)]
- capped = build_run_prompt(loaded, **kwargs, governed_metric_names=overflowing)
- assert "`metric_000`" in capped
- assert f"`metric_{_GOVERNED_METRIC_LISTING_CAP:03d}`" not in capped
- assert "and 3 more this listing omits" in capped
+ for unused in (
+ build_run_prompt(loaded, **kwargs),
+ build_run_prompt(loaded, **kwargs, project_has_governed_metrics=False),
+ ):
+ assert "# Governed metrics" not in unused
+ assert "data-catalog-metric-run" not in unused
+ assert "metric-list" not in unused
+ assert "information_schema.metrics" not in unused
def test_report_channel_renders_report_persona_and_guidance(self) -> None:
LLMSkill.objects.create(
@@ -1704,13 +1672,14 @@ async def test_run_mints_the_scouts_granted_write_scopes_and_stamps_them_on_the_
@pytest.mark.asyncio
@pytest.mark.django_db
@pytest.mark.parametrize(
- "names,expected_marker",
+ "names,expect_nudge",
[
- pytest.param(["scout_run_fail_pct"], "scout_run_fail_pct", id="listing_injected"),
- pytest.param(RuntimeError("catalog read down"), "Cache the lookup outcome", id="lookup_error_falls_back"),
+ pytest.param(["scout_run_fail_pct"], True, id="approved_metrics_nudge"),
+ pytest.param([], False, id="empty_catalog_renders_nothing"),
+ pytest.param(RuntimeError("catalog read down"), False, id="lookup_error_renders_nothing"),
],
)
-async def test_governed_listing_reaches_the_prompt_from_the_catalog(ateam, aerrors_skill, names, expected_marker):
+async def test_catalog_nudge_follows_the_projects_approved_metrics(ateam, aerrors_skill, names, expect_nudge):
session, result = await database_sync_to_async(_make_fake_session, thread_sensitive=False)(ateam)
acting_user = await sync_to_async(User.objects.create_and_join)(
organization=ateam.organization,
@@ -1741,10 +1710,10 @@ async def test_governed_listing_reaches_the_prompt_from_the_catalog(ateam, aerro
run_result = await arun_signals_scout(team_id=ateam.id, skill_name="signals-scout-errors")
assert run_result.status == apps.get_model("tasks", "TaskRun").Status.COMPLETED.value
- assert expected_marker in captured["prompt"]
- # The listing must be resolved as the run's acting user, or it could be wider than what the run
- # could have queried for itself; the access check lives behind the facade call, so passing the
- # user is the only part of that the runner owns.
+ assert ("# Governed metrics" in captured["prompt"]) is expect_nudge
+ # The check must be resolved as the run's acting user, or the prompt could point a run at
+ # metrics it cannot read; the access check lives behind the facade call, so passing the user is
+ # the only part of that the runner owns.
assert names_mock.call_args.args == (ateam, acting_user)
diff --git a/products/signals/skills/AGENTS.md b/products/signals/skills/AGENTS.md
index 099d68cffe6d..d5c6cc7adbb0 100644
--- a/products/signals/skills/AGENTS.md
+++ b/products/signals/skills/AGENTS.md
@@ -113,6 +113,7 @@ Most are a single self-contained `SKILL.md`; a few bundle surface-specific refer
- **Official skills (`signals/`, `inbox-exploration/`).** Disk in this directory is the source of truth. Changes get published to `products/posthog_ai/dist/skills/` for distribution as part of the official PostHog skill set; they are not auto-synced onto teams' `LLMSkill` rows.
- **Scout skills (`signals-scout-*/`).** Disk in this directory is the source of truth, and `lazy_seed` mirrors changes onto each agent-enabled team's `LLMSkill` rows on the next coordinator tick (or immediately via `python manage.py sync_signals_scout_skills --all-enabled`). Teams that have manually edited a row are treated as "diverged" and left alone — the sync logs them so you can decide whether to nudge those teams to reset.
+- **A skill in this directory names nothing that exists in only one project.** Every skill here ships to every project, so a metric, dashboard, event, or id from PostHog's own project is wrong for almost every reader. Text about an optional product says how to tell whether the project uses it, and never assumes that it does.
- **If you change the scout fleet shape (add a new specialist, rename, or change the SKILL.md schema), update this file.**
## Reference
diff --git a/products/signals/skills/authoring-scouts/SKILL.md b/products/signals/skills/authoring-scouts/SKILL.md
index aacce71be5ab..a809ea3f0022 100644
--- a/products/signals/skills/authoring-scouts/SKILL.md
+++ b/products/signals/skills/authoring-scouts/SKILL.md
@@ -102,11 +102,8 @@ Name it explicitly near the top of the body so every run anchors on it.
(The one exception: a **measurement scout** on the structured-output channel holds no bar — it applies a **rubric** to every sampled item, and the rubric takes the discriminator's slot as the design surface to name, dogfood, and calibrate. See the recurring measurement / LLM-judge pattern in `references/scout-patterns.md`.)
-A second design rule binds any **metric-shaped scout** — one that scores, ranks, or reports a named, reusable measure, whether a business measure (MRR, churn risk, usage revenue, activation) or operational telemetry it computes every run to monitor or report (cost per run, failure or error rates, latency, throughput).
-When the project's metrics catalog is enabled, it may hold a governed definition of that measure in `system.information_schema.metrics`, and the harness tells every run to prefer it — so write the body to cooperate rather than compete: have the run check the catalog for an approved, non-drifted metric before its own derivation, and run a match through `data-catalog-metric-run`.
-Where a governed metric exists, reference it by name in any `references/queries.md` you ship, and label every hand-written derivation there a noncanonical fallback — an unlabeled "validated query" outranks the harness's catalog-first rule at run time, which is exactly how a scout ends up re-deriving a number the team already governs.
-Freshness, availability, and schema checks are exempt: they stay schema-first, with no catalog detour.
-A measurement scout is exempt too, but only for the measure it invents: a subjective rubric has no governed definition to defer to, while any conventional metric the same scout reports still goes through the catalog.
+A second design consideration applies to a **metric-shaped scout** — one that scores, ranks, or reports a named, reusable measure, whether a business measure (MRR, churn risk, usage revenue, activation) or operational telemetry it computes every run to monitor or report (cost per run, failure or error rates, latency, throughput).
+If the project has an approved metric for that measure (`metric-list` shows what exists), name it in the body and run it with `data-catalog-metric-run`, so the scout's number matches the one the team already reports.
## Run posture (config)
diff --git a/products/signals/skills/exploring-scouts/SKILL.md b/products/signals/skills/exploring-scouts/SKILL.md
index 78b835365a51..502553880854 100644
--- a/products/signals/skills/exploring-scouts/SKILL.md
+++ b/products/signals/skills/exploring-scouts/SKILL.md
@@ -26,10 +26,6 @@ This skill helps you **understand and explore what a project's scouts are doing
It is the observability counterpart to the `authoring-scouts` skill (which teaches writing and tuning) and to the `inbox-exploration` skill (which covers the inbox reports scouts feed into).
(The scout tools were recently renamed from `signals-scout-*` to `scout-*`; if a `scout-*` name comes back unknown, the server may still expose it under the legacy `signals-scout-*` name — search the tool catalog and call whichever name it returns.)
-## Governed metric first
-
-When the question asks for scout failure rate or cost per run, call `posthog:metric-list` before the scout tools and look for `scout_run_fail_pct` or `scout_cost_per_run`. Run an approved, non-drifted match with `posthog:data-catalog-metric-run` for the canonical headline. If the user also asks which scouts, runs, or failure modes drive the result, answer the headline first, then use the workflows below for a noncanonical breakdown. If no governed metric matches, say so and label the derived measure noncanonical.
-
**A scout's output is inbox reports, written 1:1.** Scouts list `emit_report` / `edit_report` in their `allowed_tools` and **author or edit inbox reports directly**; a run's output shows up as **`emitted_report_ids`** (reports it authored) and **`edited_report_ids`** (reports it updated).
The run rows also carry `emitted_count` / `emitted_finding_ids` — **legacy fields from the deprecated signal-emitting channel** (weak `emit_signal` findings a pipeline consolidated). On a report-channel scout they stay `0` / empty even on a productive run; a non-zero tally means the run came from a scout still on the legacy channel (an old custom scout, or a canonical scout not yet ported) — real output for that run, not noise. When unsure of a scout's channel, check its `allowed_tools` via `skill-get`.
**Never read `emitted_count: 0` as "did nothing"** — check the report columns and the run summary first.
diff --git a/products/signals/skills/signals-scout-mcp-tool-calls/SKILL.md b/products/signals/skills/signals-scout-mcp-tool-calls/SKILL.md
index e6754073c117..950e81d08438 100644
--- a/products/signals/skills/signals-scout-mcp-tool-calls/SKILL.md
+++ b/products/signals/skills/signals-scout-mcp-tool-calls/SKILL.md
@@ -76,7 +76,7 @@ If `$mcp_tool_call` is absent from the profile's `top_events` (or a 7-day `count
## Orient
-- Governed baseline first: when your run prompt's catalog listing shows an approved `mcp_tool_call_fail_pct` metric, run it via `data-catalog-metric-run` as the canonical project-wide failure-rate baseline and refresh `pattern:mcp_analytics:baseline` from its output. Per-tool, per-category, struggle, and latency numbers stay cookbook SQL — label them noncanonical whenever the governed baseline exists.
+- Governed baseline: when your run prompt has a _Governed metrics_ section and `metric-list` shows an approved metric for the project-wide MCP tool-call failure rate, run it via `data-catalog-metric-run` as the baseline and refresh `pattern:mcp_analytics:baseline` from its output. Per-tool, per-category, struggle, and latency numbers stay cookbook SQL.
- `scout-scratchpad-search` (`text=mcp`) — durable steering from past runs. `pattern:` entries hold the baseline rates and the captured **regime** (hono vs external-SDK) so you don't re-probe it cold; `noise:` / `addressed:` / `dedupe:` say what's benign, fixed, or already filed; `report:` / `reviewer:` entries point at the open report for a category and who owns it.
- `scout-runs-list` (last 7d) — what prior MCP runs found and ruled out.
- `scout-project-profile-get` — confirm `$mcp_tool_call` reach off `top_events`.