houserules/packages
Joey Yakimowich-Payne d44b433889
feat(chess/ui): add narrate.ts pure module for descriptor → English
Pure tree-walker that converts CustomModifierDescriptor (or just an
EffectPrimitiveNode array) to a human-readable English narrative.

- Static KIND_NARRATORS map covers all 21 primitives (14 existing + 7
  T1-extension trigger kinds: on-move, on-turn-end, on-promotion,
  on-check-received, on-check-delivered, on-moved-onto-square,
  on-captured) — no PRIMITIVE_REGISTRY lookup so the module stays free
  of engine/Session/Rete imports.
- Cycle guard via WeakSet on node identity outputs '…' on revisit;
  length cap 4000 chars truncates with ' … and N more primitives'.
- Performance: 0.091ms avg on 50-node descriptor (11x under the 1ms
  budget for live preview).
- 34 tests cover every kind, nested combinations, cycle handling,
  truncation, and perf microbenchmark.

Used by the live-preview pane (T17) added later in this epic.
2026-04-21 16:57:10 -06:00
..
chess feat(chess/ui): add narrate.ts pure module for descriptor → English 2026-04-21 16:57:10 -06:00
rete refactor(rete): use asEntityId for AGG_FACT sentinel id 2026-04-19 16:49:50 -06:00
server feat(modifiers): bundle preset activations on profiles + editor Presets tab 2026-04-21 14:03:52 -06:00