Consolidate room leave/delete event handling into RoomManager emitter, remove redundant PLAYER_LEFT publishes from GameServer, and delete the chess game plugin (board, types, tests) in favor of the new plugin architecture. Add per-module CLAUDE.md files for leveling, guild-settings, feature-flags, db, api, and panel to improve agent navigability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
919 B
919 B
Feature Flags Module
- No caching. Every
isFlagEnabled()andhasAccess()call hits the database directly. isFlagEnabled(flagName)checks global on/off state.hasAccess(flagName, context)checks both global state AND per-entity access records (guild, user, or role).- Access logic: flag must be globally enabled AND user must have an explicit access grant. Grants can target guildId, userId, or roleId independently.
- Commands declare
beta: trueand optionallyfeatureFlag: stringin the Command interface.CommandHandlerintercepts beta commands and callshasAccess()before execution. - If a command has no explicit
featureFlag, the command name (interaction.commandName) is used as the flag name fallback. - Flag names are case-sensitive. Convention is snake_case or camelCase — no enforcement.
- Admin management via
/featureflagscommand: CRUD on flags and access grants/revokes.