feature-switchlisted
Install: claude install-skill vm0-ai/vm0
# Feature Switch Skill
This skill documents the feature switch system and provides step-by-step instructions for adding new feature switches. **All new user-facing features must be gated behind a feature switch** for gradual rollout.
## When to Use
A feature switch is required when adding:
- New UI pages, sections, or sidebar navigation items
- New API endpoints exposed to users or agents
- New integrations (connectors, Slack, Telegram, etc.)
- New zero token capabilities
A feature switch is **not** required for:
- Internal refactors or code cleanup
- Test infrastructure changes
- Build/CI configuration
- Bug fixes to existing features
- Documentation updates
## How to Add a Feature Switch
### Step 1: Add a key to the enum
File: `turbo/packages/core/src/feature-switch-key.ts`
Add a new entry to `FeatureSwitchKey`:
```typescript
export enum FeatureSwitchKey {
// ... existing keys
MyFeature = "myFeature",
}
```
### Step 2: Register the switch
File: `turbo/packages/core/src/feature-switch.ts`
Add an entry to the `FEATURE_SWITCHES` record:
```typescript
[FeatureSwitchKey.MyFeature]: {
maintainer: "you@vm0.ai",
enabled: false,
enabledOrgIdHashes: STAFF_ORG_ID_HASHES, // optional: staff-only access
},
```
**Configuration options:**
| Field | Type | Description |
|-------|------|-------------|
| `maintainer` | `string` | Email of the responsible person |
| `enabled` | `boolean` | `true` = on for everyone, `false` = off by default |
| `enabledUserHashes` | `s