{
  "contract_version": "gab_234_contract_v1",
  "gab_id": "GAB-234",
  "canonical_name": "FeedbackLearningRetryGuide",
  "module_owner": "EdTechFeedbackLearning",
  "renderer_key": "text_cta",
  "required_fields": [
    "gab_id",
    "retry_guide_id",
    "title",
    "instruction_text",
    "hint_text",
    "primary_cta"
  ],
  "optional_fields": [
    "subtitle",
    "retry_type",
    "instruction_label",
    "keep_label",
    "keep_text",
    "change_label",
    "change_text",
    "no_spoil_text",
    "secondary_cta"
  ],
  "field_types": {
    "retry_type": "enum['same_question','similar_question','guided_retry','after_hint','after_review']",
    "primary_cta": "object{label:string, action:string}",
    "secondary_cta": "object{label:string, action:string}",
    "instruction_text": "string — stratégie uniquement, jamais la réponse complète",
    "hint_text": "string — indice ouvert sans spoiler",
    "keep_text": "string — ce que l'élève conserve de sa tentative précédente",
    "change_text": "string — ce que l'élève doit modifier"
  },
  "constraints": [
    "instruction_text doit fournir une stratégie (garder/changer) sans dévoiler la réponse complète.",
    "hint_text est un indice ouvert : jamais la solution, même partielle.",
    "no-reward-write strict : ce gabarit n'écrit aucun XP, coins ou badge.",
    "primary_cta.label vient du JSON, jamais en dur dans le HTML.",
    "En mode évaluation, aucune réponse ne doit être révélée (doctrine no-spoil)."
  ],
  "blocked_conditions": [
    "title absent (BLOCKED)",
    "instruction_text absent (BLOCKED)",
    "hint_text absent (BLOCKED)",
    "primary_cta absent (BLOCKED)"
  ],
  "accessibility": [
    "keyboard_navigable",
    "focus_visible",
    "prefers_reduced_motion",
    "fallback_text"
  ],
  "qa_cases": [
    { "case": "instance conforme", "expected": "rendu complet, colonnes garder/changer affichées, 0 erreur" },
    { "case": "champ requis manquant (ex: instruction_text)", "expected": "BLOCKED listant le champ" },
    { "case": "secondary_cta absent", "expected": "bouton secondary masqué, rendu fonctionnel" },
    { "case": "no_spoil_text absent", "expected": "bloc no-spoil masqué, rendu fonctionnel" },
    { "case": "instance externe injectée via ENGINE.init(ext)", "expected": "rendu change sans modifier le HTML" },
    { "case": "responsive 375/768/1024", "expected": "colonnes empilées en mobile, aucun débordement horizontal" }
  ],
  "traceability": {
    "derived_from_core_gab": "GAB-234",
    "note": "Ce schema VALIDE l'instance. Le contrat pédagogique complet (input_contract/validation_logic/feedback_scoring_logic) vit dans le CORE-GAB officiel, pas ici (évite la duplication)."
  }
}
