No description
Phase A.2 of the rule-variants epic — adds the post-aggregation legal-move filter pipeline. - Adds FilterLegalMovesContext + filterLegalMoves hook on PresetDef. Hook runs AFTER the self-check filter; iterated in activePresets list order, each preset sees the prior's output. Subset-only contract (drop, don't synthesize); documented + pinned via test. - Wires the iteration into engine.getAllLegalMoves — immediately after the royal-aware self-check filter lands. - Adds filter-legal-moves.test.ts (6 tests): baseline unchanged, no-a-file drop filter, compulsory-capture prototype (proves the suicide-chess rule surface before D.1 lands), two-preset composition, and subset-contract doc test. Tests: 1434 passing (was 1428, +6 new). Blocks: unblocks D.1 (suicide-chess). |
||
|---|---|---|
| .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