docs: feature-flag usage guide + cross-links

New docs/FEATURE-FLAGS.md captures when to add a flag, where the moving
parts live, how to use useFeatureFlag from app code, the 4 states + 4
scope axes, kill-switch flow, naming conventions, and the parts we know
aren't built yet (partnerSlug eval context, user-level flags, audit-log
integration, server-side cache).

CLAUDE.md gets a one-line convention entry under "Code conventions" so
future devs notice it when grepping for code rules. NEXT-STEPS.md is
updated: the feature-flag backend follow-up is now ticked done with a
pointer to FEATURE-FLAGS.md for the remaining sub-tasks, and the
"What landed" section reflects the real Infrastructure + Flags pages
and the notification drawer.
This commit is contained in:
Ronni Baslund
2026-05-24 19:29:24 +02:00
parent 7f8516295c
commit 5407c04682
3 changed files with 147 additions and 5 deletions
+5
View File
@@ -201,6 +201,11 @@ These choices were made deliberately after extensive license/architecture resear
- **Prefer prose comments** over heavy JSDoc — explain *why*, not *what*
- **MongoDB** for portal app data (consistent with Målerportal, TurtleLootLine)
- **PostgreSQL** for services that require it (Authentik, OCIS)
- **Feature flags ship through `useFeatureFlag('key')`**, NOT hardcoded
`if (env === ...)` checks. Risky / plan-gated / kill-switchable features
go behind a flag. See [`docs/FEATURE-FLAGS.md`](./docs/FEATURE-FLAGS.md)
for when to add one, how to use the composable, and the 4 states / 4 scope
axes.
### Production target (for reference, not deploy now)