WarUI

AI Off by Default and Explicit Opt-In

GRID-A27-F01P0beyond-baselinePlanned

All AI and structured-command intelligence ships in a separate, tree-shakable module that is disabled by default. With the module disabled, no AI UI, network code or provider is present. Opt-in requires both importing the module and setting an explicit flag, so AI can never be switched on by accident or by a transitive dependency.

Planned. This page shows the specification from issue #207. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

Grid with 50 employee rows. ai.enabled=false, no AI toolbar visible. A status badge reads 'AI: disabled (default)'.

Expected behavior

With the module not imported, toggling ai.enabled shows a console-style notice that the module is missing and nothing changes. With the module imported and ai.enabled=true, the AI toolbar appears and onAiStateChange fires. Turning the flag off removes all AI UI and releases provider references.

Planned API surface

ai.enabledWarGridAiModulegrid.ai.isEnabled()onAiStateChangeai.disabledReason

Acceptance criteria

  • Default config renders zero AI UI elements (pending)
  • Default bundle contains no AI module code (verified by bundle-analysis test) (pending)
  • ai.enabled=true without the module logs one warning and keeps AI disabled (pending)
  • grid.ai.isEnabled() reflects the effective state (pending)
  • Disabling at runtime removes AI DOM nodes and fires onAiStateChange with enabled=false (pending)