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>
This commit is contained in:
Denis Defolie
2026-10-11 16:47:28 +02:00
parent a1f749de40
commit d057c8ee77
31 changed files with 938 additions and 35 deletions
View File
@@ -0,0 +1,25 @@
{
"id": "ce1_accord_adjectif_correction_01",
"level": "CE1",
"domain": "grammaire",
"skill": "accord_groupe_nominal",
"rule_id": "regle_accord_adjectif",
"difficulty": 2,
"type": "sentence_correction",
"instruction": "Touche le mot qui contient une erreur, puis corrige-le.",
"tokens": [
{ "text": "Les", "correct": true },
{
"text": "petit",
"correct": false,
"expected": "petits",
"rule_id": "regle_accord_adjectif"
},
{ "text": "chiens", "correct": true },
{ "text": "courent.", "correct": true }
],
"hint": "Le determinant « les » indique un pluriel.",
"explanation": "L'adjectif « petit » s'accorde avec le nom « chiens », qui est au pluriel : il faut ecrire « petits ».",
"review_tags": ["pluriel", "accord_adjectif"],
"review_status": "draft"
}
@@ -0,0 +1,17 @@
{
"id": "ce1_accord_adjectif_qcm_01",
"level": "CE1",
"domain": "grammaire",
"skill": "accord_groupe_nominal",
"rule_id": "regle_accord_adjectif",
"difficulty": 1,
"type": "multiple_choice",
"instruction": "Choisis le bon groupe de mots.",
"question": "Les ... chiens jouent.",
"answers": ["petit", "petits", "petite"],
"correct_answer": 1,
"hint": "Observe le determinant « les » et le nom « chiens ».",
"explanation": "Le groupe nominal est au pluriel. L'adjectif prend ici la marque du pluriel.",
"review_tags": ["pluriel", "accord_adjectif"],
"review_status": "draft"
}
@@ -0,0 +1,17 @@
{
"id": "ce1_accord_adjectif_qcm_02",
"level": "CE1",
"domain": "grammaire",
"skill": "accord_groupe_nominal",
"rule_id": "regle_accord_adjectif",
"difficulty": 1,
"type": "multiple_choice",
"instruction": "Choisis le bon groupe de mots.",
"question": "La ... maison est jolie.",
"answers": ["petit", "petite", "petites"],
"correct_answer": 1,
"hint": "Observe le determinant « la » et le nom « maison ».",
"explanation": "Le nom « maison » est feminin singulier. L'adjectif prend donc la marque du feminin.",
"review_tags": ["feminin", "accord_adjectif"],
"review_status": "draft"
}