원클릭으로
feature-flag-manager
Create, manage, and clean up feature flags for gradual rollouts and safe deployments. Use when the user asks to add a feature flag, toggle, or manage feature gating.
메뉴
Create, manage, and clean up feature flags for gradual rollouts and safe deployments. Use when the user asks to add a feature flag, toggle, or manage feature gating.
Generate a mock API server from OpenAPI specs, TypeScript interfaces, or endpoint descriptions for frontend development and testing. Use when the user asks to create a mock server, fake API, or stub endpoints.
Map and visualize module dependencies, detect circular imports, and identify coupling hotspots. Use when the user asks to analyze dependencies, find circular imports, or understand module relationships.
Generate typed error classes, error handling middleware, and HTTP error mapping following project conventions. Use when the user asks to set up error handling, create error classes, or implement error middleware.
Generate docker-compose.yml files for local development with application services, databases, caches, and queues. Use when the user asks to set up a local dev environment or create docker-compose configuration.
Generate OpenSearch Dashboards (Kibana) saved objects — index patterns, visualizations, and dashboards as JSON. Use when the user asks to create dashboards, charts, or visualizations for OpenSearch/Elasticsearch/Kibana.
Design and create automation workflows — shell scripts, Cursor hooks, GitHub Actions, cron jobs, and task runners. Use when the user asks to automate a process, create a script, or set up a workflow.
| name | feature-flag-manager |
| description | Create, manage, and clean up feature flags for gradual rollouts and safe deployments. Use when the user asks to add a feature flag, toggle, or manage feature gating. |
Implement feature flags for controlled rollouts, A/B testing, and safe deployments with cleanup workflows.
When the user asks to add a feature flag, gate a feature, set up gradual rollout, or clean up old flags.
| Strategy | When to Use | Complexity |
|---|---|---|
| Boolean toggle | Simple on/off per environment | Low |
| Percentage rollout | Gradual rollout to % of users | Medium |
| User segment | Specific users, orgs, or roles | Medium |
| A/B test | Compare variants with metrics | High |
| Kill switch | Emergency disable of a feature | Low |
FEATURE_{DOMAIN}_{DESCRIPTION} (e.g., FEATURE_ORDERS_ASYNC_PROCESSING)false (new features default to off)// config/feature-flags.ts
export const FeatureFlags = {
FEATURE_ORDERS_ASYNC_PROCESSING: {
key: 'FEATURE_ORDERS_ASYNC_PROCESSING',
description: 'Enable async order processing pipeline',
defaultValue: false,
owner: 'orders-team',
createdAt: '2026-04-12',
targetCleanup: '2026-06-12',
},
} as const;
export type FeatureFlagKey = keyof typeof FeatureFlags;
// utils/feature-flags.ts
export function isFeatureEnabled(
flagKey: FeatureFlagKey,
context?: { userId?: string; orgId?: string }
): boolean {
const envValue = process.env[flagKey];
if (envValue !== undefined) {
return envValue === 'true' || envValue === '1';
}
return FeatureFlags[flagKey].defaultValue;
}
// In handler/service:
if (isFeatureEnabled('FEATURE_ORDERS_ASYNC_PROCESSING', { userId })) {
await processOrderAsync(order);
} else {
await processOrderSync(order);
}
.env.example with false default.env with true for testingfalse until ready for rolloutdescribe('when FEATURE_ORDERS_ASYNC_PROCESSING is enabled', () => {
beforeEach(() => { process.env.FEATURE_ORDERS_ASYNC_PROCESSING = 'true'; });
afterEach(() => { delete process.env.FEATURE_ORDERS_ASYNC_PROCESSING; });
it('should process order asynchronously', async () => { /* ... */ });
});
describe('when FEATURE_ORDERS_ASYNC_PROCESSING is disabled', () => {
it('should process order synchronously', async () => { /* ... */ });
});
## Rollout Plan: FEATURE_ORDERS_ASYNC_PROCESSING
1. **Dev/Staging**: Enable, run integration tests
2. **Canary (5%)**: Monitor error rate and latency for 24h
3. **Gradual (25% → 50% → 100%)**: Each stage monitored for 48h
4. **Cleanup**: Remove flag after 2 weeks at 100%
FeatureFlags config.env filesfalse (off)FEATURE_DOMAIN_DESCRIPTION patternFeature flag created with config, utility function, code gating, tests, and rollout plan. Cleanup date documented.
afterEach