Create and manage Houston feature flags in webapp — toggle generation, gating patterns, and cleanup.
All new user-facing features in webapp should be gated behind Houston feature flags unless the task explicitly says otherwise.
Create the flag in Houston: houston.tinyspeck.com
Generate the toggle class:
bin/gen-toggle <toggle_name>
This generates a Hack class in gen-hack/ (never modify generated code directly).
Use the toggle in backend Hack code:
if (Toggle\YourToggleName::isEnabled($team_id)) {
// new behavior
}
Use the toggle in frontend code: Check the generated toggle interface for the frontend equivalent. Toggles are typically exposed via the boot data or experiment framework.
Backend (Hack):
Toggle\YourToggle::isEnabled($team_id)Toggle\YourToggle::isEnabledForUser($team_id, $user_id)Frontend (TypeScript):
js/modern/ for examplesUse webapp's existing toggle-cleanup Claude Code plugin for removing fully-rolled-out flags:
/toggle-cleanup <toggle_name>
This removes the toggle checks and dead code paths.
feature_name_short_description