: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): add verification plans to research (#91726)
Oliver Brownee4e9509e5825
diff --git a/docs/internal/signals-pr-lifecycle.md b/docs/internal/signals-pr-lifecycle.mdindex 56522fd0ae12..b2012ed2f912 100644--- a/docs/internal/signals-pr-lifecycle.md+++ b/docs/internal/signals-pr-lifecycle.md@@ -7,3 +7,19 @@ Attaching a new open, draft, or unknown PR to a resolved report returns it to reThe shared PR-linking service applies this rule to task outputs and agent attachments.An existing attachment retry does not reopen a report, and importing legacy assignments preserves its status.Suppressed reports remain suppressed when another PR is attached.++## Verification plans++After research completes, actionable reports can include a `Verification plan` note for the implementation agent.+This final request is optional: if generation or note conversion fails, research still completes without the note.+The findings, actionability, priority, title, and summary remain available.+Core research failures and cancellation still fail the run and trigger session cleanup.++The plan separates `Confirm the current state` guidance from `Confirm the outcome` guidance.+Each section says what evidence to collect, which result supports a conclusion, and which result is inconclusive.+The guidance can use a query, test, log search, replay, code review, or manual check, and does not prescribe a resolution.+Report retrieval directs any agent to the work log, where verification guidance applies regardless of how the agent started.+The agent checks that the note matches the current findings and confirms the current state before it starts work.+It confirms the outcome after the chosen resolution.+If current evidence shows the issue is gone, it records that result and stops; if no note applies, it verifies the issue from the report's evidence.+Missing data, failed checks, and inconclusive results do not establish that the issue is fixed.diff --git a/products/signals/backend/management/commands/analyze_report.py b/products/signals/backend/management/commands/analyze_report.pyindex 573beadd495e..603df146dcee 100644--- a/products/signals/backend/management/commands/analyze_report.py+++ b/products/signals/backend/management/commands/analyze_report.py@@ -271,6 +271,11 @@ class Command(BaseCommand):self.stdout.write(f"Priority explanation: {priority.explanation}")else:self.stdout.write("Priority: N/A (not actionable)")+ if result.verification_note:+ self.stdout.write("Verification note:")+ self.stdout.write(result.verification_note.note)+ else:+ self.stdout.write("Verification note: not generated")self.stdout.write("")for finding in result.effective_findings():self.stdout.write(self.style.WARNING(f"--- Signal: {finding.signal_id} ---"))diff --git a/products/signals/backend/report_generation/AGENTS.md b/products/signals/backend/report_generation/AGENTS.mdindex cf5cb0e8a2bc..af6abbd18889 100644--- a/products/signals/backend/report_generation/AGENTS.md+++ b/products/signals/backend/report_generation/AGENTS.md@@ -23,7 +23,10 @@ It is exercised locally via management commands, and it is also used by the prod- very short factual summary- optional typed impact metrics (see below), when the team is opted in- optional charts (see below), when the team is opted in- The repository used for research is tracked separately via the `repo_selection` artefact.+ - an optional task-attributed fix verification note for actionable reports++ The repository used for research is tracked separately via the `repo_selection` artefact.+- `reviewer_telemetry.py`Emits the `signals_suggested_reviewers_resolved` product-analytics event whenever a report's suggested reviewers are persisted, recording which GitHub logins link to a PostHog user and which don't (unlinkable reviewers can't be routed or run autostart, but still count as "assigned" in reviewer metrics).- Called after the artefact write commits (via `transaction.on_commit` where a transaction is open), never in-transaction: the research activity (`source="pipeline"`), scout report creation and reviewer edits (`"scout"` / `"scout_edit"`), custom-agent persistence (`"custom_agent"`), the app reviewers PUT (`"user_edit"`), and the artefacts POST (`"api"`).@@ -59,6 +62,7 @@ In production, the `update` path is triggered automatically when a `ready` reporThis 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.+Fix verification is best-effort. Generation failures do not fail completed research, but cancellation still does.### Chartsdiff --git a/products/signals/backend/report_generation/fixtures/analyze_report_funnel_research_output.json b/products/signals/backend/report_generation/fixtures/analyze_report_funnel_research_output.jsonindex fe86f3c95017..f653205646f3 100644--- a/products/signals/backend/report_generation/fixtures/analyze_report_funnel_research_output.json+++ b/products/signals/backend/report_generation/fixtures/analyze_report_funnel_research_output.json@@ -14,6 +14,7 @@"summary": "The signals point to missing funnel analysis capabilities rather than a broken funnel engine. The consistent gaps are native time-period comparison, fixed Time to Convert histogram buckets, and percentile-based conversion-time summaries, while the onboarding drop-off report could not be verified without customer data.","charts": [],"metrics": [],+ "verification_note": null,"new_artefacts": [],"old_artefacts": [{diff --git a/products/signals/backend/report_generation/fixtures/insight_scene_logic_mode_property_bug.json b/products/signals/backend/report_generation/fixtures/insight_scene_logic_mode_property_bug.jsonindex ace58e7f9801..f516edaccff1 100644--- a/products/signals/backend/report_generation/fixtures/insight_scene_logic_mode_property_bug.json+++ b/products/signals/backend/report_generation/fixtures/insight_scene_logic_mode_property_bug.json@@ -9,6 +9,7 @@"summary": "The docstring of the `_get_base_backup` function in `posthog/dags/backups.py` (line 346) misspells 'successful' as 'succesful'. This is a single-word typo in a docstring — no code behavior is affected.","charts": [],"metrics": [],+ "verification_note": null,"old_artefacts": [],"new_artefacts": [{diff --git a/products/signals/backend/report_generation/research.py b/products/signals/backend/report_generation/research.pyindex 766f9d1c769d..5367e0d23672 100644--- a/products/signals/backend/report_generation/research.py+++ b/products/signals/backend/report_generation/research.py@@ -13,6 +13,7 @@ from pydantic import BaseModel, Field, ValidationError, field_validator, model_vfrom products.signals.backend.artefact_schemas import (ActionabilityAssessment,ActionabilityChoice,+ NoteArtefact,Priority,PriorityAssessment,SignalFinding,@@ -48,12 +49,14 @@ logger = logging.getLogger(__name__)__all__ = ["ActionabilityAssessment","ActionabilityChoice",+ "FixVerificationOutput","Priority","PriorityAssessment","ReportPresentationOutput","ReportResearchOutput","ResearchArtefactContent","SignalFinding",+ "build_fix_verification_prompt","run_multi_turn_research",]@@ -159,6 +162,40 @@ Hard rules:return v+class FixVerificationOutput(BaseModel):+ """Session output for the final, actionable-only fix verification turn."""++ current_state: str = Field(+ description=(+ "Free-form guidance to confirm whether the reported issue still occurs. State the evidence to collect, "+ "the result that supports a conclusion, and the result that is inconclusive."+ ),+ )+ outcome: str = Field(+ description=(+ "Free-form guidance to confirm the intended outcome after the chosen resolution. State the evidence to "+ "collect, the result that supports a conclusion, and the result that is inconclusive."+ ),+ )++ @field_validator("current_state", "outcome")+ @classmethod+ def sections_must_not_be_empty(cls, section: str) -> str:+ section = section.strip()+ if not section:+ raise ValueError("Verification plan sections must not be empty")+ return section++ def to_note(self) -> NoteArtefact:+ return NoteArtefact(+ note=(+ f"## Verification plan\n\n"+ f"### Confirm the current state\n\n{self.current_state}\n\n"+ f"### Confirm the outcome\n\n{self.outcome}"+ )+ )++# The report artefacts a research run produces: one finding per signal plus the two assessments.ResearchArtefactContent = SignalFinding | ActionabilityAssessment | PriorityAssessment@@ -183,6 +220,13 @@ class ReportResearchOutput(BaseModel):description="UUID of the sandbox task that performed the research; artefacts persisted from ""this output are attributed to it. None for saved fixtures / pre-existing outputs.",)+ verification_note: NoteArtefact | None = Field(+ default=None,+ description=(+ "An optional final note with checks to reproduce the issue and verify a hypothetical fix after deployment. "+ "Present only when the report is actionable."+ ),+ )# The run's findings and assessments split by whether they changed: `old_artefacts` were# confirmed unchanged (already persisted — a re-research reusing them writes nothing) and# `new_artefacts` were produced or changed this run (persisted unconditionally). The report's@@ -785,6 +829,39 @@ Respond with a JSON object matching this schema:</jsonschema>"""+def build_fix_verification_prompt() -> str:+ """Build the final follow-up for actionable reports after all research and presentation work."""+ schema = json.dumps(FixVerificationOutput.model_json_schema(), indent=2)+ return f"""As the final step, write the **verification plan** for this actionable report.++Base the plan only on the evidence and successful checks from this research session. Do not do more research in this turn. Do not prescribe a resolution or claim that one exists.++Return two self-contained, free-form sections. Do not add headings because the pipeline adds them:++- In `current_state`, explain how to confirm whether the reported issue still occurs.+- In `outcome`, explain how to confirm the intended outcome after the chosen resolution.++Each section must state:++- What evidence to collect.+- What result supports the conclusion.+- What result is inconclusive.++Choose the most direct method supported by the research. It can be a query, test, log search, replay, code review, or manual check. Include the details needed to perform the check, such as known commands, inputs, IDs, filters, or time bounds. Do not force a product metric when another method gives better evidence.++State the observed baseline and comparison criterion when the research established them. Missing data, insufficient traffic, and failed checks are inconclusive. They do not show that the issue is resolved.++- Do not invent tool arguments, IDs, events, baselines, or numerical thresholds. If a required input or success criterion is unknown, name it and say what must be established before drawing a conclusion.++Do not include implementation instructions.++Respond with a JSON object matching this schema. The pipeline will format it as a note with the heading `Verification plan`:++<jsonschema>+{schema}+</jsonschema>"""++def _enforce_signal_id(finding: SignalFinding, expected_id: str) -> SignalFinding:"""Correct the finding's signal_id if the model returned a wrong one."""if finding.signal_id != expected_id:@@ -1030,6 +1107,30 @@ async def run_multi_turn_research(if output_fn:output_fn(f"Report title: {presentation_result.title}")+ # Final turn, and only for reports with a path to code work: turn the evidence already+ # gathered into a short operational check that the downstream implementation can run.+ verification_note: NoteArtefact | None = None+ if actionability_result.actionability != ActionabilityChoice.NOT_ACTIONABLE:+ if output_fn:+ output_fn("Generating fix verification steps...")+ verification_prompt = build_fix_verification_prompt()+ try:+ verification_result = await session.send_followup(+ verification_prompt,+ FixVerificationOutput,+ label="fix_verification",+ )+ verification_note = verification_result.to_note()+ except Exception:+ logger.exception(+ "multi_turn_research: failed to generate fix verification note",+ extra={+ "research_task_id": str(session.task.id),+ "team_id": context.team_id,+ "report_id": signal_report_id,+ },+ )+await session.end()except (Exception, asyncio.CancelledError) as e:# Shield so the session ending cannot itself be canceled - must complete@@ -1050,6 +1151,7 @@ async def run_multi_turn_research(charts=presentation_result.charts if charts_enabled else [],metrics=presentation_result.metrics if metrics_enabled else [],research_task_id=str(session.task.id),+ verification_note=verification_note,old_artefacts=old_artefacts,new_artefacts=new_artefacts,)diff --git a/products/signals/backend/temporal/agentic/report.py b/products/signals/backend/temporal/agentic/report.pyindex af7d65396f80..c1257b93f9cb 100644--- a/products/signals/backend/temporal/agentic/report.py+++ b/products/signals/backend/temporal/agentic/report.py@@ -486,7 +486,9 @@ async def _persist_agentic_report_artefacts(else ArtefactAttribution.system())# Everything the run flagged as new gets persisted; the artefact type derives from each content- # model. Reviewers are derived from findings, so they're only re-persisted when a finding changed.+ # model. The verification note is fresh output from the final turn of every actionable research+ # run, so it is appended as a log entry rather than folded into the latest-wins research state.+ # Reviewers are derived from findings, so they're only re-persisted when a finding changed.has_new_finding = any(isinstance(content, SignalFinding) for content in result.new_artefacts)# A reviewer or a scout can rewrite the selection while this run is in flight (a wrong-repo@@ -513,6 +515,8 @@ async def _persist_agentic_report_artefacts(),*(ArtefactDraft(content=content, attribution=research_attribution) for content in result.new_artefacts),]+ if result.verification_note is not None:+ artefacts.append(ArtefactDraft(content=result.verification_note, attribution=research_attribution))if reviewers_content and has_new_finding:artefacts.append(ArtefactDraft(diff --git a/products/signals/backend/test/test_agentic_report_activity.py b/products/signals/backend/test/test_agentic_report_activity.pyindex 2c688acb0673..2e8175d75b8f 100644--- a/products/signals/backend/test/test_agentic_report_activity.py+++ b/products/signals/backend/test/test_agentic_report_activity.py@@ -1,5 +1,6 @@import jsonimport random+import asynciofrom datetime import UTC, datetimeimport pytest@@ -9,6 +10,8 @@ from django.db import OperationalErrorimport pytest_asynciofrom asgiref.sync import sync_to_async+from parameterized import parameterized+from pydantic import ValidationErrorfrom posthog.models import Organization, Team, Userfrom posthog.models.organization import OrganizationMembership@@ -17,7 +20,7 @@ from posthog.models.user_integration import UserIntegrationfrom posthog.sync import database_sync_to_asyncfrom posthog.temporal.oauth import grants_scratchpad_write-from products.signals.backend.artefact_schemas import DISMISSAL_REASON_WRONG_REPO, Dismissal+from products.signals.backend.artefact_schemas import DISMISSAL_REASON_WRONG_REPO, Dismissal, NoteArtefactfrom products.signals.backend.models import ArtefactAttribution, SignalReport, SignalReportArtefact, SignalScoutNotefrom products.signals.backend.repo_corrections import SCOUT_REPOSITORY_REASONfrom products.signals.backend.report_charts import ReportChart@@ -25,9 +28,11 @@ from products.signals.backend.report_generation.research import (ActionabilityAssessment,ActionabilityChoice,ActionabilityUpdate,+ FixVerificationOutput,Priority,PriorityAssessment,PriorityUpdate,+ ReportPresentationOutput,ReportResearchOutput,SignalFinding,_resolve_actionability_response,@@ -88,6 +93,15 @@ def _build_research_output() -> ReportResearchOutput:return ReportResearchOutput(title="Onboarding funnel completion tracking may be regressing",summary="Signals point to a likely regression around onboarding completion event tracking.",+ verification_note=NoteArtefact(+ note=(+ "## Verification plan\n\n"+ "### Confirm the current state\n\n"+ "Run query-trends for onboarding_completed over the same 14-day window.\n\n"+ "### Confirm the outcome\n\n"+ "Confirm completion volume returns to its pre-regression baseline."+ )+ ),new_artefacts=[SignalFinding(signal_id="sig-1",@@ -522,6 +536,7 @@ async def test_run_agentic_report_activity_persists_artefacts(monkeypatch, ateam)()assert [artefact.type for artefact in artefacts] == [SignalReportArtefact.ArtefactType.ACTIONABILITY_JUDGMENT,+ SignalReportArtefact.ArtefactType.NOTE,SignalReportArtefact.ArtefactType.PRIORITY_JUDGMENT,SignalReportArtefact.ArtefactType.REPO_SELECTION,SignalReportArtefact.ArtefactType.SIGNAL_FINDING,@@ -535,14 +550,26 @@ async def test_run_agentic_report_activity_persists_artefacts(monkeypatch, ateam"already_addressed": False,}- priority_content = json.loads(artefacts[1].content)+ note_content = json.loads(artefacts[1].content)+ assert note_content == {+ "note": (+ "## Verification plan\n\n"+ "### Confirm the current state\n\n"+ "Run query-trends for onboarding_completed over the same 14-day window.\n\n"+ "### Confirm the outcome\n\n"+ "Confirm completion volume returns to its pre-regression baseline."+ ),+ "author": None,+ }++ priority_content = json.loads(artefacts[2].content)assert priority_content == {"priority": "P1","explanation": "The regression affects a core onboarding flow and should be addressed quickly.","dollar_value": 5000.0,}- repo_selection_content = json.loads(artefacts[2].content)+ repo_selection_content = json.loads(artefacts[3].content)assert repo_selection_content == {"repository": "posthog/posthog","reason": "Single repository connected: posthog/posthog",@@ -550,7 +577,7 @@ async def test_run_agentic_report_activity_persists_artefacts(monkeypatch, ateam"autostart_eligible": True,}- finding_contents = [json.loads(artefact.content) for artefact in artefacts[3:]]+ finding_contents = [json.loads(artefact.content) for artefact in artefacts[4:]]assert [finding["signal_id"] for finding in finding_contents] == ["sig-1", "sig-2"]@@ -1003,6 +1030,110 @@ async def test_run_agentic_report_activity_does_not_persist_partial_artefacts(moassert artefact_count == 0+ [+ ("immediately_actionable", ActionabilityChoice.IMMEDIATELY_ACTIONABLE, None),+ ("requires_human_input", ActionabilityChoice.REQUIRES_HUMAN_INPUT, None),+ ("not_actionable", ActionabilityChoice.NOT_ACTIONABLE, None),+ ("timeout", ActionabilityChoice.IMMEDIATELY_ACTIONABLE, TimeoutError),+ ("validation_failure", ActionabilityChoice.IMMEDIATELY_ACTIONABLE, ValidationError),+ ("cancellation", ActionabilityChoice.IMMEDIATELY_ACTIONABLE, asyncio.CancelledError),+ ]+)+async def test_run_multi_turn_research_requests_verification_note_as_the_final_actionable_step(+ _name: str, actionability: ActionabilityChoice, failure: type[BaseException] | None+) -> None:+ session = Mock()+ session.task = Mock(id="research-task-id")+ session.end = AsyncMock()++ actionability_result = ActionabilityAssessment(+ explanation="The research found a concrete code path and measured impact.",+ actionability=actionability,+ already_addressed=False,+ )+ responses: list[+ ActionabilityAssessment | PriorityAssessment | ReportPresentationOutput | FixVerificationOutput | BaseException+ ] = [actionability_result]+ expected_labels = ["actionability"]+ priority_result: PriorityAssessment | None = None+ if actionability != ActionabilityChoice.NOT_ACTIONABLE:+ priority_result = PriorityAssessment(+ explanation="The measured impact supports this priority.",+ priority=Priority.P2,+ dollar_value=1000.0,+ )+ responses.append(priority_result)+ expected_labels.append("priority")+ presentation_result = ReportPresentationOutput(+ title="fix(onboarding): restore completion tracking",+ summary="Users cannot complete the tracked onboarding flow.",+ )+ responses.append(presentation_result)+ expected_labels.append("presentation")+ verification_error: BaseException | None = None+ if actionability != ActionabilityChoice.NOT_ACTIONABLE:+ expected_labels.append("fix_verification")+ if failure is ValidationError:+ with pytest.raises(ValidationError) as exc_info:+ FixVerificationOutput(current_state=" ", outcome="Confirm the outcome.")+ verification_error = exc_info.value+ elif failure is not None:+ verification_error = failure("Verification interrupted")+ responses.append(+ verification_error+ if verification_error is not None+ else FixVerificationOutput(+ current_state="Run query-trends for onboarding_completed over the same 14-day window.",+ outcome="Confirm event volume returns to the pre-regression baseline.",+ )+ )+ session.send_followup = AsyncMock(side_effect=responses)+ first_finding = SignalFinding(signal_id="sig-1", relevant_code_paths=[], data_queried="", verified=True)++ with (+ patch(+ "products.tasks.backend.facade.agents.MultiTurnSession.start",+ AsyncMock(return_value=(session, first_finding)),+ ),+ patch("products.signals.backend.task_run_artefacts.aappend_task_run_artefact", new_callable=AsyncMock),+ patch("products.signals.backend.report_generation.research.logger.exception") as log_exception,+ ):+ if failure is asyncio.CancelledError:+ with pytest.raises(asyncio.CancelledError) as canceled:+ await run_multi_turn_research(_build_signals()[:1], Mock(team_id=1), signal_report_id="report-id")+ assert canceled.value is verification_error+ else:+ result = await run_multi_turn_research(_build_signals()[:1], Mock(team_id=1), signal_report_id="report-id")+ assert result.effective_findings() == [first_finding]+ assert result.effective_actionability() == actionability_result+ assert result.effective_priority() == priority_result+ assert result.title == presentation_result.title+ assert result.summary == presentation_result.summary+ assert result.research_task_id == "research-task-id"+ if actionability != ActionabilityChoice.NOT_ACTIONABLE and failure is None:+ assert result.verification_note is not None+ assert result.verification_note.note.startswith(+ "## Verification plan\n\n### Confirm the current state\n\n"+ )+ else:+ assert result.verification_note is None++ labels = [call.kwargs["label"] for call in session.send_followup.await_args_list]+ assert labels == expected_labels+ if failure is asyncio.CancelledError:+ session.end.assert_awaited_once_with(status="failed", error=str(verification_error))+ else:+ session.end.assert_awaited_once_with()+ if failure is not None and failure is not asyncio.CancelledError:+ log_exception.assert_called_once_with(+ "multi_turn_research: failed to generate fix verification note",+ extra={"research_task_id": "research-task-id", "team_id": 1, "report_id": "report-id"},+ )+ else:+ log_exception.assert_not_called()++@pytest.mark.asyncioasync def test_run_multi_turn_research_ends_session_when_followup_fails():signals = _build_signals()diff --git a/products/signals/backend/test/test_research_prompt.py b/products/signals/backend/test/test_research_prompt.pyindex 598a1556cb6f..89804821266e 100644--- a/products/signals/backend/test/test_research_prompt.py+++ b/products/signals/backend/test/test_research_prompt.py@@ -5,10 +5,12 @@ import pytestfrom products.signals.backend.report_charts import ReportChartfrom products.signals.backend.report_generation.research import (+ FixVerificationOutput,ReportPresentationOutput,SignalFinding,_render_previous_metrics_context,_render_signal_for_research,+ build_fix_verification_prompt,build_initial_research_prompt,build_report_presentation_prompt,build_signal_investigation_prompt,@@ -154,6 +156,46 @@ class TestBuildInitialResearchPrompt:assert "There is no previous finding for this signal" in followup_prompt+class TestBuildFixVerificationPrompt:+ def test_is_a_final_step_based_on_completed_research(self):+ prompt = build_fix_verification_prompt()++ assert "As the final step" in prompt+ assert "Do not do more research in this turn" in prompt+ assert "Do not prescribe a resolution" in prompt+ assert "In `current_state`" in prompt+ assert "In `outcome`" in prompt+ assert "query, test, log search, replay, code review, or manual check" in prompt+ assert "What evidence to collect" in prompt+ assert "What result supports the conclusion" in prompt+ assert "What result is inconclusive" in prompt+ assert "Missing data, insufficient traffic, and failed checks are inconclusive" in prompt+ assert "Do not invent tool arguments, IDs, events, baselines, or numerical thresholds" in prompt+ assert '"current_state"' in prompt+ assert '"outcome"' in prompt++ def test_formats_plan_as_a_note_with_the_expected_headings(self):+ current_state = (+ 'Run query-trends with {"kind":"TrendsQuery","dateRange":{"date_from":"-1h"},'+ '"interval":"hour","series":[{"kind":"EventsNode","event":"upload_failed","math":"total"},'+ '{"kind":"EventsNode","event":"upload_completed","math":"total"}]}. '+ "Any upload_failed events confirm that uploads still fail. No upload events is inconclusive."+ )+ outcome = (+ "Repeat the same query after the chosen resolution, once an hour of traffic is available. Use a window "+ "that excludes earlier data. Zero upload_failed events alongside "+ "upload_completed events supports recovery; any failure means the issue still occurs. "+ "No upload events or a failed query is inconclusive."+ )+ result = FixVerificationOutput(current_state=f" {current_state} ", outcome=f" {outcome} ")++ assert result.to_note().note == (+ f"## Verification plan\n\n"+ f"### Confirm the current state\n\n{current_state}\n\n"+ f"### Confirm the outcome\n\n{outcome}"+ )++def _make_chart() -> ReportChart:return ReportChart(chart_id="signups-drop",diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 28295b107d86..e84686436213 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -76,6 +76,11 @@ tools:priority, repo_selection, suggested_reviewers — the newest row of each status type is the canonical status),and work-log entries (code references, commits, task runs, notes). Read this before re-judging a status oradding to the log.+ agent_note: >+ Find the newest applicable `## Verification plan`. Treat it as guidance, not evidence. Confirm the current+ state before work and the outcome after the chosen resolution. Missing or inconclusive evidence does not+ show resolution. If the issue no longer occurs, record the result and reassess the report. If no plan+ applies, verify the issue from the report's evidence.inbox-report-artefacts-retrieve:operation: signals_report_artefacts_retrieveenabled: true@@ -258,6 +263,9 @@ tools:identified in the report, call inbox-reports-claim to record that you are working on it. Taking ownershipfrom another actor requires `takeover=true`.+ Before work, read the work log and follow the newest applicable `## Verification plan`. Confirm the current+ state before work and the outcome after the chosen resolution.+If you create a pull request implementing the remediation, call inbox-reports-claim with the returned`claim_id` and `pull_requests` to add it. Send all currently known PRs together, including stacks andcross-repository changes. Release the claim if you stop work without completing the report. If the reportdiff --git a/services/mcp/src/tools/generated/signals.ts b/services/mcp/src/tools/generated/signals.tsindex 15215d2d1b17..1b5e584ec0c1 100644--- a/services/mcp/src/tools/generated/signals.ts+++ b/services/mcp/src/tools/generated/signals.ts@@ -76,7 +76,7 @@ const InboxReportArtefactsListSchema = () => {const inboxReportArtefactsList = (): ToolBase<ReturnType<typeof InboxReportArtefactsListSchema>,- WithPostHogUrl<Schemas.PaginatedSignalReportArtefactList>+ WithAgentNote<WithPostHogUrl<Schemas.PaginatedSignalReportArtefactList>>> => ({name: 'inbox-report-artefacts-list',schema: InboxReportArtefactsListSchema(),@@ -90,7 +90,10 @@ const inboxReportArtefactsList = (): ToolBase<offset: params.offset,},})- return await withPostHogUrl(context, result, '/inbox')+ return withAgentNote(+ await withPostHogUrl(context, result, '/inbox'),+ "Find the newest applicable `## Verification plan`. Treat it as guidance, not evidence. Confirm the current state before work and the outcome after the chosen resolution. Missing or inconclusive evidence does not show resolution. If the issue no longer occurs, record the result and reassess the report. If no plan applies, verify the issue from the report's evidence.\n"+ )},})@@ -342,7 +345,7 @@ const inboxReportsRetrieve = (): ToolBase<})return withAgentNote(await withPostHogUrl(context, result, `/inbox/${result.id}`),- 'You may inspect reports without claiming them. A claim indicates active work that should not be duplicated. Before claiming a report, read the report and its work log. If you decide to begin working to fix the issues identified in the report, call inbox-reports-claim to record that you are working on it. Taking ownership from another actor requires `takeover=true`.\nIf you create a pull request implementing the remediation, call inbox-reports-claim with the returned `claim_id` and `pull_requests` to add it. Send all currently known PRs together, including stacks and cross-repository changes. Release the claim if you stop work without completing the report. If the report should be considered resolved without a pull request, or PostHog cannot observe the pull request merge, resolve it with inbox-reports-set-state.\n'+ 'You may inspect reports without claiming them. A claim indicates active work that should not be duplicated. Before claiming a report, read the report and its work log. If you decide to begin working to fix the issues identified in the report, call inbox-reports-claim to record that you are working on it. Taking ownership from another actor requires `takeover=true`.\nBefore work, read the work log and follow the newest applicable `## Verification plan`. Confirm the current state before work and the outcome after the chosen resolution.\nIf you create a pull request implementing the remediation, call inbox-reports-claim with the returned `claim_id` and `pull_requests` to add it. Send all currently known PRs together, including stacks and cross-repository changes. Release the claim if you stop work without completing the report. If the report should be considered resolved without a pull request, or PostHog cannot observe the pull request merge, resolve it with inbox-reports-set-state.\n')},})