chore: update version gated feature flag docs#32159
Conversation
Track repo-specific Cursor rule so contributors use validatedVersionGatedFeatureFlag from app/util/remoteFeatureFlag instead of duplicating version-check helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes touch application code, test infrastructure, controllers, UI components, navigation, or any functional behavior. No E2E tests are needed. Performance Test Selection: |
|



Description
Version-gated remote feature flags are evaluated in many places across the codebase, but guidance was scattered across team-specific docs and there was no single canonical pattern for agents and contributors to follow.
This PR centralizes that guidance:
docs/readme/version-gated-feature-flags.mddocuments the SSOT (app/util/remoteFeatureFlag), the required selector pattern usingvalidatedVersionGatedFeatureFlag, non-standard flag shapes, and forbidden duplicate helpers..cursor/rules/version-gated-feature-flags.mdcenforces the same patterns for AI-assisted edits underapp/**/*.{ts,tsx}..gitignoreis updated to track*.mdcCursor rules (matching the existing carve-out pattern for other IDE config), andAGENTS.mdreferences the new guide in the development guidelines table and quick reference.No runtime or selector code changes — documentation and agent guidance only.
Changelog
CHANGELOG entry: null
Related issues
Refs: fixes: MCWP-653
Manual testing steps
N/A — documentation-only change. Verified by reading rendered markdown links and confirming
.cursor/rules/version-gated-feature-flags.mdcis tracked after the.gitignorecarve-out.Screenshots/Recordings
N/A — no UI changes.
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Docs and agent guidance only; no runtime, selector, or feature-flag behavior changes.
Overview
Adds a canonical guide at
docs/readme/version-gated-feature-flags.mdand a matching Cursor rule (.cursor/rules/version-gated-feature-flags.mdc) so contributors and agents usevalidatedVersionGatedFeatureFlagfromapp/util/remoteFeatureFlagin selectors instead of duplicating version checks.Cross-links and examples in Perps, Predict, mUSD, and Compliance docs now point at that guide and show the shared import pattern.
AGENTS.mdadds the guide to the dev guidelines table and quick reference..gitignoreis adjusted so tracked*.mdcrules under.cursor/rules/can be committed (carve-out for IDE config). No app or selector code changes.Reviewed by Cursor Bugbot for commit 0388626. Bugbot is set up for automated code reviews on this repo. Configure here.