The Feature Flag Cleanup Discipline
Feature flags accumulate. The discipline that prevents flag-debt: every flag has an owner and a death date.
When you create a flag
Owner assigned at creation. The owner is responsible for retirement.
TTL set at creation. Default 90 days; extensions require justification.
The flag's purpose is documented. 'What happens when this flag is removed?' answered in writing.
During the flag's life
Track the flag's traffic. If the flag is fully ramped (100% on, 0% off) for 30 days, it is a candidate for retirement.
Quarterly audit: surface stale flags to their owners. Owner either justifies or removes.
Flags with no traffic for 30 days: usually safe to remove without owner negotiation.
Retiring a flag
Code change: remove the flag check, hardcode the chosen path.
Flag platform change: delete the flag from the platform. Both must happen.
Test: the regression suite should pass without the flag. If it does not, retirement was premature.