: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 activity summaries to scout-members-list (#129371)
posthog[bot]bd03e9a4e211
diff --git a/products/signals/backend/activity_summary/read.py b/products/signals/backend/activity_summary/read.pyindex 537a416cb13b..4052f5bfc760 100644--- a/products/signals/backend/activity_summary/read.py+++ b/products/signals/backend/activity_summary/read.py@@ -19,7 +19,7 @@ from products.signals.backend.activity_summary.queue import is_team_enrolled_forfrom products.signals.backend.models import UserActivitySummary, UserActivitySummaryVersionDEFAULT_VERSIONS_LIMIT = 5-_SKIPPED_REBUILD_STATUSES = frozenset({UserActivitySummary.Status.SKIPPED, UserActivitySummary.Status.EMPTY_PROFILE})+SKIPPED_REBUILD_STATUSES = frozenset({UserActivitySummary.Status.SKIPPED, UserActivitySummary.Status.EMPTY_PROFILE})class ActivitySummaryStatus(models.TextChoices):@@ -124,7 +124,7 @@ def get_summary(team: Team, user_id: int) -> ActivitySummaryView | None:row = UserActivitySummary.objects.for_team(team.id).filter(user_id=user_id).first()if row is None or (view := ready_view(row, config)) is None:return ActivitySummaryView(status=ActivitySummaryStatus.NOT_READY)- if view.stale and row.status in _SKIPPED_REBUILD_STATUSES:+ if view.stale and row.status in SKIPPED_REBUILD_STATUSES:return ActivitySummaryView(status=ActivitySummaryStatus.NOT_READY)return viewdiff --git a/products/signals/backend/activity_summary/search.py b/products/signals/backend/activity_summary/search.pyindex d5a3f80bcda9..6576c8e5c0f6 100644--- a/products/signals/backend/activity_summary/search.py+++ b/products/signals/backend/activity_summary/search.py@@ -27,8 +27,10 @@ from posthog.dataclasses import frozenfrom posthog.models import Team, Userfrom posthog.ph_client import feature_enabled_or_false+from products.signals.backend.activity_summary.config import ActivitySummaryConfigfrom products.signals.backend.activity_summary.prompt import EMBEDDING_DOCUMENT_TYPE, EMBEDDING_RENDERINGfrom products.signals.backend.activity_summary.read import (+ SKIPPED_REBUILD_STATUSES,ActivitySummaryTheme,ActivitySummaryView,readable_config,@@ -47,6 +49,10 @@ MAX_LIMIT = 25# The standard constant from the reciprocal rank fusion paper. It keeps one top rank from outweighing# agreement between the two rankings.RRF_K = 60+# The member roster attaches activity only to a narrowed result, so a full roster stays small.+MAX_MEMBERS_WITH_ACTIVITY = 10+# The roster carries a short activity block per member, so it keeps only the most active objects.+MAX_MEMBER_ACTIVITY_OBJECTS = 5EMBEDDING_TIMEOUT_S = 10.0# A stalled read must end inside the MCP request deadline, so that a hybrid search can still return its keyword ranking.VECTOR_READ_MAX_EXECUTION_S = 10@@ -130,6 +136,22 @@ class ActivitySummarySearchResult:not_ready_count: int+@frozen+class MemberActivityObject:+ type: str+ name: str+++@frozen+class MemberActivity:+ headline: str | None+ themes: tuple[str, ...]+ owned: tuple[MemberActivityObject, ...]+ watched: tuple[MemberActivityObject, ...]+ generated_at: datetime.datetime | None+ stale: bool++@frozenclass _Candidate:user: User@@ -156,6 +178,14 @@ def search_enabled(team: Team) -> bool:return False+def searchable_config(team: Team) -> ActivitySummaryConfig | None:+ """The read config when `team` can search summaries: the team is enrolled for reads and the search flag is on."""+ config = readable_config(team)+ if config is None or not search_enabled(team):+ return None+ return config++def search_summaries(team: Team,*,@@ -171,8 +201,8 @@ def search_summaries(Returns `None` when the team is not enrolled for reads or the search flag is off. Raises`SemanticSearchUnavailable` only for a semantic search, because a hybrid one keeps its keyword ranking."""- config = readable_config(team)- if config is None or not search_enabled(team):+ config = searchable_config(team)+ if config is None:return Nonelimit = max(1, min(limit, MAX_LIMIT))members = {user.id: user for user in team.all_users_with_access().order_by("id")}@@ -240,6 +270,50 @@ def search_summaries()+def member_activities(team: Team, user_uuids: Sequence[str]) -> dict[str, MemberActivity] | None:+ """The ready activity summaries of the given members, keyed by user UUID.++ Returns `None` when the team is not enrolled for reads or the search flag is off. A member without+ a ready summary, or without access to `team`, has no key.+ """+ config = searchable_config(team)+ if config is None:+ return None+ members = {+ user_id: str(user_uuid)+ for user_id, user_uuid in team.all_users_with_access().filter(uuid__in=user_uuids).values_list("id", "uuid")+ }+ # Two queries, not a join: the summary's user FK has no database constraint.+ rows = UserActivitySummary.objects.for_team(team.id).filter(user_id__in=members.keys())+ activities: dict[str, MemberActivity] = {}+ for row in rows:+ view = ready_view(row, config)+ # Same readiness rule as `get_summary`: a stale summary whose rebuild skipped is not ready.+ if view is None or (view.stale and row.status in SKIPPED_REBUILD_STATUSES):+ continue+ computed = view.computed or {}+ activities[members[row.user_id]] = MemberActivity(+ headline=view.headline,+ themes=tuple(theme.label for theme in view.themes),+ owned=_activity_objects(computed, "owned"),+ watched=_activity_objects(computed, "watched"),+ generated_at=view.generated_at,+ stale=view.stale,+ )+ return activities+++def _activity_objects(computed: dict[str, Any], key: str) -> tuple[MemberActivityObject, ...]:+ items = computed.get(key)+ if not isinstance(items, list):+ return ()+ return tuple(+ MemberActivityObject(type=str(item.get("type") or ""), name=str(item.get("name") or ""))+ for item in items+ if isinstance(item, dict)+ )[:MAX_MEMBER_ACTIVITY_OBJECTS]++def _prefetch_github_identities(candidates: Sequence[_Candidate]) -> None:# Deferred: resolve_reviewers imports the engineering_analytics facade, which imports the signals facade.from products.signals.backend.report_generation.resolve_reviewers import ( # noqa: PLC0415diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.mdindex cfede2e8c301..0e0b1ef85592 100644--- a/products/signals/backend/scout_harness/AGENTS.md+++ b/products/signals/backend/scout_harness/AGENTS.md@@ -124,6 +124,7 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e`SignalScoutMembersViewSet` (`scout-members-list`) is the reviewer-routing roster:it returns the project's members (those with access to the team) with `user_uuid` / `email` / `github_login` so a report-channel scout can populate `suggested_reviewers` at cold start. The roster is member PII the scout needs to route, gated on the internal `signal_scout_internal` scope object (`scope_object = "signal_scout_internal"`, default `list` → `signal_scout_internal:read`, satisfied by the sandbox token's `…:write`) — so, like `emit-signal`, it is reachable only inside a scout run and never enters a customer's public MCP catalog. (The narrower `signal_scout_report` scope was considered but is transient — kept only while emit-signal and emit-report coexist — so the durable tool stays on `signal_scout_internal`.) Membership is resolved server-side via `report_generation/resolve_reviewers.list_project_members` (through `Team.all_users_with_access()`, so private-project access control is honored), the project-nested path that the org-nested `org-members-list` tool (stripped + 403'd for a scoped-team token) can't provide.Each row also carries the `teams` that member is on, and `?team=<slug>` narrows the roster to one team with its maintainers first, which is how a slug from a scout note, CODEOWNERS, or an `owners.yaml` owner becomes reviewers (`report_generation/team_membership.py` resolves the roster through the engineering_analytics facade). The filter returns 400 rather than an empty list when the project has no synced roster or the roster holds no rows for the slug: team rosters sync one by one, so an absent slug almost always means unsynced coverage, and a scout that reads an empty list as "no such team" stops routing to a team that exists.+ A `search` or `team` call that returns at most `MAX_MEMBERS_WITH_ACTIVITY` rows also attaches each member's `activity` (headline, theme labels, and the type and name of the top owned and watched objects) through `activity_summary/search.member_activities`, behind the same enrollment and `activity-summary-search` flag gates as `activity-summary-search`. The read is best effort: a failure logs and leaves `activity` null, so it can never take the roster down. It stays in the viewset, not in `list_project_members`, so `resolve_reviewers` is unaffected.The config viewset remains the lower-level no-wait creation path: `create` registers (upserts) a config for an already-authored skill with its schedule/emit posture in one call.`list` is strictly read-only (its MCP tool is annotated `readOnly`) — it never mints config rows. The metadata viewset is the read-only `scout/metadata/current/` endpoint that reports enrollment + banner + enforced limits via `team_limits.resolve_team_metadata`.diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex 66e81e5e53e9..1d26de20909c 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -34,6 +34,7 @@ from posthog.permissions import get_authenticator_scopes, scopes_missing_after_lfrom posthog.slack.formatting import channel_id_from_targetfrom posthog.temporal.oauth import SCOUT_DEFAULT_WRITE_SCOPES, SCOUT_GRANTABLE_WRITE_SCOPES+from products.signals.backend.activity_summary.search import MAX_MEMBER_ACTIVITY_OBJECTS, MAX_MEMBERS_WITH_ACTIVITYfrom products.signals.backend.artefact_schemas import (MAX_REPORT_LINK_REASON_LENGTH,MAX_REPORT_LINKS_PER_WRITE,@@ -4746,6 +4747,34 @@ class ScoutMemberTeamSerializer(serializers.Serializer):)+class ScoutMemberActivityObjectSerializer(serializers.Serializer):+ type = serializers.CharField(help_text="The object type in snake case, such as `dashboard` or `feature_flag`.")+ name = serializers.CharField(help_text="The latest name of the object.")+++class ScoutMemberActivitySerializer(serializers.Serializer):+ """What one member worked on recently, from their activity summary."""++ headline = serializers.CharField(allow_null=True, help_text="One line about the member's recent work.")+ themes = serializers.ListField(+ child=serializers.CharField(), help_text="The labels of the main threads of the member's recent work."+ )+ owned = ScoutMemberActivityObjectSerializer(+ many=True,+ help_text=f"Up to {MAX_MEMBER_ACTIVITY_OBJECTS} objects the member created or changed, the most edited first.",+ )+ watched = ScoutMemberActivityObjectSerializer(+ many=True,+ help_text=f"Up to {MAX_MEMBER_ACTIVITY_OBJECTS} objects the member opened on several days, the most opened "+ "first. A member who only reads the work shows up here. A specific object here can support a reviewer "+ "pick when the pick's `reason` names it.",+ )+ generated_at = serializers.DateTimeField(allow_null=True, help_text="When the summary was written.")+ stale = serializers.BooleanField(+ help_text="True when the summary waits for a rebuild in a newer format. Give a stale summary less weight."+ )++class ScoutMemberSerializer(serializers.Serializer):"""One project member's routing identity, for picking a `suggested_reviewers` entry on a report."""@@ -4775,3 +4804,14 @@ class ScoutMemberSerializer(serializers.Serializer):"login. The roster is a periodic snapshot, so it can lag the live team."),)+ activity = ScoutMemberActivitySerializer(+ allow_null=True,+ required=False,+ default=None,+ help_text=(+ "What the member worked on recently. Use it as context to check against the report, not as proof: "+ "general activity is not evidence that the member owns the affected work. Filled only when the call "+ f"passes `search` or `team` and returns at most {MAX_MEMBERS_WITH_ACTIVITY} members. Null when the "+ "member has no ready summary, or when activity summaries are not available for this project."+ ),+ )diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.pyindex 6603e3913c8e..17897532dc4b 100644--- a/products/signals/backend/scout_harness/views.py+++ b/products/signals/backend/scout_harness/views.py@@ -77,6 +77,11 @@ from posthog.temporal.oauth import SCOUT_DEFAULT_WRITE_SCOPES, SCOUT_GRANTABLE_Wfrom posthog.user_permissions import UserPermissionsfrom products.access_control.backend.facade.user_access_control import UserAccessControl+from products.signals.backend.activity_summary.search import (+ MAX_MEMBERS_WITH_ACTIVITY,+ MemberActivity,+ member_activities,+)from products.signals.backend.artefact_schemas import ReviewerStatefrom products.signals.backend.background_pilot import OPT_OUT_DELETED, capture_background_scout_opted_outfrom products.signals.backend.constants import SYSTEM_SCOUT_NAMES@@ -2610,8 +2615,10 @@ class SignalScoutMembersViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet)"and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner ""by email/name, then put their resolved `github_login` in `suggested_reviewers` on `emit-report` / ""`edit-report`. Pass `team` to resolve a team slug to the people on it, maintainers first. Pass "- f"`search` to narrow a large roster; the result is capped at {MAX_PROJECT_MEMBERS}. Strictly "- "team-scoped."+ f"`search` to narrow a large roster; the result is capped at {MAX_PROJECT_MEMBERS}. When `search` or "+ f"`team` narrows the result to {MAX_MEMBERS_WITH_ACTIVITY} members or fewer, each row also carries "+ "`activity`: the member's recent work, so you can check they are close to the affected area. "+ "Strictly team-scoped."),operation_id="signals_scout_members_list",)@@ -2626,9 +2633,24 @@ class SignalScoutMembersViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet)raise exceptions.ValidationError({"detail": MEMBERSHIP_NOT_SYNCED})if team_slug is not None and not roster.team_is_covered:raise exceptions.ValidationError({"detail": TEAM_NOT_IN_ROSTER.format(team=team_slug)})- return Response(- ScoutMemberSerializer([dataclasses.asdict(member) for member in roster.members], many=True).data- )+ rows = [dataclasses.asdict(member) for member in roster.members]+ if (validated.get("search") or team_slug) and len(rows) <= MAX_MEMBERS_WITH_ACTIVITY:+ activities = _member_activities(canonical_team, [row["user_uuid"] for row in rows])+ for row in rows:+ activity = activities.get(row["user_uuid"])+ row["activity"] = dataclasses.asdict(activity) if activity is not None else None+ return Response(ScoutMemberSerializer(rows, many=True).data)+++def _member_activities(team: Team, user_uuids: list[str]) -> dict[str, MemberActivity]:+ """Best effort: the roster is the routing source, so a failed activity read leaves every row without one."""+ if not user_uuids:+ return {}+ try:+ return member_activities(team, user_uuids) or {}+ except Exception:+ logger.exception("scout_members_activity_read_failed", team_id=team.id)+ return {}def _reject_if_enabled_cap_reached(team_id: int, skill_name: str, *, cap: int) -> None:diff --git a/products/signals/backend/test/test_activity_summary_api.py b/products/signals/backend/test/test_activity_summary_api.pyindex ae4f8a393011..86efef6eb7eb 100644--- a/products/signals/backend/test/test_activity_summary_api.py+++ b/products/signals/backend/test/test_activity_summary_api.py@@ -15,6 +15,7 @@ from posthog.models import Organization, Userfrom products.signals.backend.activity_summary.config import ActivitySummaryConfigfrom products.signals.backend.activity_summary.prompt import PROMPT_VERSIONfrom products.signals.backend.activity_summary.render import RENDER_VERSION+from products.signals.backend.activity_summary.search import member_activitiesfrom products.signals.backend.models import UserActivitySummary, UserActivitySummaryVersionfrom products.signals.backend.test.test_scout_harness_api import _authenticate_as_scout@@ -241,6 +242,7 @@ class TestActivitySummaryAPI(APIBaseTest):SEARCH = "products.signals.backend.activity_summary.search"+SCOUT_VIEWS = "products.signals.backend.scout_harness.views"@time_machine.travel(NOW, tick=False)@@ -367,3 +369,52 @@ class TestActivitySummarySearchAPI(APIBaseTest):self.client.force_login(self.user)assert self._search(query="onboarding").status_code == 403++ def _members(self, **params: Any) -> Any:+ return self.client.get(f"/api/projects/{self.team.id}/signals/scout/members/", params)++ def test_a_narrowed_member_roster_carries_each_members_activity(self) -> None:+ self._summary(self.reader, "Plans the roadmap.", watched="Onboarding drop-off")+ User.objects.create_and_join(self.organization, "[email protected]", None, first_name="Restless")++ response = self._members(search="re")++ assert response.status_code == 200, response.content+ by_email = {row["email"]: row for row in response.json()}+ assert by_email["[email protected]"]["activity"] is None+ activity = by_email["[email protected]"]["activity"]+ assert activity["headline"] == "Plans the roadmap."+ assert activity["themes"] == ["Signup funnel"]+ assert activity["owned"] == [{"type": "insight", "name": "Signup funnel"}]+ assert activity["watched"] == [{"type": "dashboard", "name": "Onboarding drop-off"}]+ assert activity["stale"] is False++ @parameterized.expand(+ [+ ("no_narrowing", False),+ ("over_row_limit", False),+ ("flag_off", True),+ ("not_enrolled", True),+ ("read_fails", True),+ ]+ )+ def test_member_roster_falls_back_to_no_activity(self, case: str, reads_activity: bool) -> None:+ self._summary(self.reader, "Plans the roadmap.")+ params = {} if case == "no_narrowing" else {"search": "reader"}+ if case == "over_row_limit":+ patch(f"{SCOUT_VIEWS}.MAX_MEMBERS_WITH_ACTIVITY", 0).start()+ if case == "flag_off":+ patch(f"{SEARCH}.feature_enabled_or_false", return_value=False).start()+ if case == "not_enrolled":+ self.config = dataclasses.replace(self.config, enabled=False)+ if case == "read_fails":+ patch(f"{SEARCH}.ready_view", side_effect=RuntimeError("bad row")).start()++ with patch(f"{SCOUT_VIEWS}.member_activities", wraps=member_activities) as read:+ response = self._members(**params)++ assert response.status_code == 200, response.content+ rows = response.json()+ assert str(self.reader.uuid) in {row["user_uuid"] for row in rows}+ assert all(row["activity"] is None for row in rows)+ assert read.called is reads_activitydiff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex 994d5721f428..7db77faa885b 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -8635,6 +8635,37 @@ export interface ScoutMemberTeamApi {is_maintainer: boolean}+export interface ScoutMemberActivityObjectApi {+ /** The object type in snake case, such as `dashboard` or `feature_flag`. */+ type: string+ /** The latest name of the object. */+ name: string+}++/**+ * What one member worked on recently, from their activity summary.+ */+export interface ScoutMemberActivityApi {+ /**+ * One line about the member's recent work.+ * @nullable+ */+ headline: string | null+ /** The labels of the main threads of the member's recent work. */+ themes: string[]+ /** Up to 5 objects the member created or changed, the most edited first. */+ owned: ScoutMemberActivityObjectApi[]+ /** Up to 5 objects the member opened on several days, the most opened first. A member who only reads the work shows up here. A specific object here can support a reviewer pick when the pick's `reason` names it. */+ watched: ScoutMemberActivityObjectApi[]+ /**+ * When the summary was written.+ * @nullable+ */+ generated_at: string | null+ /** True when the summary waits for a rebuild in a newer format. Give a stale summary less weight. */+ stale: boolean+}+/*** One project member's routing identity, for picking a `suggested_reviewers` entry on a report.*/@@ -8654,6 +8685,8 @@ export interface ScoutMemberApi {github_login: string | null/** The teams this member is on, from the project's synced team roster. Empty when no roster is synced, or when the member has no linked GitHub account, since the roster is keyed on that login. The roster is a periodic snapshot, so it can lag the live team. */teams: ScoutMemberTeamApi[]+ /** What the member worked on recently. Use it as context to check against the report, not as proof: general activity is not evidence that the member owns the affected work. Filled only when the call passes `search` or `team` and returns at most 10 members. Null when the member has no ready summary, or when activity summaries are not available for this project. */+ activity?: ScoutMemberActivityApi | null}/**diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex a1bb13e486b1..be2357eb5b84 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -2476,7 +2476,7 @@ export const getSignalsScoutMembersListUrl = (projectId: string, params?: Signal}/**- * Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they're on. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their resolved `github_login` in `suggested_reviewers` on `emit-report` / `edit-report`. Pass `team` to resolve a team slug to the people on it, maintainers first. Pass `search` to narrow a large roster; the result is capped at 200. Strictly team-scoped.+ * Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they're on. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their resolved `github_login` in `suggested_reviewers` on `emit-report` / `edit-report`. Pass `team` to resolve a team slug to the people on it, maintainers first. Pass `search` to narrow a large roster; the result is capped at 200. When `search` or `team` narrows the result to 10 members or fewer, each row also carries `activity`: the member's recent work, so you can check they are close to the affected area. Strictly team-scoped.* @summary List project members for reviewer routing*/export const signalsScoutMembersList = async (diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex bbfb898e07c4..d1c30bc8a204 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -1192,7 +1192,11 @@ tools:3 rows, which is the cap `suggested_reviewers` enforces anyway. A `team` that resolves to nobody comes backas an error saying which case it hit, because team rosters sync one by one and a slug with no rows almostalways means it isn't synced here rather than that the team doesn't exist. The roster is a periodic- snapshot, so it can lag the live team. Strictly team-scoped.+ snapshot, so it can lag the live team. When `search` or `team` narrows the result to 10 members or fewer,+ each row also carries `activity`: the member's recent headline, themes, and the objects they own or watch.+ Use it as context to check a candidate against the report; general activity is not evidence of ownership.+ `activity` is null when the member has no ready summary or summaries are not available for this project, and+ a null value is not evidence against the member. Strictly team-scoped.scout-metadata-get:operation: signals_scout_metadata_getenabled: truediff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 4029ebbe4432..50d1d6fee604 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -12885,7 +12885,7 @@}},"scout-members-list": {- "description": "Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they belong to. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their `user_uuid` in `suggested_reviewers` on `scout-emit-report` / `scout-edit-report`. Every member is routable this way; a null `github_login` only means no draft PR can be opened as that person. Pass `search` to narrow a large roster by name or email. Pass `team` with a bare team slug (no `@org/` prefix) to turn a slug from a note, from CODEOWNERS, or from an owners file into the people on that team, maintainers first: take the first 1 to 3 rows, which is the cap `suggested_reviewers` enforces anyway. A `team` that resolves to nobody comes back as an error saying which case it hit, because team rosters sync one by one and a slug with no rows almost always means it isn't synced here rather than that the team doesn't exist. The roster is a periodic snapshot, so it can lag the live team. Strictly team-scoped.",+ "description": "Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they belong to. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their `user_uuid` in `suggested_reviewers` on `scout-emit-report` / `scout-edit-report`. Every member is routable this way; a null `github_login` only means no draft PR can be opened as that person. Pass `search` to narrow a large roster by name or email. Pass `team` with a bare team slug (no `@org/` prefix) to turn a slug from a note, from CODEOWNERS, or from an owners file into the people on that team, maintainers first: take the first 1 to 3 rows, which is the cap `suggested_reviewers` enforces anyway. A `team` that resolves to nobody comes back as an error saying which case it hit, because team rosters sync one by one and a slug with no rows almost always means it isn't synced here rather than that the team doesn't exist. The roster is a periodic snapshot, so it can lag the live team. When `search` or `team` narrows the result to 10 members or fewer, each row also carries `activity`: the member's recent headline, themes, and the objects they own or watch. Use it as context to check a candidate against the report; general activity is not evidence of ownership. `activity` is null when the member has no ready summary or summaries are not available for this project, and a null value is not evidence against the member. Strictly team-scoped.","category": "Signals","feature": "signals","summary": "List project members for reviewer routing",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 9f6236a1f114..c6ed92ba23e0 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -13586,7 +13586,7 @@}},"scout-members-list": {- "description": "Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they belong to. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their `user_uuid` in `suggested_reviewers` on `scout-emit-report` / `scout-edit-report`. Every member is routable this way; a null `github_login` only means no draft PR can be opened as that person. Pass `search` to narrow a large roster by name or email. Pass `team` with a bare team slug (no `@org/` prefix) to turn a slug from a note, from CODEOWNERS, or from an owners file into the people on that team, maintainers first: take the first 1 to 3 rows, which is the cap `suggested_reviewers` enforces anyway. A `team` that resolves to nobody comes back as an error saying which case it hit, because team rosters sync one by one and a slug with no rows almost always means it isn't synced here rather than that the team doesn't exist. The roster is a periodic snapshot, so it can lag the live team. Strictly team-scoped.",+ "description": "Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they belong to. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their `user_uuid` in `suggested_reviewers` on `scout-emit-report` / `scout-edit-report`. Every member is routable this way; a null `github_login` only means no draft PR can be opened as that person. Pass `search` to narrow a large roster by name or email. Pass `team` with a bare team slug (no `@org/` prefix) to turn a slug from a note, from CODEOWNERS, or from an owners file into the people on that team, maintainers first: take the first 1 to 3 rows, which is the cap `suggested_reviewers` enforces anyway. A `team` that resolves to nobody comes back as an error saying which case it hit, because team rosters sync one by one and a slug with no rows almost always means it isn't synced here rather than that the team doesn't exist. The roster is a periodic snapshot, so it can lag the live team. When `search` or `team` narrows the result to 10 members or fewer, each row also carries `activity`: the member's recent headline, themes, and the objects they own or watch. Use it as context to check a candidate against the report; general activity is not evidence of ownership. `activity` is null when the member has no ready summary or summaries are not available for this project, and a null value is not evidence against the member. Strictly team-scoped.","category": "Signals","feature": "signals","summary": "List project members for reviewer routing",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex c993698367b4..7bb51a70c910 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -102721,6 +102721,37 @@ export namespace Schemas {is_maintainer: boolean;}+ export interface ScoutMemberActivityObject {+ /** The object type in snake case, such as `dashboard` or `feature_flag`. */+ type: string;+ /** The latest name of the object. */+ name: string;+ }++ /**+ * What one member worked on recently, from their activity summary.+ */+ export interface ScoutMemberActivity {+ /**+ * One line about the member's recent work.+ * @nullable+ */+ headline: string | null;+ /** The labels of the main threads of the member's recent work. */+ themes: string[];+ /** Up to 5 objects the member created or changed, the most edited first. */+ owned: ScoutMemberActivityObject[];+ /** Up to 5 objects the member opened on several days, the most opened first. A member who only reads the work shows up here. A specific object here can support a reviewer pick when the pick's `reason` names it. */+ watched: ScoutMemberActivityObject[];+ /**+ * When the summary was written.+ * @nullable+ */+ generated_at: string | null;+ /** True when the summary waits for a rebuild in a newer format. Give a stale summary less weight. */+ stale: boolean;+ }+/*** One project member's routing identity, for picking a `suggested_reviewers` entry on a report.*/@@ -102740,6 +102771,8 @@ export namespace Schemas {github_login: string | null;/** The teams this member is on, from the project's synced team roster. Empty when no roster is synced, or when the member has no linked GitHub account, since the roster is keyed on that login. The roster is a periodic snapshot, so it can lag the live team. */teams: ScoutMemberTeam[];+ /** What the member worked on recently. Use it as context to check against the report, not as proof: general activity is not evidence that the member owns the affected work. Filled only when the call passes `search` or `team` and returns at most 10 members. Null when the member has no ready summary, or when activity summaries are not available for this project. */+ activity?: ScoutMemberActivity | null;}/**diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex 39cf33959b66..ae9262c1a95f 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -3066,7 +3066,7 @@ export const SignalsScoutConfigSyncQueryParams = () => zod.object({})/**- * Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they're on. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their resolved `github_login` in `suggested_reviewers` on `emit-report` / `edit-report`. Pass `team` to resolve a team slug to the people on it, maintainers first. Pass `search` to narrow a large roster; the result is capped at 200. Strictly team-scoped.+ * Return the people who can review work on this project — one row per member with access to it, each with their `user_uuid`, `email`, `first_name`/`last_name`, resolved GitHub `login` (null when they have no linked GitHub identity), and the `teams` they're on. The cold-start reviewer-routing path: when a finding's owner can't be read off a fetched entity's `created_by` and there's no cached `reviewer:<area>` memory or inbox precedent, list members, match the owner by email/name, then put their resolved `github_login` in `suggested_reviewers` on `emit-report` / `edit-report`. Pass `team` to resolve a team slug to the people on it, maintainers first. Pass `search` to narrow a large roster; the result is capped at 200. When `search` or `team` narrows the result to 10 members or fewer, each row also carries `activity`: the member's recent work, so you can check they are close to the affected area. Strictly team-scoped.* @summary List project members for reviewer routing*/export const SignalsScoutMembersListParams = () => zod.object({