Commit Graph

8 Commits

Author SHA1 Message Date
Denis Defolie 2d7001105d Add sound effects, ambient music and volume mixing (0.5.0)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 22:57:37 +02:00
Denis Defolie aad229ef7b Add CE2 homophones chapter (a/à, et/est, son/sont, on/ont)
Same directives as the CE1 chapter: 4 rules with a substitution test
each, 8 multiple-choice + 4 sentence corrections + 3 dictées per rule
(draft), 3 missions per rule, Piper audio for the 12 dictées.

21 missions don't fit on one map, so the world map now shows the
missions of the profile's school level (derived from the rule's level,
no data-format change), with a button letting a CE2 profile revisit the
CE1 map. Mission-position guard test now checks each level separately.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 21:58:16 +02:00
Denis Defolie 1c036658bc Add regle_pluriel_nom and regle_accord_determinant (CE1)
Extends explicitly beyond the §15 prototype scope (3 missions, one
rule) that prompt-lancement.md says not to exceed without flagging
it — confirmed with the user before implementing (decisions.md,
point 25).

Adds the two remaining CE1 rules for the "accords dans le groupe
nominal" chapter listed in prompt-lancement.md, each with the same
minimum content volume already established for regle_accord_adjectif
(8 multiple-choice, 4 sentence corrections, 3 dictées across the 3
difficulty levels) and 3 missions (one per exercise type, matching
the existing pattern), bringing the map to 9 locations.

world_map.gd is purely data-driven already, so no code change was
needed to support more locations — only its stale "trois lieux"
header comment, corrected. Dictation audio generated with the Piper
voice (make generate-dictation-audio).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 21:36:04 +02:00
Denis Defolie 26d588f1bc Add 2 dictées for the accords-du-groupe-nominal chapter
Only 1 existed, below the prompt-lancement.md minimum of 3 per
chapter. Adds difficulty 2 (feminine singular) and difficulty 3
(feminine plural, noun and adjective separated by a complement,
mirroring points 18/23). Audio generated with the Piper voice
(make generate-dictation-audio), credited in assets/CREDITS.md.

With this, regle_accord_adjectif now meets prompt-lancement.md's
minimum content volume: 8 multiple-choice, 4 sentence corrections,
3 dictées.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 21:15:26 +02:00
Denis Defolie b0dcedb402 Replace eSpeak NG with Piper neural voice for dictation audio
Manual test reported the eSpeak NG dictation voice as unintelligible.
Formant synthesis is inherently mechanical; slowing it down doesn't
fix that. Switched tools/generate_dictation_audio.py to piper-tts
(fr_FR-siwis-medium neural voice, MIT/CC-BY 4.0, attribution in
assets/CREDITS.md). The voice model (~60MB) downloads once on demand
into the untracked .cache/piper-voices/, never at game runtime.

Adds piper-tts to tools/setup.sh's venv and a pyrightconfig.json
pointing pyright at .venv, needed once tools/ imports a real
third-party package (`make lint` was silently checking against the
wrong interpreter before).

Regenerated ce1_accord_adjectif_dictee_01.ogg with the new voice.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 19:07:40 +02:00
Denis Defolie 73440ba226 Generate provisional dictation audio so dictée missions can be played
Manual testing confirmed the "La clairière de l'écho" dictée mission
was unplayable: no audio file existed yet (decisions.md point 8), so
there was nothing to listen to before transcribing the sentence.

Adds tools/generate_dictation_audio.py (offline eSpeak NG synthesis +
ffmpeg encoding to Ogg Vorbis, exposed as `make
generate-dictation-audio`) and uses it to generate
ce1_accord_adjectif_dictee_01.ogg. A new headless test
(tests/data/test_dictation_audio.gd) guards against future dictées
being added without regenerating their audio.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 18:40:11 +02:00
Denis Defolie 493a8617d7 Add the playable scene loop: boot through mission to reward
Wires every autoload up to a real UI: boot -> profile select/create
-> world map (three mission markers, positioned from data, not
hardcoded pixels) -> mission intro (narrative from data/missions/,
a new data type with its own schema) -> rule panel -> exercise host
-> one of the three exercise type scenes -> feedback panel -> reward
screen -> back to the map.

exercise_host is the only piece with real orchestration logic: picks
exercises via ExerciseEngine (now fully implemented, validating at
load like make validate-data does), validates answers through the
pure AnswerValidator/DictationAnalyzer, escalates aid over 3 attempts
via AttemptFlow, feeds DifficultyManager so adaptive difficulty is
actually wired in rather than dead code, and records every attempt
through ProgressManager. Every exercise-type scene (multiple_choice,
sentence_correction, dictation) only emits its answer by signal, per
the architecture invariant.

All child-facing text now comes from data/localization/fr.json via
UIText, not hardcoded in scripts or scenes. Getting that right
required extending SchemaValidator to support "additionalProperties"
as a schema (dynamic keys), which also closed a real gap: save.skills
was previously unvalidated against SkillState's actual shape.

16 new headless tests, including two integration tests that instance
exercise_host.tscn directly and drive it by emitting child-scene
signals, stopping short of the final scene transition (which would
tear down the test runner's own tree). Everything that needs a
screen -- layout at different sizes, touch, virtual keyboard, actual
audio playback (no .ogg files exist yet) -- is listed in the new
docs/testing/manual-checklist.md instead of claimed as verified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 17:37:37 +02:00
Denis Defolie a1f749de40 Add project skeleton: Godot setup, tooling, and smoke test
Pins Godot 4.6.3-stable and GUT 9.6.0 (9.6.1+ reference
AccessibilityServer, unavailable in 4.6.3) via tools/setup.sh. Wires
make check (gdlint + gdformat config for 4-space indent, headless
GUT run, and a JSON well-formedness check ahead of real schema
validation). Seven autoload stubs match the architecture in the
cahier des charges; real logic lands with the following steps.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 16:15:19 +02:00