Defaults and overrides: the two-layer model
The cleanest mental model has two layers. The flag's default state is what any tier gets if you say nothing. Overrides are deliberate exceptions per tier. Keep defaults conservative — usually off for paid features, on for community features — so a brand-new tier starts safe.
Default off + override on for saas is the classic paid-feature shape (PRO_DASHBOARD_ENABLED). Default on + override off for saas is community-only behaviour, like anonymous telemetry prompts. No override at all means the feature is genuinely universal — and the matrix says so explicitly.
Naming and hygiene founders should enforce
Flags rot when they're named vaguely and never retired. Enforce SCREAMING_SNAKE_CASE names that state the feature and the verb (SSO_SAML_LOGIN, USAGE_BILLING), require a one-line description, and review the tier matrix monthly. When a flag is on in every tier and the old path is dead, delete the flag and the dead branch of code in the same PR.
The matrix view matters more than any individual flag. It's the artifact you'll share with a new engineer, a prospective acquirer, or your own future self to answer 'what exactly does the paid version add?' — with per-tier resolution, that answer is a screenshot, not an afternoon of code reading.
From matrix to shipped build
tier·dev generates the per-tier config (JSON, YAML, or a dependency-free TypeScript snippet) from your matrix. Your CI sets PRODUCT_TIER per distribution and the same commit produces every edition. That's the whole trick: tiered packaging as a build input, not a codebase property.
frequently asked
- Boolean flags only — what about limits like '5 seats'?
- Start boolean. Numeric limits are usually billing-engine concerns, not codebase-divergence concerns. When a number genuinely shapes the build, model it as a flag per threshold (TEAM_SEATS_UNLIMITED) until you need typed values.
- How many flags is too many?
- Teams comfortably run dozens of tier flags. The smell isn't the count, it's flags whose purpose nobody remembers — which descriptions and a monthly matrix review prevent.
- Can I use this alongside a runtime flag tool?
- Yes. Tier flags decide what a distribution contains; runtime tools decide what an individual user sees right now. Plenty of teams run both, and the boundary is healthy.
Published June 11, 2026 · Last updated June 16, 2026