Originally written in French. Translated by AI — the meaning has been preserved, not the prose.
Short definition
A named switch, written into the code and set outside it, whose state decides which of several possible behaviours runs for a given environment or customer.
Full definition
The term comes from continuous delivery practices, where it names the means of decoupling a piece of code going to production from the activation of the feature it carries. Technical usage distinguishes several families according to lifespan and who drives the switch: the deployment flag, removed once the feature is generalized; the operations flag, thrown in case of an incident; the experimentation flag, which serves a measurement; the access flag, which opens a feature to one account rather than another.
In the articles on this blog, the word is used for what it does to a product question rather than for its delivery mechanics. A repository containing a flag doesn't contain one behaviour but two, and doesn't say which applies. The term therefore designates the precise place where reading the code stops being enough and where the state of an environment becomes necessary in order to answer.
Field usage departs from the norm on duration: the original definition holds the flag to be temporary, and many repositories carry flags eighteen months old that determine the product several accounts see. The word is used here for both cases, the flag's state counting more than its age.
Usage in the field
Comes into play in reasoning about querying the code as a product source of truth: it figures among the elements an answer must be able to cite, and it names the most frequent reason that answer must stay conditional. It also comes into play in discussions about what support or sales can assert to a specific customer.
Synonyms and variants
"Feature toggle", "flag", "toggle", "feature switch". The local turn of phrase "depending on the state of the flag" serves to signal that an answer is conditional.
Not to be confused with
- Source of truth — Source of truth — an artifact designated as prevailing in case of disagreement between several representations. The feature flag is what forces that source to be completed by a second element, the state of the deployed environment.
- Feature branch — a separate line of development, where unfinished code lives outside the trunk until it is merged. The flag operates on code already merged: what is held back isn't integration, it is execution.
- A/B test — a measurement arrangement that exposes two variants to two populations in order to settle an indicator. It is often implemented with a flag; its object is comparison, not making something available.
- Access right — a rule saying what a user profile can do in the product. It belongs to the domain and reads as such in the code; the flag is a delivery setting, outside the business vocabulary.
- Configuration option — a setting exposed to the customer, which is part of the offer and is documented. The flag is in principle invisible to the customer and destined to disappear.
Examples
"The code shows two possible behaviours depending on the state of the feature flag."
"If the AI has no access to that state, it must answer conditionally: if the flag is on, then the behaviour is this; otherwise, it is different."
In the list of elements that can serve as evidence for a product answer, it figures alongside the function, the exception, the test, the commit and the merge request.
Ambiguities / debates
Two usages coexist without either having prevailed. The first reserves the word for temporary switches and calls the rest configuration; the second calls a flag any switch whose state decides the behaviour observed, whatever its lifespan. It is the second that holds here.
The singular also covers two things depending on the team: the switch itself, and the system that hosts and drives them.