pattern

Feature Flag

also called Feature Toggle

A runtime switch that decouples deploying code from releasing behaviour, so unfinished or risky work can ship dark.

releasedeploymentexperimentation

The architectural benefit is that it makes deployment reversible without a redeploy. A bad feature is switched off in seconds rather than rolled back in minutes, and trunk-based development becomes possible because incomplete work can be merged behind a flag rather than living on a branch.

The cost is combinatorial. Every flag doubles the number of code paths in principle, and a system with twenty long-lived flags cannot be reasoned about or tested exhaustively. Flags need an owner, an expiry date, and a removal step in the same ticket that created them.

Worth distinguishing the kinds, because they have different lifetimes: release toggles (days), experiment toggles (weeks), ops kill-switches (permanent, and legitimately so), and permission toggles (permanent, and really configuration rather than flags).