Why this matters
Prevents accumulating dead flags, reduces complexity, and avoids accidental re-enablement of retired code paths.
When removing or decommissioning a feature, ensure the associated feature flag is also removed from: - application code paths, - config/registry files (e.g., flags.ts, config.json), and - analytics/feature flag tools (if applicable). If a PostHog (or similar) MCP is available, verify the flag is disabled/removed and not referenced elsewhere. Otherwise, require a repo-wide search evidence in the PR.
Prevents accumulating dead flags, reduces complexity, and avoids accidental re-enablement of retired code paths.
Side-by-side examples engineers can pattern-match during review.
Deletes old code but leaves `flag.checkoutV2` referenced in config and analytics.Removes flag from code + config + cleans up tracking; documents rollout completion.Removed feature code; flag key still exists in flags.tsFlag removed everywhere (code/config/analytics)From the same buckets as this rule.