Commit Graph

12 Commits

Author SHA1 Message Date
Denis Defolie 732b854b1f Restore missing accents in CE1 child-facing texts
Hints, explanations, instructions, rule statements and mission
narratives written for CE1 had no accents ("feminin", "ecrire",
"determinant", "a la fin"). Fixed only display fields; ids, dictation
target texts, tokens and audio untouched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 22:03:24 +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 233cc26452 Fix overlapping mission markers on the world map
Manual test: "La clairière" and "La cabane" overlapped on screen.
Their fractional positions (0.8,0.65) and (0.92,0.78) were too close
given the marker size at the project's default window size — exactly
the risk flagged but unverified in the previous commit.

Repositioned all 9 missions (not just the new ones) onto a regular
3x3 grid with 0.35 spacing, well clear of marker dimensions at the
default resolution. Added a headless regression test
(tests/data/test_mission_positions.gd) that fails if any two
missions are closer than a 0.3 fractional gap on both axes — a
data-level guard, not a substitute for visually checking actual
on-screen layout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 21:50:39 +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 9a0e6b580e Add 6 multiple-choice exercises for regle_accord_adjectif
Only 2 existed, below the prompt-lancement.md minimum of 8 per rule.
Adds 4 at difficulty 1 (plural determiner visible), 2 at difficulty 2
(predicate adjective, no determiner cue), 2 at difficulty 3 (noun and
adjective separated by a complement, mirroring the point 18 sentence
corrections). Covers all four gender/number combinations across two
adjectives. All draft, pending human review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 19:33:29 +02:00
Denis Defolie 8a3469e7b1 Require capitalization and final punctuation again; add a UI reminder
Follow-up to the previous commit: testing further showed a missing
initial capital also fails validation, which raised the real
question (CLAUDE.md: ask rather than decide alone on an ambiguous
pedagogical point) — is sentence-initial capitalization and final
punctuation something the audio should convey, or a general writing
convention the child applies regardless of what they hear?

Decided: a general convention, like in a real classroom dictée. So
both stay required, and the terminal-punctuation tolerance added in
the previous commit is reverted (DictationAnalyzer back to comparing
the text as-is).

Since the audio still can't vocalize either rule, the child needs to
be told some other way: added a permanent reminder label to the
dictation scene ("N'oublie pas : une majuscule au début de la phrase
et un point à la fin !"), sourced from data/localization/fr.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 19:27:59 +02:00
Denis Defolie 04a1b5ee1b Add 3 sentence-correction exercises for regle_accord_adjectif
Only one sentence_correction exercise existed for this rule, below the
prompt-lancement.md minimum (4 per rule, spread across difficulty
levels) and the direct cause of the content repetition noted in
decisions.md point 17.

Adds difficulty 1 (number agreement), 2 (gender agreement) and 3
(gender+number, noun and adjective separated by other words),
covering both agreement axes across all three difficulty tiers. All
draft, per CLAUDE.md pending human review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 18:29:47 +02:00
Denis Defolie ffb3cd5afa Show "Exercise N/3" so repeated content doesn't look like a freeze
Manual report: after "Bravo!", clicking Continue seemed to do
nothing. An automated test proved the mission does advance (a new
exercise instance loads, completed_count increments) -- but
mission_02_pont_des_phrases has exactly one sentence_correction
exercise in the data right now, so the "next" exercise is the
identical sentence the child just solved. Nothing was broken; there
was just no visible signal that progress happened.

Added a persistent progress label at the top of exercise_host,
updated on every exercise load. Doesn't address the underlying
content-volume gap (still tracked in decisions.md point 14), but
makes the repetition legible instead of indistinguishable from a
stall.

Rebuilt both exports.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 18:18:40 +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 d057c8ee77 Add JSON schemas, data validator, and first CE1 content
Introduces a generic JSON-Schema-subset validator in GDScript
(scripts/data/schema_validator.gd) used both by `make validate-data`
and, later, by ExerciseEngine at load time, plus semantic_checks.gd
for cross-field constraints a schema can't express (answer index
bounds, at least one faulty token in sentence correction, word count
matching between a dictation's target_text and its annotations).

Schemas cover rule, exercise (dispatched per type: multiple_choice,
sentence_correction), dictation, curriculum, and save (save.schema.json
is not yet wired into validate-data; saves live in user://, handled
at the Profiles/Saves step).

First draft content for the CE1 "accord_adjectif" rule (one rule, two
multiple-choice exercises, one sentence correction, one dictation,
one curriculum entry) exercises the full pipeline end to end and
seeds docs/review/content-review.md, regenerated by the new
tools/generate_content_review.py (`make content-review`).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-11 16:47:28 +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