Skip to content

Fases 15 y 16: base en verde y runtime en los paquetes (0.5.0) - #22

Merged
DanielMartinezSebastian merged 69 commits into
mainfrom
claude/phase-15-16-hardening
Oct 11, 2026
Merged

DanielMartinezSebastian merged 69 commits into
mainfrom
claude/phase-15-16-hardening

Conversation

@DanielMartinezSebastian

Copy link
Copy Markdown
Owner

Qué es

Dos fases de endurecimiento y el plan de la siguiente. Parte de una auditoría del 2026-10-10 que encontró tests rotos, errores de tipos y de lint, ningún CI, dist/ versionado y desfasado, y una librería que no se podía consumir fuera de la demo.

Closes #21

Fase 15 — Base en verde

  • Tests, tipos y lint arreglados sin relajar aserciones.
  • CI en GitHub Actions: build de paquetes, tests, typecheck, lint y build de la demo. Corre por primera vez en este PR.
  • packages/*/dist deja de versionarse (260 archivos); los paquetes se compilan en prepare y predev.
  • Docs resincronizadas con el código.

Fase 16 — El runtime vive en los paquetes (0.5.0)

  • createGameRuntime, registros y executors pasan a engine-core.
  • GameViewport deja de ser un canvas vacío: es un juego jugable, compuesto de useGameViewportController y GameViewportView. Los hooks de escena, transiciones, inventario y audio viven en engine-renderer-r3f.
  • La demo es consumidora: GameTouchCanvas.tsx baja de 481 a 200 líneas y publicApi.ts es un barrel de re-export. Los 64 nombres del contrato v1 se conservan.
  • /example-minimal: un juego de dos escenas que solo importa de los paquetes.
  • Estado de inventario, ítems colocados, diálogo y visibilidad de mochila en stores del core; persistencia por puerto, compatible con las partidas existentes.
  • npm run smoke: recorrido headless con Playwright que juega la demo y el ejemplo mínimo y comprueba estado y sonidos reproducidos.

Breaking

  • Recoger un ítem se emite como item:pickedUp. Antes llegaba como item:dropped con outcome: "pickup-success".

Arreglos de empaquetado

Encontrados al instalar los .tgz en un proyecto Next.js fuera del monorepo:

  • El peer de three era ^0.150.0, que solo admite 0.150.x. Ahora >=0.150.0.
  • El runtime pedía /globe.svg, un asset de la demo. La esfera de pruebas es ahora opcional.
  • Los tests ya no se incluyen en el paquete publicado.

Fase 17 — Plan (sin código)

ADR-0010 (aceptado) y 19 tareas para la capa narrativa declarativa: flags, condiciones, acciones, hotspots con verbos, NPCs, diálogos con opciones y guardado único. Esquema de la Fase 18 (demo con historia).

Validación

Ejecutada en local desde dist/ borrado:

  • 503 tests (core 348, renderer 109, demo 46), 0 errores de tipos, 0 errores de lint.
  • Build de 5 rutas.
  • Smoke: 40/40 en la demo, 5/5 en el ejemplo mínimo.
  • Paquetes empaquetados instalados en un Next.js externo: compila y pasa el smoke del ejemplo en producción.

Sin verificar

  • Modo debug con sus paneles de editor, y la cámara libre.
  • Cambio de idioma en vivo.
  • Safari e iOS.

Para revisar

  • Es grande (39 commits), pero cada commit es una tarea y pasa el gate por separado. Conviene revisar por commits.
  • El smoke requiere la demo en marcha y no está en el CI todavía.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq

DanielMartinezSebastian and others added 30 commits October 10, 2026 11:17
Audit of 2026-10-10 found failing tests, type and lint errors, no CI,
tracked build output and stale docs. Phase 15 gets the repo green;
phase 16 moves the runtime from the demo into the packages (ADR-0009,
proposed, pending owner approval and issue).

- [x] Marked: phase 15 README, 9 tasks, tracking
- [x] Marked: phase 16 README, 13 tasks, tracking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Tests still expected the demo stores to be wired implicitly, which
task 12.4 replaced with injected adapters. GameActions.setScene is now
typed as (sceneId) => void, matching the implementation and the
consumption guide.

- [x] Marked: 01-fix-publicapi-contract-tests

See docs/phases/phase-15-green-baseline/tasks/01-fix-publicapi-contract-tests.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The hook's tests called it outside a React render and could never
pass. The wiring now lives in a React-free function; the hook is a
thin effect wrapper with the same signature.

- [x] Marked: 02-fix-audio-system-tests

See docs/phases/phase-15-green-baseline/tasks/02-fix-audio-system-tests.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
- [x] Marked: 03-lint-react-rules

See docs/phases/phase-15-green-baseline/tasks/03-lint-react-rules.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
- [x] Marked: 04-lint-trivial

See docs/phases/phase-15-green-baseline/tasks/04-lint-trivial.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
sceneStore read process.env without checking that process exists.
New test scans core sources for framework imports, browser globals
and unguarded process.env.

- [x] Marked: 05-core-node-env-guard

See docs/phases/phase-15-green-baseline/tasks/05-core-node-env-guard.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
packages/*/dist was tracked (260 files) and 9 of them no longer
matched src. Packages are now built by the root prepare/predev
scripts; CI runs build, test, typecheck, lint and demo build.

- [x] Marked: 06-ci-workflow
- [x] Marked: 07-untrack-dist

See docs/phases/phase-15-green-baseline/tasks/07-untrack-dist.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Phase READMEs and the docs index claimed states that did not match
the code. Stray root docs move to docs/_archive. Inherited validation
checklists of phases 11-13 are ticked only where a command confirmed
them; the rest carry a note.

- [x] Marked: 08-docs-resync
- [x] Marked: phase 15 technical gate (browser smoke still partial)

See docs/phases/phase-15-green-baseline/tracking.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Owner approved on 2026-10-10. Tracking issue opened.

- [x] Marked: 16.01-adr-and-issue

See #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
- [x] Marked: browser smoke (move, pick up item, change scene)

See docs/phases/phase-15-green-baseline/tracking.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
createGameRuntime, the scene/item/rule registries and the command
executors now live in engine-core, copied from the demo's publicApi.
Scenes go through a single toRuntimeScene helper, so scene:set and
transition:activate no longer drop transitions and music. The demo
still uses its own copy until task 03 turns publicApi into a barrel.

- [x] Marked: 16.02-core-runtime-factory

See #21
See docs/phases/phase-16-runtime-in-library/tasks/02-core-runtime-factory.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Reset used localStorage.clear(), which also wiped locale, audio
settings and any other app sharing the origin. It now removes only
the four game keys. Key names and stored formats are unchanged.

- [x] Marked: 16.08-storage-port-persistence

See docs/phases/phase-16-runtime-in-library/tasks/08-storage-port-persistence.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
apps/web-demo kept copies of eight renderer files (two already
diverged) plus seven one-line re-export shims. Nothing imported the
copies; the one remaining shim consumer now imports from the package.

- [x] Marked: 16.05-delete-render-duplicates

See docs/phases/phase-16-runtime-in-library/tasks/05-delete-render-duplicates.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Owner verified scene transition, key door, audio and locale switch by
hand. Phase 16 becomes the active phase.

- [x] Marked: 09-validation-gate
- [x] Marked: inherited smoke checks of phases 12 and 13

See docs/phases/phase-15-green-baseline/tracking.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Stops an active path walk and emits player:walkAborted with reason
user-input. Keyboard and joystick movement does not go through the
core walking state, so it is not affected.

- [x] Marked: 16.10-wire-player-stop

See docs/phases/phase-16-runtime-in-library/tasks/10-wire-player-stop.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
… barrel

useGameState and useGameActions now live in engine-renderer-r3f. The
demo's publicApi.ts drops its copy of the runtime and re-exports the
packages; all 64 exported names of the v1 contract are preserved. The
demo therefore now runs on the core runtime, which keeps transitions
and music on scene:set.

- [x] Marked: 16.03-renderer-state-hooks-and-barrel

See #21
See docs/phases/phase-16-runtime-in-library/tasks/03-renderer-state-hooks-and-barrel.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
demo-content redefined scene types that were almost, but not quite,
assignable to the core ones, forcing casts across the demo. Demo-only
fields (doors, invisible interactions) are now explicit extensions.
Scene data is unchanged.

- [x] Marked: 16.04-unify-scene-types

See docs/phases/phase-16-runtime-in-library/tasks/04-unify-scene-types.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The renderer shipped one hardcoded character. CharacterDefinition
describes clips per direction, an optional speaking clip and scale;
GameTouchSpriteRuntime accepts it via the character prop and behaves
as before without it. DavidSprite and the clips exports remain as
deprecated aliases.

- [x] Marked: 16.09-generic-character-sprite

See docs/phases/phase-16-runtime-in-library/tasks/09-generic-character-sprite.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Item and default sounds move from a hand-written map in
GameTouchCanvas to item data and DEMO_AUDIO_DEFAULTS; triggers are
unchanged. The declarative audio system is not wired yet because it
would not sound the same (see task 07b). The demo now passes its
character definition explicitly.

Task 16.07 stays open; follow-up 07b added.

See docs/phases/phase-16-runtime-in-library/tasks/07b-enable-declarative-audio.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The game was running a demo-local copy of the inventory rules; the
core version was never executed. The demo now calls the core rules
with an injected item resolver. Core fallbacks use ?? instead of ||
so an explicitly empty dialog key is respected, matching the behaviour
the game had; parity tests pin it.

- [x] Marked: 16.06-unify-inventory-rules

See docs/phases/phase-16-runtime-in-library/tasks/06-unify-inventory-rules.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Owner chose option A for the pickup event (emit item:pickedUp, stop
sending pickups as item:dropped).

See docs/phases/phase-16-runtime-in-library/tasks/07b-enable-declarative-audio.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Pickups travelled on the bus as item:dropped with an undeclared
pickup-success outcome. The legacy adapter now maps them to
item:pickedUp, and audio rules play the drop sound only for outcome
place. The demo creates the runtime before mounting the canvas, so
the initial scene:changed reaches the bus and the 50 ms polling is
gone; SFX and music now go through useAudioSystem.

BREAKING CHANGE: listeners that detected pickups through item:dropped
must listen to item:pickedUp instead.

- [x] Marked: 16.07-declarative-audio-wiring
- [x] Marked: 16.07b-enable-declarative-audio

See #21
See docs/phases/phase-16-runtime-in-library/tasks/07b-enable-declarative-audio.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
…ores

scene:set accepts an optional spawnPosition and transition:activate
honours the transition's spawn. The runtime falls back to core dialog
and inventory-visibility stores when no UI adapters are injected, so
a consumer no longer has to bring its own. Additive only.

Step 11.2 of task 16.11.

See #21
See docs/phases/phase-16-runtime-in-library/tasks/11-steps.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
…m demo

PlacedSceneItems, SceneDropTargets, SceneBackgroundPlane, the camera
controllers and useProximityHintController had no game-specific logic
and now live in engine-renderer-r3f. Imports only: demo types become
core types and web adapters become guarded window access. Removes the
unused AnimatedSprite.

Step 11.1 of task 16.11.

See #21
See docs/phases/phase-16-runtime-in-library/tasks/11-steps.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The demo's dialog and inventory-visibility stores are now re-exports
of the core ones, so the runtime's default wiring replaces the
hand-written adapters. Items are registered in the runtime and the
inventory rules read them through createInventoryRuleContext, which
narrows GameItemRule outcomes at runtime; the inventory hook no
longer imports demo-content/items. /debug gets its own runtime so it
keeps resolving items.

Step 11.3 of task 16.11.

See #21
See docs/phases/phase-16-runtime-in-library/tasks/11-steps.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
…persistence

Inventory slots and placed items lived only in the demo, duplicated
between hook state and a persisted store. The core now owns reactive
stores for both, a generic set of seeded scenes, and load/save
functions over an injected key/value port that read the formats
existing saves use. Additive; the demo adopts them in step 11.7.

Step 11.6 of task 16.11.

See #21
See docs/phases/phase-16-runtime-in-library/tasks/11-steps.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
…untime

The generic half of the demo's scene controller (store reads, initial
scene seeding, scene id persistence) moves to the renderer with the
initial scene, storage and scene resolver injected. The demo keeps a
thin wrapper with its debug selector and returns the same keys.

Step 11.4 of task 16.11.

See #21
See docs/phases/phase-16-runtime-in-library/tasks/11-steps.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Plays a short run with Playwright against a running demo: new game,
blocked exit without the trophy, pickup, scene transition, reload.
Records every media play() so sound triggers are asserted instead of
checked by ear. Run with npm run smoke.

See docs/phases/phase-16-runtime-in-library/tasks/11-steps.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
…it rule

useTransitionSystem now lives in engine-renderer-r3f. The demo's
"take the trophy before leaving the room" check becomes a
canLeaveScene callback that reads the placed-items store when it
runs. A target scene that cannot be resolved no longer reaches
setScene with null.

Step 11.5 of task 16.11.

See #21
See docs/phases/phase-16-runtime-in-library/tasks/11-steps.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
DanielMartinezSebastian and others added 28 commits October 10, 2026 22:59
Named flags and visited scenes give rules something to remember.
Adds state:setFlag and state:clearFlag commands and a
state:flagChanged event; the runtime subscribes to the store, so
direct writes emit too and two runtimes cannot clobber each other.

- [x] Marked: 17.03-world-state

See docs/phases/phase-17-narrative-primitives/tasks/03-world-state.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Condition is plain serializable data (flag, hasItem, itemPlaced,
inScene, visited, all, any, not). evaluateCondition takes its context
as an argument; getConditionContext reads the stores. Builders are
grouped under cond to keep generic names out of the package root.
Malformed conditions evaluate to false and warn once.

- [x] Marked: 17.04-conditions

See docs/phases/phase-17-narrative-primitives/tasks/04-conditions.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
One snapshot (scene, position, inventory, placed items, seeded and
visited scenes, flags, opaque host extra) under one key, with a
migration chain and a reader for the four 0.5.0 keys. Adds game:save,
game:load and game:reset. A snapshot whose scene is not registered is
rejected whole rather than applied halfway.

- [x] Marked: 17.10-save-load

See docs/phases/phase-17-narrative-primitives/tasks/10-save-load.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Two public-domain packs from OpenGameArt (496 RPG icons by Henrique
Lazarini, Idylwild's Inventory), stored unmodified outside public/ so
they are not served. Records the owner's art decisions for phase 18:
CC0 item icons, and NPCs without new art.

See docs/phases/phase-18-story-demo/assets.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
A script is a list of declarative actions (say, setFlag, giveItem,
changeScene, walkTo, wait, call...). The sequencer runs one script at
a time, queues the rest, waits on dialog dismissal, walk completion
and an injected clock, and always releases the input lock on finish
or cancel. It dispatches existing commands rather than duplicating
their logic, and exposes an executor registry for later action types.
Adds runScript and registerHandler to the runtime, plus instantWalk
for headless runs.

Integration found that nothing emits player:walkCompleted in the
browser; task 05b covers it.

- [x] Marked: 17.05-actions-and-sequencer

See docs/phases/phase-17-narrative-primitives/tasks/05-actions-and-sequencer.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Scenes can declare hotspots with look, use and talk branches and
per-item rules. hotspot:interact picks the first matching branch,
walks to the approach point and runs the script through the
sequencer; hotspot:noAction reports why nothing applied.
inventory:pickup and inventory:drop stop being deferred warnings and
operate on the core stores with the existing item rules.

- [x] Marked: 17.06-hotspots

See docs/phases/phase-17-narrative-primitives/tasks/06-hotspots.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Nothing emitted player:walkCompleted, so a script walkTo would have
waited forever in the browser. The walk animation hook now reports
arrival, replacement of the route and interruption, without touching
the animation, and does not duplicate the abort the core already
emits for player:stop. Click-to-move is a separate physics route and
still emits neither.

- [x] Marked: 17.05b-renderer-walk-completed

See docs/phases/phase-17-narrative-primitives/tasks/05b-renderer-walk-completed.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Conversations are declarative nodes with a speaker line, effects and
choices filtered by conditions; once choices are remembered as world
flags so they survive a save. Node and choice effects run inline on
the current script (new ActionContext.runInline), which avoids a
deadlock with the one-script-at-a-time queue. A dialogue locks input
while active, ends cleanly on dialogue:end or script cancellation,
and never throws on malformed content.

- [x] Marked: 17.07-dialogue-trees

See docs/phases/phase-17-narrative-primitives/tasks/07-dialogue-trees.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Items declare `combine` branches keyed by the other item id; the rule is
symmetric. `inventory:combine` emits `item:combined` and runs the script,
or `item:combineFailed` when an item is missing or no branch applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Three causes, all visible as the sprite flipping to idle or to another
direction while walking:
- the wall-slide heuristic read a render frame with no physics step as
  both axes blocked (high refresh-rate displays, uneven frame times);
- the clip followed the slide-suppressed input instead of the intended
  direction;
- on long frames click-to-move overshot the waypoint and bounced around it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
CC-BY 3.0 by Jeremy Gooch; attribution recorded in assets-src/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
…tions

Scenes can declare `initialItems` (with conditions) and `onEnter` branches,
and transitions gain `when` and `blocked`. The renderer evaluates them
before the Phase 16 host callbacks, which still work and can veto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
CC-BY-SA 4.0 by DeMoNiCaTeD; license terms recorded in assets-src/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The legacy adapter forwarded outcomes the type did not list behind a cast.
Nothing emitted changes; the type now says what already travels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Core projects each NPC to a hotspot so hotspot:interact works with its id.
The renderer draws the sprite, applies visibleWhen, plays the speaking clip
and anchors the speech bubble on the NPC that talks. Click handling comes
with the renderer hotspots task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
validateContent walks every script and condition and reports duplicate ids,
unknown scenes, items, dialogues and nodes as errors, and unreachable or
unused content as warnings. createGameRuntime runs it in development.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
A click runs the only applicable verb or opens a menu when there are
several; dropping an inventory item on a hotspot uses it there, and drop
targets keep priority. Movement and hotspots ignore input while the core
input lock is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Nodes with choices keep the line on screen and list the options once it
has finished typing; nodes without choices advance when the bubble closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The bubble was hidden through the store only, so a script `say` action
waiting for dialog:dismissed never resumed in the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
A three-scene fixture written only as data is solved end to end by a test
without a renderer, including wrong-order attempts and save/resume.
createPlaythrough ships under the ./testing subpath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
A placed item's interactionId is a free label (its pickup tag), not a
reference to a scene interaction, so the check produced false errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The initial trophy, the welcome line and the blocked exit are now scene
data instead of host callbacks. Progress is saved as one snapshot with
door states under extra.doors; 0.5.0 saves are migrated on load. The smoke
reads the snapshot and checks the migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
… labels

The projected NPC hotspot only covered the feet, so clicking the body moved
the player instead of talking; GameSceneNpc.clickBox overrides the default.
The verb menu computed its labels before the engine texts were registered
and showed raw keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
A guide in town with a branching dialogue, a computer hotspot with look,
use and useItem in the personal room, and two key halves that combine.
InventoryUI combines items dropped on another slot. The smoke covers all
of it (69 + 8 checks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
The scene is reachable from the debug scene selector. Background by
Jeremy Gooch (CC-BY 3.0) and character by DeMoNiCaTeD (CC-BY-SA 4.0);
attribution and changes are recorded in public/assets/LICENSES-art.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Five authoring guides with examples copied from the mini-adventure fixture
and the demo content, the narrative model architecture note, and the
contract, consumption guide, READMEs and changelogs updated for 0.6.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
Bumps both packages to 0.6.0, syncs the lockfile, and records the
validation gate evidence and the retrospective.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2mNfzeKoJyn6y9Mwd7HBq
@DanielMartinezSebastian
DanielMartinezSebastian merged commit 51fbe7c into main Oct 11, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 08e461b6 Deployed Oct 11, 2026 by vercel[bot]
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.

Mover el runtime (createGameRuntime, hooks, GameViewport) de la demo a los paquetes

1 participant