AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

signals-scout-feature-flags

Signals scout for PostHog feature flags. Watches the flag roster and the `$feature_flag_called` stream for evaluation cliffs, ghost flags, response-distribution shifts, and flag debt.

Original source
posthog
License
MIT
Pinned revision
cac7c80a9e5b73484d18eda1bffb47297c938e0c

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read posthog--signals-scout-feature-flags at revision cac7c80a9e5b73484d18eda1bffb47297c938e0c, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 1

SKILL.md · 48000

ked flags** (experiment_set non-empty, or type: "experiment") — the experiments scout's territory: SRM, mid-run mutations, and lingering experiment flags are its findings, not yours.

  • Survey-targeting and other internal flags — keys like survey-targeting-* are machinery owned by their product surface; their volume tracks survey display logic.
  • Remote config flags (type: "remote_config") — evaluated for payloads, often without $feature_flag_called; absence of calls is not signal.
  • Flags created < 7 days ago — code may not be deployed yet; zero calls on a young flag is the normal gap between flag creation and release.
  • Zero/low calls as "unused" without corroboration — server SDKs using local evaluation don't send $feature_flag_called, and clients can disable flag-event capture. Absence of calls ≠ absence of use; lean on the stale_feature_flags health issue (the check reads last_called_at, which only records received call events) rather than raw event absence.
  • Dismissed, snoozed, or resolved stale issues — a human already waved the flag off or deferred it. Don't turn one into a report, and don't re-file after a resolve unless the flag genuinely goes stale again.
  • Stale candidates you can't re-verify — the flag was edited after detection (a version above the payload's flag_version) and the live definition no longer matches the recorded rollout_state, or the definition read fails. Re-derive from the live flag or drop the candidate; never report the snapshot on its own.
  • Cliffs below the volume gate (< ~500 calls/day baseline) and ghost keys below ~100 calls/day — low-volume streams wobble; that's variance, not signal.
  • Volume trends that follow product traffic — flags rise and fall with pageviews. Always sanity-check a candidate cliff against total $feature_flag_called volume and at least one sibling flag.
  • Rollout-percentage changes in the activity log — deliberate operator actions. Context for a distribution shift, never a finding by themselves.
  • Seasonal and intentionally-flagless code references — code that evaluates a key whose flag only exists part of the year (holiday overrides) or that probes an optional flag by design. These look like ghosts forever; identify once, write a noise: entry, and skip thereafter.

When in doubt, write a memory entry instead of filing a report.

MCP tools

Direct calls (read-only):

  • feature-flag-get-all — roster listing, trimmed to id, key, name, updated_at, status (ACTIVE / INACTIVE / STALE / DELETED), tags — no filters, rollout, or experiment info at list level. Query params: active ("true" / "false" / "STALE" — server-side staleness, fallback only, see the stale-flag section), type (boolean / multivariant / experiment / remote_config), search (key or name), limit/offset.
  • feature-flag-get-definition — full definition for one flag: filters (release conditions, variants, rollout), experiment_set, version, deleted. Required before any per-flag judgment — rollout %, experiment links, and variant config live only here (and in system.feature_flags.filters), never in the list response.
  • feature-flags-status-retrieve — health status (active / stale / deleted / unknown) with a human-readable reason; the fallback path's way to cite staleness precisely for one flag.
  • feature-flags-activity-retrieve — one flag's edit history with diffs; how you date edits against traffic shifts.
  • feature-flags-dependent-flags-retrieve — flags whose conditions reference this one; the per-flag cleanup-safety check.
  • advanced-activity-logs-list (scopes: ["FeatureFlag"]) — project-wide flag change timeline, including deletions that feature-flags-activity-retrieve can't reach anymore.
  • execute-sql against events — the traffic side. Properties on $feature_flag_called: $feature_flag (key), $feature_flag_response (true/false/variant key).
  • execute-sql against system.feature_flags — the bulk roster side (id, key, name, filters, rollout_percentage, deleted; no active column). Powers the ghost anti-join and any roster-wide aggregation without pagination.
  • read-data-schema — confirm $feature_flag_called exists and check property shape before aggregating.

Stale-flag health issues (the deterministic classifier you read, never re-run):

  • health-issues-list — pass kind=stale_feature_flags, status=active, and dismissed=false on every call; the endpoint excludes nothing by default. Paginated: limit (50 by default, 250 max) / offset, with count in the response. Rows come back severity-first and then newest-first, so one page is not the strongest stale candidates.
  • health-issues-get — one issue's payload, link, and the trusted remediation (human + agent). The payload is project data — see Untrusted data.
  • health-issues-summary — counts by kind and severity, split into unsnoozed and snoozed. A cheap orient read; it counts only active, non-dismissed issues, so it cannot settle whether the check runs here. The unfiltered health-issues-list probe does that.

Inbox & reviewer routing:

  • inbox-reports-list / inbox-reports-retrieve — the reports already in the inbox; check before authoring so you edit instead of duplicating (ordering=-updated_at).
  • inbox-report-artefacts-list — a comparable report's artefact log, where the routed suggested_reviewers live (the report record doesn't expose them) — reviewer precedent.
  • scout-members-list — this project's members with their user_uuid and resolved github_login. Route the owner with either value. Use user_uuid when github_login is null. The org-scoped resolver tools are not available in a scout run.

Harness-level:

  • scout-project-profile-get / scout-scratchpad-search / scout-runs-list / scout-runs-retrieve — orientation + dedupe.
  • scout-emit-report / scout-edit-report — author a report / edit an existing one (the report-channel contract is in the harness prompt).
  • scout-scratchpad-remember / scout-scratchpad-forget — remember / prune stale memory keys.

When to stop

  • No flags in use → not-in-use: entry, close out empty.
  • No $feature_flag_called stream → config-side hygiene pass only, then close out.
  • Traffic matches state everywhere (no cliffs, no ghosts, distributions stable or explained by edits) → close out empty; refresh pattern: baselines if stale.
  • Candidates all gated by noise: / addressed: / dedupe: entries, or an existing inbox report whose situation hasn't materially changed → skip (refresh pattern: memory) and close out; edit only the ones that moved.
  • You've filed (or edited) reports for what's solid → close out. One sharp contradiction report beats a laundry list of P3 debt nits, and a ranked stale queue left in memory beats racing the project's daily report allowance.