Plan a toggle taxonomy that classifies feature flags (ops, experiment, kill) and adds…
- User
Plan a toggle taxonomy that classifies feature flags (ops, experiment, kill) and adds automated lifecycle alerts.
- Assistant
Toggle Taxonomy Plan
This plan outlines a comprehensive taxonomy for classifying feature flags (toggles) into three primary categories—Ops, Experiment, and Kill—while incorporating automated lifecycle alerts. The goal is to standardize flag management, enforce best practices, and reduce "flag debt" (long-lived unused flags) through proactive notifications.
The taxonomy is enforced via a centralized flag management system (e.g., LaunchDarkly, Flagsmith, or custom service) with required metadata on creation. Lifecycle alerts are triggered via integrations with monitoring tools (e.g., PagerDuty, Slack, email) based on time-based rules.
1. Taxonomy Definitions
Flags are classified at creation time (immutable after). Each type has specific use cases, constraints, and review cadences.
Type Description Use Cases Constraints Default Expiry Ops Operational flags for runtime control, stability, or performance. Not user-facing experiments. - Circuit breakers- Rate limiting- Database read replicas- Cache invalidation - No A/B targeting- Single variant (on/off or percentage)- Owner: Ops/DevOps team 90 days (extendable) Experiment Flags for controlled user experiments, A/B testing, or gradual rollouts. - Feature variants- Personalization- ML model tests - Must have targeting rules (e.g., user segments)- Max 2 variants- Owner: Product/Engineering 30 days (strict) Kill Emergency kill switches for rapid disablement. Short-lived by design. - Security patches- Bug hotfixes- Outages - Global off-switch only- No targeting- Owner: On-call/SRE 7 days (auto-delete if unused) Additional Metadata Required on Creation (stored as JSON/YAML):
name: string (unique, kebab-case) type: enum(Ops, Experiment, Kill) # Required description: string owner: string (team/email/Slack handle) expiry_date: ISO date (computed if not set) milestones: array[ISO date] # e.g., review dates dependencies: array[string] # Linked flags/services rollout_strategy: enum(global, phased, targeted) # Defaults by type2. Lifecycle Stages
All flags progress through standardized stages. Transitions are manual (via UI/API) but audited.
Stage Status Description Entry Criteria Exit Criteria Proposed draftFlag defined but not deployed. Creation Deployed to prod Active liveFlag in production, serving traffic. Deployed Scheduled for deprecation Deprecated sunsettingFlag disabled but code paths remain (for fallback). Owner marks as deprecated Code removed Expired deadFlag fully removed from config/code. Expiry date reached or manual cleanup N/A (archived) - Auto-Transition Rules:
Active→Deprecated: On expiry_date.Deprecated→Expired: 14 days after deprecation (grace period).
3. Automated Lifecycle Alerts
Alerts are time-based and type-specific, triggered daily via cron jobs querying the flag registry. Sent to
owner+ central team (e.g., #flags channel).Alert Rules Table
Flag Type Stage/Trigger Days Threshold Alert Message Template Escalation All Proposed → Active overdue 7 days inactive "Flag {{name}} ({{type}}) proposed {{days}} days ago. Deploy or archive?" Day 14: Escalate to owner manager All Active > expiry_date 0 days (immediate) "Flag {{name}} expired! Auto-deprecating. Review: {{link}}" PagerDuty if critical (Kill/Ops) Ops Active without traffic 30 days "Ops flag {{name}} active but 0% rollout. Unnecessary?" Day 60: Auto-deprecate Ops Deprecated without code removal 30 days "Remove code for deprecated Ops flag {{name}}. PR template: {{link}}" N/A Experiment Active (running too long) 14 days "Experiment {{name}} at {{days}} days. Data stale? Conclude or extend." Day 28: Block extensions, force deprecate Experiment No variants/targeting On creation/deploy "Fix Experiment {{name}}: Add targeting rules." Block deploy Kill Active (unused post-incident) 3 days "Kill switch {{name}} still on. Incident resolved?" Day 7: Auto-off + alert Kill Off but not removed 1 day "Remove unused Kill flag {{name}}." Day 7: Auto-delete All Owner inactive (no ack) 7 days post-alert "No response on {{name}}. Escalating to {{backup_owner}}." SRE review board -
Alert Channels:
Severity Channels Low (warnings) Slack #flags Medium (reviews) Email to owner High (auto-actions) PagerDuty + Slack -
Suppression: Owners can snooze (up to 7 days) with justification.
4. Implementation Roadmap
Phase Tasks Timeline Owner 1: Schema Enforcement - Update flag service API/UI to require type+ metadata.- Validate on create/deploy.1 week Engineering 2: Lifecycle Tracking - Add stage field + auto-transitions.- Dashboard for flag inventory (filter by type/stage). 2 weeks Engineering 3: Alerts Engine - Cron job + rules engine (e.g., in Python with SQLAlchemy).- Integrate with Slack/PagerDuty webhooks. 2 weeks DevOps 4: Reporting - Metrics: Flag count by type/stage, debt ratio.- Quarterly cleanup rituals. 1 week Product/Ops 5: Rollout - Pilot on 10 flags.- Train teams. Ongoing All Benefits & Risks
- Benefits: Reduces flag sprawl (target: <5% zombie flags), enforces hygiene, accelerates experiments.
- Risks & Mitigations:
Risk Mitigation Teams resist classification Mandatory via CI/CD gates; start with opt-in pilot. Alert fatigue Type-specific + ack buttons; tune thresholds post-launch. False auto-actions Dry-run mode first; human approval for deletes.
This plan is extensible (e.g., add "Migration" type later). Track adoption with KPIs like "avg flag lifetime by type." Let me know if you need ERDs, code snippets, or refinements!
- Auto-Transition Rules:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.