Treating every flag the same is why they accumulate, because a release toggle and a kill switch have nothing in common except the mechanism.
release hides work in progress. lifetime: days.
deleted with the feature's first release.
experiment an A/B test. lifetime: the experiment.
deleted when the result is decided.
operational a kill switch for an expensive feature.
lifetime: permanent, and reviewed yearly.
permission who can see what. NOT a flag — this is
authorisation and belongs in the model.
the fourth one is where most long-lived flags come from.
Permission checks disguised as flags are the largest category of the ones that never get removed, and they never will be, because they are load-bearing. Recognising them and moving them into the authorisation system removes them from the flag count and puts them somewhere they can be reasoned about.