Command Registry (src/commands.ts)
- Entity ID:
ent-20260420-b01a00000010 - Type:
file - Scope:
shared - Status:
active - Aliases: getCommands(), slash command registry
Description
Central registry at src/commands.ts (~25K LOC) for all ~50 slash commands. Exports getCommands() which assembles the command list with the same gating scheme as tools — bun:bundle feature flags + USER_TYPE==='ant' + dynamic imports. Paired with src/types/command.ts for the Command type definition and src/commands/ for individual implementations. Invoked both from the REPL (slash command detection) and from CLI args.
Key claims
- Tools and commands share the same four-category gating taxonomy
- commands.ts is ~25K lines and registers ~50 slash commands
- The plugin system absorbs migrated built-in commands via a shim factory
Relations
- Tool Registry Gating Taxonomy --[applies_to]--> Command Registry (src/commands.ts)
- Command Registry (src/commands.ts) --[implements]--> Command System
- createMovedToPluginCommand --[registers_with]--> Command Registry (src/commands.ts)
- scripts/test-commands.ts --[verifies]--> Command Registry (src/commands.ts)
- Slash Command Execution Surface --[triggers]--> Command Registry (src/commands.ts)