No description
Find a file
Joey Yakimowich-Payne 73df9f4e53
feat(thressgame-100): Wave 3 \u2014 player-choice patterns + 8 recipes + e2e
Wave 3 of thressgame-100 epic complete. 85 % MILESTONE HIT.

Coverage: 37/51 \u2192 44-45/51 = 86-88 % (depending on overlap accounting; both
clear the 85 % gate).

W3.0 AUDIT \u2014 request-choice capabilities verified:
- 6 supported kinds (Zod schema): rps | piece | square | column | row | coin-flip
- (NOT yes-no, NOT number \u2014 plan brief was inaccurate; updated learnings.md)
- All 6 wired through schema \u2192 apply() \u2192 RequestChoiceModal.tsx \u2192 unit tests
- No gaps to fix.

8 NEW RECIPES (W3.2\u2013W3.5):

Batch G \u2014 choice-driven spawn (kind: square):
- tpl-bottomless-pit            \u2014 pick a square; permanent pit there
- tpl-call-down-lightning       \u2014 pick a square; death-square spawns there
                                  (SIMPLIFIED: lethality moved to consumer arm
                                  \u2014 destroy-piece needs entity-id not square)
- tpl-portal-storm              \u2014 pick 2 squares; spawn a linked portal pair

Batch H \u2014 choice-driven swap:
- tpl-anti-camping-choice       \u2014 pick victim + swapper; swap them
                                  (SIMPLIFIED: random swap not expressible \u2014
                                  with-probability gates per iteration not
                                  picks one)
- tpl-two-kids-trenchcoat       \u2014 sacrifice 2 pieces; bishop@e4
                                  (SIMPLIFIED: place-piece pieceType/color/square
                                  hardcoded \u2014 strict literal enums)

Batch I \u2014 choice-driven self-modification:
- tpl-blood-sacrifice           \u2014 sacrifice one piece; +5 Hp to another
                                  (uses W1.6's add-to-attribute.target redirect)
- tpl-summoning-ritual-light    \u2014 sacrifice + 50/50 knight-or-bishop@e4
                                  (SIMPLIFIED: hardcoded type/color/square +
                                  no resource cost \u2014 W5 territory)

Batch J \u2014 sophie's-choice:
- tpl-sophies-choice            \u2014 both players pick own piece; both die
                                  (forPlayer:'both' verified working as in
                                  tpl-mr-freeze)

FOUR DOCUMENTED SIMPLIFICATIONS (full rationale in evidence file Section 4):
- tpl-call-down-lightning: lethality dropped (no Position-comparison primitive)
- tpl-anti-camping-choice: random-swap dropped (with-probability per-iteration
  semantics)
- tpl-two-kids-trenchcoat: place-piece hardcoded (strict literal enums)
- tpl-summoning-ritual-light: hardcoded place + RNG branch (no resource yet)

KEY RUNTIME DISCOVERY (documented in learnings.md):
- runPrimitives catches SuspendedExecution INTERNALLY and returns; does NOT
  re-throw. Test pattern is to read PendingChoices off GAME_ENTITY after the
  call rather than asserting throw.
- For multi-step request-choice e2e: poll on data-choice-id flip rather than
  visibility (modal close+reopen is sub-frame). Canonical idiom for future waves.

TEST SURFACE:
- wave3-recipes-real.test.ts:               26 unit tests (60 expect calls)
- recipes.test.ts:                           5 \u00d7 54 = 444 expect calls
- wave3-choices.spec.ts (Playwright):       11 e2e tests (8 load + 3 runtime,
                                            including FIRST multi-step request-choice
                                            runtime test \u2014 portal-storm 2-step
                                            square picker with poll-on-data-choice-id
                                            assertion idiom)

bun run check: 3081 tests pass (was 3055, +26). 0 regressions.
e2e: 11/11 green via .sisyphus/scripts/run-pw.sh against docker compose dev stack.

ANTI-CAMPING OVERLAP NOTE:
Both tpl-anti-camping (W2 dormant variant) and tpl-anti-camping-choice (W3
choice variant) map to the single upstream ThressGame rule `anti_camping`.
This is intentional \u2014 two different mechanical interpretations of the same
rule name. Documented in evidence file with dual coverage accounting:
  - 45/51 = 88 % (recipe-vs-denominator convention, matches plan target)
  - 44/51 = 86 % (strict unique-rule convention)
Both clear the 85 % milestone.

Plan: .sisyphus/plans/thressgame-100.md
Notepads: .sisyphus/notepads/thressgame-100/
Evidence: .sisyphus/evidence/thressgame-100-wave3.txt (gitignored, 832 lines)
2026-04-27 15:43:26 -06:00
.github/workflows chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
.sisyphus feat(thressgame-100): Wave 3 \u2014 player-choice patterns + 8 recipes + e2e 2026-04-27 15:43:26 -06:00
docs feat(ui): AttrCombobox declare vs. consume semantics 2026-04-21 13:07:27 -06:00
packages feat(thressgame-100): Wave 3 \u2014 player-choice patterns + 8 recipes + e2e 2026-04-27 15:43:26 -06:00
scripts feat(rete): add replay engine + state-hash determinism verifier (P3.3) 2026-04-16 15:25:13 -06:00
.dockerignore infra: docker compose dev + production Dockerfiles 2026-04-27 13:44:17 -06:00
.gitignore chore(sisyphus): Rule Variants Final Verification Wave — all reviewers APPROVE 2026-04-21 10:15:18 -06:00
docker-compose.dev.yml infra: docker compose dev + production Dockerfiles 2026-04-27 13:44:17 -06:00
docker-compose.yml infra: docker compose dev + production Dockerfiles 2026-04-27 13:44:17 -06:00
Dockerfile.dev infra: docker compose dev + production Dockerfiles 2026-04-27 13:44:17 -06:00
eslint.config.js feat(engine): damage-resistance modifier descriptor 2026-04-18 22:22:31 -06:00
lefthook.yml chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
LICENSE chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
package.json feat(rete): add replay engine + state-hash determinism verifier (P3.3) 2026-04-16 15:25:13 -06:00
playwright.config.ts fix(rete): inject clock into EventLog; use tsc for DTS; fix cycle.test.ts private access; add Playwright worker limit 2026-04-16 18:25:49 -06:00
README.md chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
tsconfig.base.json chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
tsconfig.json chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
vitest.workspace.ts chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00

@paratype

A Doorenbos-style Rete II rules engine for TypeScript games, with an authoritative WebSocket chess demo.

Packages

Docs

Getting Started

bun install && bun run check