reachy-tales / CLAUDE.md
Nicolas Rabault
chore: drop GitHub workflows, target HF Space directly
75f99bf
|
Raw
History Blame Contribute Delete
4.55 kB

Reachy Tales β€” Continuation Guide

Voice-driven story adventures for Reachy Mini. Pure-TS story-engine library + JS HF Space app.

Status

Layout

Commands

npm install
npm test --workspace story-engine    # 41 engine tests
npm run test:app                     # 3 bridge tests
npm run test:all                     # both
npm run dev                          # http://localhost:5173
npm run build                        # tsc + vite build β†’ dist/

Reachy Mini SDK

Pinned to v1.7.0 via jsDelivr CDN in src/main.ts. Upstream:

Adaptations from spec β€” read before changing the bridge

  • OpenaiRealtimeClient API differs from the plan's draft: event-based via on(), no updateSession(), returns tool results via sendToolResponse(callId, output). The bridge restarts the session on every story transition (not just voice changes) β€” visible as a small audio gap. To eliminate, add a session.update event-send path in src/openai-realtime.ts and use it when the voice doesn't change.
  • App-side tsconfig.app.json disables noUncheckedIndexedAccess because the copied reference plumbing (src/move-player.ts, src/head-wobbler.ts) does matrix math with direct array indexing. The engine workspace keeps the strict setting.
  • exactOptionalPropertyTypes is on. Engine code uses conditional spreads (...(v !== undefined && { k: v })) instead of literal undefined assignments β€” see packages/story-engine/src/loader.ts and packages/story-engine/src/engine.ts.

Untested (require physical infra)

docs/playtest.md is the v1 acceptance checklist. None of those items have been verified β€” they need a real Reachy Mini, an OpenAI Realtime key, and a browser. CI does not cover them.

Open content gaps

content/story_pirates/storylines/chapter1/ has 17 nodes. The original French source referenced 28 follow-up nodes that were never authored. Those action.next refs were stripped during translation review. To extend the story, author the missing follow-up nodes β€” many leaf nodes have actions: [] as a result.

HF Space deployment

The Space at https://huggingface.co/spaces/Nico-robot/reachy-tales is the only remote. To deploy a change:

git push hf main          # the `hf` remote was added by the initial create

The Space auto-builds the Docker image (~1–2 min) and serves on the HF-assigned URL. Logs visible in the Space UI.

If hf remote is missing on a fresh clone:

git remote add hf https://huggingface.co/spaces/Nico-robot/reachy-tales

To recreate the Space from scratch (one-time):

hf auth login                                                          # if not authed
hf repos create reachy-tales --repo-type space --space-sdk docker
git remote add hf https://huggingface.co/spaces/Nico-robot/reachy-tales
git push -u hf main