Управление флагами функций в проекте

orchestration

feature-switch is a Claude Code skill that documents the feature flag system in the vm0 project and provides step-by-step instructions for adding new switches to enable gradual rollout of user-facing functionality. Every new UI page, API endpoint, integration (connectors, Slack, Telegram, etc.), or zero token capability must be gated behind a feature switch. The skill covers the full workflow: defining a key in the `FeatureSwitchKey` enum, registering it in `FEATURE_SWITCHES` with fields like `enabled`, `enabledOrgIdHashes`, `enabledEmailHashes`, and `enabledUserHashes` (FNV-1a hashes), then gating the feature in server routes, client components, sidebar navigation, connector configs, and token capability maps. Override resolution uses two layers — the static source-code registry and per-user or org-scoped DB rows managed via the Lab page or `window._vm0.featureSwitches` — making it straightforward to target staff, specific orgs, or all users at different stages of a rollout.