Skip to content

ADR-189 alignment: drop redundant SceneryTrait adds in book + Family Zoo#169

Merged
ChicagoDave merged 1 commit into
mainfrom
feature/adr-189-scenery-book-tutorial-alignment
Jun 25, 2026
Merged

ADR-189 alignment: drop redundant SceneryTrait adds in book + Family Zoo#169
ChicagoDave merged 1 commit into
mainfrom
feature/adr-189-scenery-book-tutorial-alignment

Conversation

@ChicagoDave

Copy link
Copy Markdown
Owner

Summary

ADR-189 made createEntity(name, EntityType.SCENERY) auto-add a SceneryTrait (shipped in world-model@1.2.0). This PR aligns the book and the Family Zoo tutorial to that behavior: the redundant explicit SceneryTrait adds are removed from SCENERY-typed entities, and the prose updated to teach "the EntityType.SCENERY type carries the behavior."

Book (docs/book/parts/)

  • ch05 fully reworked (option C): the "label and the trait" footgun section is replaced by "when you still add SceneryTrait by hand" (only for non-SCENERY fixed things or a custom refusal); both redundant adds dropped; em-dash fixes folded in.
  • Redundant SCENERY SceneryTrait adds removed in ch02, 04, 07, 08, 12 (12 sites); stale prose/comments that described the removed adds fixed in ch02, ch04, ch12.
  • Non-SCENERY fixed things keep their explicit SceneryTrait (dispenser=CONTAINER, parkBench=SUPPORTER, staffGate=DOOR, radio=ITEM, souvenirPress=CONTAINER).

Tutorial (tutorials/familyzoo/)

  • Redundant SCENERY adds removed across 13 ch*.ts files (158 sites); 46 non-SCENERY adds kept.
  • package.json @sharpee/* deps corrected to the real published versions (world-model/lang-en-us/stdlib ^1.2.0, the rest at their actual 1.1.x); pnpm-lock.yaml updated.

Validation

  • familyzoo builds clean on 1.2.0 (TypeScript + .sharpee bundle + browser client).
  • Published world-model@1.2.0 auto-adds SceneryTrait to SCENERY, not to ITEM (verified directly).
  • familyzoo's ch05 story runs on 1.2.0 with scenery fixed (iron fence, rabbits) and items portable (zoo map, bag of animal feed) — exactly what the v01/v03 transcripts assert.

Follow-ups (not in this PR)

  • The three packages are published at 1.2.0 but should have been the next 1.1.x patch (incremental line); a corrected republish + matching familyzoo dep update is pending.
  • Full v01–v16 transcript suite needs the in-repo CLI bundle rebuilt (./repokit build) to clear a stale-bundle world.helpers() split; standalone behavior is already confirmed.
  • dungeo (in-repo test story) may have its own redundant SCENERY adds; not touched here.

🤖 Generated with Claude Code

…rait adds for SCENERY-typed entities

Now that createEntity(name, EntityType.SCENERY) auto-adds SceneryTrait (world-model v1.2.0),
explicit addTrait(new SceneryTrait()) calls on SCENERY-typed entities are redundant and
misleading. Removed from all affected book chapters and all 13 Family Zoo tutorial files.

Book: ch05 reworked to teach "EntityType.SCENERY carries the behavior"; prose/comments in
ch02/04/12 updated; ch07/08 silent removals. Non-SCENERY fixed things (CONTAINER/SUPPORTER/
DOOR/ITEM) retain their explicit SceneryTrait as required.

Tutorial: 158 redundant adds removed across ch02–ch23; package.json @sharpee/* deps
corrected to real published versions (world-model/lang-en-us/stdlib ^1.2.0, others at
their actual 1.1.x); pnpm-lock.yaml regenerated from standalone install.

Validated: familyzoo builds clean on 1.2.0; scenery is fixed, items remain portable.

Co-Authored-By: Claude <noreply@anthropic.com>
@ChicagoDave ChicagoDave merged commit 895f979 into main Jun 25, 2026
1 check failed
@ChicagoDave ChicagoDave deleted the feature/adr-189-scenery-book-tutorial-alignment branch June 25, 2026 01:47
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

ChicagoDave added a commit that referenced this pull request Jun 25, 2026
…nc emdash-ch05 review doc

Rewrites the "What you get for free" paragraph in ch05 away from a
colon-swap fix, grounding the prose in the player's default container
ability. Updates emdash-ch05.md to record ch05 as integrated for
ADR-189 and marks entry #2 as REWRITTEN (post-PR #169 cleanup).

Co-Authored-By: Claude <noreply@anthropic.com>
ChicagoDave added a commit that referenced this pull request Jun 25, 2026
…cenery alignment

Adds a Continuation section covering PR #168/#169 merges, the 1.2.0→1.1.x
version correction, the scenery alignment refactor, the familyzoo test story
work, and issues #166/#167/#170.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant