No description
T3 Wave 5 (T29). New Playwright suite at e2e/custom-modifiers.spec.ts covering 16 scenarios across the user-facing flows: - Editor opens from the Modifier Profile editor header - Palette click adds primitive to tree - Save button reflects validator state (disabled when name empty) - Custom modifier appears in PerType kind dropdown - Selecting a custom kind shows the summary card - Library survives page reload - Solo game with custom-kind profile renders modifier indicators - Multi-profile stack: stack two profiles, remove an entry, reorder - Aura primitive: page survives onAfterMove recompute - Library cap holds at 20 entries Plus 4 trigger primitive scenarios (formerly fixme, unblocked by the trigger evaluator wiring committed alongside): - on-turn-start nested primitives fire at turn boundary - on-capture nested primitives fire on capture - conditional evaluates and runs matching branch - absorb-damage-with-attribute integrates with damage pipeline 2 fixmes remain — both blocked on the editor-side multiplayer send UI (server + client wire-side is fully implemented in this commit). Integration fixes uncovered while writing the suite: 1. ModifierKindIdSchema widened from z.enum([built-ins]) to z.string().min(1). The pre-T3 enum silently rejected every profile that referenced a custom modifier id (e.g. 'custom:my-shield'), causing library load to drop the entry and the picker to have no option. Validity is now enforced at apply time via the registry-dispatch fallback (MODIFIER_REGISTRY → engine.customModifiers → warn-and-skip). 2. Lobby.resetToFreshGame now passes loadCustomModifierLibrary() results to ChessEngine.opts.customModifiers so a profile that references a custom kind can resolve at apply time. Without this the apply silently no-opped the custom-kind entries and indicators never rendered. Schema tests updated: the 'rejects unknown modifier kind' test flipped to 'accepts arbitrary kind strings (T3 widening)' with explanatory JSDoc; an empty-string-rejection test added to preserve the min(1) guard. 77 e2e + 1386 unit tests green; 2 honest fixmes documented. |
||
|---|---|---|
| .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