graph TD
Start[Quiz Generation Agent Start] --> InputCheck{Check Module Inputs}
InputCheck --> |Valid Input| ProcessLoop[Begin Module Processing Loop]
InputCheck --> |Invalid Input| Error[Error: Invalid Input]
ProcessLoop --> Module1[Process Module 1]
Module1 --> Quiz1[Generate Quiz 1]
Quiz1 --> |Skill #223| Questions1[Create 15 Questions]
Questions1 --> Answers1[Generate Answer Key]
Answers1 --> Store1[Store Quiz 1 Output]
ProcessLoop --> Module2[Process Module 2]
Module2 --> Quiz2[Generate Quiz 2]
Quiz2 --> |Skill #223| Questions2[Create 15 Questions]
Questions2 --> Answers2[Generate Answer Key]
Answers2 --> Store2[Store Quiz 2 Output]
ProcessLoop --> ModuleN[... Modules 3-14 ...]
ProcessLoop --> Module15[Process Module 15]
Module15 --> Quiz15[Generate Quiz 15]
Quiz15 --> |Skill #223| Questions15[Create 15 Questions]
Questions15 --> Answers15[Generate Answer Key]
Answers15 --> Store15[Store Quiz 15 Output]
Store1 --> ValidateAll[Validate All Quizzes]
Store2 --> ValidateAll
ModuleN --> ValidateAll
Store15 --> ValidateAll
ValidateAll --> CompileOutput[Compile Final Quiz Package]
CompileOutput --> End[Quiz Generation Agent Complete]
Error --> End