#!/usr/bin/env python3
"""
Week 22 Generator - Sentence Structure & Punctuation
"""
import os
import sys

# Add course root to path so we can import shared modules
COURSE_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, COURSE_ROOT)

from monday import generate_monday
from tuesday import generate_tuesday
from wednesday import generate_wednesday
from thursday import generate_thursday
from friday import generate_friday
from teacher_guide import generate_teacher_guide

# =====================================================================
# WEEK 22 DATA
# =====================================================================

WEEK_DIR = os.path.join(COURSE_ROOT, "Week_22")
WEEK_NUM = 22
PHONICS_LABEL = "Sentence Structure & Punctuation"

# 4-tuple: (word, pattern_code, phonics_note, context_definition)
WORDS = [
    ("sentence", "en", "words used in sentence context", "a group of words that expresses a complete thought"),
    ("complete", "omple", "words used in sentence context", "having all the parts needed; finished"),
    ("capital", "a", "capitalization is key to sentence rules", "uppercase letters used at the start of sentences and for proper nouns"),
    ("period", "e", "words used in sentence context", "the punctuation mark (.) that ends a statement"),
    ("question", "e", "words used in sentence context", "a sentence that asks something, ends with a question mark"),
    ("exclaim", "ai", "words used in sentence context", "to shout or say something with strong feeling"),
    ("fragment", "a", "capitalization is key to sentence rules", "an incomplete sentence that is missing a subject or verb"),
    ("punctuation", "u", "words used in sentence context", "marks like periods, question marks, and commas that show how to read"),
    ("grammar", "a", "capitalization is key to sentence rules", "the rules that tell us how to put words together correctly"),
    ("paragraph", "a", "capitalization is key to sentence rules", "a group of sentences about one topic"),
    ("capitalization", "a", "capitalization is key to sentence rules", "using uppercase letters at the start of sentences and for proper nouns"),
    ("expression", "e", "words used in sentence context", "a word or phrase that shows a feeling or idea"),
]

LEARNING_SKILLS_MON = [
    "Understand what makes a complete sentence (subject + verb + complete thought)",
    "Identify sentence fragments and run-on sentences",
    "Recognize the three types of end punctuation: period, question mark, exclamation point",
]

LEARNING_SKILLS_TUE = [
    "Sort sentences into statements, questions, and exclamations",
    "Fix sentence fragments by adding missing parts",
    "Practice choosing the correct end punctuation for each sentence type",
]

LEARNING_SKILLS_WED = [
    "Apply capitalization rules to the start of sentences and proper nouns",
    "Use context clues to identify sentence types in reading passages",
    "Distinguish between complete sentences and fragments in paragraphs",
]

LEARNING_SKILLS_THU = [
    "Write complete sentences with proper capitalization and end punctuation",
    "Edit paragraphs to fix fragments and run-on sentences",
    "Apply all punctuation and capitalization rules in original writing",
]

LEARNING_SKILLS_FRI = [
    "Demonstrate mastery of all 12 spelling words",
    "Correctly identify and fix sentence fragments and run-ons",
    "Apply capitalization and end punctuation rules in writing",
]

# =====================================================================
# MONDAY DATA
# =====================================================================

LEARNING_TEXT_MON = (
    "A complete sentence needs THREE things: a SUBJECT (who or what), a VERB (action or being word), "
    "and a COMPLETE THOUGHT. For example, 'The dog runs' is a complete sentence. "
    "A fragment is a piece of a sentence that is missing something — like 'runs very fast' (who runs?). "
    "A run-on sentence is two sentences smashed together with no punctuation. "
    "Today we will learn to spot complete sentences, fragments, and run-ons!"
)

VOWEL_EXAMPLES = [
    "The bird sings. (complete — has subject, verb, complete thought)",
    "Sings very loudly. (fragment — missing the subject!)",
    "The bird sings, the sun shines. (run-on — needs a period or 'and' between them)",
]

GRAMMAR_NOTE = "Every sentence needs a subject, a verb, and a complete thought."

GRAMMAR_DEEP = (
    "Three Parts of a Complete Sentence:\\\\n"
    "1. SUBJECT — who or what the sentence is about (e.g., 'The cat')\\\\n"
    "2. VERB — the action or being word (e.g., 'runs', 'is')\\\\n"
    "3. COMPLETE THOUGHT — the sentence must make sense on its own\\\\n"
    "\\\\n"
    "Types of End Punctuation:\\\\n"
    "- PERIOD (.) — ends a statement. Example: The dog barks.\\\\n"
    "- QUESTION MARK (?) — ends a question. Example: Where is the dog?\\\\n"
    "- EXCLAMATION POINT (!) — ends an excited statement. Example: What a beautiful day!\\\\n"
    "\\\\n"
    "Fragments are INCOMPLETE. Run-ons are TWO sentences mashed together."
)

MONDAY_GRAMMAR_FOCUS = "Complete Sentences vs. Fragments"

MONDAY_GRAMMAR_EXPLANATION = (
    "A complete sentence has a subject, a verb, and expresses a complete thought. "
    "A fragment is missing one of these parts and doesn't stand alone."
)

MONDAY_GRAMMAR_PRACTICE = [
    ("The cat sleeps on the mat.", "complete"),
    ("Sleeps on the mat.", "fragment"),
    ("The happy dog.", "fragment"),
]

MONDAY_STORY = (
    "Every sentence needs to be complete. A fragment is like a puzzle with a piece missing. "
    "For example, 'runs in the park' is a fragment because we don't know WHO runs. "
    "A complete sentence tells us everything: 'The boy runs in the park.' "
    "Questions end with question marks, like 'Where is the ball?' "
    "Exclamations end with exclamation points, like 'What a beautiful day!' "
    "Statements end with periods, like 'The sun is shining.' "
    "Good grammar means using the right punctuation for every sentence type. "
    "A paragraph is a group of complete sentences about one topic. "
    "Capitalization means starting every sentence with a capital letter. "
    "Practice writing complete sentences with proper punctuation every day!"
)

MONDAY_SORT_LABELS = ["Complete Sentence", "Fragment", "Run-On"]

TEACHER_MONDAY_SORT_ANSWERS = {
    "Complete Sentence": ["The cat sleeps.", "She asks a question.", "The bird flies south."],
    "Fragment": ["in the park", "very quickly", "the big red"],
    "Run-On": ["The dog barks the cat meows.", "I like pizza I like cake."],
}

MONDAY_FILL_DATA = [
    ("A sentence that ends with a period is a __________.", "statement"),
    ("An incomplete sentence is called a __________.", "fragment"),
    ("Two sentences smashed together is a __________.", "run-on"),
]

MONDAY_OPPOSITE_WORDS = []
TEACHER_MONDAY_OPPOSITE_ANSWERS = []
MONDAY_SENTENCE_WORDS = ["sentence", "complete", "capital", "period", "question", "fragment"]

# =====================================================================
# TUESDAY DATA
# =====================================================================

TUESDAY_LEARNING = (
    "Today we will practice sorting sentences by type — statements, questions, and exclamations. "
    "We will also fix fragments and identify run-on sentences. "
    "Remember: every sentence needs a subject, a verb, and a complete thought!"
)

TUESDAY_READING = (
    "Good writing uses complete sentences. Each sentence tells the reader something important. "
    "Statements give information. Questions ask for information. Exclamations show strong feelings. "
    "For example, 'The garden is beautiful' is a statement. "
    "'Is the garden beautiful?' is a question. "
    "'What a beautiful garden!' is an exclamation! "
    "A fragment like 'in the garden' doesn't tell us enough — who or what is in the garden? "
    "A run-on like 'The garden is beautiful the flowers are red' needs a period between the two thoughts. "
    "Correct writing: 'The garden is beautiful. The flowers are red.' "
    "Punctuation marks help the reader know how to read each sentence correctly."
)

TUESDAY_COMP_QUESTIONS = [
    "What are the three types of sentences?",
    "What makes a sentence a fragment?",
    "How do you fix a run-on sentence?",
    "Why is punctuation important?",
]

TEACHER_TUESDAY_COMP_ANSWERS = [
    "Statements, questions, and exclamations",
    "It is missing a subject, a verb, or a complete thought",
    "Split it into two sentences with a period, or join them with 'and' or 'but'",
    "It helps the reader understand how to read each sentence",
]

TUESDAY_SCRAMBLE_WORDS = ["sentence", "complete", "capital", "punctuation"]

TEACHER_TUESDAY_SCRAMBLE_ANSWERS = [
    ("ecnetses", "sentence"),
    ("etelpmoc", "complete"),
    ("laaptac", "capital"),
    ("cniatnuocp", "punctuation"),
]

TUESDAY_REMEMBER_BOXES = [
    ("Sentence Types",
     "Statements end with a period (.). "
     "Questions end with a question mark (?). "
     "Exclamations end with an exclamation point (!)."),
    ("Complete vs. Fragment",
     "Complete sentences have a subject, verb, and complete thought. "
     "Fragments are missing one of these parts."),
]

TUESDAY_PARAGRAPH_EXAMPLE = (
    "Every good paragraph has complete sentences.",
    "Each sentence should express one complete thought with proper punctuation. "
    "Capital letters start every sentence. Periods, question marks, and exclamation points end them.",
    "Practicing complete sentences makes your writing clear and correct!",
)

TUESDAY_PATTERN_HUNT_WORDS = [
    "The dog barks.",        # complete
    "barks loudly",          # fragment
    "Where is the cat?",     # complete
    "in the box",            # fragment
    "What a nice day!",      # complete
    "very nice",             # fragment
]

TEACHER_TUESDAY_PATTERN_HUNT = {
    "match": ["The dog barks.", "Where is the cat?", "What a nice day!"],
    "decoy": ["barks loudly", "in the box", "very nice"],
}

TUESDAY_SWAP_DATA = [
    (
        "The bird sings beautifully!",
        ("The bird sings beautifully!", "complete"),
        ("sings beautifully", "fragment"),
    ),
    (
        "What time is it?",
        ("What time is it?", "complete"),
        ("time is it", "fragment"),
    ),
]

TEACHER_TUESDAY_SWAP_ANSWERS = [
    "The bird sings beautifully! (complete sentence — has subject 'bird', verb 'sings')",
    "What time is it? (complete sentence — has subject 'time', verb 'is')",
]

TUESDAY_BUILDER_PROMPTS = [
    ("Write a statement about your favorite food", "statement"),
    ("Write a question about your teacher", "question"),
]

# =====================================================================
# WEDNESDAY DATA
# =====================================================================

WEDNESDAY_LEARNING = (
    "Today we will connect our sentence skills with capitalization rules. "
    "Every sentence starts with a capital letter. Proper nouns (names, places, days) always get capitals. "
    "We will practice fixing sentences that have wrong capitalization and punctuation."
)

WEDNESDAY_READING = (
    "Sarah went to the park on Monday. She saw many birds singing in the trees. "
    "The park was beautiful with colorful flowers everywhere. "
    "'What a wonderful day!' she said. "
    "She walked along the path near the pond. Ducks swam in the water. "
    "Sarah sat on a bench and ate her lunch. "
    "'I love spending time outdoors,' she thought happily."
)

WEDNESDAY_VOCAB_Q = (
    "Find a question in the story. What punctuation ends it?",
    "Find an exclamation in the story. What punctuation ends it?"
)

TEACHER_WEDNESDAY_VOCAB_Q_QUESTION = WEDNESDAY_VOCAB_Q
TEACHER_WEDNESDAY_VOCAB_Q_ANSWER = (
    "'What a wonderful day!' — actually an exclamation with '!'. "
    "The exclamation is 'What a wonderful day!' ending with '!'"
)

WEDNESDAY_SYN_ANT = ["complete", "capital", "period", "question", "fragment", "sentence"]
WEDNESDAY_WORD_WEB_CENTER = "Sentence Structure"
WEDNESDAY_WORD_WEB_INSTRUCTION = (
    "Create a word web with 'Sentence Structure' in the center. "
    "Draw branches for: Complete Sentences, Fragments, Run-Ons, Punctuation Types, Capitalization."
)

WEDNESDAY_SORT_DATA = [
    "The complete sentence has all three parts needed.",
    "A fragment is missing something important.",
]

TEACHER_WEDNESDAY_SORT_ANSWERS = {
    "sentences": [
        "The complete sentence has all three parts needed.",
        "A fragment is missing something important.",
    ],
    "correct_order": [
        "The complete sentence has all three parts needed.",
        "A fragment is missing something important.",
    ],
}

WEDNESDAY_CORRECT = [
    "the dog barks loudly",
    "where is your cat",
    "what a nice day",
]

TEACHER_WEDNESDAY_CORRECT_ANSWERS = [
    ("the dog barks loudly", "The dog barks loudly."),
    ("where is your cat", "Where is your cat?"),
    ("what a nice day", "What a nice day!"),
]

WEDNESDAY_FILL = [
    ("Every sentence starts with a __________ letter.", "capital"),
    ("A group of sentences about one topic is a __________.", "paragraph"),
    ("The rules for writing are called __________.", "grammar"),
]

TEACHER_WEDNESDAY_FILL_ANSWERS = ["capital", "paragraph", "grammar"]

# =====================================================================
# THURSDAY DATA
# =====================================================================

THURSDAY_LEARNING = (
    "Today is about writing! We will practice writing complete sentences with correct "
    "capitalization and end punctuation. We will also edit paragraphs to fix errors."
)

REMINDER_TEXT = (
    "Capitalization: Start every sentence with a capital letter. "
    "Proper nouns (names, places, days, months) always get capitals. "
    "End punctuation: Statements get periods (.), questions get (?), exclamations get (!)."
)

THURSDAY_STORY = (
    "Yesterday, Tom went to the library. He wanted to find a book about dinosaurs. "
    "The librarian helped him find exactly what he needed. "
    "'Thank you!' Tom said. "
    "He sat down and read for an hour. The book was amazing. "
    "It had pictures of real dinosaur bones and fossils. "
    "'I want to be a paleontologist when I grow up!' Tom thought. "
    "He borrowed three books and couldn't wait to read more."
)

THURSDAY_COMP_QUESTIONS = [
    "Why did Tom go to the library?",
    "What did Tom want to find?",
    "What did Tom think about becoming?",
    "How many books did Tom borrow?",
]

TEACHER_THURSDAY_COMP_ANSWERS = [
    "To find a book about dinosaurs",
    "A book about dinosaurs",
    "A paleontologist",
    "Three books",
]

THURSDAY_SORT_DATA = [
    "The complete sentence needs a subject and verb.",
    "Punctuation marks help the reader understand.",
]

TEACHER_THURSDAY_SORT_ANSWERS = {
    "sentences": [
        "The complete sentence needs a subject and verb.",
        "Punctuation marks help the reader understand.",
    ],
    "correct_order": [
        "The complete sentence needs a subject and verb.",
        "Punctuation marks help the reader understand.",
    ],
}

THURSDAY_DETECTIVE = [
    "sentnce",      # sentence
    "cmplete",      # complete
    "capital",      # correct
    "period",       # correct
    "questin",      # question
    "exclaim",      # correct
    "fragement",    # fragment
    "punctation",   # punctuation
    "grammer",      # grammar
    "paragrah",     # paragraph
    "capitlization", # capitalization
    "expressin",    # expression
]

TEACHER_THURSDAY_DETECTIVE_ANSWERS = [
    ("sentnce", "sentence"), ("cmplete", "complete"), ("capital", "capital"),
    ("period", "period"), ("questin", "question"), ("exclaim", "exclaim"),
    ("fragement", "fragment"), ("punctation", "punctuation"), ("grammer", "grammar"),
    ("paragrah", "paragraph"), ("capitlization", "capitalization"), ("expressin", "expression"),
]

THURSDAY_SWAP_DATA = [
    (
        "The complete sentence has all parts.",
        ("The complete sentence has all parts.", "complete"),
        ("has all parts", "fragment"),
    ),
    (
        "Punctuation marks are important for reading.",
        ("Punctuation marks are important for reading.", "complete"),
        ("are important for reading", "fragment"),
    ),
]

TEACHER_THURSDAY_SWAP_ANSWERS = [
    "The complete sentence has all parts. (complete)",
    "Punctuation marks are important for reading. (complete)",
]

THURSDAY_MAP_WORD = "capitalization"
TEACHER_THURSDAY_MAP_SUGGESTIONS = [
    "Meaning: using uppercase letters correctly",
    "Syllables: cap-i-tal-i-za-tion (5 syllables)",
    "Example: Capitalization means starting sentences with capital letters.",
]

THURSDAY_CONTEXT_CLUE_WRITING = ["sentence", "punctuation"]

THURSDAY_STORY_PROMPT = "Write a short story (at least 4 sentences) with correct capitalization and punctuation. Include at least one question and one exclamation!"

THURSDAY_PARA_PROMPTS = [
    "Write a paragraph about your favorite place (3+ sentences)",
    "Write a paragraph about what you did this weekend (3+ sentences)",
]

THURSDAY_FIX_PARAGRAPH = "yesterday sarah went to the park she saw birds in the trees what a nice day! she sat on a bench and ate lunch"

# =====================================================================
# FRIDAY DATA
# =====================================================================

FRIDAY_REVIEW_STORY = (
    "This week we learned all about sentence structure and punctuation. "
    "We discovered that every complete sentence needs a subject, a verb, and a complete thought. "
    "We practiced spotting fragments and fixing run-on sentences. "
    "We learned the three types of end punctuation: periods, question marks, and exclamation points. "
    "We also practiced capitalization rules for the start of sentences and proper nouns. "
    "Now, let's show what we know with our spelling test!"
)

FRIDAY_STORY_QUESTIONS = [
    "What three things does a complete sentence need?",
    "Name the three types of end punctuation.",
    "What is a fragment?",
]

TEACHER_FRIDAY_STORY_ANSWERS = [
    "A subject, a verb, and a complete thought",
    "Periods, question marks, and exclamation points",
    "An incomplete sentence missing a subject, verb, or complete thought",
]

FRIDAY_OPPOSITE_WORDS = ["complete", "capital", "expression"]
TEACHER_FRIDAY_OPPOSITE_ANSWERS = [
    ("complete", "incomplete"),
    ("capital", "lowercase"),
    ("expression", "blank face"),
]

FRIDAY_BUILDER_WORDS = ["sentence", "punctuation", "paragraph"]
FRIDAY_JOURNAL_WORDS = ["grammar", "capitalization", "fragment"]

# =====================================================================
# MAIN
# =====================================================================

def main():
    if len(sys.argv) > 1 and sys.argv[1] == "--generate":
        pass
    else:
        print("Usage: python3 generate_week22.py --generate")
        return

    print("=== Generating Week 22: Sentence Structure & Punctuation ===")

    # 1. Generate daily PDFs
    print("  Generating Monday PDF...")
    generate_monday(
        week_dir=WEEK_DIR,
        week_num=WEEK_NUM,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        learning_text=LEARNING_TEXT_MON,
        vowel_examples=VOWEL_EXAMPLES,
        grammar_note=GRAMMAR_NOTE,
        grammar_deep=GRAMMAR_DEEP,
        grammar_practice=MONDAY_GRAMMAR_PRACTICE,
        story_text=MONDAY_STORY,
        sort_labels=MONDAY_SORT_LABELS,
        fill_data=MONDAY_FILL_DATA,
        opposite_words=MONDAY_OPPOSITE_WORDS,
        sentence_words=MONDAY_SENTENCE_WORDS
    )

    print("  Generating Tuesday PDF...")
    generate_tuesday(
        week_dir=WEEK_DIR,
        week_num=WEEK_NUM,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        learning_text=TUESDAY_LEARNING,
        reading_text=TUESDAY_READING,
        comp_questions=TUESDAY_COMP_QUESTIONS,
        teacher_comp_answers=TEACHER_TUESDAY_COMP_ANSWERS,
        scramble_words=TUESDAY_SCRAMBLE_WORDS,
        teacher_scramble_answers=TEACHER_TUESDAY_SCRAMBLE_ANSWERS,
        remember_boxes=TUESDAY_REMEMBER_BOXES,
        paragraph_example=TUESDAY_PARAGRAPH_EXAMPLE,
        pattern_hunt_words=TUESDAY_PATTERN_HUNT_WORDS,
        teacher_pattern_hunt=TEACHER_TUESDAY_PATTERN_HUNT,
        swap_data=TUESDAY_SWAP_DATA,
        builder_prompts=TUESDAY_BUILDER_PROMPTS
    )

    print("  Generating Wednesday PDF...")
    generate_wednesday(
        week_dir=WEEK_DIR,
        week_num=WEEK_NUM,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        learning_text=WEDNESDAY_LEARNING,
        reading_text=WEDNESDAY_READING,
        vocab_q=WEDNESDAY_VOCAB_Q,
        teacher_vocab_q_question=TEACHER_WEDNESDAY_VOCAB_Q_QUESTION,
        teacher_vocab_q_answer=TEACHER_WEDNESDAY_VOCAB_Q_ANSWER,
        syn_ant=WEDNESDAY_SYN_ANT,
        word_web_center=WEDNESDAY_WORD_WEB_CENTER,
        word_web_suggestions=WEDNESDAY_WORD_WEB_INSTRUCTION,
        sort_data=WEDNESDAY_SORT_DATA,
        teacher_sort_answers=TEACHER_WEDNESDAY_SORT_ANSWERS,
        correct_sentences=WEDNESDAY_CORRECT,
        teacher_correct_answers=TEACHER_WEDNESDAY_CORRECT_ANSWERS,
        fill_data=WEDNESDAY_FILL,
        teacher_fill_answers=TEACHER_WEDNESDAY_FILL_ANSWERS,
    )

    print("  Generating Thursday PDF...")
    generate_thursday(
        week_dir=WEEK_DIR,
        week_num=WEEK_NUM,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        learning_text=THURSDAY_LEARNING,
        remember_text=REMINDER_TEXT,
        story_text=THURSDAY_STORY,
        comp_questions=THURSDAY_COMP_QUESTIONS,
        teacher_comp_answers=TEACHER_THURSDAY_COMP_ANSWERS,
        sort_data=THURSDAY_SORT_DATA,
        teacher_sort_answers=TEACHER_THURSDAY_SORT_ANSWERS,
        detective_words=THURSDAY_DETECTIVE,
        teacher_detective_answers=TEACHER_THURSDAY_DETECTIVE_ANSWERS,
        swap_data=THURSDAY_SWAP_DATA,
        teacher_swap_answers=TEACHER_THURSDAY_SWAP_ANSWERS,
        map_word=THURSDAY_MAP_WORD,
        map_suggestions=TEACHER_THURSDAY_MAP_SUGGESTIONS,
        context_clue_writing=THURSDAY_CONTEXT_CLUE_WRITING,
        story_prompt=THURSDAY_STORY_PROMPT,
        para_prompts=THURSDAY_PARA_PROMPTS,
        fix_paragraph=THURSDAY_FIX_PARAGRAPH,
    )

    print("  Generating Friday PDF...")
    generate_friday(
        week_dir=WEEK_DIR,
        week_num=WEEK_NUM,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        review_story=FRIDAY_REVIEW_STORY,
        story_questions=FRIDAY_STORY_QUESTIONS,
        opposite_words=FRIDAY_OPPOSITE_WORDS,
        builder_words=FRIDAY_BUILDER_WORDS,
        journal_words=FRIDAY_JOURNAL_WORDS,
    )

    # 2. Generate Teacher Guide
    print("  Generating Teacher Guide PDF...")
    generate_teacher_guide(
        week_dir=WEEK_DIR,
        week_num=WEEK_NUM,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        # Monday
        monday_phonics_explanation="Sentence structure requires three things: a subject, a verb, and a complete thought. Punctuation marks (periods, question marks, exclamation points) signal how to read each sentence. Fragments are incomplete. Run-ons are two sentences mashed together.",
        monday_grammar_focus="Complete Sentences vs. Fragments vs. Run-Ons",
        monday_grammar_explanation="Complete sentences have subject + verb + complete thought. Fragments miss one of these. Run-ons combine two independent clauses without proper punctuation.",
        monday_story_text=MONDAY_STORY,
        monday_sort_labels=MONDAY_SORT_LABELS,
        monday_sort_answers=[
            ["The cat sleeps.", "She asks a question.", "The bird flies south."],
            ["in the park", "very quickly", "the big red"],
            ["The dog barks the cat meows.", "I like pizza I like cake."],
        ],
        monday_fill_answers=["statement", "fragment", "run-on"],
        monday_opposite_answers=[],
        monday_sentence_words=MONDAY_SENTENCE_WORDS,
        # Tuesday
        tuesday_phonics_explanation="Practice sorting sentences by type — statements, questions, and exclamations. Fix fragments and identify run-on sentences.",
        tuesday_scramble_answers=TEACHER_TUESDAY_SCRAMBLE_ANSWERS,
        tuesday_reading_text=TUESDAY_READING,
        tuesday_comp_questions=TUESDAY_COMP_QUESTIONS,
        tuesday_comp_answers=TEACHER_TUESDAY_COMP_ANSWERS,
        tuesday_pattern_hunt_answers=TEACHER_TUESDAY_PATTERN_HUNT,
        tuesday_swap_answers=TEACHER_TUESDAY_SWAP_ANSWERS,
        tuesday_builder_prompts=TUESDAY_BUILDER_PROMPTS,
        # Wednesday
        wednesday_phonics_explanation="Connect sentence skills with capitalization rules. Every sentence starts with a capital letter. Proper nouns always get capitals.",
        wednesday_reading_text=WEDNESDAY_READING,
        wednesday_vocab_q_answer=TEACHER_WEDNESDAY_VOCAB_Q_ANSWER,
        wednesday_vocab_q_question=TEACHER_WEDNESDAY_VOCAB_Q_QUESTION,
        wednesday_syn_ant_words=WEDNESDAY_SYN_ANT,
        wednesday_word_web_center=WEDNESDAY_WORD_WEB_CENTER,
        wednesday_word_web_suggestions=WEDNESDAY_WORD_WEB_INSTRUCTION,
        wednesday_sort_answers=TEACHER_WEDNESDAY_SORT_ANSWERS,
        wednesday_correct_answers=TEACHER_WEDNESDAY_CORRECT_ANSWERS,
        wednesday_fill_answers=TEACHER_WEDNESDAY_FILL_ANSWERS,
        wednesday_context_clue_answer="Capital letters start every sentence. Proper nouns (Sarah, Monday) always get capitals.",
        wednesday_context_clue_question="What are the capitalization rules we practice this week?",
        wednesday_dictation_words=["sentence", "complete", "capital", "period", "question", "exclaim"],
        # Thursday
        thursday_phonics_explanation="Write complete sentences with correct capitalization and end punctuation. Edit paragraphs to fix fragments and run-on sentences.",
        thursday_story_text=THURSDAY_STORY,
        thursday_comp_questions=THURSDAY_COMP_QUESTIONS,
        thursday_comp_answers=TEACHER_THURSDAY_COMP_ANSWERS,
        thursday_sort_answers=TEACHER_THURSDAY_SORT_ANSWERS,
        thursday_detective_answers=TEACHER_THURSDAY_DETECTIVE_ANSWERS,
        thursday_swap_answers=TEACHER_THURSDAY_SWAP_ANSWERS,
        thursday_map_word=THURSDAY_MAP_WORD,
        thursday_map_suggestions=TEACHER_THURSDAY_MAP_SUGGESTIONS,
        thursday_para_prompts=THURSDAY_PARA_PROMPTS,
        # Friday
        friday_phonics_explanation="Review and assessment — demonstrate mastery of sentence structure, punctuation, and capitalization rules.",
        friday_test_answers=[w[0] for w in WORDS],
        friday_review_story=FRIDAY_REVIEW_STORY,
        friday_story_questions=FRIDAY_STORY_QUESTIONS,
        friday_story_answers=TEACHER_FRIDAY_STORY_ANSWERS,
        friday_opposite_answers=TEACHER_FRIDAY_OPPOSITE_ANSWERS,
        friday_builder_words=FRIDAY_BUILDER_WORDS,
        friday_journal_words=FRIDAY_JOURNAL_WORDS,
    )

    print("\n=== Week 22 generation complete! ===")
    print(f"  Output: {WEEK_DIR}/")


if __name__ == "__main__":
    main()