# EduVis Showcase: Adaptive Remediation & Assessment Branching
# Demonstrates:
# 1. True / False checking (2-option MCQ)
# 2. MCQ misconception tracking & solution steps
# 3. Unified Remediation block (Review - Remember - Solve) and relationship target constraints

schema_version: "0.6"

curriculum:
  code: showcase
  topic: adaptive-remediation

lesson:
  title: "Adaptive Remediation & Telemetry Event Branching"
  concepts:
    - prime_numbers

progression:
  pattern: direct_instruction
  pedagogy:
    explain_why: true
    no_skipped_steps: true
  phases:
    - phase: explain
      purpose: conceptual_model
    - phase: independent_practice
      difficulty: starter
    - phase: explain
      purpose: worked_example
    - phase: explain
      purpose: conceptual_model
    - phase: independent_practice
      difficulty: starter
    - phase: explain
      purpose: worked_example
    - phase: independent_practice
      difficulty: starter
    - phase: explain
      purpose: worked_example

content:

  # --- 1. TRUE / FALSE CHECK --------------------------------------------------
  - id: check_true_false
    type: multiple_choice
    concepts:
      - prime_numbers
    placement:
      lesson_phase: explain
      purpose: conceptual_model
      layout_zone: center
      memory_role: anchor
      assessment_objective: conceptual_understanding
    question: "True or False: The number 1 is a prime number."
    options:
      "True": "Incorrect, 1 only has one factor."
      "False": "Correct, 1 is not a prime number."
    answer: "False"

  # --- 2. FIVE OPTION MCQ -----------------------------------------------------
  - id: check_five_options
    type: multiple_choice
    concepts:
      - prime_numbers
    placement:
      lesson_phase: independent_practice
      difficulty: starter
      layout_zone: center
      memory_role: practice
      assessment_objective: procedural_fluency
    relationships:
      precedes:
        - explain_composite_intro
    question: "Which of the following numbers is prime?"
    options:
      A: "1 (first positive integer)"
      B: "4 (factors: 1, 2, 4)"
      C: "6 (factors: 1, 2, 3, 6)"
      D: "9 (factors: 1, 3, 9)"
      E: "2 (only even prime number)"
    answer: "E"

  # --- 3. UNIFIED REMEDIATION BLOCK (PRIME NUMBERS) --------------------------
  - id: explain_prime_remediation
    type: remediation_block
    concepts:
      - prime_numbers
    placement:
      lesson_phase: explain
      purpose: worked_example
      layout_zone: center
      memory_role: misconception_fix
    relationships:
      remediation_for:
        - check_five_options
    review:
      source_question: check_five_options
      student_answer: "C"
      correct_answer: "E"
    remember:
      type: callout_box
      title: "Prime Numbers Rule"
      border_color: orange
      lines:
        - "A prime number is a whole number greater than 1."
        - "It must have exactly two factors: 1 and itself."
    solve:
      type: hint_list
      items:
        - "Step 1: Write down factors of Option C (6): 1, 2, 3, 6 (four factors). Not prime."
        - "Step 2: Write down factors of Option E (2): 1, 2 (exactly two factors). Prime!"
      final: "Therefore, E is the correct answer."

  # --- 4. COMPOSITE NUMBERS INTRO --------------------------------------------
  - id: explain_composite_intro
    type: callout_box
    concepts:
      - prime_numbers
    placement:
      lesson_phase: explain
      purpose: conceptual_model
      layout_zone: center
      memory_role: anchor
    title: "Composite Numbers"
    border_color: green
    lines:
      - "Whole numbers greater than 1 that are NOT prime are called COMPOSITE NUMBERS."
      - "A composite number has more than two factors (divisors)."
      - "For example, 4 has factors 1, 2, and 4 (three factors). Thus, 4 is composite."

  # --- 5. MCQ FOR COMPOSITE NUMBERS ------------------------------------------
  - id: check_composite_number
    type: multiple_choice
    concepts:
      - prime_numbers
    placement:
      lesson_phase: independent_practice
      difficulty: starter
      layout_zone: center
      memory_role: practice
      assessment_objective: conceptual_understanding
    question: "Which of the following numbers is a composite number?"
    options:
      A: "2 (factors: 1, 2)"
      B: "3 (factors: 1, 3)"
      C: "5 (factors: 1, 5)"
      D: "9 (factors: 1, 3, 9)"
      E: "7 (factors: 1, 7)"
    answer: "D"
    misconceptions:
      A: "prime-composite-confusion"
    solution_steps:
      - "List factors for each option."
      - "2, 3, 5, and 7 are only divisible by 1 and themselves (Prime numbers)."
      - "9 is divisible by 1, 3, and 9 (three factors)."
      - "A number with more than two factors is composite."

  # --- 6. UNIFIED REMEDIATION BLOCK (COMPOSITE NUMBERS) ----------------------
  - id: explain_composite_remediation
    type: remediation_block
    concepts:
      - prime_numbers
    placement:
      lesson_phase: explain
      purpose: worked_example
      layout_zone: center
      memory_role: misconception_fix
    relationships:
      remediation_for:
        - check_composite_number
    review:
      source_question: check_composite_number
      student_answer: "A"
      correct_answer: "D"
    remember:
      type: callout_box
      title: "Composite Numbers Rule"
      border_color: red
      lines:
        - "A composite number is a positive integer greater than 1 that has more than two factors."
        - "Any whole number greater than 1 is either prime or composite."
    solve:
      type: hint_list
      items:
        - "Step 1: List the factors of 2. It has only 1 and 2 (Prime)."
        - "Step 2: List the factors of 9. Factors are 1, 3, 9. Since it has more than two factors, it is composite."
      final: "Therefore, D is the correct answer."

  # --- 7. MCQ FOR PRIME FACTORS ----------------------------------------------
  - id: check_prime_factors
    type: multiple_choice
    concepts:
      - prime_numbers
    placement:
      lesson_phase: independent_practice
      difficulty: starter
      layout_zone: center
      memory_role: practice
      assessment_objective: procedural_fluency
    question: "What are the prime factors of 12?"
    options:
      A: "2 and 3"
      B: "2, 3, and 4 (4 is composite)"
      C: "1, 2, 3, 4, 6, 12 (all factors)"
      D: "3 and 4"
    answer: "A"
    misconceptions:
      B: "includes-composite-factor"
      C: "list-all-factors-confusion"
    solution_steps:
      - "Find all factors of 12: 1, 2, 3, 4, 6, 12."
      - "Filter out the numbers that are not prime (1, 4, 6, and 12 are not prime)."
      - "The remaining prime factors are 2 and 3."

  # --- 8. UNIFIED REMEDIATION BLOCK (PRIME FACTORS) --------------------------
  - id: explain_factors_remediation
    type: remediation_block
    concepts:
      - prime_numbers
    placement:
      lesson_phase: explain
      purpose: worked_example
      layout_zone: center
      memory_role: misconception_fix
    relationships:
      remediation_for:
        - check_prime_factors
    review:
      source_question: check_prime_factors
      student_answer: "C"
      correct_answer: "A"
    remember:
      type: callout_box
      title: "Prime Factors Rule"
      border_color: green
      lines:
        - "Factors are numbers you multiply together to get another number."
        - "Prime factors are factors that are also prime numbers."
    solve:
      type: hint_list
      items:
        - "Step 1: List all factors of 12: 1, 2, 3, 4, 6, 12."
        - "Step 2: Identify prime numbers among them. Only 2 and 3 are prime."
      final: "Therefore, the prime factors of 12 are 2 and 3 (Option A)."
