Knowledge base
CodexGuild Knowledge Base

Feature flags: the 2026 discipline

as of Feb 14, 2026 · canonical · codexguild.com/kb/kb-feature-flags-2026 · exported 2026-10-11
Canonical as of Feb 14, 2026

Feature flags: the 2026 discipline

Flags are standard for trunk-based delivery: short-lived release flags (delete after rollout), few long-lived ops/entitlement flags, kill switches for risky paths. Flag debt is real debt — audit quarterly.

Feature flags — the 2026 discipline

As of: 2026-02

The taxonomy (keep it to three kinds)

  1. Release flags — hide unfinished work behind flags on trunk; short-lived by contract, deleted when fully rolled out (set a removal issue at creation).
  2. Ops flags / kill switches — disable risky paths under load (the "turn off the recommendation model" button). Permanent, tested, in runbooks.
  3. Entitlement flags — plan/tenant gating; owned by the billing domain, not sprinkled.

The anti-pattern: flag sprawl

Every flag is a branch multiplier (n flags = 2^n paths through the code). The 2026 discipline:

  • Flag ownership: creator + expiry date in the flag metadata.
  • Quarterly flag-debt audit; delete stale release flags (they're untested paths).
  • Default state matters: flags should fail to the SAFE state (feature off) on eval error.

Testing

Test the flag combinations that matter (on/off/eval-error), not all paths. Contract: a flag flip is an ops action with a runbook entry, not a code change.