No description
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. |
||
|---|---|---|
| .github/workflows | ||
| .sisyphus | ||
| docs | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| eslint.config.js | ||
| lefthook.yml | ||
| LICENSE | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vitest.workspace.ts | ||
@paratype
A Doorenbos-style Rete II rules engine for TypeScript games, with an authoritative WebSocket chess demo.
Packages
packages/rete— Rete II engine corepackages/chess— Browser chess demo (React + Vite)packages/server— Authoritative Bun WebSocket server
Docs
- SPEC.md — Engine specification
- PHASES.md — Development phases & perf budgets
- RULES.md — Chess rule presets
- PROTOCOL.md — WebSocket message protocol
Getting Started
bun install && bun run check