graph TD
Start[Start Keyword Analyzer] --> InputCheck{Check Required Inputs}
InputCheck --> |Missing Inputs| Error[Return Error]
InputCheck --> |Inputs Valid| Task218[Task #218: Generate Keywords]
Task218 --> KeywordOutput[Raw Keyword Data]
KeywordOutput --> MetricsCheck{Need Additional Metrics?}
MetricsCheck --> |Yes| Task224[Task #224: Gather Extra Metrics]
MetricsCheck --> |No| Task223[Task #223: Format Data]
Task224 --> EnhancedMetrics[Enhanced Metrics Data]
EnhancedMetrics --> Task223
Task223 --> FinalOutput[Keyword Research Output]
FinalOutput --> ValidationCheck{Validate Output}
ValidationCheck --> |Invalid| Task223
ValidationCheck --> |Valid| End[End Keyword Analyzer]
subgraph Inputs
NicheList[Ranked Niche List]
TaskReqs[Task Requirements]
end
NicheList --> InputCheck
TaskReqs --> InputCheck