Mermaid Diagram Generator Generate high-quality Mermaid diagram code based on user requirements, with file output and verification. Constants - OUTPUT DIR = — Output directory for all generated files - MAX ITERATIONS = 3 — Maximum refinement rounds for syntax errors Workflow: MUST EXECUTE ALL STEPS Step 0: Pre-flight Check Step 1: Understand Requirements & Select Diagram Type Parse the input: $ARGUMENTS 1. Analyze user description to determine the most suitable diagram type 2. Read the corresponding syntax reference documentation (see Step 2 below) 3. If the diagram involves mathematical nota…