: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): remove hard line wrapping from AGENTS.md files (#74628)
Andrew Maguirefd5ec62ec8bb
diff --git a/products/signals/backend/emission/AGENTS.md b/products/signals/backend/emission/AGENTS.mdindex 0811c46fb711..d96e7ac28fce 100644--- a/products/signals/backend/emission/AGENTS.md+++ b/products/signals/backend/emission/AGENTS.md@@ -1,12 +1,10 @@# Signal emission pipeline-Emits Signals from various sources — both external data imports (Zendesk tickets, GitHub issues, etc.)-and internal products (Conversations tickets) — to surface actionable product feedback.+Emits Signals from various sources — both external data imports (Zendesk tickets, GitHub issues, etc.) and internal products (Conversations tickets) — to surface actionable product feedback.## How emitted signals are used-Each emitted signal is sent to the Signals workflow (`products/signals/backend/api.py:emit_signal`)-where its `description` is embedded for semantic search.+Each emitted signal is sent to the Signals workflow (`products/signals/backend/api.py:emit_signal`) where its `description` is embedded for semantic search.Signals from different sources and types are then combined into signal groups and processed into signal reports to help users find issues with their products.This means the `description` field must be written for embedding quality:@@ -29,8 +27,7 @@ The core signal pipeline (`products/signals/backend/emission/pipeline.py`) is so`products/signals/backend/emission/registry.py` maps `(source_type, schema_name)` pairs to their config.All emitters are auto-registered at module load time.-The registry key is a plain string pair — external sources use `ExternalDataSourceType` values (e.g., `"Zendesk"`),-internal sources use their own identifiers (e.g., `"conversations"`).+The registry key is a plain string pair — external sources use `ExternalDataSourceType` values (e.g., `"Zendesk"`), internal sources use their own identifiers (e.g., `"conversations"`).### Record fetchers@@ -45,24 +42,19 @@ Each source defines how to fetch records via its `record_fetcher` on the config:Triggered by the data import workflow:-1. **Parent workflow** (`products/warehouse_sources/backend/temporal/data_imports/external_data_job.py`) finishes importing data,- then spawns the emit-signals child workflow if emission is enabled for the source.-2. **Child workflow** (`products/warehouse_sources/backend/temporal/data_imports/workflow_activities/emit_signals.py`) runs the activity that- calls `config.record_fetcher` then the shared pipeline.+1. **Parent workflow** (`products/warehouse_sources/backend/temporal/data_imports/external_data_job.py`) finishes importing data, then spawns the emit-signals child workflow if emission is enabled for the source.+2. **Child workflow** (`products/warehouse_sources/backend/temporal/data_imports/workflow_activities/emit_signals.py`) runs the activity that calls `config.record_fetcher` then the shared pipeline.### Conversations sourceTriggered by a Temporal schedule (hourly):-1. **Coordinator workflow** (`conversations_coordinator.py`) queries teams with conversations signals enabled- and spawns per-team child workflows (batched, ~50 concurrent).-2. **Per-team workflow** runs the activity that fetches eligible tickets (>1 hour old, not resolved,- not yet emitted) with their full message threads, then runs the shared pipeline.+1. **Coordinator workflow** (`conversations_coordinator.py`) queries teams with conversations signals enabled and spawns per-team child workflows (batched, ~50 concurrent).+2. **Per-team workflow** runs the activity that fetches eligible tickets (>1 hour old, not resolved, not yet emitted) with their full message threads, then runs the shared pipeline.### Gating-All sources are gated behind AI consent (`organization.is_ai_data_processing_approved`)-and a `SignalSourceConfig` row with `enabled=True` for the matching `source_product`/`source_type`.+All sources are gated behind AI consent (`organization.is_ai_data_processing_approved`) and a `SignalSourceConfig` row with `enabled=True` for the matching `source_product`/`source_type`.Users enable sources via the Inbox Sources modal.## Adding a new source@@ -70,30 +62,21 @@ Users enable sources via the Inbox Sources modal.1. **Create the emitter module** — add a file in this directory (e.g., `jira_issues.py`).Follow existing emitters (`zendesk_tickets.py`, `github_issues.py`, `conversations_tickets.py`) for the pattern:define which fields to query,- write a pure emitter function that transforms a record dict into a signal output (or `None` if data is insufficient),- define a `record_fetcher` (use `data_warehouse_record_fetcher` for warehouse sources, or write a new fetcher for other sources),- optionally define an LLM actionability prompt and/or a summarization prompt with threshold,- and export the final config as a module-level constant.- **Avoid querying PII fields** (user IDs, email addresses, names, organization IDs, etc.)- unless they are strictly required to locate the entity in the source system later.+ write a pure emitter function that transforms a record dict into a signal output (or `None` if data is insufficient), define a `record_fetcher` (use `data_warehouse_record_fetcher` for warehouse sources, or write a new fetcher for other sources), optionally define an LLM actionability prompt and/or a summarization prompt with threshold, and export the final config as a module-level constant.+ **Avoid querying PII fields** (user IDs, email addresses, names, organization IDs, etc.) unless they are strictly required to locate the entity in the source system later.Prefer opaque record IDs and URLs over fields that identify people or organizations.2. **Register in `registry.py`** — import the config and add it inside `_register_all_emitters()`.For external sources, use the `ExternalDataSourceType` value as the source type.For internal sources, use a descriptive string identifier.-3. **Write tests in `tests/`** — emitter tests (`test_<source>.py`) covering valid records,- missing/empty required fields (parameterized), and extra field extraction.+3. **Write tests in `tests/`** — emitter tests (`test_<source>.py`) covering valid records, missing/empty required fields (parameterized), and extra field extraction.Add a realistic mock record and pytest fixture in `tests/conftest.py`.Run tests: `pytest products/signals/backend/emission/tests/`## Local testing with fixtures-To exercise the full pipeline (emitter → summarization → actionability → `emit_signal`)-without running a real data import or populating a warehouse table,-use the `emit_signals_from_fixture` management command.-It loads sanitized fixture records from `products/signals/eval/fixtures/`-and feeds them straight into `run_signal_pipeline`,-bypassing `data_warehouse_record_fetcher` entirely.+To exercise the full pipeline (emitter → summarization → actionability → `emit_signal`) without running a real data import or populating a warehouse table, use the `emit_signals_from_fixture` management command.+It loads sanitized fixture records from `products/signals/eval/fixtures/` and feeds them straight into `run_signal_pipeline`, bypassing `data_warehouse_record_fetcher` entirely.```bash# Smoke test with 1-2 records (cheap, ~1-2 LLM calls per record)@@ -112,5 +95,4 @@ The command requires `DEBUG=True` and is intended for local iteration only.## Maintaining this file-If the pipeline architecture, registry pattern, or conventions change significantly,-update this AGENTS.md to reflect the new reality.+If the pipeline architecture, registry pattern, or conventions change significantly, update this AGENTS.md to reflect the new reality.diff --git a/products/signals/backend/management/AGENTS.md b/products/signals/backend/management/AGENTS.mdindex e1b0c2efad84..84df90b808ab 100644--- a/products/signals/backend/management/AGENTS.md+++ b/products/signals/backend/management/AGENTS.md@@ -38,22 +38,14 @@ python manage.py list_signal_reports --team-id 1 --signals --json- `pending_input` — needs human judgment before acting- `failed` — failed safety review (possible prompt injection)- `potential` (reset, weight zeroed) — deemed not actionable-7. On reaching `ready`, the summary workflow starts `signal-report-inbox-notification` to post the Slack- inbox notification. If the report auto-started an implementation task, that workflow waits for the PR to- open (bounded by `SIGNALS_INBOX_PR_NOTIFICATION_TIMEOUT_SECONDS`) so the card can show a "Review PR"- button; if that task never opens a PR (fails, is cancelled, or the wait times out) no notification is- sent. Reports with no auto-start task notify immediately.-8. `ready` reports accumulate new signals silently. After enough new signals (`signal_count >= signals_at_run`),- the report is re-promoted and the summary workflow runs again — reusing the previous repo selection and- lightly validating previous findings instead of re-researching from scratch.--Reports that aren't `ready` still appear in the output with their `error` field-explaining why they were filtered, plus `artefacts` containing the full judge reasoning.+7. On reaching `ready`, the summary workflow starts `signal-report-inbox-notification` to post the Slack inbox notification. If the report auto-started an implementation task, that workflow waits for the PR to open (bounded by `SIGNALS_INBOX_PR_NOTIFICATION_TIMEOUT_SECONDS`) so the card can show a "Review PR" button; if that task never opens a PR (fails, is cancelled, or the wait times out) no notification is sent. Reports with no auto-start task notify immediately.+8. `ready` reports accumulate new signals silently. After enough new signals (`signal_count >= signals_at_run`), the report is re-promoted and the summary workflow runs again — reusing the previous repo selection and lightly validating previous findings instead of re-researching from scratch.++Reports that aren't `ready` still appear in the output with their `error` field explaining why they were filtered, plus `artefacts` containing the full judge reasoning.## Seeding a pre-researched report-Use `ingest_report_json` to short-circuit the research flow and drop a fully-researched-`SignalReport` into the database, so you can test the autostart path without the sandbox.+Use `ingest_report_json` to short-circuit the research flow and drop a fully-researched `SignalReport` into the database, so you can test the autostart path without the sandbox.```bash# 1. Make sure at least one team user has opted into autonomy. Either set a default@@ -67,36 +59,23 @@ python manage.py ingest_report_json \--team-id 1```-The fixture must match the shape in `report_generation/fixtures/` — a JSON object with-`repository`, `signal_ids`, and a `result` that parses as `ReportResearchOutput`. Autostart-still requires a working GitHub integration (for reviewer resolution) and the commit authors-in `relevant_commit_hashes` to map to a user with a `SignalUserAutonomyConfig` whose effective-priority threshold (personal or team default) covers the report's priority — otherwise the-report will be saved but no `Task` will be created.+The fixture must match the shape in `report_generation/fixtures/` — a JSON object with `repository`, `signal_ids`, and a `result` that parses as `ReportResearchOutput`. Autostart still requires a working GitHub integration (for reviewer resolution) and the commit authors in `relevant_commit_hashes` to map to a user with a `SignalUserAutonomyConfig` whose effective priority threshold (personal or team default) covers the report's priority — otherwise the report will be saved but no `Task` will be created.## Seeding billable reports (refund testing)`seed_refund_test_data` drops five minimal reports covering the refund/exemption matrix:-PR-run-today (refund takes the `excluded` path), PR-run-4-days-ago (`credited` path — calls the-billing dispute endpoint), PR-run-last-month (out of the billing period — the Refund button-renders disabled with the reason), billing-exempt with a PR ("Free" badge with health-check-tooltip; refund hidden), and no-PR (target for `exempt_signal_report_billing`). Re-run freely —-a report can only be refunded once.+PR-run-today (refund takes the `excluded` path), PR-run-4-days-ago (`credited` path — calls the billing dispute endpoint), PR-run-last-month (out of the billing period — the Refund button renders disabled with the reason), billing-exempt with a PR ("Free" badge with health-check tooltip; refund hidden), and no-PR (target for `exempt_signal_report_billing`). Re-run freely — a report can only be refunded once.```bashpython manage.py seed_refund_test_data --team-id 1```-`seed_inbox_data` reports are billable too (runs are recorded via the production dual-write),-but their runs are created "now", so refunds on them always take the excluded path.-Environment prerequisites (feature flag, local billing service): "Testing refunds locally"-in `../../ARCHITECTURE.md`.+`seed_inbox_data` reports are billable too (runs are recorded via the production dual-write), but their runs are created "now", so refunds on them always take the excluded path.+Environment prerequisites (feature flag, local billing service): "Testing refunds locally" in `../../ARCHITECTURE.md`.## Re-ingesting reports-`reingest_signal_report` deletes specific reports and re-emits their signals through the active-pipeline (same `SignalReportReingestionWorkflow` as the API `reingest` action), so they regroup-and re-research from scratch:+`reingest_signal_report` deletes specific reports and re-emits their signals through the active pipeline (same `SignalReportReingestionWorkflow` as the API `reingest` action), so they regroup and re-research from scratch:```bashpython manage.py reingest_signal_report --team-id 1 <report-uuid> [<report-uuid> ...]@@ -138,9 +117,7 @@ Background and architecture: `../scout_harness/AGENTS.md` and `../../skills/AGEN### Running one scout locally-`run_signals_scout` triggers a single `(team, skill)` run end-to-end without waiting-for the Temporal coordinator. Inserts a `SignalScoutRun` row, opens a sandbox, pumps-the agent loop until budget exhaustion or natural completion, finalizes the run.+`run_signals_scout` triggers a single `(team, skill)` run end-to-end without waiting for the Temporal coordinator. Inserts a `SignalScoutRun` row, opens a sandbox, pumps the agent loop until budget exhaustion or natural completion, finalizes the run.```bash# Single specialist run against a dogfood team@@ -156,16 +133,11 @@ python manage.py run_signals_scout --team-id 1 --skill-name signals-scout-genera--repository posthog/posthog --verbose```-The team must have a `SignalScoutConfig` row for the scout (the coordinator auto-creates-one; the command also seeds it). Configs default to `emit=False` — the scout runs and-logs but `emit_finding` writes nothing, so no finding reaches the Signals inbox until you-flip `emit=True` on that scout's config (e.g. via the `scout-config-update` MCP tool).+The team must have a `SignalScoutConfig` row for the scout (the coordinator auto-creates one; the command also seeds it). Configs default to `emit=False` — the scout runs and logs but `emit_finding` writes nothing, so no finding reaches the Signals inbox until you flip `emit=True` on that scout's config (e.g. via the `scout-config-update` MCP tool).### Canonical skill sync-`sync_signals_scout_skills` forces a `sync_canonical_skills` pass without waiting for-the next coordinator tick. Reads `products/signals/skills/signals-scout-*/` from disk-and reconciles each scout against the team's `LLMSkill` rows.+`sync_signals_scout_skills` forces a `sync_canonical_skills` pass without waiting for the next coordinator tick. Reads `products/signals/skills/signals-scout-*/` from disk and reconciles each scout against the team's `LLMSkill` rows.```bash# After merging a SKILL.md change — fan out to every dogfood team now@@ -178,19 +150,11 @@ python manage.py sync_signals_scout_skills --team-id 1python manage.py sync_signals_scout_skills --all-enabled --dry-run```-Output buckets per team: `created`, `updated`, `diverged` (team-edited or hand-authored rows-left alone), `tombstoned` (rows the team already soft-deleted — left alone, never resurrected),-`pruned` (live rows whose canonical skill was removed from disk — soft-deleted so the-coordinator stops dispatching them). Same function the coordinator and runner call lazily —-this command is just the impatient path.+Output buckets per team: `created`, `updated`, `diverged` (team-edited or hand-authored rows left alone), `tombstoned` (rows the team already soft-deleted — left alone, never resurrected), `pruned` (live rows whose canonical skill was removed from disk — soft-deleted so the coordinator stops dispatching them). Same function the coordinator and runner call lazily — this command is just the impatient path.## Backfilling task_run artefacts-One-off data migration: turn legacy `SignalReportTask` rows (those carrying the old `relationship`-label) into `task_run` log artefacts so the research / implementation / repo-selection runs tied to-a report show up in its artefact timeline. `SignalReportTask` lives on as the unlabelled-task↔report association; rows without a legacy label are skipped — their `task_run` artefact is-written at creation time.+One-off data migration: turn legacy `SignalReportTask` rows (those carrying the old `relationship` label) into `task_run` log artefacts so the research / implementation / repo-selection runs tied to a report show up in its artefact timeline. `SignalReportTask` lives on as the unlabelled task↔report association; rows without a legacy label are skipped — their `task_run` artefact is written at creation time.```bash# Preview, scoped to one team@@ -200,13 +164,7 @@ python manage.py backfill_task_run_artefacts --team-id 1 --dry-runpython manage.py backfill_task_run_artefacts```-Idempotent — skips any report that already has a `task_run` artefact referencing the same task, so it-is safe to re-run. Each artefact carries a `(product, type)` pair: these are signals-pipeline runs, so-`product` is `signals` and `type` is the legacy relationship label (`research` / `implementation` /-`repo_selection`). Backfilled artefacts are attributed to their task and backdated to their-`SignalReportTask.created_at` so the log stays chronologically correct (the artefact row is created-now, but the run happened earlier). Live creation paths append the same artefacts at run time going-forward — custom agents instead use their own `identifier()` `(product, type)` pair.+Idempotent — skips any report that already has a `task_run` artefact referencing the same task, so it is safe to re-run. Each artefact carries a `(product, type)` pair: these are signals-pipeline runs, so `product` is `signals` and `type` is the legacy relationship label (`research` / `implementation` / `repo_selection`). Backfilled artefacts are attributed to their task and backdated to their `SignalReportTask.created_at` so the log stays chronologically correct (the artefact row is created now, but the run happened earlier). Live creation paths append the same artefacts at run time going forward — custom agents instead use their own `identifier()` `(product, type)` pair.## Tipsdiff --git a/products/signals/backend/report_generation/AGENTS.md b/products/signals/backend/report_generation/AGENTS.mdindex e0796000b183..b4796243d92b 100644--- a/products/signals/backend/report_generation/AGENTS.md+++ b/products/signals/backend/report_generation/AGENTS.md@@ -1,9 +1,7 @@# Signals Report GenerationThis directory contains the new agentic report-research flow for Signals.-It is exercised locally via management commands, and it is also used by the production-Temporal summary flow behind a feature flag. In production, the summary workflow runs-the safety judge first, then calls into this flow via a Temporal activity if the report is safe.+It is exercised locally via management commands, and it is also used by the production Temporal summary flow behind a feature flag. In production, the summary workflow runs the safety judge first, then calls into this flow via a Temporal activity if the report is safe.## What lives here@@ -11,9 +9,7 @@ the safety judge first, then calls into this flow via a Temporal activity if theSelects the most relevant GitHub repository for a set of signals.- If the team has 0 repos: returns `None` (report goes to `pending_input`).- If the team has 1 repo: returns it directly (no sandbox needed).- - If the team has N repos: spawns a sandbox agent that uses `gh` CLI to explore- candidates and pick the best match. Uses `PostHog/.github` as a small dummy repo- for the sandbox clone, since the agent only needs `gh` CLI access (not the repo itself).+ - If the team has N repos: spawns a sandbox agent that uses `gh` CLI to explore candidates and pick the best match. Uses `PostHog/.github` as a small dummy repo for the sandbox clone, since the agent only needs `gh` CLI access (not the repo itself).- Output: `RepoSelectionResult(repository: str | None, reason: str)`.- Persisted as a `repo_selection` artefact on the report (by the caller activity, not here).- On re-promotion, the activity reuses the previous artefact instead of re-running selection.@@ -31,8 +27,7 @@ the safety judge first, then calls into this flow via a Temporal activity if theSaved previous research output used by local `update` testing.- `fixtures/insight_scene_logic_mode_property_bug.json`Saved research output for a single-signal, `immediately_actionable` P1 report.- Used by the `ingest_report_json` management command to exercise the autostart- path without running the sandbox research flow.+ Used by the `ingest_report_json` management command to exercise the autostart path without running the sandbox research flow.## Mental model@@ -48,68 +43,25 @@ the safety judge first, then calls into this flow via a Temporal activity if thelightly validate old findings before reusing themfully research only new or stale signalsshow previous actionability, priority, title, and summary as context- the agent confirms still-correct findings/assessments (via the `*Update` wrapper schemas)- instead of regenerating them — `ReportResearchOutput` splits its findings/assessments into- `old_artefacts` (confirmed unchanged, already persisted) and `new_artefacts` (produced this run),- and the caller activity persists the new ones unconditionally; read the report's effective state- via the `effective_*` accessors--When a report was spawned because a signal would have grouped into an already-**resolved**-report (resolved reports are terminal and never reopen), the grouping pipeline links the two with-symmetric `related_to` artefacts (one on each, pointing at the other). The caller activity finds the-linked report that is resolved and passes `resolved_report_title` / `resolved_report_summary`. The-initial research prompt then includes a `## Previously resolved report` block so the agent can judge-whether the recurrence is a regression, a new dimension of the same issue, or distinct.--In production, the `update` path is triggered automatically when a `ready` report is-re-promoted after accumulating enough new signals. The caller activity (`temporal/agentic/report.py`)-reconstructs the previous `ReportResearchOutput` from stored artefacts and the report's-title/summary fields, then passes it to `run_multi_turn_research()`.+ the agent confirms still-correct findings/assessments (via the `*Update` wrapper schemas) instead of regenerating them — `ReportResearchOutput` splits its findings/assessments into `old_artefacts` (confirmed unchanged, already persisted) and `new_artefacts` (produced this run), and the caller activity persists the new ones unconditionally; read the report's effective state via the `effective_*` accessors++When a report was spawned because a signal would have grouped into an already-**resolved** report (resolved reports are terminal and never reopen), the grouping pipeline links the two with symmetric `related_to` artefacts (one on each, pointing at the other). The caller activity finds the linked report that is resolved and passes `resolved_report_title` / `resolved_report_summary`. The initial research prompt then includes a `## Previously resolved report` block so the agent can judge whether the recurrence is a regression, a new dimension of the same issue, or distinct.++In production, the `update` path is triggered automatically when a `ready` report is re-promoted after accumulating enough new signals. The caller activity (`temporal/agentic/report.py`) reconstructs the previous `ReportResearchOutput` from stored artefacts and the report's title/summary fields, then passes it to `run_multi_turn_research()`.This module is intentionally prompt-orchestration only.-Production persistence is handled outside `run_multi_turn_research()`, in the caller activity,-so this module stays isolated from report DB writes.+Production persistence is handled outside `run_multi_turn_research()`, in the caller activity, so this module stays isolated from report DB writes.### Charts-The presentation step can also author `charts` — query nodes the inbox draws on the report body,-so a finding about a metric move is visible next to the sentence describing it. They are the same-`SignalReport.charts` the scout channel writes (schema + bounds in `report_charts.py`), authored in-the same structured response as the title/summary so the summary can place one with a-`[label](chart:<id>)` markdown link. This is the pipeline counterpart of the scout `emit_report`-charts path.--- **Opt-in.** Gated per team by the `signals-report-charts` flag (`_team_report_charts_enabled` in- the caller activity; on in DEBUG). When off, both the chart guidance and the `charts` field itself- are dropped from the presentation prompt (chart-free schema), and the caller drops anything the- model returns anyway — so an un-opted team is never shown or steered toward charts on the delicate- fleet-wide path.-- **Replace, not append.** `charts` is the report's whole set. On a re-research the previous charts- are shown back as context (loaded from `SignalReport.charts` by `_load_previous_research`); the run- keeps, refreshes, or drops them and the caller replaces the column with the result.-- **Persistence is atomic with the prose.** `run_agentic_report_activity` only _resolves_ the charts- payload (`_resolve_report_charts_payload`) and returns it on `RunAgenticReportOutput.charts`; the- column is written by the transition activity that also writes the title/summary- (`mark_report_ready_activity` / `mark_report_pending_input_activity`), inside the same- `transition_to` transaction. So charts and the prose they illustrate land together — a failed run- or the not-actionable reset (neither writes the new prose) leaves the charts alone by construction,- with no separate-transaction window. The resolver yields three outcomes: a valid non-empty set- (replace the column); `None` when the team isn't opted in **or** the run authored no charts (leave- the column alone — the presentation field is optional, so an omitted key and a deliberate "drop- everything" both arrive empty and are indistinguishable, and wiping user-visible charts on that- ambiguity is the worse failure, so the pipeline never auto-clears to zero; a human can clear from- the inbox); and `[]` when the set busts the whole-set caps (clear, so a stale set can't sit under- the new summary).-- **Not safety-judged.** The pipeline's safety judge screens the input signals before research runs,- so it never sees research-authored charts — the same as it never sees research-authored- title/summary. Charts are agent output derived from already-screened signals, consistent with that- model. (This differs from the scout emit path, where charts and prose are judged together.)--The caller activity passes `has_business_knowledge=True` when the team's business knowledge-product is both feature-flagged on and has at least one READY source (via-`products.business_knowledge.backend.logic.is_available_for_team`). When true, the research-prompt includes a `## Business knowledge` block that instructs the agent to search the team's-curated knowledge base via MCP tools.+The presentation step can also author `charts` — query nodes the inbox draws on the report body, so a finding about a metric move is visible next to the sentence describing it. They are the same `SignalReport.charts` the scout channel writes (schema + bounds in `report_charts.py`), authored in the same structured response as the title/summary so the summary can place one with a `[label](chart:<id>)` markdown link. This is the pipeline counterpart of the scout `emit_report` charts path.++- **Opt-in.** Gated per team by the `signals-report-charts` flag (`_team_report_charts_enabled` in the caller activity; on in DEBUG). When off, both the chart guidance and the `charts` field itself are dropped from the presentation prompt (chart-free schema), and the caller drops anything the model returns anyway — so an un-opted team is never shown or steered toward charts on the delicate fleet-wide path.+- **Replace, not append.** `charts` is the report's whole set. On a re-research the previous charts are shown back as context (loaded from `SignalReport.charts` by `_load_previous_research`); the run keeps, refreshes, or drops them and the caller replaces the column with the result.+- **Persistence is atomic with the prose.** `run_agentic_report_activity` only _resolves_ the charts payload (`_resolve_report_charts_payload`) and returns it on `RunAgenticReportOutput.charts`; the column is written by the transition activity that also writes the title/summary (`mark_report_ready_activity` / `mark_report_pending_input_activity`), inside the same `transition_to` transaction. So charts and the prose they illustrate land together — a failed run or the not-actionable reset (neither writes the new prose) leaves the charts alone by construction, with no separate-transaction window. The resolver yields three outcomes: a valid non-empty set (replace the column); `None` when the team isn't opted in **or** the run authored no charts (leave the column alone — the presentation field is optional, so an omitted key and a deliberate "drop everything" both arrive empty and are indistinguishable, and wiping user-visible charts on that ambiguity is the worse failure, so the pipeline never auto-clears to zero; a human can clear from the inbox); and `[]` when the set busts the whole-set caps (clear, so a stale set can't sit under the new summary).+- **Not safety-judged.** The pipeline's safety judge screens the input signals before research runs, so it never sees research-authored charts — the same as it never sees research-authored title/summary. Charts are agent output derived from already-screened signals, consistent with that model. (This differs from the scout emit path, where charts and prose are judged together.)++The caller activity passes `has_business_knowledge=True` when the team's business knowledge product is both feature-flagged on and has at least one READY source (via `products.business_knowledge.backend.logic.is_available_for_team`). When true, the research prompt includes a `## Business knowledge` block that instructs the agent to search the team's curated knowledge base via MCP tools.## Local debug commands@@ -121,15 +73,12 @@ They are not production entrypoints.File: `../management/commands/analyze_report.py`Local dev tool (DEBUG only). Runs the agentic research/update flow against synthetic signals.-Will be reworked into an eval harness — keeping it now preserves coverage of the multi-turn-research path while the eval infrastructure is built.+Will be reworked into an eval harness — keeping it now preserves coverage of the multi-turn research path while the eval infrastructure is built.- `python manage.py analyze_report research`Fresh research run from the hardcoded synthetic signals.- `python manage.py analyze_report update`- Loads `fixtures/analyze_report_funnel_research_output.json` as previous report research,- appends one extra synthetic signal,- and tests the re-research path.+ Loads `fixtures/analyze_report_funnel_research_output.json` as previous report research, appends one extra synthetic signal, and tests the re-research path.Use this command when changing prompt logic in `research.py`.@@ -138,8 +87,7 @@ Use this command when changing prompt logic in `research.py`.File: `../management/commands/select_repo.py`Local dev tool (DEBUG only). Tests repo selection in isolation against synthetic JS SDK signals.-Will be reworked into an eval harness — keeping it now preserves coverage of the sandbox-based-repo selection path.+Will be reworked into an eval harness — keeping it now preserves coverage of the sandbox-based repo selection path.- `python manage.py select_repo`Uses the team's actual GitHub integrations to list candidate repos.@@ -152,12 +100,9 @@ Use this command when changing prompt logic in `select_repo.py`.File: `../management/commands/parse_sandbox_log.py`-Local dev/testing tool (DEBUG only). Extracts key events from verbose sandbox logs-without consuming the full stream — useful for both human inspection and agentic use-(e.g., agents reviewing sandbox runs without reading raw S3 log streams).+Local dev/testing tool (DEBUG only). Extracts key events from verbose sandbox logs without consuming the full stream — useful for both human inspection and agentic use (e.g., agents reviewing sandbox runs without reading raw S3 log streams).-Renders a concise timeline of: prompts, tool calls, tool outputs, agent messages,-and optional thought chunks.+Renders a concise timeline of: prompts, tool calls, tool outputs, agent messages, and optional thought chunks.## When editing this flowdiff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.mdindex 4965c3bdd5d2..b2aabec7051c 100644--- a/products/signals/backend/scout_harness/AGENTS.md+++ b/products/signals/backend/scout_harness/AGENTS.md@@ -1,406 +1,119 @@# Signals Agent Harness-This directory contains the headless **Signals agent** — a scheduled scout that explores-a project, writes durable scratchpad entries across runs, and emits findings into the-Signals inbox via `emit_signal()` using the `signals_scout` source variant.+This directory contains the headless **Signals agent** — a scheduled scout that explores a project, writes durable scratchpad entries across runs, and emits findings into the Signals inbox via `emit_signal()` using the `signals_scout` source variant.-It is the second agentic surface in Signals. The other one — `report_generation/` — runs-on demand when a `SignalReport` is promoted to `candidate` and produces a single research-output for one report. The harness here is the inverse: it runs on a schedule, decides-_what_ to investigate from scratch, and pushes new signals into the same pipeline rather-than acting on existing ones.+It is the second agentic surface in Signals. The other one — `report_generation/` — runs on demand when a `SignalReport` is promoted to `candidate` and produces a single research output for one report. The harness here is the inverse: it runs on a schedule, decides _what_ to investigate from scratch, and pushes new signals into the same pipeline rather than acting on existing ones.-In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick every-`COORDINATOR_INTERVAL_MINUTES = 30` → fan out per-(team, skill) child workflows). Locally-it is exercised via the `run_signals_scout` management command (see `../management/AGENTS.md`).+In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick every `COORDINATOR_INTERVAL_MINUTES = 30` → fan out per-(team, skill) child workflows). Locally it is exercised via the `run_signals_scout` management command (see `../management/AGENTS.md`).## What lives here- `runner.py`- Per-run entrypoint (`arun_signals_scout` / `run_signals_scout`). Inserts the- `SignalScoutRun` row, builds the prompt + toolset, spawns the sandbox session,- pumps the agent loop until budget exhaustion or natural completion, finalizes the run,- and returns a `RunResult`. The activity wrapper in `temporal/agentic/scout_scheduler.py`- delegates straight to this.+ Per-run entrypoint (`arun_signals_scout` / `run_signals_scout`). Inserts the `SignalScoutRun` row, builds the prompt + toolset, spawns the sandbox session, pumps the agent loop until budget exhaustion or natural completion, finalizes the run, and returns a `RunResult`. The activity wrapper in `temporal/agentic/scout_scheduler.py` delegates straight to this.- `prompt.py`- Assembles the system prompt: persona + skill body + relevant scratchpad entries +- project profile inventory + recent run summaries. Scratchpad and run history are- filtered by skill so a specialist only sees its own past work. `build_run_prompt`- forks on the run's channel via `skill_loader.skill_uses_report_channel`: a scout that- opted into the report channel gets the report persona + report-authoring guidance- (search the inbox first, edit before authoring a duplicate, set `suggested_reviewers`- to route the report); every other scout gets the signal persona that fires weak- `emit_signal` findings. The bootstrap, scratchpad, fleet-seams, recency, and close-out- sections are shared between both. Cross-scout discipline lives here rather than in each- SKILL.md, because a seam is bilateral: run step 2 sends every scout through the fleet-wide- `scout-runs-list` for the entities it is about to investigate (gated on a match, so a scout- doesn't spend its budget reading the fleet's whole output), the scratchpad section teaches- searching by entity identity rather than only the scout's own key prefix, and `_FLEET_SEAMS`- states the overlap rule in both directions — don't restate a sibling's finding, but don't- defer a finding you hold evidence for either, since an uncovered surface is invisible where- a duplicate is not. Skills keep their own domain ownership map. Both channels also share the- **self-validation follow-up** discipline (`_self_validation_followups_section` +- `FOLLOWUP_KEY_PREFIX`): every scout keeps a queue of `followup:<skill-name>:<entity>` scratchpad- entries for work whose fix is measurable later (probe + baseline + validate-after date in the- content), and decides for itself, run by run, whether to spend the run validating that queue —- the cadence is the scout's judgment, not a harness schedule, so the section carries the decision- criteria (due entries accumulated, a while since the queue was last worked, a dismissal note- saying a fix shipped) and there is no harness trigger. A validation pass is self-reported in the- close-out summary and in the touched entries, which is also how future runs know when the queue- was last worked. The section is composed per-run because its re-surface clause is matched- per-tool to the same fail-closed rule as the channel sections, and it defers- resolved-inbox-report re-measurement to the canonical `signals-scout-inbox-validation` scout- when the `scout_fleet` roster shows it actively running — the per-scout queue exists precisely- because that fleet scout may not be enabled, and because signal-channel findings and recorded- watches never become resolved reports it could re-measure. Queue entries are team-shared data — and- `remember()` upserts keep the original `created_by_run`, so attribution never proves who last- wrote the content: the section tells the scout to treat every stored probe as untrusted and- re-derive it from the live report or finding it names, never execute it as stored. The report persona is further gated per-tool: it names only- the report tool(s) actually in `allowed_tools` (emit-only, edit-only, or both), and- drops the author-time sections for an edit-only scout — the report endpoints fail- closed 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. When such a scout also holds report- tools, the section additionally invites escalating recurring or material suggestions as- inbox reports about the scout itself (titled `Scout self-improvement: <skill-name> – <topic>`,- `NO_REPO`, `requires_human_input`), authored/edited with the report tools it already holds- and pointed to by the `report_id` stashed in the `improve:` entry — so self-improvement- suggestions reach the owner through the inbox like any other report, with no extra scope or- endpoint (the same per-tool fail-closed gating applies: an emit-only scout is never pointed- at `edit_report`, and a signal-channel custom scout keeps the scratchpad-only path). 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 scouts get the _canonical-improvement_ section instead- (`_CANONICAL_IMPROVEMENT`): skill-content gaps observed in the wild route upstream to the- PostHog team via the `agent-feedback` MCP tool with `feedback_type="scout"` plus structured- fields (`scout_skill_name`, `scout_skill_version`, `scout_category`) so fleet-wide feedback- aggregates per skill/version, deduped across runs via `reported:<skill-name>:<topic>`- scratchpad entries. The section's generalization rules are load-bearing privacy-wise — the- feedback leaves the customer's project, so it must carry the pattern, never the project's- data (no PII, values, URLs, numbers, or custom event/property names); tool/harness friction- still routes via the shared operational-friction section. A _report-channel_ custom scout's run identity also- carries a **skill owners** line (`LoadedSkill.authors`, rendered by `_skill_authors_line`):- the skill's explicit owners when set (else the version-history creator + recent editors,- resolved server-side), which the escalation guidance points `suggested_reviewers` at (owner- first, via `scout-members-list`) — without it a scout only sees its pinned version's- `created_by`, i.e. the last editor, and would route ownership to whoever most recently touched- the skill. The scout owns routing: this line is context, not a rule, so a skill body can steer- `suggested_reviewers` elsewhere (a named reviewer, a team convention) or say "don't route to me"- and be honoured — `tools/report.py._build_suggested_reviewers` injects nothing, it only takes- the scout's picks. Owners feed exactly one code rule there — a picked reviewer who is a current- owner is stamped `is_skill_owner=True` so autostart never mints its session under an- editor-controlled owner (`auto_start._resolve_autostart_assignee`); the stamp changes identity- eligibility, never who reviews. The line is gated on the report channel: a- signal-channel scout has no `suggested_reviewers` field, so member names/emails (PII) must not- reach its prompt.+ Assembles the system prompt: persona + skill body + relevant scratchpad entries + project profile inventory + recent run summaries. Scratchpad and run history are filtered by skill so a specialist only sees its own past work. `build_run_prompt` forks on the run's channel via `skill_loader.skill_uses_report_channel`: a scout that opted into the report channel gets the report persona + report-authoring guidance (search the inbox first, edit before authoring a duplicate, set `suggested_reviewers` to route the report); every other scout gets the signal persona that fires weak `emit_signal` findings. The bootstrap, scratchpad, fleet-seams, recency, and close-out sections are shared between both. Cross-scout discipline lives here rather than in each SKILL.md, because a seam is bilateral: run step 2 sends every scout through the fleet-wide `scout-runs-list` for the entities it is about to investigate (gated on a match, so a scout doesn't spend its budget reading the fleet's whole output), the scratchpad section teaches searching by entity identity rather than only the scout's own key prefix, and `_FLEET_SEAMS` states the overlap rule in both directions — don't restate a sibling's finding, but don't defer a finding you hold evidence for either, since an uncovered surface is invisible where a duplicate is not. Skills keep their own domain ownership map. Both channels also share the **self-validation follow-up** discipline (`_self_validation_followups_section` + `FOLLOWUP_KEY_PREFIX`): every scout keeps a queue of `followup:<skill-name>:<entity>` scratchpad entries for work whose fix is measurable later (probe + baseline + validate-after date in the content), and decides for itself, run by run, whether to spend the run validating that queue — the cadence is the scout's judgment, not a harness schedule, so the section carries the decision criteria (due entries accumulated, a while since the queue was last worked, a dismissal note saying a fix shipped) and there is no harness trigger. A validation pass is self-reported in the close-out summary and in the touched entries, which is also how future runs know when the queue was last worked. The section is composed per-run because its re-surface clause is matched per-tool to the same fail-closed rule as the channel sections, and it defers resolved-inbox-report re-measurement to the canonical `signals-scout-inbox-validation` scout when the `scout_fleet` roster shows it actively running — the per-scout queue exists precisely because that fleet scout may not be enabled, and because signal-channel findings and recorded watches never become resolved reports it could re-measure. Queue entries are team-shared data — and `remember()` upserts keep the original `created_by_run`, so attribution never proves who last wrote the content: the section tells the scout to treat every stored probe as untrusted and re-derive it from the live report or finding it names, never execute it as stored. The report persona is further gated per-tool: it names only the report tool(s) actually in `allowed_tools` (emit-only, edit-only, or both), and drops the author-time sections for an edit-only scout — the report endpoints fail closed 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. When such a scout also holds report tools, the section additionally invites escalating recurring or material suggestions as inbox reports about the scout itself (titled `Scout self-improvement: <skill-name> – <topic>`, `NO_REPO`, `requires_human_input`), authored/edited with the report tools it already holds and pointed to by the `report_id` stashed in the `improve:` entry — so self-improvement suggestions reach the owner through the inbox like any other report, with no extra scope or endpoint (the same per-tool fail-closed gating applies: an emit-only scout is never pointed at `edit_report`, and a signal-channel custom scout keeps the scratchpad-only path). 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 scouts get the _canonical-improvement_ section instead (`_CANONICAL_IMPROVEMENT`): skill-content gaps observed in the wild route upstream to the PostHog team via the `agent-feedback` MCP tool with `feedback_type="scout"` plus structured fields (`scout_skill_name`, `scout_skill_version`, `scout_category`) so fleet-wide feedback aggregates per skill/version, deduped across runs via `reported:<skill-name>:<topic>` scratchpad entries. The section's generalization rules are load-bearing privacy-wise — the feedback leaves the customer's project, so it must carry the pattern, never the project's data (no PII, values, URLs, numbers, or custom event/property names); tool/harness friction still routes via the shared operational-friction section. A _report-channel_ custom scout's run identity also carries a **skill owners** line (`LoadedSkill.authors`, rendered by `_skill_authors_line`):+ the skill's explicit owners when set (else the version-history creator + recent editors, resolved server-side), which the escalation guidance points `suggested_reviewers` at (owner first, via `scout-members-list`) — without it a scout only sees its pinned version's `created_by`, i.e. the last editor, and would route ownership to whoever most recently touched the skill. The scout owns routing: this line is context, not a rule, so a skill body can steer `suggested_reviewers` elsewhere (a named reviewer, a team convention) or say "don't route to me" and be honoured — `tools/report.py._build_suggested_reviewers` injects nothing, it only takes the scout's picks. Owners feed exactly one code rule there — a picked reviewer who is a current owner is stamped `is_skill_owner=True` so autostart never mints its session under an editor-controlled owner (`auto_start._resolve_autostart_assignee`); the stamp changes identity eligibility, never who reviews. The line is gated on the report channel: a signal-channel scout has no `suggested_reviewers` field, so member names/emails (PII) must not reach its prompt.- `skill_loader.py`- Resolves `signals-scout-*` skills from the team's `LLMSkill` rows. Defines- `SIGNALS_SCOUT_SKILL_PREFIX` and `LoadedSkill` (body + version + allowed_tools + origin + authors), plus- `REPORT_CHANNEL_TOOLS` / `skill_uses_report_channel` — the shared report-channel opt-in- predicate the runner (scope posture) and prompt builder (persona fork) both resolve from.- `resolve_skill_authors` prefers the skill's **explicit owner set** (`LLMSkillOwner`, keyed on the- logical `(team, name)` so it never drifts when the body is edited) — returned as `role="owner"`,- seed-creator first. Only when a skill has no explicit owners does it fall back to reconstructing- authorship from version rows (distinct non-null `created_by`: creator = earliest first-authored,- then editors by last-edit recency, capped). Both paths are restricted to- `team.all_users_with_access()` so a revoked user's profile stops flowing into a privileged prompt.- `resolve_skill_owner_user_uuids` exposes the owner set (seed-creator first) to the report tools'- reviewer provenance stamp (`is_skill_owner`). Author resolution is opt-in via `load_skill_for_run(..., include_authors=True)`- — only the runner's prompt-building path pays for it; the report-authorization gate in `views.py`- loads the skill per report write just to check `allowed_tools` and skips it.+ Resolves `signals-scout-*` skills from the team's `LLMSkill` rows. Defines `SIGNALS_SCOUT_SKILL_PREFIX` and `LoadedSkill` (body + version + allowed_tools + origin + authors), plus `REPORT_CHANNEL_TOOLS` / `skill_uses_report_channel` — the shared report-channel opt-in predicate the runner (scope posture) and prompt builder (persona fork) both resolve from.+ `resolve_skill_authors` prefers the skill's **explicit owner set** (`LLMSkillOwner`, keyed on the logical `(team, name)` so it never drifts when the body is edited) — returned as `role="owner"`, seed-creator first. Only when a skill has no explicit owners does it fall back to reconstructing authorship from version rows (distinct non-null `created_by`: creator = earliest first-authored, then editors by last-edit recency, capped). Both paths are restricted to `team.all_users_with_access()` so a revoked user's profile stops flowing into a privileged prompt.+ `resolve_skill_owner_user_uuids` exposes the owner set (seed-creator first) to the report tools' reviewer provenance stamp (`is_skill_owner`). Author resolution is opt-in via `load_skill_for_run(..., include_authors=True)` — only the runner's prompt-building path pays for it; the report-authorization gate in `views.py` loads the skill per report write just to check `allowed_tools` and skips it.- `lazy_seed.py`- Canonical skill sync. Reads `products/signals/skills/signals-scout-*/` from disk and- reconciles them against the team's `LLMSkill` rows: creates missing rows, updates- ones the team hasn't edited, leaves diverged / hand-authored rows alone, tombstones- rows whose canonical skill was deleted. Only rows tagged- `metadata.seeded_by="signals_scout_harness"` are ever updated. Called both lazily- (coordinator tick, runner cold-start) and explicitly via the `sync_signals_scout_skills`- management command.+ Canonical skill sync. Reads `products/signals/skills/signals-scout-*/` from disk and reconciles them against the team's `LLMSkill` rows: creates missing rows, updates ones the team hasn't edited, leaves diverged / hand-authored rows alone, tombstones rows whose canonical skill was deleted. Only rows tagged `metadata.seeded_by="signals_scout_harness"` are ever updated. Called both lazily (coordinator tick, runner cold-start) and explicitly via the `sync_signals_scout_skills` management command.- `config_registry.py`- `register_missing_configs(team_id)` — auto-creates an enabled, default-schedule- `SignalScoutConfig` for any `signals-scout-*` skill lacking one ("author a skill, get a- scout"). Called by the coordinator tick; the HTTP surface registers explicitly via the- write-scoped config `create` endpoint instead (reads stay side-effect free).+ `register_missing_configs(team_id)` — auto-creates an enabled, default-schedule `SignalScoutConfig` for any `signals-scout-*` skill lacking one ("author a skill, get a scout"). Called by the coordinator tick; the HTTP surface registers explicitly via the write-scoped config `create` endpoint instead (reads stay side-effect free).- `slack_delivery.py` / `slack_delivery_queue.py`- Best-effort direct Slack delivery for configured scout outputs. Finding emissions and surfaced- report emits/edits snapshot the run config's destination after their database write commits, then- enqueue the shared retrying Celery worker. Integrations are project-scoped, so a workspace connected- from any environment in the project can receive the canonical parent team's scout output.+ Best-effort direct Slack delivery for configured scout outputs. Finding emissions and surfaced report emits/edits snapshot the run config's destination after their database write commits, then enqueue the shared retrying Celery worker. Integrations are project-scoped, so a workspace connected from any environment in the project can receive the canonical parent team's scout output.- `tools/`Implementations of the four harness-internal tools the agent calls during a run.- The effective toolset for a run is the intersection of the skill's `allowed_tools`- list with what `tools/__init__.py` re-exports — there is no separate registry- module today.- - `emit.py` — `emit_signal_*` tools that push findings as `cross_source_issue`- signals into the standard ingestion pipeline.- - `scratchpad.py` — `remember`, `forget`, and `search_scratchpad` tools backed by- the `SignalScratchpad` model.- - `notes.py` — `list_notes` / `leave_note` / `delete_note` backed by the- `SignalScoutNote` model: steering notes humans (or other agents) leave for the- fleet over the public MCP surface (`scout-notes-*` tools), the inbound counterpart- to the scratchpad. A note targets one scout by `skill_name` or the whole fleet- (blank), optionally expiring via `expires_at`; the run prompt's _Notes left for- you_ section directs every scout to `scout-notes-list` its own notes in step 1 and- treat them as advisory steering. Unlike the scratchpad there is no sandbox-only- write gate, but writes still demand skill-authoring-level authorization (keys need- `llm_skill:write` on top of `signal_scout:write`, and every writer must clear the- `llm_skill` RBAC editor bar) — so a note-writer could already steer the fleet by- editing its skills, and notes add no new steering power. The second writer is- `../dismissal_notes.py`: judging an inbox report with a note (dismiss, snooze, or- restore) also leaves it here as an `origin=report_dismissal` note, targeted at the- scout that authored the report, so a reviewer's verdict reaches the scout without it- having to re-find the report. Resolving does not, since that says the report did its- job rather than that filing it was wrong. That path re-checks canonical-project access- and the same `llm_skill` editor bar itself (`_may_steer_scouts`), since dismissing a- report needs only `task:write`. The derived row is context with a TTL; the `dismissal`- artefact on the report stays the record of truth.- - `profile.py` — `project_profile_*` tools that read the deterministic- `SignalProjectProfile` snapshot.- - `runs.py` — `runs_*` tools that read past `SignalScoutRun` rows for dedupe and- cross-skill awareness.+ The effective toolset for a run is the intersection of the skill's `allowed_tools` list with what `tools/__init__.py` re-exports — there is no separate registry module today.+ - `emit.py` — `emit_signal_*` tools that push findings as `cross_source_issue` signals into the standard ingestion pipeline.+ - `scratchpad.py` — `remember`, `forget`, and `search_scratchpad` tools backed by the `SignalScratchpad` model.+ - `notes.py` — `list_notes` / `leave_note` / `delete_note` backed by the `SignalScoutNote` model: steering notes humans (or other agents) leave for the fleet over the public MCP surface (`scout-notes-*` tools), the inbound counterpart to the scratchpad. A note targets one scout by `skill_name` or the whole fleet (blank), optionally expiring via `expires_at`; the run prompt's _Notes left for you_ section directs every scout to `scout-notes-list` its own notes in step 1 and treat them as advisory steering. Unlike the scratchpad there is no sandbox-only write gate, but writes still demand skill-authoring-level authorization (keys need `llm_skill:write` on top of `signal_scout:write`, and every writer must clear the `llm_skill` RBAC editor bar) — so a note-writer could already steer the fleet by editing its skills, and notes add no new steering power. The second writer is `../dismissal_notes.py`: judging an inbox report with a note (dismiss, snooze, or restore) also leaves it here as an `origin=report_dismissal` note, targeted at the scout that authored the report, so a reviewer's verdict reaches the scout without it having to re-find the report. Resolving does not, since that says the report did its job rather than that filing it was wrong. That path re-checks canonical-project access and the same `llm_skill` editor bar itself (`_may_steer_scouts`), since dismissing a report needs only `task:write`. The derived row is context with a TTL; the `dismissal` artefact on the report stays the record of truth.+ - `profile.py` — `project_profile_*` tools that read the deterministic `SignalProjectProfile` snapshot.+ - `runs.py` — `runs_*` tools that read past `SignalScoutRun` rows for dedupe and cross-skill awareness.- `profile/`- - `builders.py` — deterministic builders that compute the inventory payload for- `SignalProjectProfile`. Sections fall into three layers: capability / configured- (sticky — `products_in_use`, `integrations`, `external_data_sources`,- `signal_source_configs`, `scout_fleet`, …), aggregated recency (`recent_activity` — per-scope- counts off the activity log, cross-cutting orientation across every entity type),- and per-entity recent inventory (`recent_surveys`, `recent_feature_flags`,- `recent_experiments`, `recent_alerts`, `recent_hog_functions`, `recent_hog_flows`,- `recent_notebooks`, `recent_cohorts`, `recent_actions`, `recent_dashboards`,- `business_knowledge`).- Per-entity sections are deliberately light (counts + 5 most-recent items with- name, status, timestamp); deep drilldowns go via the per-entity MCP list tools.- See the module docstring at `profile/builders.py` for the authoritative section- list — when adding or renaming a section, bump `INVENTORY_SOURCE_VERSION` so- the cache invalidates cleanly.+ - `builders.py` — deterministic builders that compute the inventory payload for `SignalProjectProfile`. Sections fall into three layers: capability / configured (sticky — `products_in_use`, `integrations`, `external_data_sources`, `signal_source_configs`, `scout_fleet`, …), aggregated recency (`recent_activity` — per-scope counts off the activity log, cross-cutting orientation across every entity type), and per-entity recent inventory (`recent_surveys`, `recent_feature_flags`, `recent_experiments`, `recent_alerts`, `recent_hog_functions`, `recent_hog_flows`, `recent_notebooks`, `recent_cohorts`, `recent_actions`, `recent_dashboards`, `business_knowledge`).+ Per-entity sections are deliberately light (counts + 5 most-recent items with name, status, timestamp); deep drilldowns go via the per-entity MCP list tools.+ See the module docstring at `profile/builders.py` for the authoritative section list — when adding or renaming a section, bump `INVENTORY_SOURCE_VERSION` so the cache invalidates cleanly.- `limits.py`- Runtime ceilings as module constants: `DEFAULT_MAX_RUNTIME_S` (per-run budget),- `ACTIVITY_SLACK_S`, and `WORKFLOW_HARD_CEILING_S` (`= DEFAULT_MAX_RUNTIME_S +-ACTIVITY_SLACK_S`, the activity-level ceiling that gates the workflow's- `start_to_close_timeout`).+ Runtime ceilings as module constants: `DEFAULT_MAX_RUNTIME_S` (per-run budget), `ACTIVITY_SLACK_S`, and `WORKFLOW_HARD_CEILING_S` (`= DEFAULT_MAX_RUNTIME_S + ACTIVITY_SLACK_S`, the activity-level ceiling that gates the workflow's `start_to_close_timeout`).- `team_limits.py`- Single source of truth for a team's effective scout caps + metadata, resolved from the- `signals-scout` flag payload in one read. The same three-layer cap resolution- (`team_configs[team]` → `default_team_config` → code constant) the coordinator enforces at- dispatch, plus enrollment (`_parse_enrollment` → `guaranteed_team_ids` / `skip_team_ids`, with a- cloud/dev-gated fallback) and the editorial banner string. `guaranteed_team_ids` may contain the- `"*"` wildcard (`ENROLL_ALL_TOKEN`): with it, enrollment inverts from an explicit allowlist to- "every team that has enabled scout configs" — the self-serve gate, where the product-autonomy-- gated UI creates the configs; explicit ids alongside `"*"` are still force-provisioned and- `skip_team_ids` still hard-excludes. The global per-tick ceiling is flag-tunable too- (`_resolve_global_max_runs_per_tick` ← `max_runs_per_tick_global`, default `MAX_RUNS_PER_TICK`).- Kept free of the temporalio stack so it stays cheap to import on the API path; both the- coordinator and the metadata endpoint import from here so the reported caps never drift from what- dispatch allows. `resolve_team_metadata()` backs the metadata viewset;+ Single source of truth for a team's effective scout caps + metadata, resolved from the `signals-scout` flag payload in one read. The same three-layer cap resolution (`team_configs[team]` → `default_team_config` → code constant) the coordinator enforces at dispatch, plus enrollment (`_parse_enrollment` → `guaranteed_team_ids` / `skip_team_ids`, with a cloud/dev-gated fallback) and the editorial banner string. `guaranteed_team_ids` may contain the `"*"` wildcard (`ENROLL_ALL_TOKEN`): with it, enrollment inverts from an explicit allowlist to "every team that has enabled scout configs" — the self-serve gate, where the product-autonomy- gated UI creates the configs; explicit ids alongside `"*"` are still force-provisioned and `skip_team_ids` still hard-excludes. The global per-tick ceiling is flag-tunable too (`_resolve_global_max_runs_per_tick` ← `max_runs_per_tick_global`, default `MAX_RUNS_PER_TICK`).+ Kept free of the temporalio stack so it stays cheap to import on the API path; both the coordinator and the metadata endpoint import from here so the reported caps never drift from what dispatch allows. `resolve_team_metadata()` backs the metadata viewset;`seed_config_layers_for_team()` lets the on-demand `sync` endpoint seed the same launch posture.- `derived_metadata.py`- Computes the `metadata["derived"]` region on the run row at finalize: booleans the harness- reads back off the run's own settled output (`has_emit_report`, `has_edit_report`,- `has_self_improvement`, `has_chart`, `has_self_validation`). Deliberately server-derived- rather than scout-reported, so a flag can't be omitted or contradicted by the model, and- computed in one place at finalize rather than stamped incrementally at each emit/edit site.- `has_self_improvement` classifies authored report titles through- `tools/report.is_self_improvement_title`, the same predicate the lifecycle events use, so the- run row and the event stream can never disagree. `has_self_validation` reads the run window- against the skill-namespaced `followup:` scratchpad keys, since working that queue means- writing to it.+ Computes the `metadata["derived"]` region on the run row at finalize: booleans the harness reads back off the run's own settled output (`has_emit_report`, `has_edit_report`, `has_self_improvement`, `has_chart`, `has_self_validation`). Deliberately server-derived rather than scout-reported, so a flag can't be omitted or contradicted by the model, and computed in one place at finalize rather than stamped incrementally at each emit/edit site.+ `has_self_improvement` classifies authored report titles through `tools/report.is_self_improvement_title`, the same predicate the lifecycle events use, so the run row and the event stream can never disagree. `has_self_validation` reads the run window against the skill-namespaced `followup:` scratchpad keys, since working that queue means writing to it.- `serializers.py`DRF serializers for the harness HTTP surface (runs, scratchpad, project profile).Annotated for drf-spectacular so the generated MCP tools have informative schemas.- `views.py`- `SignalScoutRunViewSet`, `SignalScoutConfigViewSet`, `SignalScratchpadViewSet`,- `SignalScoutNoteViewSet`, `SignalProjectProfileViewSet`, `SignalScoutMetadataViewSet`,- `SignalScoutMembersViewSet`, `SignalScoutViewSet`.- Routed under `project_signals_scout_*` basenames in `products/signals/backend/routes.py`- and exposed as `scout-*` MCP tools via `products/signals/mcp/tools.yaml`.- `SignalScoutViewSet` backs `scout-create`: it creates a custom `signals-scout-*` skill- and its runnable config atomically, grants the report-channel tools server-side, and- treats an identical definition as a retry while rejecting conflicting definitions.+ `SignalScoutRunViewSet`, `SignalScoutConfigViewSet`, `SignalScratchpadViewSet`, `SignalScoutNoteViewSet`, `SignalProjectProfileViewSet`, `SignalScoutMetadataViewSet`, `SignalScoutMembersViewSet`, `SignalScoutViewSet`.+ Routed under `project_signals_scout_*` basenames in `products/signals/backend/routes.py` and exposed as `scout-*` MCP tools via `products/signals/mcp/tools.yaml`.+ `SignalScoutViewSet` backs `scout-create`: it creates a custom `signals-scout-*` skill and its runnable config atomically, grants the report-channel tools server-side, and treats an identical definition as a retry while rejecting conflicting definitions.`SignalScoutMembersViewSet` (`scout-members-list`) is the reviewer-routing roster:- it returns the project's members (those with access to the team) with `user_uuid` / `email` /- `github_login` so a report-channel scout can populate `suggested_reviewers` at cold start. The roster- is member PII the scout needs to route, gated on the internal `signal_scout_internal` scope object- (`scope_object = "signal_scout_internal"`, default `list` → `signal_scout_internal:read`, satisfied by- the sandbox token's `…:write`) — so, like `emit-signal`, it is reachable only inside a scout run and- never enters a customer's public MCP catalog. (The narrower `signal_scout_report` scope was considered- but is transient — kept only while emit-signal and emit-report coexist — so the durable tool stays on- `signal_scout_internal`.) Membership is resolved server-side via- `report_generation/resolve_reviewers.list_project_members` (through `Team.all_users_with_access()`,- so private-project access control is honored), the project-nested path that the org-nested- `org-members-list` tool (stripped + 403'd for a scoped-team token) can't provide.- The config viewset remains the lower-level no-wait creation path: `create` registers- (upserts) a config for an already-authored skill with its schedule/emit posture in one call.- `list` is strictly read-only (its MCP tool is annotated `readOnly`) — it never- mints config rows. The metadata viewset is the read-only `scout/metadata/current/`- endpoint that reports enrollment + banner + enforced limits via- `team_limits.resolve_team_metadata`.+ it returns the project's members (those with access to the team) with `user_uuid` / `email` / `github_login` so a report-channel scout can populate `suggested_reviewers` at cold start. The roster is member PII the scout needs to route, gated on the internal `signal_scout_internal` scope object (`scope_object = "signal_scout_internal"`, default `list` → `signal_scout_internal:read`, satisfied by the sandbox token's `…:write`) — so, like `emit-signal`, it is reachable only inside a scout run and never enters a customer's public MCP catalog. (The narrower `signal_scout_report` scope was considered but is transient — kept only while emit-signal and emit-report coexist — so the durable tool stays on `signal_scout_internal`.) Membership is resolved server-side via `report_generation/resolve_reviewers.list_project_members` (through `Team.all_users_with_access()`, so private-project access control is honored), the project-nested path that the org-nested `org-members-list` tool (stripped + 403'd for a scoped-team token) can't provide.+ The config viewset remains the lower-level no-wait creation path: `create` registers (upserts) a config for an already-authored skill with its schedule/emit posture in one call.+ `list` is strictly read-only (its MCP tool is annotated `readOnly`) — it never mints config rows. The metadata viewset is the read-only `scout/metadata/current/` endpoint that reports enrollment + banner + enforced limits via `team_limits.resolve_team_metadata`.## Mental model-`arun_signals_scout()` is the main entrypoint. One call → one `SignalScoutRun` row →-one sandbox session → zero or more emitted signals.+`arun_signals_scout()` is the main entrypoint. One call → one `SignalScoutRun` row → one sandbox session → zero or more emitted signals.- The harness inserts the bridge row at the start of a run (inside `_spawn_and_run`).- `SignalScoutRun` is now a thin bridge to a Tasks `TaskRun` — run status / timing / error- live on `task_run`, not on the bridge row. Single-flight is a best-effort app-layer guard:- `_has_running_run` skips dispatch when a prior run for the same `(team, skill_name)` has- `task_run.status = IN_PROGRESS`. The old `WHERE status='running'` partial unique index was- dropped in the bridge simplification; `_self_heal_stale_runs` now reaps the orphan case at- the app layer (failing any `QUEUED`/`IN_PROGRESS` run older than `STALE_RUN_CUTOFF_S` before- the guard), so a worker crash no longer wedges a lane permanently. A `task_run.status`-based- DB constraint is still a possible follow-up for stronger single-flight guarantees.+ `SignalScoutRun` is now a thin bridge to a Tasks `TaskRun` — run status / timing / error live on `task_run`, not on the bridge row. Single-flight is a best-effort app-layer guard:+ `_has_running_run` skips dispatch when a prior run for the same `(team, skill_name)` has `task_run.status = IN_PROGRESS`. The old `WHERE status='running'` partial unique index was dropped in the bridge simplification; `_self_heal_stale_runs` now reaps the orphan case at the app layer (failing any `QUEUED`/`IN_PROGRESS` run older than `STALE_RUN_CUTOFF_S` before the guard), so a worker crash no longer wedges a lane permanently. A `task_run.status`-based DB constraint is still a possible follow-up for stronger single-flight guarantees.- The sandbox is opened with the team's MCP token plus the harness-internal tools.- The skill body is loaded into the system prompt; each scout has its own- `SignalScoutConfig` row (keyed on `(team, skill_name)`) whose `enabled` flag,- `run_interval_minutes`, and optional project-local cron `run_cron_schedule` the- coordinator's per-scout due-check honors.-- Scout sandbox GitHub credentials are **always read-only**: the runner requests- `github_read_access` on every scout run, so provisioning mints an ephemeral downscoped- installation token (`contents`/`metadata`/`pull_requests` read, team-level installs only, never- persisted — `get_readonly_github_token` in the tasks product) instead of the write-capable- token that task creation would otherwise attach, or injects nothing when the mint isn't- possible. The token backs the preinstalled `gh` CLI via `GH_TOKEN`/`GITHUB_TOKEN`.- Separately, the **`gh` prompt guidance** for code-derived reviewer evidence — commit history by- path, cross-checked against `scout-members-list`, cited in each reviewer's `reason` — renders- only for report-channel scouts whose team passes both the `github_read_access` posture in the- `signals-scout` flag payload (`team_configs`/`default_team_config`, resolved by- `team_limits.github_read_access_for_team`; default ON, an explicit `false` at either layer is- the kill switch) AND the mint-feasibility preflight- (`tasks_facade.can_mint_readonly_github_token`), so a tokenless run is never steered at `gh`.-- `MultiTurnSession.start()` creates a Tasks `(Task, TaskRun)` pair to drive the- sandbox. The bridge row links to its `TaskRun` via a `OneToOne` FK (`task_run`), created- by the `on_task_run_created` hook before the agent's first turn — this powers the- `task_url` deep-link on the run serializers- (`/project/{team_id}/tasks/{task_id}?runId={task_run_id}`) and is the join key for the- LLM-analytics token / cost roll-up. Failure context (status, error, full chat log via- LLMA) lives on the `TaskRun`; the harness persists no run state on the bridge row.- The bridge row does carry a `metadata` JSON column — the API-native record of run context that- isn't worth a dedicated column — in two server-written regions.- Top-level keys are stamped write-once at creation by `_create_run_row`, and split by whether they- are always present.- `harness_prompt_version` / `report_channel` (`none`/`emit`/`edit`/`both`) / `skill_origin` /- `github_guidance` always are:- together they pin down which instructions the run was given, which is the thing an eval or A/B- has to hold constant. The last three are composition forks the build alone doesn't capture, since- the same prompt build renders different sections depending on channel, skill origin, and whether- a read-only GitHub token could be minted.- Each is unrecoverable after the fact (the prompt has no version history, a skill's- `allowed_tools` can be edited, and a seeded canonical row flips to `custom` the moment a team- edits it, taking every past run's origin with it), which is why they are stamped rather than- resolved at read time.- `model` / `runtime_adapter` / `reasoning_effort` appear only when the `scouts-model-selection`- gate (or a runtime pin) overrode the agent-server default, so their absence is meaningful.- All four are attached to both lifecycle events via `_attach_run_shape_props`, since that is where- the A/B readout happens, and `github_guidance` is resolved in `arun_signals_scout` rather than- inside `_spawn_and_run` so the failure and cancellation paths can report it too.+ The skill body is loaded into the system prompt; each scout has its own `SignalScoutConfig` row (keyed on `(team, skill_name)`) whose `enabled` flag, `run_interval_minutes`, and optional project-local cron `run_cron_schedule` the coordinator's per-scout due-check honors.+- Scout sandbox GitHub credentials are **always read-only**: the runner requests `github_read_access` on every scout run, so provisioning mints an ephemeral downscoped installation token (`contents`/`metadata`/`pull_requests` read, team-level installs only, never persisted — `get_readonly_github_token` in the tasks product) instead of the write-capable token that task creation would otherwise attach, or injects nothing when the mint isn't possible. The token backs the preinstalled `gh` CLI via `GH_TOKEN`/`GITHUB_TOKEN`.+ Separately, the **`gh` prompt guidance** for code-derived reviewer evidence — commit history by path, cross-checked against `scout-members-list`, cited in each reviewer's `reason` — renders only for report-channel scouts whose team passes both the `github_read_access` posture in the `signals-scout` flag payload (`team_configs`/`default_team_config`, resolved by `team_limits.github_read_access_for_team`; default ON, an explicit `false` at either layer is the kill switch) AND the mint-feasibility preflight (`tasks_facade.can_mint_readonly_github_token`), so a tokenless run is never steered at `gh`.+- `MultiTurnSession.start()` creates a Tasks `(Task, TaskRun)` pair to drive the sandbox. The bridge row links to its `TaskRun` via a `OneToOne` FK (`task_run`), created by the `on_task_run_created` hook before the agent's first turn — this powers the `task_url` deep-link on the run serializers (`/project/{team_id}/tasks/{task_id}?runId={task_run_id}`) and is the join key for the LLM-analytics token / cost roll-up. Failure context (status, error, full chat log via LLMA) lives on the `TaskRun`; the harness persists no run state on the bridge row.+ The bridge row does carry a `metadata` JSON column — the API-native record of run context that isn't worth a dedicated column — in two server-written regions.+ Top-level keys are stamped write-once at creation by `_create_run_row`, and split by whether they are always present.+ `harness_prompt_version` / `report_channel` (`none`/`emit`/`edit`/`both`) / `skill_origin` / `github_guidance` always are:+ together they pin down which instructions the run was given, which is the thing an eval or A/B has to hold constant. The last three are composition forks the build alone doesn't capture, since the same prompt build renders different sections depending on channel, skill origin, and whether a read-only GitHub token could be minted.+ Each is unrecoverable after the fact (the prompt has no version history, a skill's `allowed_tools` can be edited, and a seeded canonical row flips to `custom` the moment a team edits it, taking every past run's origin with it), which is why they are stamped rather than resolved at read time.+ `model` / `runtime_adapter` / `reasoning_effort` appear only when the `scouts-model-selection` gate (or a runtime pin) overrode the agent-server default, so their absence is meaningful.+ All four are attached to both lifecycle events via `_attach_run_shape_props`, since that is where the A/B readout happens, and `github_guidance` is resolved in `arun_signals_scout` rather than inside `_spawn_and_run` so the failure and cancellation paths can report it too.New runner-known run dimensions belong here, not grown as ad-hoc columns.- The nested `derived` object is written once at finalize by `derived_metadata.py` and holds- booleans the harness computes from the run's own settled output (`has_emit_report`,- `has_edit_report`, `has_self_improvement`, `has_chart`, `has_self_validation`), so- "what kind of run was this?" is a field lookup rather than a parse of the prose `summary`.- Nothing in the column is scout-authored: a self-reported flag would only be as reliable as the- model remembering to write it, which is what makes this column safe to query directly.+ The nested `derived` object is written once at finalize by `derived_metadata.py` and holds booleans the harness computes from the run's own settled output (`has_emit_report`, `has_edit_report`, `has_self_improvement`, `has_chart`, `has_self_validation`), so "what kind of run was this?" is a field lookup rather than a parse of the prose `summary`.+ Nothing in the column is scout-authored: a self-reported flag would only be as reliable as the model remembering to write it, which is what makes this column safe to query directly.Both regions surface verbatim on the run serializers / `scout-runs-*` MCP tools.- A missing `derived` region is unknown rather than all-false: the run predates the field, died- before finalize, or its stamp failed (best-effort and logged, since observability must not fail a- run that already committed its output). The flags read the authored reports' current state at- finalize rather than an emit-time snapshot, so a title or chart changed after the emit is what- lands; the emit-time record stays on the report lifecycle events.+ A missing `derived` region is unknown rather than all-false: the run predates the field, died before finalize, or its stamp failed (best-effort and logged, since observability must not fail a run that already committed its output). The flags read the authored reports' current state at finalize rather than an emit-time snapshot, so a title or chart changed after the emit is what lands; the emit-time record stays on the report lifecycle events.- Each run emits scout-owned lifecycle analytics events (best-effort, keyed on the team):- `signals_scout_run_started` (the run cleared the guards and a TaskRun exists),- `signals_scout_run_finished` (terminal: `completed`/`failed`/`cancelled` + runtime + emit- count), and `signals_scout_run_reaped` (a stranded orphan was reaped by- `_self_heal_stale_runs`). They join on `run_id`/`task_run_id` and are the event-derived- (no-warehouse-lag) basis for throughput, stall, and worker-death alerting — a `started`- with no `finished` is a run that died before finalize; a reaped run emits no `finished`.- When the `scouts-model-selection` gate (or a runtime pin) routes the run, `started` and- `finished` also carry `model` / `runtime_adapter`, so run outcomes are sliceable by model- without joining through `$ai_generation`; absence means the agent-server default served it.- The report channel adds `signals_scout_report_emitted` / `signals_scout_report_edited`- (plus customer-facing `$scout_report_*` copies), stamped with derived classification- properties (`report_kind` = `finding`/`self_improvement`, `is_self_improvement_report`)- via `_report_classification_props` in `tools/report.py` — classified server-side off the- prompt's mandated title prefix (`prompt.SELF_IMPROVEMENT_REPORT_TITLE_PREFIX`), so- self-improvement reports are separable without downstream title heuristics. That helper- is the single extension point for future derived telemetry dimensions on these events —- add new flags there (both events pick them up), not as model columns.-- Emit happens via the harness's `emit_signal_*` tools, which call `emit_signal()`- with `source_product="signals_scout"` and `source_type="cross_source_issue"`.- From there the signal flows through the same emitter → buffer → grouping v2 path- as any other source.-- Scouts do not set a per-signal `weight`. The harness pins every emitted finding to- `SCOUT_SIGNAL_WEIGHT = 1.0` (`tools/emit.py`), so a fresh report's `total_weight`- meets `WEIGHT_THRESHOLD` (default 1.0) on the first signal and promotes immediately.- `weight` is the pipeline's promotion knob, not a scout judgment — promotion is- governed by the `confidence` emit-gate (≥ ~0.65), dedupe, and the safety filter.+ `signals_scout_run_started` (the run cleared the guards and a TaskRun exists), `signals_scout_run_finished` (terminal: `completed`/`failed`/`cancelled` + runtime + emit count), and `signals_scout_run_reaped` (a stranded orphan was reaped by `_self_heal_stale_runs`). They join on `run_id`/`task_run_id` and are the event-derived (no-warehouse-lag) basis for throughput, stall, and worker-death alerting — a `started` with no `finished` is a run that died before finalize; a reaped run emits no `finished`.+ When the `scouts-model-selection` gate (or a runtime pin) routes the run, `started` and `finished` also carry `model` / `runtime_adapter`, so run outcomes are sliceable by model without joining through `$ai_generation`; absence means the agent-server default served it.+ The report channel adds `signals_scout_report_emitted` / `signals_scout_report_edited` (plus customer-facing `$scout_report_*` copies), stamped with derived classification properties (`report_kind` = `finding`/`self_improvement`, `is_self_improvement_report`) via `_report_classification_props` in `tools/report.py` — classified server-side off the prompt's mandated title prefix (`prompt.SELF_IMPROVEMENT_REPORT_TITLE_PREFIX`), so self-improvement reports are separable without downstream title heuristics. That helper is the single extension point for future derived telemetry dimensions on these events — add new flags there (both events pick them up), not as model columns.+- Emit happens via the harness's `emit_signal_*` tools, which call `emit_signal()` with `source_product="signals_scout"` and `source_type="cross_source_issue"`.+ From there the signal flows through the same emitter → buffer → grouping v2 path as any other source.+- Scouts do not set a per-signal `weight`. The harness pins every emitted finding to `SCOUT_SIGNAL_WEIGHT = 1.0` (`tools/emit.py`), so a fresh report's `total_weight` meets `WEIGHT_THRESHOLD` (default 1.0) on the first signal and promotes immediately.+ `weight` is the pipeline's promotion knob, not a scout judgment — promotion is governed by the `confidence` emit-gate (≥ ~0.65), dedupe, and the safety filter.The scout-facing schema and skills carry no `weight` field.-- Findings can carry `tags` — lowercase kebab-case category slugs, normalized and- capped by `normalize_tags` in `tools/emit.py`. Tags persist in the signal's- `extra.tags` (queryable in the signal store) and on the `SignalScoutEmission` row.- The vocabulary lives in the scout loop, not the harness: the base prompt's- _Tagging your findings_ section instructs each scout to maintain a- `tags:<domain>:taxonomy` scratchpad entry (read first-move like any memory, evolved- as categories emerge), and the emission rows are the queryable ground truth a scout- can audit its taxonomy against. The harness only normalizes, caps, and persists.-- Scratchpad entries and run history are read at prompt assembly time. The agent can- also write scratchpad entries mid-run via `remember` / `forget` — that's how a- specialist with no anomalies to chase records "no LLM activity here, close out- fast" so future runs of the same skill short-circuit cold.+- Findings can carry `tags` — lowercase kebab-case category slugs, normalized and capped by `normalize_tags` in `tools/emit.py`. Tags persist in the signal's `extra.tags` (queryable in the signal store) and on the `SignalScoutEmission` row.+ The vocabulary lives in the scout loop, not the harness: the base prompt's _Tagging your findings_ section instructs each scout to maintain a `tags:<domain>:taxonomy` scratchpad entry (read first-move like any memory, evolved as categories emerge), and the emission rows are the queryable ground truth a scout can audit its taxonomy against. The harness only normalizes, caps, and persists.+- Scratchpad entries and run history are read at prompt assembly time. The agent can also write scratchpad entries mid-run via `remember` / `forget` — that's how a specialist with no anomalies to chase records "no LLM activity here, close out fast" so future runs of the same skill short-circuit cold.## Where the rest of the system meets this directory- **Coordinator** — `temporal/agentic/scout_coordinator.py` and `scout_scheduler.py`.- Polls every `COORDINATOR_INTERVAL_MINUTES = 30`; dispatches each scout whose- per-scout schedule (`run_interval_minutes`, default every 24 hours, or an optional- project-local cron `run_cron_schedule` that takes precedence) is due, most-overdue first, hard cap- `MAX_RUNS_PER_TICK = 50` per tick, `ScheduleOverlapPolicy.SKIP` to drop ticks rather than queue them.-- **Models** — `SignalScoutConfig`, `SignalScoutRun`, `SignalScratchpad`,- `SignalScoutNote`, `SignalProjectProfile` in `../models.py`.-- **Source variant** — `SignalSourceConfig.SourceProduct.SIGNALS_SCOUT` paired with- `SourceType.CROSS_SOURCE_ISSUE`.+ Polls every `COORDINATOR_INTERVAL_MINUTES = 30`; dispatches each scout whose per-scout schedule (`run_interval_minutes`, default every 24 hours, or an optional project-local cron `run_cron_schedule` that takes precedence) is due, most-overdue first, hard cap `MAX_RUNS_PER_TICK = 50` per tick, `ScheduleOverlapPolicy.SKIP` to drop ticks rather than queue them.+- **Models** — `SignalScoutConfig`, `SignalScoutRun`, `SignalScratchpad`, `SignalScoutNote`, `SignalProjectProfile` in `../models.py`.+- **Source variant** — `SignalSourceConfig.SourceProduct.SIGNALS_SCOUT` paired with `SourceType.CROSS_SOURCE_ISSUE`.- **Scout fleet** — the `signals-scout-*` skills live at`../../skills/signals-scout-*/` (generalist + 7 specialists). See`../../skills/AGENTS.md` for the fleet convention.- **Local commands** — `run_signals_scout` (one-shot run) and- `sync_signals_scout_skills` (force a canonical-skill sync). Both documented in- `../management/AGENTS.md`.+ `sync_signals_scout_skills` (force a canonical-skill sync). Both documented in `../management/AGENTS.md`.## 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`.-- 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.-- If you change the canonical SKILL.md format or directory layout, update- `lazy_seed.discover_canonical_skills()` and the parser tests — the coordinator- call to `sync_canonical_skills()` runs on every tick and silently swallows parser- errors (logs only), so a quiet schema break can leave canonical content stale on- every team.-- Run lifecycle lives on the linked `TaskRun` (`task_run.status`), managed by- `MultiTurnSession` — the `SignalScoutRun` bridge row carries no status of its own. A- `TaskRun` stranded in `IN_PROGRESS` (worker SIGKILL before finalize) would block new runs- for that `(team, skill)` via `_has_running_run` — so `_self_heal_stale_runs` fails any such- run older than `STALE_RUN_CUTOFF_S` before the guard, letting the lane recover within a tick- or two instead of wedging until manual intervention.-- Emit path goes through `emit_signal()` and only `emit_signal()` — **with one sanctioned- carve-out**: a scout that opts into the report-authoring channel (`emit_report` / `edit_report`- in its skill's `allowed_tools`) writes a full `SignalReport` directly. That write does NOT go- through harness code touching `SignalReport` or the embeddings pipeline itself — it goes through- the `scout_report/` service (`create_scout_report` / `update_scout_report`), which owns the report- row + the bound `document_embeddings` signal write (the grouping substrate, minus the matcher).- Harness/tool code calls that service; it still never touches `SignalReport` or the embeddings- pipeline directly. See `../scout_report/persistence.py` and the `scouts-emit-reports` spec.- Both report-channel actions are tracked on the run as queryable columns: `emit_report` appends to- `SignalScoutRun.emitted_report_ids` (via `_record_report_emit`), and `edit_report` appends — deduped —- to `edited_report_ids` (via `record_report_edit`), so "which reports did this run author vs. edit?"- is a column lookup, not an event-stream or artefact-log join. Both writes are best-effort and- post-commit (an edit/emit never fails because its tally write did).-- **If you add or rename a workflow/activity in `temporal/agentic/`, update- `posthog/temporal/tests/ai/test_module_integrity.py` (`TestSignalsProductModuleIntegrity`)- to match.**+- Keep the harness loop generic. Skill-specific logic belongs in the SKILL.md of the scout, not in `runner.py` or `prompt.py`.+- 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.+- If you change the canonical SKILL.md format or directory layout, update `lazy_seed.discover_canonical_skills()` and the parser tests — the coordinator call to `sync_canonical_skills()` runs on every tick and silently swallows parser errors (logs only), so a quiet schema break can leave canonical content stale on every team.+- Run lifecycle lives on the linked `TaskRun` (`task_run.status`), managed by `MultiTurnSession` — the `SignalScoutRun` bridge row carries no status of its own. A `TaskRun` stranded in `IN_PROGRESS` (worker SIGKILL before finalize) would block new runs for that `(team, skill)` via `_has_running_run` — so `_self_heal_stale_runs` fails any such run older than `STALE_RUN_CUTOFF_S` before the guard, letting the lane recover within a tick or two instead of wedging until manual intervention.+- Emit path goes through `emit_signal()` and only `emit_signal()` — **with one sanctioned carve-out**: a scout that opts into the report-authoring channel (`emit_report` / `edit_report` in its skill's `allowed_tools`) writes a full `SignalReport` directly. That write does NOT go through harness code touching `SignalReport` or the embeddings pipeline itself — it goes through the `scout_report/` service (`create_scout_report` / `update_scout_report`), which owns the report row + the bound `document_embeddings` signal write (the grouping substrate, minus the matcher).+ Harness/tool code calls that service; it still never touches `SignalReport` or the embeddings pipeline directly. See `../scout_report/persistence.py` and the `scouts-emit-reports` spec.+ Both report-channel actions are tracked on the run as queryable columns: `emit_report` appends to `SignalScoutRun.emitted_report_ids` (via `_record_report_emit`), and `edit_report` appends — deduped — to `edited_report_ids` (via `record_report_edit`), so "which reports did this run author vs. edit?" is a column lookup, not an event-stream or artefact-log join. Both writes are best-effort and post-commit (an edit/emit never fails because its tally write did).+- **If you add or rename a workflow/activity in `temporal/agentic/`, update `posthog/temporal/tests/ai/test_module_integrity.py` (`TestSignalsProductModuleIntegrity`) to match.**- **If you change the harness layout or tool surface, update this file to match.**diff --git a/products/signals/eval/AGENTS.md b/products/signals/eval/AGENTS.mdindex eef9806c3843..222606313c98 100644--- a/products/signals/eval/AGENTS.md+++ b/products/signals/eval/AGENTS.md@@ -1,16 +1,13 @@# Signal grouping evalEnd-to-end evaluation of the signal grouping pipeline.-Measures how well the pipeline clusters incoming signals into reports,-compared against hand-labeled ground-truth groups.+Measures how well the pipeline clusters incoming signals into reports, compared against hand-labeled ground-truth groups.## What it testsThe eval feeds 92 synthetic signals (from 42 ground-truth groups) through the **real** pipeline:-LLM query generation, embedding search, LLM matching, specificity verification, summarization,-safety judging, and actionability judging.-Infrastructure is mocked — an in-memory embedding store (`mock.py`) replaces ClickHouse + Kafka,-and a `ReportStore` replaces Postgres.+LLM query generation, embedding search, LLM matching, specificity verification, summarization, safety judging, and actionability judging.+Infrastructure is mocked — an in-memory embedding store (`mock.py`) replaces ClickHouse + Kafka, and a `ReportStore` replaces Postgres.Signals arrive in a deterministic random order (seeded RNG),interleaved across groups to simulate real-world arrival patterns.@@ -20,8 +17,7 @@ interleaved across groups to simulate real-world arrival patterns.1. **Pre-emit** — summarize long descriptions, check actionability (Claude Haiku via the internal LLM gateway).Signals that fail actionability are dropped.2. **Match** — generate search queries (LLM), embed queries (OpenAI),- cosine search against stored signals, LLM match to existing report or create new,- verify specificity of match (LLM).+ cosine search against stored signals, LLM match to existing report or create new, verify specificity of match (LLM).3. **Persist** — store the signal + embedding, update report metadata.After all signals are processed:@@ -123,8 +119,7 @@ python manage.py clear_eval_data --source X # filter by eval source tag- Signals run through the pipeline concurrently (semaphore-bounded, 70 max).- The match + persist step is serialized behind `asyncio.Lock` —- this ensures the embedding store and report store see a consistent view- when deciding whether a signal joins an existing report or creates a new one.+ this ensures the embedding store and report store see a consistent view when deciding whether a signal joins an existing report or creates a new one.- Report judging runs concurrently (all reports at once).# Reportsdiff --git a/products/signals/skills/AGENTS.md b/products/signals/skills/AGENTS.mdindex 7c8d51bd1196..31fb98fe8323 100644--- a/products/signals/skills/AGENTS.md+++ b/products/signals/skills/AGENTS.md@@ -4,415 +4,99 @@ Two distinct skill families live in this directory:1. **Official PostHog skills** — `signals/`, `inbox-exploration/`,`authoring-scouts/`, `exploring-scouts/`. First-party PostHog skills- published via `products/posthog_ai/dist/skills/` and loaded by users through the PostHog- MCP. They teach a caller how to query, browse, and reason about signals data. Two are- meta skills about the scout fleet itself: `authoring-scouts/` teaches a user's- agent how to write, edit, and adapt scouts (per-team via the skills store, or canonically- in this directory), and `exploring-scouts/` is its read-only counterpart —- teaching a caller how to observe and make sense of what a project's scouts are doing and- how they're performing (the `scout-config-list` / `-runs-list` / `-runs-retrieve`- / `-scratchpad-search` / `-project-profile-get` tools, run anatomy, and health- assessment). They are not part of the automated agent path — humans (and human-driven- agents) reach for them on demand.-2. **Scout fleet** — `signals-scout-*/`. Canonical default skills that the headless- Signals agent loads into its system prompt at runtime. These are also the first- example of PostHog shipping templated skills _into a user's PostHog Skills Store_:- `lazy_seed` mirrors them onto each agent-enabled team's `LLMSkill` rows on the first- coordinator tick, where users can then edit or override them per-team. They are not- designed to be invoked by humans directly; the prompt and tool affordances assume- they are running inside the harness.+ published via `products/posthog_ai/dist/skills/` and loaded by users through the PostHog MCP. They teach a caller how to query, browse, and reason about signals data. Two are meta skills about the scout fleet itself: `authoring-scouts/` teaches a user's agent how to write, edit, and adapt scouts (per-team via the skills store, or canonically in this directory), and `exploring-scouts/` is its read-only counterpart — teaching a caller how to observe and make sense of what a project's scouts are doing and how they're performing (the `scout-config-list` / `-runs-list` / `-runs-retrieve` / `-scratchpad-search` / `-project-profile-get` tools, run anatomy, and health assessment). They are not part of the automated agent path — humans (and human-driven agents) reach for them on demand.+2. **Scout fleet** — `signals-scout-*/`. Canonical default skills that the headless Signals agent loads into its system prompt at runtime. These are also the first example of PostHog shipping templated skills _into a user's PostHog Skills Store_:+ `lazy_seed` mirrors them onto each agent-enabled team's `LLMSkill` rows on the first coordinator tick, where users can then edit or override them per-team. They are not designed to be invoked by humans directly; the prompt and tool affordances assume they are running inside the harness.## Scout fleet convention (`signals-scout-*`)-The harness discovers scouts by globbing `signals-scout-*` over the team's `LLMSkill`-table. The canonical content on disk in this directory is mirrored to each-agent-enabled team's `LLMSkill` rows by `scout_harness/lazy_seed.py` — see-`../backend/scout_harness/AGENTS.md` for the sync mechanics, and the-`sync_signals_scout_skills` management command for the manual fan-out path.+The harness discovers scouts by globbing `signals-scout-*` over the team's `LLMSkill` table. The canonical content on disk in this directory is mirrored to each agent-enabled team's `LLMSkill` rows by `scout_harness/lazy_seed.py` — see `../backend/scout_harness/AGENTS.md` for the sync mechanics, and the `sync_signals_scout_skills` management command for the manual fan-out path.### Generalist + specialists-- `signals-scout-general/` — cross-product generalist. Looks for cross-product- correlations and surfaces no specialist covers, rather than deep-diving a single- product. The first canonical scout on the **report channel** (its frontmatter- `allowed_tools` lists `emit_report` / `edit_report`): it authors fully-validated- correlations 1:1 as `SignalReport`s directly, rather than firing weak `emit_signal`- findings for the pipeline to cluster. The report-channel contract itself (when to author- vs. edit, the field schema, status mapping, reviewer routing, dedupe) lives in the harness- prompt (`scout_harness/prompt.py`), injected into every report-channel scout — so a ported- scout carries only its _domain-specific_ report framing inline in its body, not a bundled- copy of the contract. The generalist keeps one progressively-disclosed reference,- `references/conventions.md` (scratchpad key prefixes + the four-states author/edit- classifier + cross-project noise patterns). This is the entry point if you want to- understand how a scout decides what to investigate end-to-end.-- `signals-scout-ai-observability/` — anomaly watcher for AI observability- (cost / latency / error / token-share regressions).-- `signals-scout-apm/` — RED-metrics anomaly watcher for the distributed tracing (APM /- OpenTelemetry spans) product. Scores each `(service, operation)` against its own- seasonality-matched baseline (the same window 7 days ago, via `apm-spans-aggregate`'s- `compare_to`) for error-rate steps, p95 latency regressions, new error signatures,- failing downstream dependencies, and service traffic cliffs. Its discriminator is a- _rate_ regression with a steady denominator — error rate / p95 stepping up while request- volume holds is signal; counts moving in lockstep with traffic are baseline. Distinct- from `signals-scout-ai-observability`, which watches `$ai_*` LLM traces, not OTel spans;+- `signals-scout-general/` — cross-product generalist. Looks for cross-product correlations and surfaces no specialist covers, rather than deep-diving a single product. The first canonical scout on the **report channel** (its frontmatter `allowed_tools` lists `emit_report` / `edit_report`): it authors fully-validated correlations 1:1 as `SignalReport`s directly, rather than firing weak `emit_signal` findings for the pipeline to cluster. The report-channel contract itself (when to author vs. edit, the field schema, status mapping, reviewer routing, dedupe) lives in the harness prompt (`scout_harness/prompt.py`), injected into every report-channel scout — so a ported scout carries only its _domain-specific_ report framing inline in its body, not a bundled copy of the contract. The generalist keeps one progressively-disclosed reference, `references/conventions.md` (scratchpad key prefixes + the four-states author/edit classifier + cross-project noise patterns). This is the entry point if you want to understand how a scout decides what to investigate end-to-end.+- `signals-scout-ai-observability/` — anomaly watcher for AI observability (cost / latency / error / token-share regressions).+- `signals-scout-apm/` — RED-metrics anomaly watcher for the distributed tracing (APM / OpenTelemetry spans) product. Scores each `(service, operation)` against its own seasonality-matched baseline (the same window 7 days ago, via `apm-spans-aggregate`'s `compare_to`) for error-rate steps, p95 latency regressions, new error signatures, failing downstream dependencies, and service traffic cliffs. Its discriminator is a _rate_ regression with a steady denominator — error rate / p95 stepping up while request volume holds is signal; counts moving in lockstep with traffic are baseline. Distinct from `signals-scout-ai-observability`, which watches `$ai_*` LLM traces, not OTel spans;raw log lines are the logs scout's territory.- `signals-scout-logs/` — anomaly watcher for logs (rate / level / pattern shifts).-- `signals-scout-error-tracking/` — anomaly watcher for error tracking- (issue spikes, regressions, suppression-rule churn).-- `signals-scout-feature-flags/` — state-vs-traffic watcher for feature flags. Audits- the wiring between the flag UI and the code: evaluation cliffs on healthy flags,- ghost flags (code calling deleted keys), response-distribution shifts with no- matching flag edit, plus a bundled flag-debt hygiene pass (stale / dead-check- flags). Its discriminator is the flag's configured state against the- `$feature_flag_called` stream; experiment-linked flags are the experiments- scout's territory.-- `signals-scout-data-pipelines/` — delivery watcher for data pipelines: CDP- destinations and transformations (hog functions), batch exports, and hog flows.- Watches for platform interventions (the hog watcher degrading or auto-disabling- an enabled function), delivery failure shares stepping above a pipeline's own- baseline, batch export runs failing or stalling (a growing data gap), filter- starvation, and active flows failing for the people they trigger on. Its- discriminator is configured-to-deliver vs actually-delivering — drafts, paused- exports, and deliberately disabled functions are operator choices, not signal;+- `signals-scout-error-tracking/` — anomaly watcher for error tracking (issue spikes, regressions, suppression-rule churn).+- `signals-scout-feature-flags/` — state-vs-traffic watcher for feature flags. Audits the wiring between the flag UI and the code: evaluation cliffs on healthy flags, ghost flags (code calling deleted keys), response-distribution shifts with no matching flag edit, plus a bundled flag-debt hygiene pass (stale / dead-check flags). Its discriminator is the flag's configured state against the `$feature_flag_called` stream; experiment-linked flags are the experiments scout's territory.+- `signals-scout-data-pipelines/` — delivery watcher for data pipelines: CDP destinations and transformations (hog functions), batch exports, and hog flows.+ Watches for platform interventions (the hog watcher degrading or auto-disabling an enabled function), delivery failure shares stepping above a pipeline's own baseline, batch export runs failing or stalling (a growing data gap), filter starvation, and active flows failing for the people they trigger on. Its discriminator is configured-to-deliver vs actually-delivering — drafts, paused exports, and deliberately disabled functions are operator choices, not signal;data warehouse / external-data syncs (data coming _in_) are thedata-warehouse scout's territory.-- `signals-scout-data-warehouse/` — import-integrity watcher for the data- warehouse: external data sources, their per-table sync schemas, webhook push- channels, and materialized views. Watches for source connections in Error- (cascading to every armed table under them), schemas Failed or stuck Running,- schemas that read Completed but have fallen behind their own sync cadence (a- silent, growing data gap), webhook push channels broken behind a green status,- row-volume cliffs, and failed/abandoned materialized views. Its discriminator is- configured-to-sync (`should_sync: true`) vs actually-syncing and- promised-freshness vs actual-freshness — paused schemas, billing limits, and- draft sources are operator choices, not signal. Also carries a second,- lower-priority **optimization lane** that runs only when the integrity lane is- quiet: reads the per-team `query_log` table for recurring, multi-user query- time and read-bytes concentrated on one warehouse table or query shape- (materialization candidates, queries bypassing an existing matview, matviews- with no readers), filing each as a capped, evergreen-deduped P3 suggestion. The mirror image of- data-pipelines (which watches data leaving PostHog); active `external_data_failure`- health issues overlap the health-checks scout, so it dedupes against the inbox and- owns the silent gaps the active-failure summary misses (staleness behind a green- status, broken webhooks, row cliffs).+- `signals-scout-data-warehouse/` — import-integrity watcher for the data warehouse: external data sources, their per-table sync schemas, webhook push channels, and materialized views. Watches for source connections in Error (cascading to every armed table under them), schemas Failed or stuck Running, schemas that read Completed but have fallen behind their own sync cadence (a silent, growing data gap), webhook push channels broken behind a green status, row-volume cliffs, and failed/abandoned materialized views. Its discriminator is configured-to-sync (`should_sync: true`) vs actually-syncing and promised-freshness vs actual-freshness — paused schemas, billing limits, and draft sources are operator choices, not signal. Also carries a second, lower-priority **optimization lane** that runs only when the integrity lane is quiet: reads the per-team `query_log` table for recurring, multi-user query time and read-bytes concentrated on one warehouse table or query shape (materialization candidates, queries bypassing an existing matview, matviews with no readers), filing each as a capped, evergreen-deduped P3 suggestion. The mirror image of data-pipelines (which watches data leaving PostHog); active `external_data_failure` health issues overlap the health-checks scout, so it dedupes against the inbox and owns the silent gaps the active-failure summary misses (staleness behind a green status, broken webhooks, row cliffs).- `signals-scout-revenue-analytics/` — anomaly watcher for revenue(MRR / churn / segment shifts).-- `signals-scout-session-replay/` — capture-integrity + friction watcher for session- replay. Watches recording volume against site traffic for capture cliffs (SDK- breakage, config drift — recordings are not retroactive), and the friction stream- (`$rageclick`, dead clicks, errors-after-click via `session_replay_features`) for- clusters concentrating on one URL or element above that surface's own baseline.- Also the judgment layer over replay vision: scanner watch-gaps (failing scanners,- exhausted quota) and cross-session aggregation of `$recording_observed` scanner- output. Its discriminator is concentration-vs-diffusion — friction that piles up- in one place is signal, friction that tracks traffic is baseline; exceptions per- se are the error-tracking scout's territory.-- `signals-scout-replay-vision/` — agentic pull watcher over Replay Vision scanners- (the standing LLM probes that write `$recording_observed` events). Replay Vision is- the newer evolution of session replay, so this scout and `signals-scout-session-replay`- intentionally coexist for now. Watches two promises: that enabled scanners are- actually observing (throughput / success-rate cliffs, exhausted quota — a silent- watch gap), and that what the scanners see in aggregate gets surfaced (a monitor's- `yes`-rate or a scorer's mean stepping away from its own baseline, a classifier tag- or recurring summarizer theme concentrating across many sessions). It is the- complement to the per-session push path: scanners with `emits_signals: true` already- emit one signal per session (source `replay_vision`, type `scanner_finding`) into the- same inbox, so this scout never repeats them — it adds the cross-session shape the- per-session probe can't see. Its discriminators are- aggregate-shift-vs-per-session-baseline and- configured-to-observe-vs-actually-observing; raw friction / capture is the- session-replay scout's territory and exceptions are the error-tracking scout's.+- `signals-scout-session-replay/` — capture-integrity + friction watcher for session replay. Watches recording volume against site traffic for capture cliffs (SDK breakage, config drift — recordings are not retroactive), and the friction stream (`$rageclick`, dead clicks, errors-after-click via `session_replay_features`) for clusters concentrating on one URL or element above that surface's own baseline.+ Also the judgment layer over replay vision: scanner watch-gaps (failing scanners, exhausted quota) and cross-session aggregation of `$recording_observed` scanner output. Its discriminator is concentration-vs-diffusion — friction that piles up in one place is signal, friction that tracks traffic is baseline; exceptions per se are the error-tracking scout's territory.+- `signals-scout-replay-vision/` — agentic pull watcher over Replay Vision scanners (the standing LLM probes that write `$recording_observed` events). Replay Vision is the newer evolution of session replay, so this scout and `signals-scout-session-replay` intentionally coexist for now. Watches two promises: that enabled scanners are actually observing (throughput / success-rate cliffs, exhausted quota — a silent watch gap), and that what the scanners see in aggregate gets surfaced (a monitor's `yes`-rate or a scorer's mean stepping away from its own baseline, a classifier tag or recurring summarizer theme concentrating across many sessions). It is the complement to the per-session push path: scanners with `emits_signals: true` already emit one signal per session (source `replay_vision`, type `scanner_finding`) into the same inbox, so this scout never repeats them — it adds the cross-session shape the per-session probe can't see. Its discriminators are aggregate-shift-vs-per-session-baseline and configured-to-observe-vs-actually-observing; raw friction / capture is the session-replay scout's territory and exceptions are the error-tracking scout's.- `signals-scout-surveys/` — anomaly watcher for surveys(response-rate drops, sentiment shifts, completion-funnel regressions).- `signals-scout-web-analytics/` — acquisition + site-health watcher for web traffic.Reads the `sessions` table for per-channel volume diverging from- seasonality-aligned baselines (robust z against the median/MAD of four- same-weekday aligned windows), attribution- breakage (paid traffic reclassifying into Direct/Unknown when UTM tagging breaks),- entry-path bounce steps and traffic cliffs, and 404 spikes (via the project's own- not-found event, discovered by name). Its- discriminator is segment-vs-aggregate divergence — one channel/path/referrer- stepping away from its own baseline while totals hold is signal; the whole site- moving together is baseline. On the **report channel** (`emit_report` /- `edit_report`): files each dated, segment-named divergence as a 1:1 inbox report,- editing the live report while the divergence persists. Whole-site metric anomalies- on watched dashboards are the anomaly-detection scout's territory; page-performance- is the web-vitals scout's.-- `signals-scout-web-vitals/` — Core Web Vitals watcher. Reads each page's p75- LCP / INP / CLS / FCP from `$web_vitals` against the absolute Google thresholds- (good / needs-improvement / poor) _and_ against its own history: pages standing in- the poor band (the absolute view the relative scouts miss), pages crossing a band- boundary after a deploy (dated against a daily series), and sharp in-band- regressions. Its discriminator is band-placement on a volume-stable percentile,- with a page-scoped-vs-site-wide second axis (one page is code/content; all pages- together is a population / CDN / third-party shift). Every finding carries a- metric-specific cause hypothesis and a concrete remediation (bundled- `references/remediation.md`). On the **report channel** (`emit_report` /- `edit_report`): files each page+metric finding as a 1:1 inbox report, editing the- live report while the page stays slow. Vitals-capture _absence_ is the health-checks- scout's territory, not this one's.-- `signals-scout-experiments/` — validity watcher for A/B experiments. Audits the- measurement machinery rather than the results: sample ratio mismatch, `$multiple`- contamination, exposure stalls, mid-run flag mutations, plus lifecycle drift- (zombies, ended-but-contaminating flags). Its discriminator is config-vs-data- contradiction — the configured split / status / flag state against what the- exposure stream actually shows.-- `signals-scout-observability-gaps/` — the odd one out. Watches for _structural- gaps_ between events being captured and existing insight / dashboard / alert- coverage, and emits P3 _recommendations_ rather than P0–P2 _anomalies_.-- `signals-scout-insight-alerts/` — digest + triage layer over the team's own- configured insight alerts (threshold / detector alerts on insights). Doesn't- re-detect anomalies — the user already set the thresholds — it reads each alert's- recent firing history (`alerts-list` to triage all alerts cheaply, `alert-get` to- deep-read the firing checks of the few candidates) and surfaces the recent firings a- human most likely missed. Its discriminator is missed-ness × materiality ×- persistence, weighting hardest toward firings the standard notification path stayed- silent on (no subscribers, suppressed by the investigation agent, or an alert- silently Errored and no longer evaluating); skips snoozed / disabled / flapping /- already-notified-and-resolved. Complements `observability-gaps` (which recommends- _creating_ alerts) and `anomaly-detection` (which scores insights the team _views_,- whether or not they're alerted) — this one owns the firings of alerts that already- exist.-- `signals-scout-csp-violations/` — anomaly watcher for Content Security Policy- violations (`$csp_violation` blocked-URL clusters, per-directive bursts,- post-deploy page-scoped regressions, suspicious third-party domains).-- `signals-scout-anomaly-detection/` — anomaly watcher for the dashboards and- insights a team actually views. Discovers high-traffic insights (view counts +- dashboard access), curates a durable scratchpad watchlist, and balances- re-checking known items (exploit) against discovering new ones (explore) across- runs; scores the latest complete bucket by robust (MAD) deviation from each- insight's own seasonality-matched baseline. The first canonical scout on the- **report channel** — it files each anomaly as a finished 1:1 inbox report via- `emit_report` / `edit_report` (its `allowed_tools`) rather than a weak signal.+ seasonality-aligned baselines (robust z against the median/MAD of four same-weekday aligned windows), attribution breakage (paid traffic reclassifying into Direct/Unknown when UTM tagging breaks), entry-path bounce steps and traffic cliffs, and 404 spikes (via the project's own not-found event, discovered by name). Its discriminator is segment-vs-aggregate divergence — one channel/path/referrer stepping away from its own baseline while totals hold is signal; the whole site moving together is baseline. On the **report channel** (`emit_report` / `edit_report`): files each dated, segment-named divergence as a 1:1 inbox report, editing the live report while the divergence persists. Whole-site metric anomalies on watched dashboards are the anomaly-detection scout's territory; page-performance is the web-vitals scout's.+- `signals-scout-web-vitals/` — Core Web Vitals watcher. Reads each page's p75 LCP / INP / CLS / FCP from `$web_vitals` against the absolute Google thresholds (good / needs-improvement / poor) _and_ against its own history: pages standing in the poor band (the absolute view the relative scouts miss), pages crossing a band boundary after a deploy (dated against a daily series), and sharp in-band regressions. Its discriminator is band-placement on a volume-stable percentile, with a page-scoped-vs-site-wide second axis (one page is code/content; all pages together is a population / CDN / third-party shift). Every finding carries a metric-specific cause hypothesis and a concrete remediation (bundled `references/remediation.md`). On the **report channel** (`emit_report` / `edit_report`): files each page+metric finding as a 1:1 inbox report, editing the live report while the page stays slow. Vitals-capture _absence_ is the health-checks scout's territory, not this one's.+- `signals-scout-experiments/` — validity watcher for A/B experiments. Audits the measurement machinery rather than the results: sample ratio mismatch, `$multiple` contamination, exposure stalls, mid-run flag mutations, plus lifecycle drift (zombies, ended-but-contaminating flags). Its discriminator is config-vs-data contradiction — the configured split / status / flag state against what the exposure stream actually shows.+- `signals-scout-observability-gaps/` — the odd one out. Watches for _structural gaps_ between events being captured and existing insight / dashboard / alert coverage, and emits P3 _recommendations_ rather than P0–P2 _anomalies_.+- `signals-scout-insight-alerts/` — digest + triage layer over the team's own configured insight alerts (threshold / detector alerts on insights). Doesn't re-detect anomalies — the user already set the thresholds — it reads each alert's recent firing history (`alerts-list` to triage all alerts cheaply, `alert-get` to deep-read the firing checks of the few candidates) and surfaces the recent firings a human most likely missed. Its discriminator is missed-ness × materiality × persistence, weighting hardest toward firings the standard notification path stayed silent on (no subscribers, suppressed by the investigation agent, or an alert silently Errored and no longer evaluating); skips snoozed / disabled / flapping / already-notified-and-resolved. Complements `observability-gaps` (which recommends _creating_ alerts) and `anomaly-detection` (which scores insights the team _views_, whether or not they're alerted) — this one owns the firings of alerts that already exist.+- `signals-scout-csp-violations/` — anomaly watcher for Content Security Policy violations (`$csp_violation` blocked-URL clusters, per-directive bursts, post-deploy page-scoped regressions, suspicious third-party domains).+- `signals-scout-anomaly-detection/` — anomaly watcher for the dashboards and insights a team actually views. Discovers high-traffic insights (view counts + dashboard access), curates a durable scratchpad watchlist, and balances re-checking known items (exploit) against discovering new ones (explore) across runs; scores the latest complete bucket by robust (MAD) deviation from each insight's own seasonality-matched baseline. The first canonical scout on the **report channel** — it files each anomaly as a finished 1:1 inbox report via `emit_report` / `edit_report` (its `allowed_tools`) rather than a weak signal.Bundles its own references(`anomaly-methods.md`, `watchlist-and-memory.md`, `report-contract.md`).-- `signals-scout-health-checks/` — the judgment layer over PostHog's own health- checks. Reads the project's active health issues (`health-issues-summary` /- `-list` / `-get`) rather than re-running detection, and decides which are worth- surfacing: bundles same-kind clusters into one finding, weights by real blast- radius (cross-referenced against event volume / reach / SDK-version share), and- prioritizes issues an agent can resolve via the MCP over credential-gated ones.- Its discriminator is kind-concentration × severity × agent-fixability ×- persistence, not raw firing count. This includes `ingestion_warning` issues —- the `ingestion_warning` check files one health issue per warning type (with- `warning_type` / `category` / `severity` / `affected_count` in the payload), so- the scout owns that triage end-to-end, corroborating blast radius via- `execute-sql` against `system.ingestion_warnings` and pointing fixes at the- `resolving-ingestion-warnings` skill.+- `signals-scout-health-checks/` — the judgment layer over PostHog's own health checks. Reads the project's active health issues (`health-issues-summary` / `-list` / `-get`) rather than re-running detection, and decides which are worth surfacing: bundles same-kind clusters into one finding, weights by real blast radius (cross-referenced against event volume / reach / SDK-version share), and prioritizes issues an agent can resolve via the MCP over credential-gated ones.+ Its discriminator is kind-concentration × severity × agent-fixability × persistence, not raw firing count. This includes `ingestion_warning` issues — the `ingestion_warning` check files one health issue per warning type (with `warning_type` / `category` / `severity` / `affected_count` in the payload), so the scout owns that triage end-to-end, corroborating blast radius via `execute-sql` against `system.ingestion_warnings` and pointing fixes at the `resolving-ingestion-warnings` skill.- `signals-scout-inbox-validation/` — follow-up watcher for the inbox itself.- Watches reports that recently transitioned to `resolved` (implementation PR- merged), waits out a deployment soak window, then re-probes the entities the- report's underlying signals named (pre-fix baselines captured at enqueue time)- to check the fix actually held — plus a strictly-gated escalation check on- recently dismissed reports. Its discriminator is resolution-vs-reality — the- resolved status's promise against the post-deploy data stream. Emits only- failed validations; confirmations are scratchpad memory. It never detects new- problems — that's the rest of the fleet's territory.-- `signals-scout-product-analytics/` — behavioral-regression watcher for the core- product-analytics primitives (funnels, retention, lifecycle, stickiness, paths).- Curates a watchlist of the team's saved funnel / retention / lifecycle insights- (and at most one inferred activation flow where none is saved) and re-scores each- flow's _derived rate_ — step-to-step conversion %, cohort return %, lifecycle- composition — against its own trailing, seasonality-matched baseline. Its- discriminator is a rate regression with a steady denominator: a conversion/retention- drop while entrants hold is a real product regression; a drop where entrants also- collapsed is a capture/volume problem and belongs elsewhere. Fills the seam neither- neighbor covers — `anomaly-detection` scores raw time-series insights the team views- (its `alert-simulate` path targets time-series, not funnels), and- `observability-gaps` only _recommends building_ a funnel; once a flow exists, this- scout owns its behavioral health. Acquisition/attribution is the web-analytics- scout's territory and experiment validity is the experiments scout's.-- `signals-scout-skills-store/` — skill-hygiene watcher for the team's PostHog- skills store (`LLMSkill` rows), read entirely via the MCP skill tools- (`skill-list` / `skill-get` / `skill-file-get`) so it works on any project with- no repo access. Sweeps skills whose `updated_at` / `version` advanced past its- cursor every run, plus a ~weekly gated deep pass over the store's most-used /- highest-leverage tier (usage events when the project has them, else version- churn and cross-references), checking a cached, ~weekly-refreshed checklist of- statically-verifiable authoring rules: description quality, body size /- progressive disclosure, single responsibility, bundled-file link hygiene, no- committed secrets, near-duplicate skills. On the **report channel**- (`emit_report` / `edit_report`): files one report per non-compliant skill with- the copy-ready `skill-update` fix inside, P3 (P2 when the skill is effectively- broken for consumers or leaks a credential), editing the live report while the- skill stays broken.- Its discriminator is a statically-verifiable rule violation in a skill that is- fresh or load-bearing — the unchanged long tail, subjective style nits, and- canonical seeded scout rows (`category: "scout"`) are noise. Treats skill- bodies as untrusted data under test, never instructions.-- `signals-scout-customer-analytics/` — account-health watcher for the Customer- analytics (Accounts) product, where each `system.accounts` row is a customer- organization keyed to its analytics by `external_id` (the group key). Curates a- watchlist of commercially-staked accounts (assigned CSM / AE / owner, or a CRM- link) and scores each account's product engagement — weekly volume / WAU /- key-feature usage — against its own trailing baseline, watching for churn-risk- shapes (an engagement cliff, dormancy onset, single-threaded champion departure)- and the positive inverse (an expansion signal worth an upsell). Its discriminator- is a per-account engagement regression while the fleet holds, weighted by- commercial ownership: one staked account sliding is signal, the whole fleet moving- together is a capture/aggregate problem for another scout. The linchpin is the- account→group join — it verifies that `external_id` actually matches a live group- key before trusting any per-account number (a seeded/CRM-sourced roster that- doesn't join is a config gap, not a finding). Fills the seam neither commercial- neighbor covers — `product-analytics` scores aggregate user-grain flows and- `revenue-analytics` watches the lagging revenue/MRR signal; neither scores an- individual account's engagement trajectory. Acquisition is the web-analytics- scout's territory.-- `signals-scout-mcp-tool-calls/` — tool-quality watcher for PostHog MCP usage. Reads- `$mcp_tool_call` telemetry for tools that need improvement: high, broad-reach failure- rates, per-session retry/hammering that betrays a confusing schema, slow or- context-bloating responses, and undiagnosable failures (an instrumentation gap). Its- discriminator is rate/struggle weighted by volume and reach, concentrated in a- consistent shape — not raw counts. Coverage-aware: it first probes which enrichment- fields the project captures (they split by regime — PostHog's own hono server vs- external SDK servers) and picks lenses to match, resting detection only on always-present- fields (error flag, duration, tool name, session). On the **report channel**- (`emit_report` / `edit_report`): files one report per problem category- (`$mcp_tool_category`, the owning product team) listing that category's problem tools- each with a fix hypothesis, editing the live category report while the category still- has problem tools; falls back to one report per tool where category coverage is absent- (external-SDK regime); bundles `references/queries.md`, a HogQL cookbook validated- against real telemetry.-- `signals-scout-tasks/` — delivery + demand watcher for the Tasks product (the agent- work items a project runs), read from the `system.tasks` / `system.task_runs` system- tables. Two lenses in one body: **delivery health** every run (runs failing, clustered- by repository and by `error_message` prefix) and a ~weekly gated **demand** pass over- human-authored tasks (recurring asks that point at a product gap). Its discriminator is- failure concentration × spread — a cluster's failure rate over meaningful volume, with- runs ÷ distinct tasks separating a _systemic_ defect in a shared path (ratio ≈ 1 across- many tasks) from a _retry storm_ (ratio ≫ 1 over one or two stuck tasks), which is the- single biggest false positive on this surface. Two exclusions are load-bearing: it always- drops `origin_product = 'signals_scout'` (the fleet's own run containers, which the- `internal` flag does _not_ filter and which can outnumber every real origin), and the- demand lens reads human origins only, so the inbox's own throughput can never register as- user demand. On the **report channel** (`emit_report` / `edit_report`): one report per- cluster (a repository or a failure class), with the demand lens held to a higher bar —- its default outcome is compounding scratchpad memory, and it files only once a theme- crosses into something actionable. Bundles `references/queries.md`, a cookbook validated- against real task data (it also records that `stage` is unpopulated, so no lens rests on- it). Task text is treated as untrusted prompt material, never instructions.-- `signals-scout-conversations/` — support-delivery health watcher for the- Conversations (support inbox) product. Reads the `$conversation_*` ticket-lifecycle- events for operational regressions: SLA breach-rate steps on team replies- (`sla_active` / `sla_breached`), first-response latency blowouts (ticket-created →- first team reply), backlog inflow-vs-resolution imbalance, and channel / assignment /- priority concentration. Its discriminator is a _rate against a volume-stable- denominator, per operational dimension, stepping away from its own trailing baseline- while ticket volume holds_ — a breach share / response latency / inflow-minus-resolution- delta moving on steady volume is signal, a raw count that tracks inbound volume is- baseline — always gated by a minimum-volume guard. On the **report channel**- (`emit_report` / `edit_report`): files each dated, dimension-named regression as a 1:1- inbox report, editing the live report while the regression persists. It is the- operational complement to the per-ticket emission path: the emission pipeline- (`source_product="conversations"`) already reads each ticket thread and fires a- per-ticket _product-feedback_ signal (bugs / feature requests / usability), so this- scout never re-surfaces individual ticket content — it owns the aggregate throughput /- SLA / backlog / routing shape the one-ticket-at-a-time emitter can't see, and (reading- analytics events) it works whether or not that emission source is enabled.+ Watches reports that recently transitioned to `resolved` (implementation PR merged), waits out a deployment soak window, then re-probes the entities the report's underlying signals named (pre-fix baselines captured at enqueue time) to check the fix actually held — plus a strictly-gated escalation check on recently dismissed reports. Its discriminator is resolution-vs-reality — the resolved status's promise against the post-deploy data stream. Emits only failed validations; confirmations are scratchpad memory. It never detects new problems — that's the rest of the fleet's territory.+- `signals-scout-product-analytics/` — behavioral-regression watcher for the core product-analytics primitives (funnels, retention, lifecycle, stickiness, paths).+ Curates a watchlist of the team's saved funnel / retention / lifecycle insights (and at most one inferred activation flow where none is saved) and re-scores each flow's _derived rate_ — step-to-step conversion %, cohort return %, lifecycle composition — against its own trailing, seasonality-matched baseline. Its discriminator is a rate regression with a steady denominator: a conversion/retention drop while entrants hold is a real product regression; a drop where entrants also collapsed is a capture/volume problem and belongs elsewhere. Fills the seam neither neighbor covers — `anomaly-detection` scores raw time-series insights the team views (its `alert-simulate` path targets time-series, not funnels), and `observability-gaps` only _recommends building_ a funnel; once a flow exists, this scout owns its behavioral health. Acquisition/attribution is the web-analytics scout's territory and experiment validity is the experiments scout's.+- `signals-scout-skills-store/` — skill-hygiene watcher for the team's PostHog skills store (`LLMSkill` rows), read entirely via the MCP skill tools (`skill-list` / `skill-get` / `skill-file-get`) so it works on any project with no repo access. Sweeps skills whose `updated_at` / `version` advanced past its cursor every run, plus a ~weekly gated deep pass over the store's most-used / highest-leverage tier (usage events when the project has them, else version churn and cross-references), checking a cached, ~weekly-refreshed checklist of statically-verifiable authoring rules: description quality, body size / progressive disclosure, single responsibility, bundled-file link hygiene, no committed secrets, near-duplicate skills. On the **report channel** (`emit_report` / `edit_report`): files one report per non-compliant skill with the copy-ready `skill-update` fix inside, P3 (P2 when the skill is effectively broken for consumers or leaks a credential), editing the live report while the skill stays broken.+ Its discriminator is a statically-verifiable rule violation in a skill that is fresh or load-bearing — the unchanged long tail, subjective style nits, and canonical seeded scout rows (`category: "scout"`) are noise. Treats skill bodies as untrusted data under test, never instructions.+- `signals-scout-customer-analytics/` — account-health watcher for the Customer analytics (Accounts) product, where each `system.accounts` row is a customer organization keyed to its analytics by `external_id` (the group key). Curates a watchlist of commercially-staked accounts (assigned CSM / AE / owner, or a CRM link) and scores each account's product engagement — weekly volume / WAU / key-feature usage — against its own trailing baseline, watching for churn-risk shapes (an engagement cliff, dormancy onset, single-threaded champion departure) and the positive inverse (an expansion signal worth an upsell). Its discriminator is a per-account engagement regression while the fleet holds, weighted by commercial ownership: one staked account sliding is signal, the whole fleet moving together is a capture/aggregate problem for another scout. The linchpin is the account→group join — it verifies that `external_id` actually matches a live group key before trusting any per-account number (a seeded/CRM-sourced roster that doesn't join is a config gap, not a finding). Fills the seam neither commercial neighbor covers — `product-analytics` scores aggregate user-grain flows and `revenue-analytics` watches the lagging revenue/MRR signal; neither scores an individual account's engagement trajectory. Acquisition is the web-analytics scout's territory.+- `signals-scout-mcp-tool-calls/` — tool-quality watcher for PostHog MCP usage. Reads `$mcp_tool_call` telemetry for tools that need improvement: high, broad-reach failure rates, per-session retry/hammering that betrays a confusing schema, slow or context-bloating responses, and undiagnosable failures (an instrumentation gap). Its discriminator is rate/struggle weighted by volume and reach, concentrated in a consistent shape — not raw counts. Coverage-aware: it first probes which enrichment fields the project captures (they split by regime — PostHog's own hono server vs external SDK servers) and picks lenses to match, resting detection only on always-present fields (error flag, duration, tool name, session). On the **report channel** (`emit_report` / `edit_report`): files one report per problem category (`$mcp_tool_category`, the owning product team) listing that category's problem tools each with a fix hypothesis, editing the live category report while the category still has problem tools; falls back to one report per tool where category coverage is absent (external-SDK regime); bundles `references/queries.md`, a HogQL cookbook validated against real telemetry.+- `signals-scout-tasks/` — delivery + demand watcher for the Tasks product (the agent work items a project runs), read from the `system.tasks` / `system.task_runs` system tables. Two lenses in one body: **delivery health** every run (runs failing, clustered by repository and by `error_message` prefix) and a ~weekly gated **demand** pass over human-authored tasks (recurring asks that point at a product gap). Its discriminator is failure concentration × spread — a cluster's failure rate over meaningful volume, with runs ÷ distinct tasks separating a _systemic_ defect in a shared path (ratio ≈ 1 across many tasks) from a _retry storm_ (ratio ≫ 1 over one or two stuck tasks), which is the single biggest false positive on this surface. Two exclusions are load-bearing: it always drops `origin_product = 'signals_scout'` (the fleet's own run containers, which the `internal` flag does _not_ filter and which can outnumber every real origin), and the demand lens reads human origins only, so the inbox's own throughput can never register as user demand. On the **report channel** (`emit_report` / `edit_report`): one report per cluster (a repository or a failure class), with the demand lens held to a higher bar — its default outcome is compounding scratchpad memory, and it files only once a theme crosses into something actionable. Bundles `references/queries.md`, a cookbook validated against real task data (it also records that `stage` is unpopulated, so no lens rests on it). Task text is treated as untrusted prompt material, never instructions.+- `signals-scout-conversations/` — support-delivery health watcher for the Conversations (support inbox) product. Reads the `$conversation_*` ticket-lifecycle events for operational regressions: SLA breach-rate steps on team replies (`sla_active` / `sla_breached`), first-response latency blowouts (ticket-created → first team reply), backlog inflow-vs-resolution imbalance, and channel / assignment / priority concentration. Its discriminator is a _rate against a volume-stable denominator, per operational dimension, stepping away from its own trailing baseline while ticket volume holds_ — a breach share / response latency / inflow-minus-resolution delta moving on steady volume is signal, a raw count that tracks inbound volume is baseline — always gated by a minimum-volume guard. On the **report channel** (`emit_report` / `edit_report`): files each dated, dimension-named regression as a 1:1 inbox report, editing the live report while the regression persists. It is the operational complement to the per-ticket emission path: the emission pipeline (`source_product="conversations"`) already reads each ticket thread and fires a per-ticket _product-feedback_ signal (bugs / feature requests / usability), so this scout never re-surfaces individual ticket content — it owns the aggregate throughput / SLA / backlog / routing shape the one-ticket-at-a-time emitter can't see, and (reading analytics events) it works whether or not that emission source is enabled.### How the coordinator decides what runs-There is no sampling. Each scout has its own `SignalScoutConfig` row (one per-`(team, skill_name)`) carrying a `run_interval_minutes` schedule (default 1440 =-every 24 hours) and a `last_run_at` stamp. Every tick the coordinator:+There is no sampling. Each scout has its own `SignalScoutConfig` row (one per `(team, skill_name)`) carrying a `run_interval_minutes` schedule (default 1440 = every 24 hours) and a `last_run_at` stamp. Every tick the coordinator:-1. Bounds candidates to the teams enrolled via the `signals-scout` feature flag's- JSON payload allowlist (`guaranteed_team_ids` minus `skip_team_ids`,- `_participating_teams` → `_enrolled_team_ids`). Editing the payload in the flag UI- enrolls or drains a team next tick — no manual seed.-2. Auto-registers a config for any `signals-scout-*` skill missing one- (`scout_harness/config_registry.register_missing_configs`) — on an enrolled team,- authoring a skill is enough to get a scout. For custom scouts, `scout-create-prepare`- validates and signs the skill and config, then `scout-create-execute` creates them- after the user confirms; `scout-config-create` remains the lower-level way to register- a config for an existing skill.-3. 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 at- `MAX_RUNS_PER_TICK` per tick. Each due scout becomes one `RunSignalsScoutWorkflow`- child run; `last_run_at` is advanced for everything dispatched.+1. Bounds candidates to the teams enrolled via the `signals-scout` feature flag's JSON payload allowlist (`guaranteed_team_ids` minus `skip_team_ids`, `_participating_teams` → `_enrolled_team_ids`). Editing the payload in the flag UI enrolls or drains a team next tick — no manual seed.+2. Auto-registers a config for any `signals-scout-*` skill missing one (`scout_harness/config_registry.register_missing_configs`) — on an enrolled team, authoring a skill is enough to get a scout. For custom scouts, `scout-create-prepare` validates and signs the skill and config, then `scout-create-execute` creates them after the user confirms; `scout-config-create` remains the lower-level way to register a config for an existing skill.+3. 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 at `MAX_RUNS_PER_TICK` per tick. Each due scout becomes one `RunSignalsScoutWorkflow` child run; `last_run_at` is advanced for everything dispatched.-Pausing a scout is `enabled=False` on its config; slowing it is a larger-`run_interval_minutes`. Both are tunable via the `scout-config-update` MCP-tool, and settable for a new custom scout via the nested `config` object on-`scout-create-prepare`. See-`scout_coordinator._collect_planned_runs` for the exact due-check.+Pausing a scout is `enabled=False` on its config; slowing it is a larger `run_interval_minutes`. Both are tunable via the `scout-config-update` MCP tool, and settable for a new custom scout via the nested `config` object on `scout-create-prepare`. See `scout_coordinator._collect_planned_runs` for the exact due-check.### Authoring a new scoutCreating a new `signals-scout-foo/SKILL.md` directory and merging it is enough.-The next coordinator tick (or an explicit `sync_signals_scout_skills --all-enabled` run)-will:+The next coordinator tick (or an explicit `sync_signals_scout_skills --all-enabled` run) will:- discover it via `lazy_seed.discover_canonical_skills()`,- create matching `LLMSkill` rows on each agent-enabled team,-- auto-register an enabled `SignalScoutConfig` on the default every-24-hours schedule- for it so the next due tick dispatches it.+- auto-register an enabled `SignalScoutConfig` on the default every-24-hours schedule for it so the next due tick dispatches it.-No coordinator-side code change is needed. Use `signals-scout-general` as the-template if your scout is broad; pick a specialist as the template if it is-domain-tight.+No coordinator-side code change is needed. Use `signals-scout-general` as the template if your scout is broad; pick a specialist as the template if it is domain-tight.### What lives inside a scout SKILL.md-Each scout's body is an instruction set the harness loads verbatim into the system-prompt. References (siblings of `SKILL.md`) are progressively disclosed via-`Skill.read_file()` from inside the run. Keep the body lean — every line is a-recurring token cost on every run — and push detail into references that are only-read when needed. Do not hard-wrap scout `SKILL.md` prose at a column width — use-semantic line breaks (sentence per line); the body is a prompt, not display text,-and column wrapping only adds diff noise.+Each scout's body is an instruction set the harness loads verbatim into the system prompt. References (siblings of `SKILL.md`) are progressively disclosed via `Skill.read_file()` from inside the run. Keep the body lean — every line is a recurring token cost on every run — and push detail into references that are only read when needed. Do not hard-wrap scout `SKILL.md` prose at a column width — use semantic line breaks (sentence per line); the body is a prompt, not display text, and column wrapping only adds diff noise.-The generalist (`signals-scout-general`) is **report-only** — it authors `SignalReport`s-directly and does not `emit_signal`. The **report-channel contract** (when to author a fresh-report vs. edit an existing one, the field schema, the safety × actionability status mapping,-reviewer routing via `scout-members-list`, and the non-idempotency + pipeline-rewrite-caveats) lives in the **harness prompt** (`scout_harness/prompt.py`), which forks on the scout's-channel and injects it into every report-channel scout — so it is **not** duplicated as a-per-scout reference. The generalist keeps one bundled reference:+The generalist (`signals-scout-general`) is **report-only** — it authors `SignalReport`s directly and does not `emit_signal`. The **report-channel contract** (when to author a fresh report vs. edit an existing one, the field schema, the safety × actionability status mapping, reviewer routing via `scout-members-list`, and the non-idempotency + pipeline-rewrite caveats) lives in the **harness prompt** (`scout_harness/prompt.py`), which forks on the scout's channel and injects it into every report-channel scout — so it is **not** duplicated as a per-scout reference. The generalist keeps one bundled reference:-- **`references/conventions.md`** — the four-states author/edit classifier, scratchpad- key-prefix vocabulary, and cross-project noise patterns.+- **`references/conventions.md`** — the four-states author/edit classifier, scratchpad key-prefix vocabulary, and cross-project noise patterns.-The entire canonical fleet is on the **report channel** (ported one scout per PR,-biggest reach first — see the `scouts-emit-reports` spec). A report-channel scout is-report-only — its frontmatter `allowed_tools` lists `emit_report` / `edit_report` — and it-carries only its _domain-specific_ report framing **inline in its body** (what's-report-shaped for its surface, its `reviewer:<domain>` / `report:<domain>` scratchpad-keys, a tailored title example); the channel contract comes from the prompt, so a ported scout-bundles **no** `report.md`. The exception is `signals-scout-anomaly-detection`, which keeps a-slimmed `references/report-contract.md` for its genuinely scout-specific **notebook write-up +-embedded-chart recipe** (it defers the generic contract to the prompt). The legacy signal-channel (weak `emit_signal` findings for the pipeline to cluster) still exists in the-harness for custom scouts that never opted in via `allowed_tools`, but it is deprecated:-no canonical scout uses it, and the user-facing skills (`authoring-scouts`,-`exploring-scouts`) no longer teach it — new scouts always list the report tools.+The entire canonical fleet is on the **report channel** (ported one scout per PR, biggest reach first — see the `scouts-emit-reports` spec). A report-channel scout is report-only — its frontmatter `allowed_tools` lists `emit_report` / `edit_report` — and it carries only its _domain-specific_ report framing **inline in its body** (what's report-shaped for its surface, its `reviewer:<domain>` / `report:<domain>` scratchpad keys, a tailored title example); the channel contract comes from the prompt, so a ported scout bundles **no** `report.md`. The exception is `signals-scout-anomaly-detection`, which keeps a slimmed `references/report-contract.md` for its genuinely scout-specific **notebook write-up + embedded-chart recipe** (it defers the generic contract to the prompt). The legacy signal channel (weak `emit_signal` findings for the pipeline to cluster) still exists in the harness for custom scouts that never opted in via `allowed_tools`, but it is deprecated:+no canonical scout uses it, and the user-facing skills (`authoring-scouts`, `exploring-scouts`) no longer teach it — new scouts always list the report tools.The specialists each carry their own domain discriminator + investigation patterns.-Most are a single self-contained `SKILL.md`; a few bundle surface-specific references-read on demand — `signals-scout-anomaly-detection` (`anomaly-methods.md`,-`watchlist-and-memory.md`, `report-contract.md`), `signals-scout-ai-observability`-(`lenses.md`), and `signals-scout-surveys` (`response-querying.md`). Treat the-generalist as the reference shape. Note that a scout can only read its own bundled-files at runtime (each team's `LLMSkill` row carries just that skill's files) — which is-why a scout that needs the dedupe/memory conventions in depth bundles its own copy-rather than pointing at the generalist's. The report-channel contract is the exception to-that copy-it-locally rule: it rides in the harness prompt, not a file, so report scouts-share one definition without each bundling a copy.+Most are a single self-contained `SKILL.md`; a few bundle surface-specific references read on demand — `signals-scout-anomaly-detection` (`anomaly-methods.md`, `watchlist-and-memory.md`, `report-contract.md`), `signals-scout-ai-observability` (`lenses.md`), and `signals-scout-surveys` (`response-querying.md`). Treat the generalist as the reference shape. Note that a scout can only read its own bundled files at runtime (each team's `LLMSkill` row carries just that skill's files) — which is why a scout that needs the dedupe/memory conventions in depth bundles its own copy rather than pointing at the generalist's. The report-channel contract is the exception to that copy-it-locally rule: it rides in the harness prompt, not a file, so report scouts share one definition without each bundling a copy.## When editing skills in this directory-- **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.-- **If you change the scout fleet shape (add a new specialist, rename, or change- the SKILL.md schema), update this file.**+- **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.+- **If you change the scout fleet shape (add a new specialist, rename, or change the SKILL.md schema), update this file.**## Reference