Two new specs:
- 2026-05-24-zacus-hub-app.md — architecture, sprints, auth,
open decisions for the SwiftUI hub app + gateway.
- 2026-05-24-firmware-scenario-hotload.md — firmware Phase 2
plan for /game/scenario + ESP-NOW mesh relay (the master
side has shipped on the submodule; the relay + peer
receivers + scenario_engine_reload remain to do).
Submodule ESP32_ZACUS bumped to d220d94 on feat/idf-migration
(POST /game/scenario hot-load on master, scenario_server.c on
BOX-3, ota_server max_uri_handlers 8->16, sdkconfig.qemu).
Both chantiers live in other repos but the validating infrastructure
(Kyutai :8304, voice-bridge :8200, Kokoro :8002, LiteLLM :4000) is
documented here. Specs are implementable as-is — file layout, API
shapes, integration order, bench targets, risks, concrete entry
commands.
ailiance/realtime/ : OpenAI Realtime API wrap. ~9 events,
5 modules, single process, one upstream Kyutai WS per client.
baby-brain stt migration : router keeps whisperx for diarisation
(WML needs speakers), routes the conversational path to Kyutai.
Includes the ssh one-liner to add a babybrain-tailnet auth key
to Studio Kyutai config when work starts.
Snapshot of state after this session + actionable plan for the
five remaining chantiers (glossary biasing, server-side EOU,
TTS fallback, ailiance Realtime wrap, baby-brain migration).
Each chantier documents what was discovered (e.g. Kyutai Rust
server has no TextPrompt message, Step VAD prs are undocumented),
why we did/didn't act on it this session, and a precise entry
point for the next session — so the next person/agent doesn't
have to re-grep the moshi-server source to know what's possible.
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.
Context: Three codex branches had useful firmware
fixes (I2S, AP password, CORS) but with broken
double-nested paths from Codex CWD bug.
Changes:
- Save fix descriptions and patch to docs/debt/
- For manual re-application to correct paths
Impact: Preserves knowledge from dropped branches.
- Updated `validate_scenario.py` to handle V2 scenario YAML files, introducing new required keys and validation logic.
- Added support for legacy V1 scenarios with an option to allow migration.
- Modified `run_content_checks.sh` to validate V2 scenarios and associated audio and printables manifests.
- Created AGENT_TODO 3.md to track progress on backend integration with LovyanGFX.
- Added repo-map 3.svg for visual representation of project structure.
- Configured .gitmodules for esp32-llm and esp-picotts submodules.
- Documented critical gate issues with WiFiServer.h in RC_AUTOFIX_CICD 3.md.
- Developed fiches for AudioManager and BluetoothManager detailing interfaces and usage.
- Compiled hw_validation_a252_wifi_report 3.md for hardware validation results.
- Established plan_delegation_agents 3.md outlining roles and responsibilities for project agents.
- Defined multitasking architecture in plan_multitache_rtos 3.md.
- Outlined comprehensive testing strategy in plan_tests_livraison 3.md.
- Documented automated testing protocol in protocole_test_qa_moniteur_serie 3.md.
- Clarified roles in roles_agents 3.md for effective team collaboration.
- Validated WebUI functionality in tests_webui 3.md.
- Added idf_component 3.yml for esp-picotts integration.
- Included picoacph 3.h for text-to-speech processing capabilities.
🚀 Fusion galactique terminée !
J’ai compressé plus de fichiers que le cerveau d’un MJ sous caféine.
Cohérence validée, humour injecté, assets alignés…
Si tu trouves un bug, c’est sûrement un easter egg.
Prêt à embarquer pour Zacus 3000 — la seule enquête où même les robots rigolent !
(PS : Si tu merges, tu gagnes +10 points de charisme MJ)
* Fusion, nettoyage, docs, humour, style futuriste — PR #108🚀
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Clément SAILLANT <108685187+electron-rare@users.noreply.github.com>
* docs: import zacus conversation bundle v3 and close ZIP intake TODO
* tools: add reproducible validator installer and document next gates
* docs: remove ZIP terminology and align intake docs to conversation bundle
* tools: add runtime bundle validator and update docs workflow
* feat: promote gameplay scenario and enforce G3 bundle checks in CI
* docs: add deep repo analysis and next-step TODOs
* Initial plan (#107)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>