MacStudio spec: P1 part13 marked delivered (commit d59282a, voice-bridge 0.5 with CORSMiddleware + NPC_SYSTEM_PROMPT injection for npc-fast persona). Risks section gains a new entry pointing to the LAN-only security checklist in tools/macstudio/README.md (commit 695b7f7). Acceptance gates: 4 new boxes checked.
Voice-pipeline ESP-SR spec: C_slice 12 marked delivered (commit 71bc9a5, mDNS zacus-master.local + game_endpoint REST NVS-backed) and C_slice 13 (commit a743cfc, voice_dispatcher fuzzy keyword aliases). Risks rewritten: PLIP /voice/hook decroche is now the primary trigger, custom Espressif wake-word is optional, microWakeWord remains an open-source alternative path. Gates: 3 new boxes checked.
Tradeoffs: kept the wholesale 'Total core' line and the §9 Open questions entry on mDNS untouched even though both are now obsolete — minimum-diff to satisfy the verrou and keep review easy. Both can be revised in a follow-up pass.
Brainstorm 4/4 — final of today's evening session.
Decisions:
- Framework: full Arduino -> ESP-IDF migration on the
ESP32_ZACUS master. Gating phase (~100-160 h). esp-sr
is IDF-native and the Arduino wrapper lags. Plays well
with the existing playtest harness as regression guard.
- Wake word: custom "Professeur Zacus", trained via
Espressif's wakenet trainer (~30 min FR samples + 1-2
day train cycle). Falls back to pre-trained "hi_esp"
during P3 placeholder.
- STT mode: VAD + batch (chunk ≤ 10 s) via whisper.cpp
large-v3-turbo on MacStudio. Simpler than streaming and
≈ 400 ms p95 on M3 Ultra.
- Intent mapping: hybrid - 4 hard-coded keyword
fast-paths (indice / skip / valider / annuler) at
< 100 ms, then Qwen 7B fallback in JSON mode with
confidence threshold. Sub-0.6 confidence -> "pardon je
n'ai pas compris" graceful degradation.
- AEC: mute-during-TTS first (Q5b), upgrade to esp-sr
software AEC (P8 optional) only if interruption UX is
needed.
Phased plan P1-P7 core + optional P8. P1 (IDF migration)
is ~80% of the cost. Remaining 20% is bounded once the
framework switch lands.
Voice-bridge FastAPI on MacStudio :8200 fans out to
whisper / Piper / LiteLLM. ESP32 client sees one host,
three intuitive endpoints.
All 4 brainstorms of today's evening session committed.
Implementation order suggested: (4) MacStudio first
(unblocks 5+6) -> (5) hints engine -> (7) playtest
harness in parallel -> (6) voice pipeline last (longest
chantier).
Brainstorm 3/4. Decisions:
- Trigger: button + auto stuck-timer (configurable per
group profile). Voice STT trigger explicitly rejected
(button is enough).
- Escalation: adaptive level selection (1 to 3) modulated
by stuck_timer * group_profile. TECH groups receive
subtler hints; NON_TECH escalate faster when stuck.
- Anti-cheat: hard cap at 3 hints per puzzle + progressive
score penalty (50, +100, +200 cumulative on top of
scoring.hint_penalty). Cooldown 60 s between requests.
- Content strategy: hybrid - static base phrase from
npc_phrases.yaml is the authoritative content, Qwen 2.5
72B rewrites for Zacus voice flavor only. Per-puzzle
banned-word safety filter rejects rewrites that leak
solutions; fallback to base phrase on filter trip or
LLM timeout (> 2 s).
- Service: standalone FastAPI server at
tools/hints/server.py on MacStudio :4100, talks to
LiteLLM :4000. Stateless. ESP32 master holds session
state.
Phased plan P1-P6 (14-21 h). P5 (ESP32 firmware
integration) is the largest because it crosses the
submodule boundary.
Depends on the MacStudio migration design (Qwen 72B
available via LiteLLM). Cannot start until that lands.
1 brainstorm remaining: voice pipeline ESP-SR.
Brainstorm 2/4 of today's evening session. Decisions:
- Granularity: engine + content (no LLM/TTS/STT, no HW
in-the-loop). Atelier UI is Playwright's job.
- Format: sidecar YAML files in
game/scenarios/playtests/<name>.playtest.yaml. Each
declares scenario reference, config, scripted events,
critical_asserts, and optional snapshot config.
- Asserts: hybrid - snapshot of full transcript (drift
detection) PLUS explicit critical_asserts that must hold
regardless of snapshot match (business invariants).
- Runners: Python (tools/playtest/run_playtest.py, source
of IR truth) AND TypeScript (vitest in
scenario-engine/__tests__). Same YAML files, same JSON
transcript shape. Drift between them is itself a
regression.
- CI: GitHub Actions workflow on PRs touching
game/scenarios/, tools/scenario/, or
packages/scenario-engine/.
Phased plan P1-P4 (9-13 h core) + optional P5 stretch
(parametric runs with random seeds for statistics).
3 first playtests to seed the suite:
- zacus_v3_60min_tech happy path
- zacus_v3_60min_mixed (profile detection edge)
- zacus_v2_legacy_route (regression guard)
2 brainstorms remaining: hints engine, voice pipeline
ESP-SR.
Brainstorm output for replacing the dual-frontend setup
(frontend-scratch-v2 + frontend-v3 with 3 apps) by a V3
monorepo with 2 apps: dashboard (unchanged) and atelier
(new fusion of editor + simulation).
Decisions:
- Architecture: Scratch-like split (Blockly left/center,
3D stage right, validation console bottom).
- V2 cutover: hard, immediate, before atelier work.
- Naming: @zacus/atelier (avoids collision with the
existing zacus-studio desktop app).
- Live-diff strategy: stale badge + manual Run, no
auto-replay (Three teardown is too expensive).
- Modes Sandbox/Demo/Test as bottom tabs.
6-phase plan with explicit acceptance criteria, ~20-30h
focused effort.