Validator V2: widen 9 imperative-primitive Zod schemas to accept resolver
shapes ($var / ctx-attr / ctx-build) alongside literals so the 8 parity-fixture
descriptors graduate from test-only artifacts into first-class loadable recipes.
Schemas widened (target/square/positional fields):
- move-piece, set-piece-attr, destroy-piece, destroy-marker, swap-pieces
- convert-piece-type, place-piece, spawn-marker, spawn-marker-pair
- cancel-capture (audited — no positional field, N/A)
Strict enums preserved: pieceType, color, markerKind reject resolver shapes
(intentional design constraint — closed sets defining piece behavior).
Validator iteration-trigger-scope fix (validate.ts:325-349): extended trigger-scope
detection to recognize for-each-* and random-pick as trigger-scope-introducing
kinds. Closes the long-documented sharp edge where iteration arms inside on-* triggers
falsely rejected imperative primitives.
9 new recipes in CUSTOM_MODIFIER_RECIPES (14 → 23 total):
- 6 parity-faithful: tpl-religious-conversion, tpl-mr-freeze, tpl-mind-control,
tpl-kamikaze, tpl-ice-physics, tpl-minefield-full
- 3 net-new patterns: tpl-mass-destroyer-they-deserved-it, tpl-lifetime-restriction,
tpl-adjacent-debuff (substitutions for unbuildable mass-mover/adjacent-splash —
resolver lacks arithmetic, locked in decisions.md)
User-facing description rewrites: 50 primitive longDescription + examples[].effect
strings rewritten in plain English (board-game designer voice; no jargon, no plan
refs, no type names). 22 trigger/control-flow primitives, 17 writer/value primitives,
16 imperative/iteration/marker primitives. Stripped 'V1 sharp edge' and 'T67-followup'
historical notes from recipes.ts header.
Test surface:
- recipes.test.ts: 5 invariants × 23 recipes (190 expect calls), all green
- validate.test.ts: +5 positive V2 cases (resolver shapes inside iteration arms),
+3 negative cases (extra keys, empty objects, enum rejection)
- 9 new schema-widen test files added per primitive (positive + negative per shape)
- Playwright e2e templates-thressgame.spec.ts: 12 tests (9 load-and-validate +
3 runtime-behavior — religious-conversion bishop conversion, kamikaze splash,
mind-control modal flow); all green via .sisyphus/scripts/run-pw.sh against
docker compose dev stack
- ParamField.snapshot.test.tsx.snap regenerated (15 → 18 snapshots)
Final verification (F1-F4):
F1 oracle: APPROVE
F2 manual QA: APPROVE (47/47 e2e across 3 specs, zero flake)
F3 test quality: REJECT (misdiagnosis — wrong test runner; verified via direct
re-run that spec passes 12/12)
F4 scope fidelity: APPROVE
Plan: .sisyphus/plans/thressgame-templates.md
Notepads: .sisyphus/notepads/thressgame-templates/
Evidence: .sisyphus/evidence/thressgame-templates-final.txt (gitignored)
40 lines
927 B
JSON
40 lines
927 B
JSON
{
|
|
"name": "@paratype/chess",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"default": "./src/index.ts"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@dnd-kit/core": "^6",
|
|
"@dnd-kit/sortable": "^8",
|
|
"@dnd-kit/utilities": "^3",
|
|
"@paratype/rete": "workspace:*",
|
|
"@tailwindcss/vite": "^4.2.2",
|
|
"canvas-confetti": "^1.9.4",
|
|
"clsx": "^2.1.1",
|
|
"lucide-react": "^1.8.0",
|
|
"motion": "^12.38.0",
|
|
"react-router-dom": "^7.14.1",
|
|
"sonner": "^2.0.7",
|
|
"tailwindcss": "^4.2.2",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@types/canvas-confetti": "^1.9.0",
|
|
"@types/react": "^19.0.0",
|
|
"@types/react-dom": "^19.0.0",
|
|
"@vitejs/plugin-react": "^4.0.0",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"vite": "^6.0.0"
|
|
}
|
|
}
|