houserules/packages/chess
Joey Yakimowich-Payne 85433867ea
feat(T7): Widen spawn-marker & spawn-marker-pair schemas for resolver shapes
T7 (spawn-marker-pair schema widening) — widen two primitive schemas to accept
resolver shapes on numeric and enum fields, enabling real fixtures to validate.

## Changes

### spawn-marker.ts
- Widen `square` from literal number to numberOrResolver({ min: 0, max: 63 })
- Widen `owner` from literal enum to enumOrResolverFor(PIECE_COLORS).optional()
- Keep `markerKind` strict enum (design constraint — locked marker kinds)
- Update apply() to cast resolved params to literals before engine call

### spawn-marker-pair.ts
- Widen `squareA` and `squareB` to numberOrResolver({ min: 0, max: 63 })
- Widen `owner` to enumOrResolverFor(PIECE_COLORS).optional()
- Keep `markerKind` strict enum
- Update apply() method with cast assertions

### Tests
- Add 8 resolver-shape positive tests to spawn-marker.test.ts
- Add 8 resolver-shape positive tests to spawn-marker-pair.test.ts
- Add 2 strict-enum negative tests (markerKind rejection)
- Add 2 __resolverEnumValues introspection tests (ParamField compatibility)
- Add mr-freeze-validates.test.ts: validates mr_freeze.json (cascade depth 3)
  fixture with resolver shapes on square (ctx-build) and owner (ctx-attr)

## Verification

 mr_freeze.json now validates cleanly (was the wave goal)
 __resolverEnumValues property exposed and survives .optional() wrapper
 60 tests pass (30 spawn-marker + 29 spawn-marker-pair + 1 mr-freeze)
 No new linting issues
 Links field left alone (mr_freeze doesn't use resolver shapes on links)
2026-04-26 23:03:47 -06:00
..
docs docs(chess): document 7 new trigger primitives + target/event context (T27) 2026-04-21 18:59:54 -06:00
e2e feat(thressgame-coverage): Wave 19 (close 6 production gaps, lift all fixmes) 2026-04-26 21:39:13 -06:00
public feat(ui): add knight-silhouette favicon, theme-color, and meta description 2026-04-21 13:35:42 -06:00
src feat(T7): Widen spawn-marker & spawn-marker-pair schemas for resolver shapes 2026-04-26 23:03:47 -06:00
tests/fide-games test(chess): replay 5 classic FIDE games; Phase 2 acceptance gate (P2.23) 2026-04-16 15:18:57 -06:00
index.html feat(ui): add knight-silhouette favicon, theme-color, and meta description 2026-04-21 13:35:42 -06:00
package.json chore(chess): add @dnd-kit deps for upcoming visual-builder block list 2026-04-21 18:01:41 -06:00
README.md chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
RULES.md docs(chess): correct trigger count from 11 to 10 (3 existing + 7 new) 2026-04-21 19:17:04 -06:00
tsconfig.json test(chess): e2e full-flow scenario; tag Phase 3 (P3.15) 2026-04-16 16:55:28 -06:00
vite.config.ts feat(chess): scaffold Vite + React app (P3.9) 2026-04-16 15:54:32 -06:00
vitest.config.ts refactor(chess/ui): extract ParamField from CustomModifierEditor (no behavior change) 2026-04-21 16:57:42 -06:00

@paratype/chess — custom-rules chess demo