Files
systemic-game-design-course/course/07-rule-resolution/expansion
Lucas WintherandClaude Opus 5.5 d993457772 feat: module 07 rule resolution
Adds IS NOT to the Part II parser and a resolution pass (negation, then
identity lock) that turns parsed rules into the rules in force; harness
gains activeRules() and hasProperty(). A leading NOT now breaks the
sentence instead of being ignored (carried from M6 review). Nouns say
which objects they name ("selects"), so the ALL Expansion Drop is one
line of data. Corrects lesson 06's NOT wording; harness.md M7 details.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 03:47:48 +01:00
..
2026-10-29 03:47:48 +01:00
2026-10-29 03:47:48 +01:00
2026-10-29 03:47:48 +01:00

Module 7 Expansion Drop: ALL

The lesson's Expansion Drop beat explains the task. This file holds the scenario, the test locations and the check.

  • Word: ALL, a meta-noun: as a subject it names every object that is not text. The Baba Is You Wiki's TEXT page: "TEXT is not included in ALL, but is included in NOT ALL." (recorded in docs/research/baba-is-you.md §5).
  • Tests: tests/rust/test_07x.rs and tests/ts/test_07x.test.ts. Copy the one for your track into your workspace's tests/.
  • Reference answer: solution/words.json, one file for both tracks: the Module 7 reference's src/content/words.json with one entry added, { "name": "ALL", "role": "noun", "selects": "things" }. Copy it over your workspace's src/content/words.json. Nothing under src/engine/ changes, and neither does the harness. The "selects" field is the hook the Module 7 engine already reads: the engine's own TEXT uses it too ("text").
  • Check: commit your workspace before you start, then run node tools/expansion-check.mjs <your-workspace> <that-commit> from the course repository. It fails if any file under src/engine/ changed.

Scenario

test_07x_all_meta_noun

  • Setup: newBaba with an empty level 4 wide and 5 high. Place ALL (0,0) IS (1,0) YOU (2,0), an object baba at (0,4), an object rock at (1,4) and a text text:FLAG at (3,4).
  • Assertions 1:
    • activeRules() is exactly ["ALL IS YOU", "TEXT IS PUSH"].
    • hasProperty(baba, "YOU") and hasProperty(rock, "YOU") are true: ALL names every thing, whatever its noun.
    • hasProperty(flagText, "YOU") is false: text is not in ALL.
  • Action: place BABA (0,2) IS (1,2) NOT (2,2) YOU (3,2).
  • Assertions 2:
    • activeRules() is exactly ["ALL IS YOU", "BABA IS NOT YOU", "TEXT IS PUSH"]. No rule cancels another as written: BABA IS NOT YOU and ALL IS YOU have different subjects.
    • hasProperty(baba, "YOU") is false and hasProperty(rock, "YOU") is still true. The negation is settled per object: Baba is named by both ALL and BABA, and "BABA IS NOT YOU prevents BABA from having the property YOU" (wiki, IS page).

Before the drop the lexicon doesn't know ALL, so the first sentence spells nothing and Baba is not YOU.