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]>
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.rsandtests/ts/test_07x.test.ts. Copy the one for your track into your workspace'stests/. - Reference answer:
solution/words.json, one file for both tracks: the Module 7 reference'ssrc/content/words.jsonwith one entry added,{ "name": "ALL", "role": "noun", "selects": "things" }. Copy it over your workspace'ssrc/content/words.json. Nothing undersrc/engine/changes, and neither does the harness. The"selects"field is the hook the Module 7 engine already reads: the engine's ownTEXTuses 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 undersrc/engine/changed.
Scenario
test_07x_all_meta_noun
- Setup:
newBabawith an empty level 4 wide and 5 high. PlaceALL (0,0) IS (1,0) YOU (2,0), an objectbabaat (0,4), an objectrockat (1,4) and a texttext:FLAGat (3,4). - Assertions 1:
activeRules()is exactly["ALL IS YOU", "TEXT IS PUSH"].hasProperty(baba, "YOU")andhasProperty(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 YOUandALL IS YOUhave different subjects.hasProperty(baba, "YOU")is false andhasProperty(rock, "YOU")is still true. The negation is settled per object: Baba is named by bothALLandBABA, 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.