:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(signals): record scout notes left from a report on its activity log (#124508)
Dylan Martind550b828be20
diff --git a/products/signals/backend/artefact_schemas.py b/products/signals/backend/artefact_schemas.pyindex 10efbd44c421..b1690c358149 100644--- a/products/signals/backend/artefact_schemas.py+++ b/products/signals/backend/artefact_schemas.py@@ -836,6 +836,20 @@ class CheckAuthoringStatus(BaseModel):reason: str = Field(min_length=1)+class ScoutNoteLeft(BaseModel):+ """Content schema for a `scout_note_left` artefact: a person left a scout note from this report.++ Appended by the notes API in the same transaction as the note, so the report keeps a record of+ the steering after the note itself is retired. Never written through the generic artefact API.+ """++ note: str = Field(description="The note text as its author wrote it, without the report reference.")+ skill_name: str = Field(+ default="", description="The scout the note was addressed to, or blank for every scout on the project."+ )+ scout_note_id: str = Field(description="The id of the scout note this entry records.")++class TitleChange(BaseModel):"""Content schema for a `title_change` artefact: a record of an edit to the report's title.@@ -1324,6 +1338,7 @@ LogArtefactContent = (| Commit| TaskRunArtefact| NoteArtefact+ | ScoutNoteLeft| TitleChange| SummaryChange| CodeReview@@ -1364,6 +1379,7 @@ ARTEFACT_CONTENT_SCHEMAS: Mapping[str, type[BaseModel]] = {"task_run": TaskRunArtefact,"note": NoteArtefact,"check_authoring": CheckAuthoringStatus,+ "scout_note_left": ScoutNoteLeft,"title_change": TitleChange,"summary_change": SummaryChange,"code_review": CodeReview,@@ -1417,6 +1433,7 @@ NON_WRITABLE_ARTEFACT_TYPES: frozenset[str] = frozenset("video_segment","title_change","summary_change",+ "scout_note_left","code_review","work_claim","work_release",diff --git a/products/signals/backend/migrations/0234_signalscoutnote_report_note_origin.py b/products/signals/backend/migrations/0234_signalscoutnote_report_note_origin.pynew file mode 100644index 000000000000..18f50ab2013c--- /dev/null+++ b/products/signals/backend/migrations/0234_signalscoutnote_report_note_origin.py@@ -0,0 +1,25 @@+from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [("signals", "0233_personalinboxranking_input_parts")]++ operations = [+ migrations.AlterField(+ model_name="signalscoutnote",+ name="origin",+ field=models.CharField(+ choices=[+ ("human", "Left directly"),+ ("report_dismissal", "Derived from inbox dismissal feedback"),+ ("report_discussion", "Derived from inbox discussion feedback"),+ ("report_feedback", "Derived from inbox report feedback"),+ ("report_reviewer_correction", "Derived from an inbox reviewer correction"),+ ("report_note", "Left from an inbox report"),+ ],+ db_default="human",+ default="human",+ max_length=32,+ ),+ ),+ ]diff --git a/products/signals/backend/migrations/max_migration.txt b/products/signals/backend/migrations/max_migration.txtindex ae6c210e7273..f80586e780c0 100644--- a/products/signals/backend/migrations/max_migration.txt+++ b/products/signals/backend/migrations/max_migration.txt@@ -1 +1 @@-0233_personalinboxranking_input_parts+0234_signalscoutnote_report_note_origindiff --git a/products/signals/backend/models.py b/products/signals/backend/models.pyindex 008cfdda89a2..b0f1ce6a5869 100644--- a/products/signals/backend/models.py+++ b/products/signals/backend/models.py@@ -1492,6 +1492,7 @@ class SignalReportArtefact(UUIDModel):COMMIT = "commit"TASK_RUN = "task_run"NOTE = "note"+ SCOUT_NOTE_LEFT = "scout_note_left"TITLE_CHANGE = "title_change"SUMMARY_CHANGE = "summary_change"CODE_REVIEW = "code_review"@@ -1565,6 +1566,7 @@ class SignalReportArtefact(UUIDModel):ArtefactType.COMMIT,ArtefactType.TASK_RUN,ArtefactType.NOTE,+ ArtefactType.SCOUT_NOTE_LEFT,ArtefactType.TITLE_CHANGE,ArtefactType.SUMMARY_CHANGE,ArtefactType.CODE_REVIEW,@@ -3857,6 +3859,7 @@ class SignalScoutNote(TeamScopedRootMixin, UUIDModel):REPORT_DISCUSSION = "report_discussion", "Derived from inbox discussion feedback"REPORT_FEEDBACK = "report_feedback", "Derived from inbox report feedback"REPORT_REVIEWER_CORRECTION = "report_reviewer_correction", "Derived from an inbox reviewer correction"+ REPORT_NOTE = "report_note", "Left from an inbox report"@classmethoddef derived_origins(cls) -> tuple[str, ...]:diff --git a/products/signals/backend/report_access.py b/products/signals/backend/report_access.pyindex ac84d3b74e37..c47c048d04df 100644--- a/products/signals/backend/report_access.py+++ b/products/signals/backend/report_access.py@@ -5,3 +5,7 @@ from products.access_control.backend.facade.user_access_control import UserAccesdef may_read_reports(*, user: User, team: Team) -> bool:return UserAccessControl(user=user, team=team).check_access_level_for_resource("task", "viewer")+++def may_write_reports(*, user: User, team: Team) -> bool:+ return UserAccessControl(user=user, team=team).check_access_level_for_resource("task", "editor")diff --git a/products/signals/backend/report_scout_notes.py b/products/signals/backend/report_scout_notes.pynew file mode 100644index 000000000000..2094a57f18ef--- /dev/null+++ b/products/signals/backend/report_scout_notes.py@@ -0,0 +1,69 @@+"""Scout notes a person leaves from an inbox report.++A note left from a report names the report by id, so a scout can fetch the report and the report+finds its notes again through the notes list's `text` filter. The title stays out of the content+because direct notes are listed to callers who may not read reports.++The row carries the `report_note` origin rather than `HUMAN`, because it quotes a report id the way+the four forwarded origins quote report content: the notes list withholds every derived origin from+a caller that fails the reports read gate, so the id reaches nobody who could not read the report.++The same transaction appends a `scout_note_left` artefact to the report. The note steers future runs+and can be retired; the artefact is the report's record that someone steered the scouts from it, and+it stays after the note is gone.+"""++from __future__ import annotations++from datetime import datetime++from django.db import transaction++from products.signals.backend.artefact_attribution import ArtefactAttribution+from products.signals.backend.artefact_schemas import ScoutNoteLeft+from products.signals.backend.models import SignalReport, SignalReportArtefact, SignalScoutNote+from products.signals.backend.scout_harness.tools.notes import MAX_NOTE_CONTENT_LENGTH, ScoutNote, leave_note+++def report_note_content(report_id: str, text: str) -> str:+ # The inbox strips this exact prefix when it lists a report's notes; keep the two in step.+ return f"Note on inbox report `{report_id}`:\n\n{text}"+++# The stored note carries the report reference, so the text a caller may send is the note cap less+# that reference. The request serializer rejects a longer one, so a body the schema accepts never+# fails the deeper cap instead.+MAX_REPORT_NOTE_TEXT_LENGTH = MAX_NOTE_CONTENT_LENGTH - len(report_note_content("0" * 36, ""))+++def leave_report_note(+ *,+ team_id: int,+ report: SignalReport,+ text: str,+ skill_name: str,+ created_by_id: int | None,+ expires_at: datetime | None,+ attribution: ArtefactAttribution,+) -> ScoutNote:+ """Leave a scout note about `report` and record it on the report's activity log.++ `team_id` is the canonical team the scouts read notes from. The caller has already checked+ that the report belongs to it and that the caller may write to reports and steer scouts.+ """+ with transaction.atomic():+ note = leave_note(+ team_id=team_id,+ content=report_note_content(str(report.id), text),+ skill_name=skill_name,+ created_by_id=created_by_id,+ expires_at=expires_at,+ origin=SignalScoutNote.Origin.REPORT_NOTE,+ )+ SignalReportArtefact.add_log(+ team_id=report.team_id,+ report_id=str(report.id),+ content=ScoutNoteLeft(note=text, skill_name=skill_name, scout_note_id=str(note.id)),+ attribution=attribution,+ )+ return notediff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.mdindex 7786cbfd42d8..e7d49d5bcea2 100644--- a/products/signals/backend/scout_harness/AGENTS.md+++ b/products/signals/backend/scout_harness/AGENTS.md@@ -83,7 +83,7 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e`run_id` on a `remember` write is best-effort lineage, never a gate: the serializer coerces one it can't parse to `None` (`_BestEffortUUIDField`, the same stance `expires_at` takes) and the view drops one that names no run on this project, because a scout retypes the id out of its run prompt and a truncated copy must not cost the memory. When nothing usable comes off the body the view falls back to `tools/runs.run_id_for_sandbox_task`, which resolves the writing run from the task the caller's sandbox token is bound to — provenance the sandbox cannot choose, so lineage survives the typo. Non-sandbox callers and the pipeline stages resolve to no run and are unaffected. A best-effort field must also present as a plain string in the OpenAPI schema — `_BestEffortDateTimeField` carries `@extend_schema_field(OpenApiTypes.STR)`, and codegen strips the `uuid` format for `_BestEffortUUIDField`. A `format` keyword makes the generated MCP client refuse the value before the request leaves the caller, so the tolerance never runs and the write is lost anyway.The scratchpad is shared with the report pipeline, not scout-only. `remember` / `forget` are gated on their own `signal_scratchpad_internal:write` scope rather than the wider `signal_scout_internal:write`, so the pipeline's research and implementation runs can persist what they judged without also getting `emit_signal` and `record_output`. Scouts keep both tools, because `SCOUT_INTERNAL_SCOPES` carries the scratchpad scope too; the pipeline's own postures are the `signals_research` / `signals_implementation` presets in `posthog/temporal/oauth.py`. `signals_research` withholds `task:write`: it turns the MCP read-only header off so its scratchpad tools survive, and that header was the only thing keeping the task-write toolset (report state included) away from a stage meant to read.Those stages have no `SignalScoutRun`, so `created_by_run` cannot name them. They stamp `SignalScratchpad.created_by_identity` instead — a `pipeline:*` string from `../pipeline_identity.py`, resolved server-side from the token's bound task (its `ai_stage`, written once at run creation) rather than passed in, since a writer that could name itself could name a scout's skill. `_to_entry` reads it as `created_by_skill` when there is no run, so `scout-scratchpad-search` attributes every entry the same way. Like `created_by_run` it is written on create only, so an upsert keeps the original author.- - `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. A third audience is a stage of the report pipeline, addressed through the reserved `pipeline:*` family (`PIPELINE_AUDIENCES`, holding `pipeline:report-research` today): a pseudo-target riding the same `skill_name` column, allowlisted at write time so an unrecognized one is rejected instead of silently steering no one, and skipping the scout-skill lookup because a stage has no `LLMSkill` row. `list_notes` matches `skill_name` exactly, so no scout ever sees a pipeline note; the research loader in `../report_steering.py` pastes the `pipeline:report-research` notes and tells the run to search the rest with `text`. `validate_note_target`, the shared write-time rule, and the audience constants live in `../note_targets.py`, an import-light module, because the Django admin form calls the rule at registry load and importing anything under `tools/` runs that package's `__init__`, which pulls in every harness tool. 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. Four more writers derive rows from inbox activity. `../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. `../discussion_notes.py`: opening a discussion on a report (the inbox "Discuss" action, which kicks off a Q&A task) also leaves the user's question here as an `origin=report_discussion` note, targeted at the authoring scout — framed as context to weigh or ignore, not a verdict, so the scout can fold a durable preference/correction into its scratchpad or dismiss it as noise. `../feedback_notes.py`: the thumbs rating at the end of a report body ("Was this report useful?") carries its optional note here as an `origin=report_feedback` note, targeted at the authoring scout. Unlike a dismissal it never falls back to a fleet-wide note — feedback is a verdict on one scout's own report, so with no resolvable authoring scout nothing is forwarded and the call is a no-op — and it never changes the report's state; the analytics event the client fires stays the durable record of the rating. `../reviewer_correction_notes.py`: a user-attributed reviewer edit that changes the set (adding or removing a suggested reviewer) also leaves an `origin=report_reviewer_correction` note, and it is the only derived origin addressed to more than one scout — every live scout that emitted or edited the report (`resolve_touching_scout_skills`, since an editing scout may be the one that put the reviewers there) plus every scout whose `reviewer:` memory names a removed GitHub login or PostHog user UUID (`_memory_holders`, one exact-term search under the `reviewer:` key prefix), ordered emitting scout first and capped at `MAX_NOTE_TARGETS`, so a scout still routing on a stale login hears about the correction. A report no live scout touched falls back to the fleet-wide blank dismissals use, but only when no holder resolved, since a run reads the fleet-wide notes alongside its own and a holder would hear the same edit twice. An impersonated edit forwards nothing, matching the reviewer-corrections project profile, which excludes impersonated activity rows for the same reason. GitHub logins and user UUIDs are shape-checked before rendering and capped per edit (`MAX_CORRECTION_REVIEWERS`), because both write paths into the reviewers artefact accept any string of any length and the value lands in a backtick span every scout reads. Repeat delivery coalesces only for the same report, target, and latest action inside `SUPPRESSION_WINDOW`. Corrections on other reports and reversals remain separate evidence. Scouts search related notes without a `skill_name` filter before selection, so feedback can cross producers. Self-removal alone does not establish a standing exclusion. Like a dismissal it may fall back fleet-wide, and unlike discuss/feedback it does not demand the `signal_scout:write` / `llm_skill:write` key scopes, because the logins already reach scouts through the report's reviewers artefact and the project profile. All four paths re-check the same steering gate (token `scoped_teams`, canonical-project access, and the `llm_skill` editor bar) since the dismiss, discuss, feedback, and reviewer-edit actions need only `inbox:write`, and all forward only on the canonical team. The discuss and feedback paths additionally demand the `signal_scout:write` / `llm_skill:write` key scopes: a dismissal's text reaches runs anyway through the reports API, whereas the note is the only path a discussion question or feedback note takes to a scout, so an `inbox:write` credential must not open it alone. The discuss path is triggered from the tasks viewset (which holds the request the gate reads) through `facade/api.py:forward_report_discussion_note`, never from the tasks facade. On the read side, every derived origin quotes report content (report id, title, the note text), so `SignalScoutNoteViewSet.list` withholds them from any caller failing the reports read gate (`_may_read_reports`); both that gate and `../report_steering.py` read the list off `SignalScoutNote.derived_origins()` rather than naming the kinds, so a newly added origin is withheld from the moment it exists. The derived rows are context with a TTL; the `dismissal` artefact / discussion task / feedback analytics event / reviewer `suggested_reviewers` artefact + `suggested_reviewers_changed` activity-log row stays the record of truth. Notes reach two surfaces outside the fleet, both through `../report_steering.py`. `load_report_steering` puts no note text into the description of the self-driving implementation task; it renders a short nudge that tells the run to pull notes (`scout-notes-list`) and fleet memory (`scout-scratchpad-search`) itself, because the report author already read the notes and most of them do not apply to a code change. `load_research_steering` pastes only the `pipeline:report-research` audience into the report-research prompt and nudges the run to search every other origin by entity (`list_notes` `text`), because the derived ones are feedback on exactly the judgment that stage is about to make; that run is read-only, already holds the report's raw signals, and writes back only to the report on the same team.+ - `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. A third audience is a stage of the report pipeline, addressed through the reserved `pipeline:*` family (`PIPELINE_AUDIENCES`, holding `pipeline:report-research` today): a pseudo-target riding the same `skill_name` column, allowlisted at write time so an unrecognized one is rejected instead of silently steering no one, and skipping the scout-skill lookup because a stage has no `LLMSkill` row. `list_notes` matches `skill_name` exactly, so no scout ever sees a pipeline note; the research loader in `../report_steering.py` pastes the `pipeline:report-research` notes and tells the run to search the rest with `text`. `validate_note_target`, the shared write-time rule, and the audience constants live in `../note_targets.py`, an import-light module, because the Django admin form calls the rule at registry load and importing anything under `tools/` runs that package's `__init__`, which pulls in every harness tool. 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. Five more writers derive rows from inbox activity. `../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. `../discussion_notes.py`: opening a discussion on a report (the inbox "Discuss" action, which kicks off a Q&A task) also leaves the user's question here as an `origin=report_discussion` note, targeted at the authoring scout — framed as context to weigh or ignore, not a verdict, so the scout can fold a durable preference/correction into its scratchpad or dismiss it as noise. `../feedback_notes.py`: the thumbs rating at the end of a report body ("Was this report useful?") carries its optional note here as an `origin=report_feedback` note, targeted at the authoring scout. Unlike a dismissal it never falls back to a fleet-wide note — feedback is a verdict on one scout's own report, so with no resolvable authoring scout nothing is forwarded and the call is a no-op — and it never changes the report's state; the analytics event the client fires stays the durable record of the rating. `../reviewer_correction_notes.py`: a user-attributed reviewer edit that changes the set (adding or removing a suggested reviewer) also leaves an `origin=report_reviewer_correction` note, and it is the only derived origin addressed to more than one scout — every live scout that emitted or edited the report (`resolve_touching_scout_skills`, since an editing scout may be the one that put the reviewers there) plus every scout whose `reviewer:` memory names a removed GitHub login or PostHog user UUID (`_memory_holders`, one exact-term search under the `reviewer:` key prefix), ordered emitting scout first and capped at `MAX_NOTE_TARGETS`, so a scout still routing on a stale login hears about the correction. A report no live scout touched falls back to the fleet-wide blank dismissals use, but only when no holder resolved, since a run reads the fleet-wide notes alongside its own and a holder would hear the same edit twice. An impersonated edit forwards nothing, matching the reviewer-corrections project profile, which excludes impersonated activity rows for the same reason. GitHub logins and user UUIDs are shape-checked before rendering and capped per edit (`MAX_CORRECTION_REVIEWERS`), because both write paths into the reviewers artefact accept any string of any length and the value lands in a backtick span every scout reads. Repeat delivery coalesces only for the same report, target, and latest action inside `SUPPRESSION_WINDOW`. Corrections on other reports and reversals remain separate evidence. Scouts search related notes without a `skill_name` filter before selection, so feedback can cross producers. Self-removal alone does not establish a standing exclusion. Like a dismissal it may fall back fleet-wide, and unlike discuss/feedback it does not demand the `signal_scout:write` / `llm_skill:write` key scopes, because the logins already reach scouts through the report's reviewers artefact and the project profile. `../report_scout_notes.py`: the notes endpoint itself writes an `origin=report_note` row when the create names a report, since the content quotes the report's id, and appends the report's `scout_note_left` artefact in the same transaction so the steering stays on the report after the note is retired. It is the only derived origin a person writes head-on rather than one forwarded from another action, so its gate sits on the endpoint: the steering gate plus the `inbox:write` and `task:write` scopes and the `task` editor bar, matching the reports artefact API the entry lands through. All four forwarding paths re-check the same steering gate (token `scoped_teams`, canonical-project access, and the `llm_skill` editor bar) since the dismiss, discuss, feedback, and reviewer-edit actions need only `inbox:write`, and all forward only on the canonical team. The discuss and feedback paths additionally demand the `signal_scout:write` / `llm_skill:write` key scopes: a dismissal's text reaches runs anyway through the reports API, whereas the note is the only path a discussion question or feedback note takes to a scout, so an `inbox:write` credential must not open it alone. The discuss path is triggered from the tasks viewset (which holds the request the gate reads) through `facade/api.py:forward_report_discussion_note`, never from the tasks facade. On the read side, every derived origin quotes report content (report id, title, the note text), so `SignalScoutNoteViewSet.list` withholds them from any caller failing the reports read gate (`_may_read_reports`); both that gate and `../report_steering.py` read the list off `SignalScoutNote.derived_origins()` rather than naming the kinds, so a newly added origin is withheld from the moment it exists. The derived rows are context with a TTL; the `dismissal` artefact / discussion task / feedback analytics event / reviewer `suggested_reviewers` artefact + `suggested_reviewers_changed` activity-log row stays the record of truth. Notes reach two surfaces outside the fleet, both through `../report_steering.py`. `load_report_steering` puts no note text into the description of the self-driving implementation task; it renders a short nudge that tells the run to pull notes (`scout-notes-list`) and fleet memory (`scout-scratchpad-search`) itself, because the report author already read the notes and most of them do not apply to a code change. `load_research_steering` pastes only the `pipeline:report-research` audience into the report-research prompt and nudges the run to search every other origin by entity (`list_notes` `text`), because the derived ones are feedback on exactly the judgment that stage is about to make; that run is read-only, already holds the report's raw signals, and writes back only to the report on the same team.- `structured_output.py` — `record_structured_output` (+ `_sync`): the structured-output channel, next to signals and reports. Opt-in via `SignalScoutConfig.structured_output_schema` (a JSON Schema describing ONE record, validated at config-write time by `validate_structured_output_schema` — which also rejects non-local `$ref`/`$dynamicRef`, and every validator here uses a no-retrieval registry, so a user-controlled schema can never make the worker fetch a URL; null = channel off, and the record endpoint fails closed). Setting the schema is skill-authoring-level steering (schema `description` fields are free prose rendered verbatim into a privileged prompt), so the config viewset gates it behind `llm_skill:write` + the `llm_skill` editor bar, like scout notes; clearing it stays on the base config scope. Records validate against the dispatch-time schema snapshot the runner stamps on the run row (`metadata["structured_output_schema"]`), so a mid-run schema edit can't reject records matching what the run was shown — while clearing the config schema mid-run still fails the channel closed (re-checked inside the capacity-reservation transaction with the config row locked, so a clear racing a submit serializes cleanly). Each submitted record is validated against the schema (all-or-nothing per call — an invalid record fails the batch with nothing written) and written into the team's own project as a `$scout_structured_output` event via one `capture_batch_internal` call (person processing off, deterministic uuid over `(run, batch index, subject, payload)` so a resubmitted batch collapses at ingestion while in-batch duplicates stay distinct). The events ARE the record — there is no Postgres row store, so past records are read like any events (insights, HogQL) and retention follows event retention — which is also why a delivery failure fails the call (`StructuredOutputDeliveryError` → 503) with an instruction to retry — the events carry a stable timestamp (the run's `created_at`) alongside the deterministic uuid, so the dedupe sorting key (`toDate(timestamp)` is part of it) stays identical across retries even past UTC midnight — and why the channel fails loudly for a dry-run `emit=False` scout, an org without AI-processing consent (mirroring `emit._preflight_emit_gates`), or a disabled `signals_scout` source instead of suppressing quietly (the runner also withholds the prompt section and schema snapshot when `emit` is off). Cardinality is the scout's call — the schema describes one record; a run may submit one, one per judged entity, or a batch (caps: `MAX_RECORDS_PER_CALL` per call, `MAX_RECORDS_PER_RUN` per run via the `structured_output_count` counter on `run.metadata`, reserved under the run-row lock before the forward — it counts accepted batches, so failed or retried forwards still spend cap). The prompt renders the exact configured schema in a per-run `# Structured output` section only when the channel is live, so the prompt and the validator can never describe two different contracts.- `checks.py` — `record_check_result`: the only way a scout run closes the report check it was dispatched to answer (`agent`-kind `SignalReportCheck`, dispatched by `../report_check_agent.py` with `triggered_by="check"`). The verdict goes through the check executor's own funnel (`../report_check_execution.record_check_verdict`), so an agent result advances or retires its check by the same rules a measured one does, and lands on the report as a `check_result` artefact attributed to the run's task. Binding is what keeps the tool narrow: it admits only a check whose resolved lane is this run's own skill and that is still waiting on a dispatch (`dispatched_at` set), so the widest thing a run can do is answer the question it was asked. Deliberately NOT gated on `allowed_tools` like the report channel — the dispatch binding is the gate, so the fallback lane needs no frontmatter change to answer a check. It takes `inconclusive` with a required `reason` for a run whose tools worked but whose evidence cannot settle the claim, so `errored` stays a real tool or model failure. The prompt tells a run to record `passed` or `failed` when the evidence meets the check's stated bar. A run that never calls it leaves the check stamped, and the coordinator records an errored result once the result window passes.The same module holds the authoring tools — `create_report_check` / `list_report_checks` / `cancel_report_check`, exposed as `scout-report-check-create` / `-list` / `-cancel` — which are the other direction: a run that surfaces something whose fix will show in data writes the re-measurement down instead of leaving a note for a future run to find. They write through `../report_check_authoring.create_check`, the one place a check row is written, so a scout-written check obeys the same per-report cap, the same metric-query copy, and the same bounds as one written through the REST endpoint, and is attributed to the run's task like every other scout write. Unlike `record_check_result` these ARE gated on the report channel (`signal_scout_report:write` plus the `edit_report` `allowed_tools` opt-in, through `_resolve_in_progress_run`), because a check is a write on a report rather than an answer to a question the coordinator already asked. Their actions resolve the run through `_resolve_own_in_progress_run`, which also refuses a sandbox token minted for a different run, and create and cancel pass `_preflight_emit_gates` first, so a dry-run scout writes no check.diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex 6d7ed15b4676..ecf53cdf6849 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -56,6 +56,7 @@ from products.signals.backend.report_charts import MAX_REPORT_CHARTSfrom products.signals.backend.report_check_final_agents import MonitoringScoutResultfrom products.signals.backend.report_metrics import MAX_REPORT_METRICSfrom products.signals.backend.report_prompts import MAX_SUGGESTED_PROMPT_LENGTH, MAX_SUGGESTED_PROMPTS+from products.signals.backend.report_scout_notes import MAX_REPORT_NOTE_TEXT_LENGTHfrom products.signals.backend.scout_harness.config_registry import CRON_SCHEDULE_MAX_LENGTH, cron_schedule_errorfrom products.signals.backend.scout_harness.derived_metadata import DERIVED_FLAG_KEYS, DERIVED_METADATA_KEYfrom products.signals.backend.scout_harness.fleet_sync import SYNC_SURFACES@@ -1254,7 +1255,8 @@ class ScoutNoteSerializer(serializers.Serializer):"`report_reviewer_correction` for a suggested reviewer someone added or removed on a ""report, or for a report a person or their agent claimed: evidence about who owns that ""surface, and a prompt to revisit the routing memory it corrects or supports, rather "- "than a directive."+ "than a directive. `report_note` for one left from a report through this API with "+ "`report_id` set: steering written straight for you, about the report its content names."),)@@ -1343,6 +1345,17 @@ class ScoutNoteCreateRequestSerializer(serializers.Serializer):"and no scout. Omit or leave blank for a general note every scout sees."),)+ report_id = serializers.UUIDField(+ required=False,+ allow_null=True,+ help_text=(+ "Optional id of the inbox report this note is about. The note then names the report so a "+ "scout can fetch it, and the report's activity log records that the note was left. "+ "Requires edit access to inbox reports, and the report must belong to this project. "+ "The report reference shares the note's character budget, so `content` is capped at "+ f"{MAX_REPORT_NOTE_TEXT_LENGTH} characters when this is set."+ ),+ )expires_at = _BestEffortDateTimeField(required=False,allow_null=True,@@ -1361,6 +1374,18 @@ class ScoutNoteCreateRequestSerializer(serializers.Serializer):return Nonereturn value+ def validate(self, attrs: dict[str, Any]) -> dict[str, Any]:+ if attrs.get("report_id") and len(attrs.get("content", "")) > MAX_REPORT_NOTE_TEXT_LENGTH:+ raise serializers.ValidationError(+ {+ "content": (+ "A note about a report also stores a reference to it, so content is limited "+ f"to {MAX_REPORT_NOTE_TEXT_LENGTH} characters when report_id is set."+ )+ }+ )+ return attrs+# --- Emit -----------------------------------------------------------------diff --git a/products/signals/backend/scout_harness/tools/notes.py b/products/signals/backend/scout_harness/tools/notes.pyindex b205b9a984b1..217057c8113c 100644--- a/products/signals/backend/scout_harness/tools/notes.py+++ b/products/signals/backend/scout_harness/tools/notes.py@@ -7,15 +7,16 @@ A note targets one scout by `skill_name`, a pipeline stage by a reserved`pipeline:*` audience, or the whole fleet when `skill_name` is blank; `list_notes`is what a run calls to pick up the notes addressed to it.-Most notes are left by hand through that surface. Four `origin`s are derived from-inbox activity instead: `report_dismissal`, forwarded from the feedback someone+Most notes are left by hand through that surface. Five `origin`s come from inbox+activity instead: `report_dismissal`, forwarded from the feedback someonetyped when they dismissed, snoozed, or restored an inbox report (see`dismissal_notes.py`); `report_discussion`, forwarded from the question someoneasked when they opened a discussion on a report (see `discussion_notes.py`);`report_feedback`, forwarded from the note someone left when rating a report useful-or not (see `feedback_notes.py`); and `report_reviewer_correction`, forwarded when+or not (see `feedback_notes.py`); `report_reviewer_correction`, forwarded whensomeone added or removed a suggested reviewer, or claimed a report (see-`reviewer_correction_notes.py`).+`reviewer_correction_notes.py`); and `report_note`, written straight for the+scouts from a report (see `report_scout_notes.py`)."""from __future__ import annotations@@ -128,8 +129,9 @@ def leave_note() -> ScoutNote:"""Create a note. Not an upsert — every call mints a new row; delete retires one.- `origin` is server-owned and never caller-supplied over the API: the notes endpoint always- writes `HUMAN`. `REPORT_DISMISSAL` belongs to `dismissal_notes.forward_dismissal_note`,+ `origin` is server-owned and never caller-supplied over the API: the notes endpoint writes+ `HUMAN`, or `REPORT_NOTE` through `report_scout_notes.leave_report_note` when the request names+ a report. `REPORT_DISMISSAL` belongs to `dismissal_notes.forward_dismissal_note`,`REPORT_DISCUSSION` to `discussion_notes.forward_discussion_note`, `REPORT_FEEDBACK` to`feedback_notes.forward_feedback_note`, and `REPORT_REVIEWER_CORRECTION` to`reviewer_correction_notes.forward_reviewer_correction_note` and `forward_reviewer_claim_note`.diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.pyindex 3a0b35dc1d57..0accb417511b 100644--- a/products/signals/backend/scout_harness/views.py+++ b/products/signals/backend/scout_harness/views.py@@ -97,11 +97,12 @@ from products.signals.backend.models import ()from products.signals.backend.pipeline_identity import pipeline_writer_identityfrom products.signals.backend.presentation.scout_permissions import ScoutCanonicalTeamAccessPermission-from products.signals.backend.report_access import may_read_reports+from products.signals.backend.report_access import may_read_reports, may_write_reportsfrom products.signals.backend.report_charts import ChartSizefrom products.signals.backend.report_check_final_agents import MonitoringScoutResult, submit_monitoring_scout_resultfrom products.signals.backend.report_generation.resolve_reviewers import MAX_PROJECT_MEMBERS, list_project_membersfrom products.signals.backend.report_monitoring_results import InvalidMonitoringResult, MonitoringResultConflict+from products.signals.backend.report_scout_notes import leave_report_notefrom products.signals.backend.reviewer_rules import ReviewerProposal, ReviewerWriteErrorfrom products.signals.backend.scout_harness.config_registry import enabled_scout_count, ensure_scout_categoryfrom products.signals.backend.scout_harness.create_access import can_create_scout@@ -284,6 +285,7 @@ from products.signals.backend.scout_harness.trial_access import ()from products.signals.backend.scout_harness.trial_views import ScoutTrialConfigMixinfrom products.signals.backend.scout_report import InvalidScoutReportError+from products.signals.backend.task_attribution import resolve_request_attributionfrom products.signals.backend.tasks import enqueue_project_profile_buildfrom products.skills.backend.api.skill_services import (LLMSkillDuplicateNameConflictError,@@ -408,6 +410,25 @@ def _may_read_reports(request: Request, view: APIView, canonical_team: Team) ->return may_read_reports(user=user, team=canonical_team)+def _may_write_reports(request: Request, view: APIView, canonical_team: Team) -> bool:+ """Whether this caller could append to an inbox report's activity log canonically.++ A note left from a report appends a `scout_note_left` artefact, and the reports artefact API+ gates every write on the `inbox:write` + `task:write` pair plus the `task` editor bar. The+ notes surface rides `signal_scout`, so both legs are re-checked here, as `_may_read_reports`+ does on the read side, or steering access alone would write to a report the caller may not edit.+ """+ scopes = get_authenticator_scopes(request.successful_authenticator)+ if scopes is not None and "*" not in scopes:+ if scopes_missing_after_legacy_fallback(request, view, scopes, ["inbox:write", "task:write"]):+ return False++ user = request.user+ if not isinstance(user, User):+ return False+ return may_write_reports(user=user, team=canonical_team)++class Conflict(exceptions.APIException):status_code = status.HTTP_409_CONFLICTdefault_detail = "A run for this scout is already in progress."@@ -2228,6 +2249,22 @@ class SignalScoutNoteViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):"Leaving or deleting scout notes requires editor access to skills, since notes steer the scout agents.")+ def _report_to_note_on(self, request: Request, team_id: int, report_id: uuid.UUID | None) -> SignalReport | None:+ if report_id is None:+ return None+ # The note names the report and its activity log gains an entry, so the caller must be able+ # to edit reports, not only steer scouts.+ if not _may_write_reports(request, self, self.team.parent_team or self.team):+ raise exceptions.PermissionDenied("Leaving a note on a report requires edit access to inbox reports.")+ report = (+ SignalReport.objects.filter(team_id=team_id, id=report_id)+ .exclude(status=SignalReport.Status.DELETED)+ .first()+ )+ if report is None:+ raise exceptions.ValidationError({"report_id": "No report with this id in this project."})+ return report+@validated_request(query_serializer=ScoutNotesQuerySerializer,responses={@@ -2296,14 +2333,27 @@ class SignalScoutNoteViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):# `request.user` is a real `User` under all three auth classes here; `pk` guards the# theoretical anonymous edge so attribution degrades to null instead of raising.created_by_id = request.user.pk if getattr(request.user, "pk", None) else None+ team_id = _canonical_team_id(self)+ report = self._report_to_note_on(request, team_id, data.get("report_id"))try:- note = leave_note(- team_id=_canonical_team_id(self),- content=data["content"],- skill_name=data.get("skill_name") or "",- created_by_id=created_by_id,- expires_at=data.get("expires_at"),- )+ if report is None:+ note = leave_note(+ team_id=team_id,+ content=data["content"],+ skill_name=data.get("skill_name") or "",+ created_by_id=created_by_id,+ expires_at=data.get("expires_at"),+ )+ else:+ note = leave_report_note(+ team_id=team_id,+ report=report,+ text=data["content"],+ skill_name=data.get("skill_name") or "",+ created_by_id=created_by_id,+ expires_at=data.get("expires_at"),+ attribution=resolve_request_attribution(request, team_id),+ )except InvalidNoteError as exc:raise exceptions.ValidationError({"detail": str(exc)})return Response(ScoutNoteSerializer(note.as_dict()).data, status=status.HTTP_201_CREATED)diff --git a/products/signals/backend/test/test_scout_harness_api.py b/products/signals/backend/test/test_scout_harness_api.pyindex 7c123019c336..2e820088a2c8 100644--- a/products/signals/backend/test/test_scout_harness_api.py+++ b/products/signals/backend/test/test_scout_harness_api.py@@ -2808,6 +2808,107 @@ class TestScoutHarnessNotesAPI(APIBaseTest):assert note.expires_at is Noneassert note.content == "watch checkout"+ def test_create_with_report_id_names_the_report_and_logs_it_on_the_report(self) -> None:+ self._make_scout_skill()+ report = SignalReport.objects.create(team=self.team, title="Checkout 500s", status=SignalReport.Status.READY)++ response = self.client.post(+ self._list_url(),+ data={+ "content": "focus on the new checkout flow",+ "skill_name": "signals-scout-web-analytics",+ "report_id": str(report.id),+ },+ format="json",+ )++ assert response.status_code == status.HTTP_201_CREATED, response.content+ note = response.json()+ assert str(report.id) in note["content"]+ assert "Checkout 500s" not in note["content"]+ # The content quotes a report id, so the row has to ride the derived-origin read gate.+ assert note["origin"] == SignalScoutNote.Origin.REPORT_NOTE+ listed = self.client.get(self._list_url(), data={"text": str(report.id)})+ assert [row["id"] for row in listed.json()] == [note["id"]]+ artefact = SignalReportArtefact.objects.get(+ report=report, type=SignalReportArtefact.ArtefactType.SCOUT_NOTE_LEFT+ )+ assert json.loads(artefact.content) == {+ "note": "focus on the new checkout flow",+ "skill_name": "signals-scout-web-analytics",+ "scout_note_id": note["id"],+ }+ assert artefact.created_by_id == self.user.id++ @parameterized.expand(+ [+ ("unknown_report", "unknown", ["*"], status.HTTP_400_BAD_REQUEST),+ ("other_teams_report", "other_team", ["*"], status.HTTP_400_BAD_REQUEST),+ ("deleted_report", "deleted", ["*"], status.HTTP_400_BAD_REQUEST),+ (+ "caller_without_report_read",+ "own",+ ["signal_scout:write", "llm_skill:write"],+ status.HTTP_403_FORBIDDEN,+ ),+ (+ "caller_without_report_write",+ "own",+ ["signal_scout:write", "llm_skill:write", "task:read"],+ status.HTTP_403_FORBIDDEN,+ ),+ (+ "caller_with_inbox_write_only",+ "own",+ ["signal_scout:write", "llm_skill:write", "inbox:write"],+ status.HTTP_403_FORBIDDEN,+ ),+ ]+ )+ def test_create_with_report_id_writes_nothing_when_refused(+ self, _name: str, report_kind: str, scopes: list[str], expected_status: int+ ) -> None:+ from posthog.models.personal_api_key import PersonalAPIKey+ from posthog.models.utils import generate_random_token_personal, hash_key_value++ other = Team.objects.create(organization=self.organization, name="Other")+ report_id = {+ "unknown": lambda: str(uuid4()),+ "other_team": lambda: str(SignalReport.objects.create(team=other, status=SignalReport.Status.READY).id),+ "deleted": lambda: str(SignalReport.objects.create(team=self.team, status=SignalReport.Status.DELETED).id),+ "own": lambda: str(SignalReport.objects.create(team=self.team, status=SignalReport.Status.READY).id),+ }[report_kind]()+ raw = generate_random_token_personal()+ PersonalAPIKey.objects.create(label="k", user=self.user, secure_value=hash_key_value(raw), scopes=scopes)+ self.client.logout()++ response = self.client.post(+ self._list_url(),+ data={"content": "focus on the new checkout flow", "report_id": report_id},+ format="json",+ HTTP_AUTHORIZATION=f"Bearer {raw}",+ )++ assert response.status_code == expected_status, response.content+ assert not SignalScoutNote.objects.filter(team=self.team).exists()+ assert not SignalReportArtefact.objects.filter(type=SignalReportArtefact.ArtefactType.SCOUT_NOTE_LEFT).exists()++ def test_create_with_report_id_rejects_content_too_long_to_carry_the_reference(self) -> None:+ from products.signals.backend.report_scout_notes import MAX_REPORT_NOTE_TEXT_LENGTH++ report = SignalReport.objects.create(team=self.team, status=SignalReport.Status.READY)++ response = self.client.post(+ self._list_url(),+ data={"content": "x" * (MAX_REPORT_NOTE_TEXT_LENGTH + 1), "report_id": str(report.id)},+ format="json",+ )++ # The request serializer owns the shorter cap, so the caller gets a field error instead of+ # the note layer's cap firing on prose the schema advertised as acceptable.+ assert response.status_code == status.HTTP_400_BAD_REQUEST, response.content+ assert not SignalScoutNote.objects.filter(team=self.team).exists()+def test_notes_do_not_leak_across_teams(self) -> None:# Cross-team rows go through `all_teams`: the fail-closed `objects` manager is pinned# to `self.team` inside the test, so an `objects.filter(team=other)` is always empty.diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex 7067fdc7f844..fbf2dac85df2 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -5713,6 +5713,7 @@ export interface SignalReportStateRequestApi {* * `commit` - Commit* * `task_run` - Task Run* * `note` - Note+ * * `scout_note_left` - Scout Note Left* * `title_change` - Title Change* * `summary_change` - Summary Change* * `code_review` - Code Review@@ -5755,6 +5756,7 @@ export const SignalReportArtefactArtefactTypeEnumApi = {Commit: 'commit',TaskRun: 'task_run',Note: 'note',+ ScoutNoteLeft: 'scout_note_left',TitleChange: 'title_change',SummaryChange: 'summary_change',CodeReview: 'code_review',@@ -8757,7 +8759,7 @@ export interface ScoutNoteApi {* @nullable*/created_by_name: string | null- /** Where the note came from. `human` for one left directly through this API. `report_dismissal` for one forwarded from the note someone typed when they dismissed, snoozed, or restored one or more inbox reports: one reviewer's verdict on the reports its content names, so weigh it as evidence about those reports rather than as fleet-level steering. `report_discussion` for the question someone asked when they opened a discussion on a report: context to weigh, neither a verdict on the report nor a directive. `report_feedback` for the note someone left when rating a report useful or not: one reader's rating of the named report, context to weigh rather than a directive. `report_reviewer_correction` for a suggested reviewer someone added or removed on a report, or for a report a person or their agent claimed: evidence about who owns that surface, and a prompt to revisit the routing memory it corrects or supports, rather than a directive. */+ /** Where the note came from. `human` for one left directly through this API. `report_dismissal` for one forwarded from the note someone typed when they dismissed, snoozed, or restored one or more inbox reports: one reviewer's verdict on the reports its content names, so weigh it as evidence about those reports rather than as fleet-level steering. `report_discussion` for the question someone asked when they opened a discussion on a report: context to weigh, neither a verdict on the report nor a directive. `report_feedback` for the note someone left when rating a report useful or not: one reader's rating of the named report, context to weigh rather than a directive. `report_reviewer_correction` for a suggested reviewer someone added or removed on a report, or for a report a person or their agent claimed: evidence about who owns that surface, and a prompt to revisit the routing memory it corrects or supports, rather than a directive. `report_note` for one left from a report through this API with `report_id` set: steering written straight for you, about the report its content names. */origin: string}@@ -8775,6 +8777,11 @@ export interface ScoutNoteCreateRequestApi {* @maxLength 200*/skill_name?: string+ /**+ * Optional id of the inbox report this note is about. The note then names the report so a scout can fetch it, and the report's activity log records that the note was left. Requires edit access to inbox reports, and the report must belong to this project. The report reference shares the note's character budget, so `content` is capped at 9938 characters when this is set.+ * @nullable+ */+ report_id?: string | null/*** Optional ISO-8601 expiry. After this time the note drops out of the default list view, so time-boxed steering ('watch closely this week') retires itself. Omit for a note that stays active until deleted. Best-effort — a value that can't be parsed or is already in the past is dropped (the note stays active), not rejected, so the note is never lost.* @nullablediff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex c2775bf5a803..0907e161937a 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -1369,7 +1369,7 @@ export const getSignalsReportArtefactsDestroyUrl = (projectId: string, reportId:}/**- * Delete an artefact, addressed by id. Deleting the latest row of a status type reverts the report's canonical status to the previous version (latest-wins over what remains). `task_run` artefacts are an append-only work log and cannot be deleted. Neither can the types this API cannot write, which the pipeline owns: `autostart_skip`, `check_authoring`, `check_cancelled`, `check_expired`, `check_observation`, `check_result`, `check_scheduled`, `code_review`, `impact_measurement_plan`, `implementation_decision`, `implementation_dispatch`, `implementation_handover`, `implementation_replacement`, `pr_owner_assignment`, `pull_request`, `ranking_score`, `report_link`, `reviewer_corrections`, `summary_change`, `task_run`, `title_change`, `video_segment`, `work_claim`, `work_release`.+ * Delete an artefact, addressed by id. Deleting the latest row of a status type reverts the report's canonical status to the previous version (latest-wins over what remains). `task_run` artefacts are an append-only work log and cannot be deleted. Neither can the types this API cannot write, which the pipeline owns: `autostart_skip`, `check_authoring`, `check_cancelled`, `check_expired`, `check_observation`, `check_result`, `check_scheduled`, `code_review`, `impact_measurement_plan`, `implementation_decision`, `implementation_dispatch`, `implementation_handover`, `implementation_replacement`, `pr_owner_assignment`, `pull_request`, `ranking_score`, `report_link`, `reviewer_corrections`, `scout_note_left`, `summary_change`, `task_run`, `title_change`, `video_segment`, `work_claim`, `work_release`.* @summary Delete an artefact*/export const signalsReportArtefactsDestroy = async (diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 2077e79154d0..ec3e9b8d8566 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -2924,6 +2924,12 @@ export const SignalsScoutNotesCreateBody = /* @__PURE__ */ zod.describe('Address the note to one scout by its skill name (exact match against a configured scout on the project — check `scout-config-list` for the roster), or to one stage of the report pipeline by its reserved audience (`pipeline:report-research`). Use a pipeline audience for guidance about how reports get researched rather than about what the scouts watch, so it reaches that stage and no scout. Omit or leave blank for a general note every scout sees.'),+ report_id: zod+ .uuid()+ .nullish()+ .describe(+ "Optional id of the inbox report this note is about. The note then names the report so a scout can fetch it, and the report's activity log records that the note was left. Requires edit access to inbox reports, and the report must belong to this project. The report reference shares the note's character budget, so `content` is capped at 9938 characters when this is set."+ ),expires_at: zod.string().nullish()diff --git a/products/signals/frontend/inbox/components/detail/ArtefactLogList.test.tsx b/products/signals/frontend/inbox/components/detail/ArtefactLogList.test.tsxindex aa0ce6487b00..7676e005c471 100644--- a/products/signals/frontend/inbox/components/detail/ArtefactLogList.test.tsx+++ b/products/signals/frontend/inbox/components/detail/ArtefactLogList.test.tsx@@ -52,6 +52,29 @@ describe('ArtefactLogList', () => {expect(screen.getByText('The root cause moved to the ingestion path.')).toBeInTheDocument()})+ it('shows a scout note left from the report, with the scout it was addressed to', () => {+ render(+ <ArtefactLogList+ reportId="report-1"+ artefacts={[+ makeArtefact(+ {+ note: 'Focus on the new checkout flow.',+ skill_name: 'signals-scout-web-analytics',+ scout_note_id: 'note-1',+ },+ 'scout_note_left'+ ),+ ]}+ />+ )++ expect(screen.getByText('Scout note left')).toBeInTheDocument()+ expect(screen.queryByText('scout_note_left')).not.toBeInTheDocument()+ expect(screen.getByText('Focus on the new checkout flow.')).toBeInTheDocument()+ expect(screen.getByText('For signals-scout-web-analytics')).toBeInTheDocument()+ })+it('labels an inconclusive check result and explains why', () => {render(<ArtefactLogListdiff --git a/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx b/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsxindex c149e37569cd..1c041370d1d9 100644--- a/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx+++ b/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx@@ -71,6 +71,7 @@ import {RankingScoreView,readRankingScore,NoteContent,+ ScoutNoteLeftContent,RelatedToContent,REPORT_LINK_KIND_LABELS,ReportLinkContent,@@ -151,6 +152,7 @@ const ARTEFACT_MARKER: Record<string, ComponentType<{ className?: string }>> = {commit: IconCommit,task_run: IconTerminal,note: IconComment,+ scout_note_left: IconComment,priority_judgment: IconFlag,actionability_judgment: IconListCheck,safety_judgment: IconShield,@@ -773,6 +775,17 @@ function renderArtefactBody({const c = content as NoteContentreturn <NoteBody note={c.note} author={c.author} />}+ case 'scout_note_left': {+ const c = content as ScoutNoteLeftContent+ return (+ <div className="w-full">+ <NoteBody note={c.note} />+ <span className="mt-1 block text-xs text-tertiary">+ {c.skill_name?.trim() ? `For ${c.skill_name}` : 'For every scout on this project'}+ </span>+ </div>+ )+ }case 'priority_judgment': {const c = content as { explanation?: string }return c.explanation ? <ReasoningBody text={c.explanation} /> : nulldiff --git a/products/signals/frontend/inbox/components/detail/artefactTypes.ts b/products/signals/frontend/inbox/components/detail/artefactTypes.tsindex 06b24735927f..818f20008e16 100644--- a/products/signals/frontend/inbox/components/detail/artefactTypes.ts+++ b/products/signals/frontend/inbox/components/detail/artefactTypes.ts@@ -49,6 +49,13 @@ export interface NoteContent {author?: string}+export interface ScoutNoteLeftContent {+ note: string+ /** Blank when the note was addressed to every scout on the project. */+ skill_name?: string+ scout_note_id?: string+}+export interface SignalFindingContent {signal_id: stringrelevant_code_paths?: string[]@@ -352,6 +359,7 @@ export const ARTEFACT_TYPE_LABELS: Record<string, string> = {commit: 'Commit pushed',task_run: 'Task run',note: 'Note added',+ scout_note_left: 'Scout note left',priority_judgment: 'Priority assessed',actionability_judgment: 'Actionability assessed',safety_judgment: 'Safety assessed',diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 858d2d2d1350..e64ca3d76bb3 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -194,8 +194,8 @@ tools:Append an artefact to an inbox report so it reads as a living document. Everything is append-only. Statusjudgments are consequential, not advisory: the canonical priority and actionability steer what people andagents pick up next, and PostHog's automation uses them to decide which reports to act on. Follow-up goals- live in report checks, not artefacts. Writes are attributed to your task automatically. Returns the created- artefact with its id.+ live in report checks, not artefacts. Writes are attributed to your task automatically, or to the calling+ user when no task is running. Returns the created artefact with its id.param_overrides:content:description: >@@ -204,11 +204,13 @@ tools:of at most 20 source lines (a single line has start_line equal to end_line). `commit`: repository,branch, commit_sha, message, for one commit already pushed to a remote branch. git_signed_commitusually records it for you, so create one only for a commit pushed by other means, and never for an- unpushed or local-only commit. `note`: note, free-form. `priority_judgment`: explanation, priority- (P0–P4). `actionability_judgment`: explanation, actionability, already_addressed. `safety_judgment`:- choice. `repo_selection`: repository, reason. `suggested_reviewers`: a list of {github_login}.- `source_suggestion`: product, reason, for a product the project does not use that would have given- this report better evidence; the inbox hides it once the product is in use.+ unpushed or local-only commit. `note`: note, free-form, for annotating a report with context; to+ also steer the scouts use `scout-notes-create` with `report_id`, which records the note on the+ report too. `priority_judgment`: explanation, priority (P0–P4). `actionability_judgment`:+ explanation, actionability, already_addressed. `safety_judgment`: choice. `repo_selection`:+ repository, reason. `suggested_reviewers`: a list of {github_login}. `source_suggestion`: product,+ reason, for a product the project does not use that would have given this report better evidence;+ the inbox hides it once the product is in use.inbox-report-artefacts-delete:operation: signals_report_artefacts_destroyenabled: true@@ -1252,10 +1254,12 @@ tools:about how reports get researched, judged, and routed ('route billing-adjacent reports to the billingfolks'), so it reaches that stage and no scout. `pipeline:report-research` is the only pipeline audiencetoday; any other `pipeline:*` value is rejected. Optionally set `expires_at` so a time-boxed note retires- itself. Notes are advisory: scouts weigh them seriously as prior context but still apply their own evidence- bar. Because scouts read notes verbatim, writing one requires the same authorization as editing a scout's- skill: the `llm_skill:write` scope plus skill editor access. Each call creates a new note (NOT idempotent —- a retry leaves a duplicate); use `scout-notes-delete` to retire one that's been acted on.+ itself. Pass `report_id` when the note is about one inbox report: the note then names that report, and the+ report's activity log records the note. Notes are advisory: scouts weigh them seriously as prior context but+ still apply their own evidence bar. Because scouts read notes verbatim, writing one requires the same+ authorization as editing a scout's skill: the `llm_skill:write` scope plus skill editor access. Each call+ creates a new note (NOT idempotent — a retry leaves a duplicate); use `scout-notes-delete` to retire one+ that's been acted on.scout-notes-delete:operation: signals_scout_notes_destroyenabled: truediff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex e58d811c4742..3a25903ff6c4 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -7877,7 +7877,7 @@"feature_flag_behavior": "enable"},"inbox-report-artefacts-create": {- "description": "Append an artefact to an inbox report so it reads as a living document. Everything is append-only. Status judgments are consequential, not advisory: the canonical priority and actionability steer what people and agents pick up next, and PostHog's automation uses them to decide which reports to act on. Follow-up goals live in report checks, not artefacts. Writes are attributed to your task automatically. Returns the created artefact with its id.",+ "description": "Append an artefact to an inbox report so it reads as a living document. Everything is append-only. Status judgments are consequential, not advisory: the canonical priority and actionability steer what people and agents pick up next, and PostHog's automation uses them to decide which reports to act on. Follow-up goals live in report checks, not artefacts. Writes are attributed to your task automatically, or to the calling user when no task is running. Returns the created artefact with its id.","category": "Signals","feature": "signals","summary": "Append an artefact to a report",@@ -12946,7 +12946,7 @@}},"scout-notes-create": {- "description": "Leave a steering note the scout fleet picks up on its next runs — the lightweight way to nudge the scouts without editing a scout's skill: feedback on past reports ('the staging spike you keep flagging is known noise'), pointers ('we shipped a new checkout Tuesday, watch conversion'), or focus requests ('dig into the EU signup funnel this week'). Address the note to one scout via `skill_name` (the scout's exact name; it must match a skill on this project that holds a scout config, so check `scout-config-list` for the roster), or omit it for a general note every scout sees. A `skill_name` from the reserved `pipeline:*` family addresses one stage of the report pipeline instead of a scout: use `pipeline:report-research` for guidance about how reports get researched, judged, and routed ('route billing-adjacent reports to the billing folks'), so it reaches that stage and no scout. `pipeline:report-research` is the only pipeline audience today; any other `pipeline:*` value is rejected. Optionally set `expires_at` so a time-boxed note retires itself. Notes are advisory: scouts weigh them seriously as prior context but still apply their own evidence bar. Because scouts read notes verbatim, writing one requires the same authorization as editing a scout's skill: the `llm_skill:write` scope plus skill editor access. Each call creates a new note (NOT idempotent — a retry leaves a duplicate); use `scout-notes-delete` to retire one that's been acted on.",+ "description": "Leave a steering note the scout fleet picks up on its next runs — the lightweight way to nudge the scouts without editing a scout's skill: feedback on past reports ('the staging spike you keep flagging is known noise'), pointers ('we shipped a new checkout Tuesday, watch conversion'), or focus requests ('dig into the EU signup funnel this week'). Address the note to one scout via `skill_name` (the scout's exact name; it must match a skill on this project that holds a scout config, so check `scout-config-list` for the roster), or omit it for a general note every scout sees. A `skill_name` from the reserved `pipeline:*` family addresses one stage of the report pipeline instead of a scout: use `pipeline:report-research` for guidance about how reports get researched, judged, and routed ('route billing-adjacent reports to the billing folks'), so it reaches that stage and no scout. `pipeline:report-research` is the only pipeline audience today; any other `pipeline:*` value is rejected. Optionally set `expires_at` so a time-boxed note retires itself. Pass `report_id` when the note is about one inbox report: the note then names that report, and the report's activity log records the note. Notes are advisory: scouts weigh them seriously as prior context but still apply their own evidence bar. Because scouts read notes verbatim, writing one requires the same authorization as editing a scout's skill: the `llm_skill:write` scope plus skill editor access. Each call creates a new note (NOT idempotent — a retry leaves a duplicate); use `scout-notes-delete` to retire one that's been acted on.","category": "Signals","feature": "signals","summary": "Leave a note for the scouts",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex de1f18820058..5b3c9789b8a8 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -8109,7 +8109,7 @@"feature_flag_behavior": "enable"},"inbox-report-artefacts-create": {- "description": "Append an artefact to an inbox report so it reads as a living document. Everything is append-only. Status judgments are consequential, not advisory: the canonical priority and actionability steer what people and agents pick up next, and PostHog's automation uses them to decide which reports to act on. Follow-up goals live in report checks, not artefacts. Writes are attributed to your task automatically. Returns the created artefact with its id.",+ "description": "Append an artefact to an inbox report so it reads as a living document. Everything is append-only. Status judgments are consequential, not advisory: the canonical priority and actionability steer what people and agents pick up next, and PostHog's automation uses them to decide which reports to act on. Follow-up goals live in report checks, not artefacts. Writes are attributed to your task automatically, or to the calling user when no task is running. Returns the created artefact with its id.","category": "Signals","feature": "signals","summary": "Append an artefact to a report",@@ -13647,7 +13647,7 @@}},"scout-notes-create": {- "description": "Leave a steering note the scout fleet picks up on its next runs — the lightweight way to nudge the scouts without editing a scout's skill: feedback on past reports ('the staging spike you keep flagging is known noise'), pointers ('we shipped a new checkout Tuesday, watch conversion'), or focus requests ('dig into the EU signup funnel this week'). Address the note to one scout via `skill_name` (the scout's exact name; it must match a skill on this project that holds a scout config, so check `scout-config-list` for the roster), or omit it for a general note every scout sees. A `skill_name` from the reserved `pipeline:*` family addresses one stage of the report pipeline instead of a scout: use `pipeline:report-research` for guidance about how reports get researched, judged, and routed ('route billing-adjacent reports to the billing folks'), so it reaches that stage and no scout. `pipeline:report-research` is the only pipeline audience today; any other `pipeline:*` value is rejected. Optionally set `expires_at` so a time-boxed note retires itself. Notes are advisory: scouts weigh them seriously as prior context but still apply their own evidence bar. Because scouts read notes verbatim, writing one requires the same authorization as editing a scout's skill: the `llm_skill:write` scope plus skill editor access. Each call creates a new note (NOT idempotent — a retry leaves a duplicate); use `scout-notes-delete` to retire one that's been acted on.",+ "description": "Leave a steering note the scout fleet picks up on its next runs — the lightweight way to nudge the scouts without editing a scout's skill: feedback on past reports ('the staging spike you keep flagging is known noise'), pointers ('we shipped a new checkout Tuesday, watch conversion'), or focus requests ('dig into the EU signup funnel this week'). Address the note to one scout via `skill_name` (the scout's exact name; it must match a skill on this project that holds a scout config, so check `scout-config-list` for the roster), or omit it for a general note every scout sees. A `skill_name` from the reserved `pipeline:*` family addresses one stage of the report pipeline instead of a scout: use `pipeline:report-research` for guidance about how reports get researched, judged, and routed ('route billing-adjacent reports to the billing folks'), so it reaches that stage and no scout. `pipeline:report-research` is the only pipeline audience today; any other `pipeline:*` value is rejected. Optionally set `expires_at` so a time-boxed note retires itself. Pass `report_id` when the note is about one inbox report: the note then names that report, and the report's activity log records the note. Notes are advisory: scouts weigh them seriously as prior context but still apply their own evidence bar. Because scouts read notes verbatim, writing one requires the same authorization as editing a scout's skill: the `llm_skill:write` scope plus skill editor access. Each call creates a new note (NOT idempotent — a retry leaves a duplicate); use `scout-notes-delete` to retire one that's been acted on.","category": "Signals","feature": "signals","summary": "Leave a note for the scouts",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex fa67b4ab93a5..1cc6f6e5b025 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -73442,6 +73442,7 @@ export namespace Schemas {* * `commit` - Commit* * `task_run` - Task Run* * `note` - Note+ * * `scout_note_left` - Scout Note Left* * `title_change` - Title Change* * `summary_change` - Summary Change* * `code_review` - Code Review@@ -73484,6 +73485,7 @@ export namespace Schemas {Commit: 'commit',TaskRun: 'task_run',Note: 'note',+ ScoutNoteLeft: 'scout_note_left',TitleChange: 'title_change',SummaryChange: 'summary_change',CodeReview: 'code_review',@@ -103116,7 +103118,7 @@ export namespace Schemas {* @nullable*/created_by_name: string | null;- /** Where the note came from. `human` for one left directly through this API. `report_dismissal` for one forwarded from the note someone typed when they dismissed, snoozed, or restored one or more inbox reports: one reviewer's verdict on the reports its content names, so weigh it as evidence about those reports rather than as fleet-level steering. `report_discussion` for the question someone asked when they opened a discussion on a report: context to weigh, neither a verdict on the report nor a directive. `report_feedback` for the note someone left when rating a report useful or not: one reader's rating of the named report, context to weigh rather than a directive. `report_reviewer_correction` for a suggested reviewer someone added or removed on a report, or for a report a person or their agent claimed: evidence about who owns that surface, and a prompt to revisit the routing memory it corrects or supports, rather than a directive. */+ /** Where the note came from. `human` for one left directly through this API. `report_dismissal` for one forwarded from the note someone typed when they dismissed, snoozed, or restored one or more inbox reports: one reviewer's verdict on the reports its content names, so weigh it as evidence about those reports rather than as fleet-level steering. `report_discussion` for the question someone asked when they opened a discussion on a report: context to weigh, neither a verdict on the report nor a directive. `report_feedback` for the note someone left when rating a report useful or not: one reader's rating of the named report, context to weigh rather than a directive. `report_reviewer_correction` for a suggested reviewer someone added or removed on a report, or for a report a person or their agent claimed: evidence about who owns that surface, and a prompt to revisit the routing memory it corrects or supports, rather than a directive. `report_note` for one left from a report through this API with `report_id` set: steering written straight for you, about the report its content names. */origin: string;}@@ -103134,6 +103136,11 @@ export namespace Schemas {* @maxLength 200*/skill_name?: string;+ /**+ * Optional id of the inbox report this note is about. The note then names the report so a scout can fetch it, and the report's activity log records that the note was left. Requires edit access to inbox reports, and the report must belong to this project. The report reference shares the note's character budget, so `content` is capped at 9938 characters when this is set.+ * @nullable+ */+ report_id?: string | null;/*** Optional ISO-8601 expiry. After this time the note drops out of the default list view, so time-boxed steering ('watch closely this week') retires itself. Omit for a note that stays active until deleted. Best-effort — a value that can't be parsed or is already in the past is dropped (the note stays active), not rejected, so the note is never lost.* @nullablediff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex 2e1544803610..eded1bf98376 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -1459,7 +1459,7 @@ export const SignalsReportArtefactsPartialUpdateBody = () => zod)/**- * Delete an artefact, addressed by id. Deleting the latest row of a status type reverts the report's canonical status to the previous version (latest-wins over what remains). `task_run` artefacts are an append-only work log and cannot be deleted. Neither can the types this API cannot write, which the pipeline owns: `autostart_skip`, `check_authoring`, `check_cancelled`, `check_expired`, `check_observation`, `check_result`, `check_scheduled`, `code_review`, `impact_measurement_plan`, `implementation_decision`, `implementation_dispatch`, `implementation_handover`, `implementation_replacement`, `pr_owner_assignment`, `pull_request`, `ranking_score`, `report_link`, `reviewer_corrections`, `summary_change`, `task_run`, `title_change`, `video_segment`, `work_claim`, `work_release`.+ * Delete an artefact, addressed by id. Deleting the latest row of a status type reverts the report's canonical status to the previous version (latest-wins over what remains). `task_run` artefacts are an append-only work log and cannot be deleted. Neither can the types this API cannot write, which the pipeline owns: `autostart_skip`, `check_authoring`, `check_cancelled`, `check_expired`, `check_observation`, `check_result`, `check_scheduled`, `code_review`, `impact_measurement_plan`, `implementation_decision`, `implementation_dispatch`, `implementation_handover`, `implementation_replacement`, `pr_owner_assignment`, `pull_request`, `ranking_score`, `report_link`, `reviewer_corrections`, `scout_note_left`, `summary_change`, `task_run`, `title_change`, `video_segment`, `work_claim`, `work_release`.* @summary Delete an artefact*/export const SignalsReportArtefactsDestroyParams = () => zod.object({@@ -3208,6 +3208,12 @@ export const SignalsScoutNotesCreateBody = () => zod.describe('Address the note to one scout by its skill name (exact match against a configured scout on the project — check `scout-config-list` for the roster), or to one stage of the report pipeline by its reserved audience (`pipeline:report-research`). Use a pipeline audience for guidance about how reports get researched rather than about what the scouts watch, so it reaches that stage and no scout. Omit or leave blank for a general note every scout sees.'),+ report_id: zod+ .string()+ .nullish()+ .describe(+ "Optional id of the inbox report this note is about. The note then names the report so a scout can fetch it, and the report's activity log records that the note was left. Requires edit access to inbox reports, and the report must belong to this project. The report reference shares the note's character budget, so `content` is capped at 9938 characters when this is set."+ ),expires_at: zod.string().nullish()diff --git a/services/mcp/src/tools/generated/signals.ts b/services/mcp/src/tools/generated/signals.tsindex 52d4d3fc72e7..69b43259dcc8 100644--- a/services/mcp/src/tools/generated/signals.ts+++ b/services/mcp/src/tools/generated/signals.ts@@ -225,7 +225,7 @@ const InboxReportArtefactsCreateSchema = () => {.extend(SignalsReportArtefactsCreateBody.shape).extend({content: SignalsReportArtefactsCreateBody.shape['content'].describe(- 'The artefact payload as a JSON object or array, validated against the schema for `artefact_type`. `code_reference`: file_path, start_line, end_line, contents, relevance_note, for a contiguous span of at most 20 source lines (a single line has start_line equal to end_line). `commit`: repository, branch, commit_sha, message, for one commit already pushed to a remote branch. git_signed_commit usually records it for you, so create one only for a commit pushed by other means, and never for an unpushed or local-only commit. `note`: note, free-form. `priority_judgment`: explanation, priority (P0–P4). `actionability_judgment`: explanation, actionability, already_addressed. `safety_judgment`: choice. `repo_selection`: repository, reason. `suggested_reviewers`: a list of {github_login}. `source_suggestion`: product, reason, for a product the project does not use that would have given this report better evidence; the inbox hides it once the product is in use.'+ 'The artefact payload as a JSON object or array, validated against the schema for `artefact_type`. `code_reference`: file_path, start_line, end_line, contents, relevance_note, for a contiguous span of at most 20 source lines (a single line has start_line equal to end_line). `commit`: repository, branch, commit_sha, message, for one commit already pushed to a remote branch. git_signed_commit usually records it for you, so create one only for a commit pushed by other means, and never for an unpushed or local-only commit. `note`: note, free-form, for annotating a report with context; to also steer the scouts use `scout-notes-create` with `report_id`, which records the note on the report too. `priority_judgment`: explanation, priority (P0–P4). `actionability_judgment`: explanation, actionability, already_addressed. `safety_judgment`: choice. `repo_selection`: repository, reason. `suggested_reviewers`: a list of {github_login}. `source_suggestion`: product, reason, for a product the project does not use that would have given this report better evidence; the inbox hides it once the product is in use.'),})}@@ -2088,6 +2088,9 @@ const scoutNotesCreate = (): ToolBase<ReturnType<typeof ScoutNotesCreateSchema>,if (params.skill_name !== undefined) {body['skill_name'] = params.skill_name}+ if (params.report_id !== undefined) {+ body['report_id'] = params.report_id+ }if (params.expires_at !== undefined) {body['expires_at'] = params.expires_at}diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-report-artefacts-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-report-artefacts-create.jsonindex d15f93a96bf8..d3e60f3b1973 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-report-artefacts-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-report-artefacts-create.json@@ -10,7 +10,7 @@"type": "string"},"content": {- "description": "The artefact payload as a JSON object or array, validated against the schema for `artefact_type`. `code_reference`: file_path, start_line, end_line, contents, relevance_note, for a contiguous span of at most 20 source lines (a single line has start_line equal to end_line). `commit`: repository, branch, commit_sha, message, for one commit already pushed to a remote branch. git_signed_commit usually records it for you, so create one only for a commit pushed by other means, and never for an unpushed or local-only commit. `note`: note, free-form. `priority_judgment`: explanation, priority (P0–P4). `actionability_judgment`: explanation, actionability, already_addressed. `safety_judgment`: choice. `repo_selection`: repository, reason. `suggested_reviewers`: a list of {github_login}. `source_suggestion`: product, reason, for a product the project does not use that would have given this report better evidence; the inbox hides it once the product is in use."+ "description": "The artefact payload as a JSON object or array, validated against the schema for `artefact_type`. `code_reference`: file_path, start_line, end_line, contents, relevance_note, for a contiguous span of at most 20 source lines (a single line has start_line equal to end_line). `commit`: repository, branch, commit_sha, message, for one commit already pushed to a remote branch. git_signed_commit usually records it for you, so create one only for a commit pushed by other means, and never for an unpushed or local-only commit. `note`: note, free-form, for annotating a report with context; to also steer the scouts use `scout-notes-create` with `report_id`, which records the note on the report too. `priority_judgment`: explanation, priority (P0–P4). `actionability_judgment`: explanation, actionability, already_addressed. `safety_judgment`: choice. `repo_selection`: repository, reason. `suggested_reviewers`: a list of {github_login}. `source_suggestion`: product, reason, for a product the project does not use that would have given this report better evidence; the inbox hides it once the product is in use."},"expected_reviewers": {"description": "Report reviewer_assignment.state read before selection began. Required when reviewer corrections are enabled.",diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-notes-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-notes-create.jsonindex 20d8b8c7744e..d2c3b15236d2 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-notes-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-notes-create.json@@ -18,6 +18,17 @@],"description": "Optional ISO-8601 expiry. After this time the note drops out of the default list view, so time-boxed steering ('watch closely this week') retires itself. Omit for a note that stays active until deleted. Best-effort — a value that can't be parsed or is already in the past is dropped (the note stays active), not rejected, so the note is never lost."},+ "report_id": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "Optional id of the inbox report this note is about. The note then names the report so a scout can fetch it, and the report's activity log records that the note was left. Requires edit access to inbox reports, and the report must belong to this project. The report reference shares the note's character budget, so `content` is capped at 9938 characters when this is set."+ },"skill_name": {"description": "Address the note to one scout by its skill name (exact match against a configured scout on the project — check `scout-config-list` for the roster), or to one stage of the report pipeline by its reserved audience (`pipeline:report-research`). Use a pipeline audience for guidance about how reports get researched rather than about what the scouts watch, so it reaches that stage and no scout. Omit or leave blank for a general note every scout sees.","maxLength": 200,