:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(signals): let custom scouts self-report skill improvement suggestions (#68223)
Andrew Maguirebc12bac9026d
diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.mdindex 24e7526fcc08..4e5aafcfb5a8 100644--- a/products/signals/backend/scout_harness/AGENTS.md+++ b/products/signals/backend/scout_harness/AGENTS.md@@ -35,9 +35,18 @@ it is exercised via the `run_signals_scout` management command (see `../managemethe report tool(s) actually in `allowed_tools` (emit-only, edit-only, or both), anddrops the author-time sections for an edit-only scout — the report endpoints failclosed on the exact tool, so the prompt must never steer a scout toward one it lacks.+ Orthogonal to the channel fork, the prompt also forks on the skill's origin+ (`LoadedSkill.origin`, resolved via `lazy_seed.scout_skill_row_origin`): a _custom_ scout —+ hand-authored, or a seeded canonical row the team has since edited in place (diverged) —+ gets a self-improvement section inviting evidence-backed `improve:<skill-name>:<topic>`+ scratchpad suggestions for its own skill body, which the owner reviews via the+ `exploring-scouts` / `authoring-scouts` meta skills. A pristine canonical scout never sees+ it — applying such a suggestion would mark the seeded row diverged and cut it off from+ upstream sync; canonical-skill defects route upstream via the operational-friction+ (`agent-feedback`) section instead.- `skill_loader.py`Resolves `signals-scout-*` skills from the team's `LLMSkill` rows. Defines- `SIGNALS_SCOUT_SKILL_PREFIX` and `LoadedSkill` (body + version + allowed_tools), plus+ `SIGNALS_SCOUT_SKILL_PREFIX` and `LoadedSkill` (body + version + allowed_tools + origin), plus`REPORT_CHANNEL_TOOLS` / `skill_uses_report_channel` — the shared report-channel opt-inpredicate the runner (scope posture) and prompt builder (persona fork) both resolve from.- `lazy_seed.py`diff --git a/products/signals/backend/scout_harness/lazy_seed.py b/products/signals/backend/scout_harness/lazy_seed.pyindex c087ad063a81..8f8aae1f8f3d 100644--- a/products/signals/backend/scout_harness/lazy_seed.py+++ b/products/signals/backend/scout_harness/lazy_seed.py@@ -7,6 +7,7 @@ import loggingfrom dataclasses import dataclassfrom functools import lru_cachefrom pathlib import Path+from typing import Literalfrom django.db import IntegrityError, transaction@@ -293,7 +294,7 @@ def canonical_skill_names() -> frozenset[str]:canonical scout is added or removed. Cached for the process — the shipped fleet onlychanges on deploy. A malformed canonical skill degrades to an empty set (everything reads`custom`) rather than 500-ing read endpoints; the parse error still fails loud on the- harness's own sync path. See `views._scout_origin` for the consumer.+ harness's own sync path. See `scout_skill_origin` for the consumer."""try:return frozenset(skill.name for skill in discover_canonical_skills())@@ -302,6 +303,27 @@ def canonical_skill_names() -> frozenset[str]:return frozenset()+def scout_skill_origin(skill_name: str, metadata: dict | None) -> Literal["canonical", "custom"]:+ """Classify a scout skill row as `"canonical"` or `"custom"` by who owns it.++ A scout is `canonical` when the harness seeded its skill row (tagged+ `metadata.seeded_by=HARNESS_SEEDED_BY`) **and** its name is one the harness actually ships+ on disk (`products/signals/skills/`); otherwise it's a team's hand-authored `custom` scout.+ Both halves matter: `duplicate_skill()` copies a source row's metadata verbatim — including+ `seeded_by` — so a team fork of a bundled scout inherits the seed tag, but a fork can never+ take a canonical name (the canonical row already owns it), so the name guard reclassifies it+ as `custom`. The name set is derived from disk, so it never goes stale the way a hardcoded+ list would.++ Consumers: the config serializer's `scout_origin` field (`views._skill_info_for`), which is+ metadata-only by design (one bulk query, no file contents), and — via the row-level+ `scout_skill_row_origin` refinement below — the prompt builder's self-improvement gate+ (`skill_loader.load_skill_for_run` → `prompt.py`).+ """+ is_harness_seeded = (metadata or {}).get("seeded_by") == HARNESS_SEEDED_BY+ return "canonical" if is_harness_seeded and skill_name in canonical_skill_names() else "custom"++def _compute_canonical_hash(canonical: CanonicalSkill) -> str:"""Stable content fingerprint for a canonical skill on disk.@@ -335,6 +357,31 @@ def _compute_row_hash(skill: LLMSkill, files: list[LLMSkillFile]) -> str:return hashlib.sha256(json.dumps(payload, sort_keys=True).encode("utf-8")).hexdigest()+def scout_skill_row_origin(skill: LLMSkill) -> Literal["canonical", "custom"]:+ """Row-level refinement of `scout_skill_origin`: a *diverged* seeded row classifies as custom.++ `publish_skill_version()` carries `metadata.seeded_by` (and the stale `canonical_hash`)+ forward when a team edits a canonical scout in place, so the metadata-only check keeps+ reading such a row as canonical. But a diverged row is team-owned in every way that matters+ here — upstream sync already leaves it alone, so inviting `improve:` suggestions on it risks+ no new divergence. Mirror `sync_canonical_skills`' decision: the row is diverged when its+ content hash no longer matches the `canonical_hash` stamped at seed time. A seeded row with+ no stored hash (pre-hash-tracking legacy) is unprovable either way; unlike the sync — whose+ conservative move is to not overwrite — the conservative move for the prompt gate is to NOT+ invite edits, so it stays canonical.++ Hashing needs the row's file *contents*, so keep this on the per-run load path+ (`skill_loader.load_skill_for_run`); the bulk config-list path stays on the metadata-only+ `scout_skill_origin`.+ """+ if scout_skill_origin(skill.name, skill.metadata) == "custom":+ return "custom"+ stored_hash = (skill.metadata or {}).get("canonical_hash")+ if stored_hash is None:+ return "canonical"+ return "custom" if _compute_row_hash(skill, list(skill.files.all())) != stored_hash else "canonical"++def _create_skill_from_canonical(team: Team, canonical: CanonicalSkill, canonical_hash: str) -> None:"""Insert a brand-new row for a (team, canonical.name) that has no prior history.diff --git a/products/signals/backend/scout_harness/prompt.py b/products/signals/backend/scout_harness/prompt.pyindex 4b8c80dfd177..315fc07959ee 100644--- a/products/signals/backend/scout_harness/prompt.py+++ b/products/signals/backend/scout_harness/prompt.py@@ -32,7 +32,8 @@ class SignalScoutRunSummary(BaseModel):# in its skill's `allowed_tools`) has already done the research and authors a full `SignalReport`# directly. The bootstrap, scratchpad, recency, business-knowledge, friction, and output sections are# identical for both; only the channel-specific sections differ. `build_run_prompt` composes the right-# set from the constants below.+# set from the constants below. Orthogonal to the channel fork, a *custom* (team-authored) scout on+# either channel additionally gets the self-improvement section (`_SELF_IMPROVEMENT`)._BASE_PROMPT_INTRO = """You are a Signals scout agent for PostHog.@@ -465,6 +466,20 @@ _GROUND_RULES = """# Ground rules- Stay in scope: emits are tied to your own run; scratchpad entries are scopedto this team and durable."""+# Appended only for a *custom* (team-authored) scout — see `build_run_prompt`. A canonical scout+# never sees this section: its skill body is a seeded row that upstream sync keeps current, and+# nudging a team to edit it would mark the row diverged and cut it off from canonical updates.+# Canonical-skill defects route upstream via the operational-friction section instead.+_SELF_IMPROVEMENT = """# Suggest improvements to your own skill++This scout's skill was authored by your team, and you are the only one who sees where its instructions steer a real run wrong. When THIS run produced concrete evidence that the skill misdirected you or wasted your budget — it pointed you at a tool, event, or surface that doesn't exist on this project, a default threshold or window you had to correct again, a recurring pitfall it never warns about — record the suggestion so the humans who own this scout can review it:++- Write a scratchpad entry keyed `improve:<your-skill-name>:<topic>` — use your skill name from *Your run identity*, not a bare domain: scratchpad keys are shared team-wide, and a domain-only key would let two scouts overwrite each other's suggestions. Stable key, no dates — same rules as your other keys. In the content: the specific skill change you'd suggest, the evidence from this run, and a dated observed line. Hit the same issue on a later run? Rewrite the same key with a fresh dated line appended — recurrence across runs is the strongest review signal the owner gets.+- The bar is a concrete failure or waste observed this run. Generic polish ("the wording could be clearer") is noise — don't write it.+- Routing: a problem with the tools, the harness, or these shared instructions still goes to `agent-feedback` (it reaches the PostHog team, not your team). An `improve:` entry is only for changes to your own skill body — your team reviews it and decides whether to apply it.+- You are also the janitor of your own suggestions — the scratchpad is writable only from a scout run, so the owner cannot clear an entry after acting on it. When a prior `improve:` entry of yours has been addressed (your skill body now reflects it, or the issue no longer reproduces), `forget` it or rewrite it as resolved so the pending list stays meaningful.+- At most one new `improve:` entry per run, near close-out, and mention it in your summary. It is never a substitute for finishing the run."""+_OPERATIONAL_FRICTION = """# Report operational frictionYou run this tooling end to end on a schedule, so your experience is how PostHog@@ -580,6 +595,11 @@ def build_run_prompt(skill: LoadedSkill, *, run_id: str, team_id: int, started_aother scout gets the signal persona that fires weak `emit_signal` findings for the pipeline tocluster. The bootstrap, scratchpad, recency, and close-out sections are shared.+ Orthogonal to the channel fork, the prompt also forks on the skill's *origin*: a custom+ (team-authored) scout gets the self-improvement section inviting evidence-backed `improve:`+ scratchpad suggestions for its own skill body; a canonical scout doesn't, so the harness never+ nudges a team into diverging a seeded row from upstream sync.+`run_id` is the UUID of the `SignalScoutRun` row the harness inserted beforespawning the sandbox. The agent passes it back when it calls`signals-scout-emit-signal` so the emit attribution stays@@ -613,6 +633,10 @@ def build_run_prompt(skill: LoadedSkill, *, run_id: str, team_id: int, started_aintro = _BASE_PROMPT_INTROsections = _SIGNAL_TAIL_SECTIONSemit_tool = "signals-scout-emit-signal"+ if skill.origin == "custom":+ # Slot the self-improvement invitation between friction reporting and the output format+ # (the last element of every tail). Custom scouts only — see the note on _SELF_IMPROVEMENT.+ sections = [*sections[:-1], _SELF_IMPROVEMENT, sections[-1]]tail = _render_tail(sections, schema_json=schema_json)return f"""{intro}# Your run identitydiff --git a/products/signals/backend/scout_harness/skill_loader.py b/products/signals/backend/scout_harness/skill_loader.pyindex 4d6c306ca282..7bf072c33703 100644--- a/products/signals/backend/scout_harness/skill_loader.py+++ b/products/signals/backend/scout_harness/skill_loader.py@@ -1,6 +1,7 @@from __future__ import annotationsfrom dataclasses import dataclass+from typing import Literalfrom posthog.models.team.team import Team@@ -50,6 +51,12 @@ class LoadedSkill:allowed_tools: list[str]files: list[LoadedSkillFile]skill_id: str+ # "canonical" | "custom" — who owns the skill row (see `lazy_seed.scout_skill_row_origin`;+ # a seeded row the team has edited in place classifies as custom). The prompt builder gates+ # the self-improvement section on it: a custom scout is invited to record `improve:`+ # suggestions for its own body (the team owns that body and can apply them); a pristine+ # canonical scout is not, so the prompt never nudges a team into diverging a seeded row.+ origin: Literal["canonical", "custom"]def is_signals_scout_skill(skill: LLMSkill) -> bool:@@ -62,9 +69,10 @@ def load_skill_for_run(team: Team, skill_name: str, *, version: int | None = NonPass `version=None` to follow-latest. The `signals-scout-*` prefix is not enforcedhere — the management command can hand-trigger any skill on the team."""- # Lazy import: `products.skills.backend.api` triggers a temporal module load- # that this package is itself imported from at temporal-worker boot, so a top-level- # import here cycles. Models only is fine.+ # Lazy imports, both to break cycles: `lazy_seed` imports this module at top level+ # (SIGNALS_SCOUT_SKILL_PREFIX), and `products.skills.backend.api` triggers a temporal module+ # load that this package is itself imported from at temporal-worker boot. Models only is fine.+ from products.signals.backend.scout_harness.lazy_seed import scout_skill_row_originfrom products.skills.backend.api.skill_services import get_skill_by_name_from_dbskill = get_skill_by_name_from_db(team, skill_name, version=version)@@ -82,4 +90,5 @@ def load_skill_for_run(team: Team, skill_name: str, *, version: int | None = Nonallowed_tools=list(skill.allowed_tools or []),files=[LoadedSkillFile(path=f.path, content_type=f.content_type) for f in file_rows],skill_id=str(skill.id),+ origin=scout_skill_row_origin(skill),)diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.pyindex 6f985f900405..e34b2367840c 100644--- a/products/signals/backend/scout_harness/views.py+++ b/products/signals/backend/scout_harness/views.py@@ -63,11 +63,7 @@ from products.signals.backend.scout_harness.config_registry import (ensure_scout_category,register_missing_configs,)-from products.signals.backend.scout_harness.lazy_seed import (- HARNESS_SEEDED_BY,- canonical_skill_names,- sync_canonical_skills,-)+from products.signals.backend.scout_harness.lazy_seed import scout_skill_origin, sync_canonical_skillsfrom products.signals.backend.scout_harness.limits import MAX_ENABLED_SCOUTS_PER_TEAM, STALE_RUN_CUTOFF_Sfrom products.signals.backend.scout_harness.serializers import (EditReportRequestSerializer,@@ -1308,23 +1304,7 @@ class _ScoutSkillInfo:"""description: str- origin: str # "canonical" | "custom" — see `_scout_origin`.---def _scout_origin(skill_name: str, metadata: dict | None) -> str:- """Classify a scout by who owns its skill row.-- A scout is `canonical` when the harness seeded its skill row (tagged- `metadata.seeded_by=HARNESS_SEEDED_BY`) **and** its name is one the harness actually ships- on disk (`products/signals/skills/`); otherwise it's a team's hand-authored `custom` scout.- Both halves matter: `duplicate_skill()` copies a source row's metadata verbatim — including- `seeded_by` — so a team fork of a bundled scout inherits the seed tag, but a fork can never- take a canonical name (the canonical row already owns it), so the name guard reclassifies it- as `custom`. The name set is derived from disk, so it never goes stale the way a hardcoded- list would.- """- is_harness_seeded = (metadata or {}).get("seeded_by") == HARNESS_SEEDED_BY- return "canonical" if is_harness_seeded and skill_name in canonical_skill_names() else "custom"+ origin: str # "canonical" | "custom" — see `lazy_seed.scout_skill_origin`.def _skill_info_for(team_id: int, skill_names: list[str]) -> dict[str, _ScoutSkillInfo]:@@ -1342,7 +1322,7 @@ def _skill_info_for(team_id: int, skill_names: list[str]) -> dict[str, _ScoutSki"name", "description", "metadata")return {- name: _ScoutSkillInfo(description=description or "", origin=_scout_origin(name, metadata))+ name: _ScoutSkillInfo(description=description or "", origin=scout_skill_origin(name, metadata))for name, description, metadata in rows}diff --git a/products/signals/backend/test/test_scout_harness.py b/products/signals/backend/test/test_scout_harness.pyindex df5807bc137e..e692c07bca80 100644--- a/products/signals/backend/test/test_scout_harness.py+++ b/products/signals/backend/test/test_scout_harness.py@@ -14,6 +14,7 @@ from django.db import OperationalErrorimport pytest_asynciofrom asgiref.sync import sync_to_async+from parameterized import parameterizedfrom temporalio.testing import ActivityEnvironmentfrom posthog.models import Organization, Team@@ -21,6 +22,7 @@ from posthog.models.scoping import team_scopefrom posthog.sync import database_sync_to_asyncfrom products.signals.backend.models import SignalScoutConfig, SignalScoutRun+from products.signals.backend.scout_harness.lazy_seed import HARNESS_SEEDED_BY, _compute_row_hashfrom products.signals.backend.scout_harness.limits import STALE_RUN_CUTOFF_Sfrom products.signals.backend.scout_harness.model_selection import ScoutModelfrom products.signals.backend.scout_harness.prompt import build_run_prompt@@ -247,6 +249,78 @@ class TestPromptBuilder(BaseTest):assert "Report operational friction" in promptassert "Output format" in prompt+ @parameterized.expand(+ [+ # (label, skill_name, metadata, allowed_tools, expect_section). A pristine canonical+ # scout (harness-seeded row on an on-disk fleet name) must never see the+ # self-improvement section — applying an `improve:` suggestion would mark its row+ # diverged and cut it off from upstream sync. Custom scouts get it on both channels,+ # and so does a *diverged* seeded row (content hash no longer matching the stamped+ # `canonical_hash`): the team already owns that body, sync leaves it alone.+ ("custom_signal_scout", "signals-scout-errors", {}, [], True),+ ("custom_report_scout", "signals-scout-errors", {}, ["emit_report", "edit_report"], True),+ # No stored canonical_hash (pre-hash-tracking legacy row): unprovable, stays canonical.+ ("canonical_scout_no_hash", "signals-scout-general", {"seeded_by": HARNESS_SEEDED_BY}, [], False),+ (+ "diverged_canonical_scout",+ "signals-scout-general",+ {"seeded_by": HARNESS_SEEDED_BY, "canonical_hash": "0" * 64},+ [],+ True,+ ),+ ]+ )+ def test_self_improvement_section_gated_on_custom_origin(+ self,+ _name: str,+ skill_name: str,+ metadata: dict,+ allowed_tools: list[str],+ expect_section: bool,+ ) -> None:+ LLMSkill.objects.create(+ team=self.team,+ name=skill_name,+ description="d",+ body="b",+ allowed_tools=allowed_tools,+ metadata=metadata,+ )+ prompt = build_run_prompt(+ load_skill_for_run(self.team, skill_name),+ run_id="00000000-0000-0000-0000-000000000abc",+ team_id=self.team.id,+ started_at=datetime(2026, 5, 1, 12, 34, 56, tzinfo=UTC),+ )+ assert ("Suggest improvements to your own skill" in prompt) is expect_section+ # The `improve:` key contract is what the meta-skills document — it must ride with the+ # section, and it must be skill-namespaced (scratchpad keys are unique per (team, key),+ # so a domain-only key would let two scouts clobber each other's suggestions).+ assert ("improve:<your-skill-name>:<topic>" in prompt) is expect_section+ # The upstream friction channel is origin-independent: canonical defects still route there.+ assert "agent-feedback" in prompt++ def test_pristine_seeded_row_stays_canonical(self) -> None:+ # A seeded row whose content still matches its stamped canonical_hash is the one case+ # that must NOT get the section — a regression that ignores the hash comparison (always+ # custom when a hash is present) would nudge every unedited canonical scout to diverge.+ skill = LLMSkill.objects.create(+ team=self.team,+ name="signals-scout-general",+ description="d",+ body="b",+ metadata={"seeded_by": HARNESS_SEEDED_BY},+ )+ skill.metadata["canonical_hash"] = _compute_row_hash(skill, [])+ skill.save()+ prompt = build_run_prompt(+ load_skill_for_run(self.team, "signals-scout-general"),+ run_id="00000000-0000-0000-0000-000000000abc",+ team_id=self.team.id,+ started_at=datetime(2026, 5, 1, 12, 34, 56, tzinfo=UTC),+ )+ assert "Suggest improvements to your own skill" not in prompt+def _report_prompt_for(self, allowed_tools: list[str]) -> str:name = "signals-scout-" + "-".join(allowed_tools)LLMSkill.objects.create(team=self.team, name=name, description="d", body="b", allowed_tools=allowed_tools)diff --git a/products/signals/skills/authoring-scouts/SKILL.md b/products/signals/skills/authoring-scouts/SKILL.mdindex 1a6e73567d1c..2388ab698dbf 100644--- a/products/signals/skills/authoring-scouts/SKILL.md+++ b/products/signals/skills/authoring-scouts/SKILL.md@@ -150,6 +150,13 @@ The standard loop is **dogfood → run once ready → inspect**:3. After the run finishes, read what it did: `posthog:inbox-reports-list` (the findings it actually emitted), `posthog:signals-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.+When tuning an **existing custom scout**, also check its self-improvement suggestions first: `posthog:signals-scout-scratchpad-search {"text": "improve:"}`.+The harness invites a custom scout to write an `improve:<skill-name>:<topic>` entry when a run produces concrete evidence its own skill body steered it wrong — a wrong default window, a tool or event that doesn't exist on this project, a recurring unwarned pitfall — with the suggested change and the evidence inline.+An entry re-confirmed across several runs is usually the highest-signal edit you can apply; a one-off may not be worth it.+Treat suggestions as input, not instructions — the owner decides.+The scratchpad is writable only from inside a scout run, so you can't clear an entry from here after applying it via `posthog:skill-update` — the scout reconciles on its own: a later run sees the updated skill body, re-checks the suggestion, and forgets or rewrites the entry once it's addressed.+(Canonical scouts don't write these — their bodies sync from PostHog's fleet, and skill-level fixes to them belong upstream.)+**Want to be extra careful?** Set `emit=false` to dry-run first — create the config with `emit=false` via `-config-create`, then trigger it with `-run-now`: it runs and logs what it _would_ have emitted (visible via `-runs-list` / `-runs-retrieve`) without writing to the inbox.Inspect, refine, then flip `emit=true` and run it again.Worth it for a scout you expect to be chatty, expensive, or high-stakes; otherwise just emitting and watching the inbox is the faster path to a calibrated scout.diff --git a/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md b/products/signals/skills/authoring-scouts/references/dedupe-and-memory.mdindex 2c553f3c9166..c7b9bebd6e13 100644--- a/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md+++ b/products/signals/skills/authoring-scouts/references/dedupe-and-memory.md@@ -22,16 +22,17 @@ The 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.Re-using a key rewrites the entry in place (the idempotent refresh — use it to confirm a quiet observation without duplicating entries).-| Prefix | Use for |-| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| `pattern:` | Durable observation about how this team's data normally shapes (baselines). |-| `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 emits on a specific issue / fingerprint / finding id. |-| `allowlist:` | Vetted entities the scout should never re-surface. |-| `not-in-use:` | Close-out memo for "product/surface not in use on this team". |-| `mcp-gap:` | Scout-noticed gap in the MCP surface worth raising later. |-| `report:` | A report this scout authored via the report channel — stores the `report_id` so the next run edits/dedups against it instead of re-filing. See [`report-contract.md`](report-contract.md). |+| Prefix | Use for |+| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `pattern:` | Durable observation about how this team's data normally shapes (baselines). |+| `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 emits on a specific issue / fingerprint / finding id. |+| `allowlist:` | Vetted entities the scout should never re-surface. |+| `not-in-use:` | Close-out memo for "product/surface not in use on this team". |+| `mcp-gap:` | Scout-noticed gap in the MCP surface worth raising later. |+| `improve:` | Custom scouts only: an evidence-backed suggested change to this scout's own skill body, written for the scout's owner to review and apply (or reject). Keyed `improve:<skill-name>:<topic>` — skill name, not domain, since scratchpad keys are team-wide and two scouts sharing a domain would clobber each other. The harness prompt invites these on custom scouts; canonical scouts never write them (applying one would diverge the seeded row). The scout clears its own entry once a later run confirms the suggestion was addressed. |+| `report:` | A report this scout authored via the report channel — stores the `report_id` so the next run edits/dedups against it instead of re-filing. See [`report-contract.md`](report-contract.md). |Format: `<prefix>:<domain>:<entity>` — e.g. `pattern:error_tracking:baseline`, `noise:logs:rabbitmq-deploy-window`, `dedupe:csp_violations:a1b2c3d4`.Each canonical specialist has its own `<domain>` label (`error_tracking`, `logs`, `llm_analytics`, `experiments`, `feature-flags`, `session-replay`, `web-analytics`, `pipelines`, `health`, …) — not a closed set.diff --git a/products/signals/skills/exploring-scouts/SKILL.md b/products/signals/skills/exploring-scouts/SKILL.mdindex 2d23f3e9b56d..da0209ddb755 100644--- a/products/signals/skills/exploring-scouts/SKILL.md+++ b/products/signals/skills/exploring-scouts/SKILL.md@@ -188,16 +188,17 @@ Returns entries newest-first (capped at 100); `text` matches `content` and `key`Omit `text` to browse everything.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 emit 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-emitting a specific issue / fingerprint / finding |-| `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 |+| Prefix | Meaning |+| ------------- | ------------------------------------------------------------------------------ |+| `pattern:` | A baseline — how this team's data normally shapes |+| `watch:` | A live issue being tracked but still below the emit 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-emitting a specific issue / fingerprint / finding |+| `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 |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.@@ -206,6 +207,11 @@ Keys follow `<prefix>:<domain>:<entity>` (e.g. `dedupe:error_tracking:019e8375-When a user asks "why isn't my scout flagging X anymore?", search the scratchpad for `noise:`, `addressed:`, `dedupe:`, and `allowlist:` entries — the fleet may have deliberately learned to suppress it.The canonical prefix vocabulary and the four-state dedupe classifier the fleet reasons in terms of are documented in the `authoring-scouts` skill (`references/dedupe-and-memory.md`).+**Custom scouts self-report skill improvements.** A custom (team-authored) scout is invited by the harness to write an `improve:<skill-name>:<topic>` entry when a run produces concrete evidence its own skill body steered it wrong — the suggested change, the evidence, and a dated observed line, re-confirmed in place on later runs.+When assessing a custom scout, search `{"text": "improve:"}` and surface these to the user: an entry re-confirmed across several runs is the highest-signal edit the owner can make.+Reviewing and applying them is a write operation — hand off to the `authoring-scouts` skill.+Canonical scouts never write `improve:` entries (their skill bodies are synced from PostHog's fleet), so an `improve:` entry under a canonical scout's domain is itself worth flagging.+## Workflow: list what scouts have actually emitted"What has the fleet emitted lately / show me every finding my scouts produced."