Create Flowchart - Workflow Instructions
<critical>The workflow execution engine is governed by: {project_root}/.faos/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow creates a flowchart visualization in Excalidraw format for processes, pipelines, or logic flows.</critical>
<workflow>
<step n="0" goal="Contextual Analysis (Smart Elicitation)">
<critical>Before asking any questions, analyze what the user has already told you</critical>
<action>Review the user's initial request and conversation history</action>
<action>Extract any mentioned: flowchart type, complexity, decision points, save location</action>
<check if="ALL requirements are clear from context">
<action>Summarize your understanding</action>
<action>Skip directly to Step 5 (Plan Flowchart Layout)</action>
</check>
<check if="SOME requirements are clear">
<action>Note what you already know</action>
<action>Only ask about missing information in Step 2</action>
</check>
<check if="requirements are unclear or minimal">
<action>Proceed with full elicitation in Step 2</action>
</check>
</step>
<step n="1" goal="Assess Depth and Select Visual Pattern">
<action>Based on the user's request, determine the flowchart depth level per {{helpers}} Depth Assessment:</action>
<action>Present assessment:
- Simple/Conceptual (10-20 elements): Quick process, 3-5 steps, few decisions
- Standard (20-40 elements): Standard workflow, 6-10 steps, some branching
- Comprehensive/Technical (40-50 elements): Detailed process, 11-20 steps, multiple decision points
</action>
<action>State your assessment: "This looks like a [depth] flowchart because [reason]"</action>
<action>Select the best visual pattern from {{helpers}} Visual Pattern Library. For flowcharts, common patterns are:
- pipeline: Default for linear sequential flows
- cycle: For processes with feedback loops or retry logic
- tree: For decision-heavy flows that branch significantly
- fan-out: For processes that distribute to parallel paths
- convergence: For parallel paths that merge back together
</action>
<action>State: "I recommend the [pattern] pattern because it argues that [specific argument]"</action>
<action>Ask: "Does this depth and pattern match your intent? (yes/adjust)"</action>
<action>WAIT for confirmation</action>
<check if="user says adjust">
<action>Revise depth and/or pattern based on feedback</action>
<action>Confirm revised choices</action>
</check>
</step>
<step n="2" goal="Gather Requirements" elicit="true">
<action>Ask Question 1: "What type of process flow do you need to visualize?"</action>
<action>Present numbered options:
1. Business Process Flow - Document business workflows, approval processes, or operational procedures
2. Algorithm/Logic Flow - Visualize code logic, decision trees, or computational processes
3. User Journey Flow - Map user interactions, navigation paths, or experience flows
4. Data Processing Pipeline - Show data transformation, ETL processes, or processing stages
5. Other - Describe your specific flowchart needs
</action>
<action>WAIT for user selection (1-5)</action>
<action>Ask Question 2: "How many main steps are in this flow?"</action>
<action>Present numbered options:
1. Simple (3-5 steps) - Quick process with few decision points
2. Medium (6-10 steps) - Standard workflow with some branching
3. Complex (11-20 steps) - Detailed process with multiple decision points
4. Very Complex (20+ steps) - Comprehensive workflow requiring careful layout
</action>
<action>WAIT for user selection (1-4)</action>
<action>Store selection in {{complexity}}</action>
<action>Ask Question 3: "Does your flow include decision points (yes/no branches)?"</action>
<action>Present numbered options:
1. No decisions - Linear flow from start to end
2. Few decisions (1-2) - Simple branching with yes/no paths
3. Multiple decisions (3-5) - Several conditional branches
4. Complex decisions (6+) - Extensive branching logic
</action>
<action>WAIT for user selection (1-4)</action>
<action>Store selection in {{decision_points}}</action>
<action>Ask Question 4: "Where should the flowchart be saved?"</action>
<action>Present numbered options:
1. Default location - docs/flowcharts/[auto-generated-name].excalidraw
2. Custom path - Specify your own file path
3. Project root - Save in main project directory
4. Specific folder - Choose from existing folders
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2 or 4">
<action>Ask for specific path</action>
<action>WAIT for user input</action>
</check>
<action>Store final path in {{default_output_file}}</action>
</step>
<step n="3" goal="Check for Existing Theme" elicit="true">
<action>Check if theme.json exists at output location</action>
<check if="theme.json exists">
<action>Ask: "Found existing theme. Use it? (yes/no)"</action>
<action>WAIT for user response</action>
<check if="user says yes">
<action>Load and use existing theme</action>
<action>Skip to Step 5</action>
</check>
<check if="user says no">
<action>Proceed to Step 4</action>
</check>
</check>
<check if="theme.json does not exist">
<action>Proceed to Step 4</action>
</check>
</step>
<step n="4" goal="Create Theme" elicit="true">
<action>Ask: "Let's create a theme for your flowchart. Choose a color scheme:"</action>
<action>Present numbered options:
1. Professional Blue
- Primary Fill: #e3f2fd (light blue)
- Accent/Border: #1976d2 (blue)
- Decision: #fff3e0 (light orange)
- Text: #1e1e1e (dark gray)
2. Success Green
- Primary Fill: #e8f5e9 (light green)
- Accent/Border: #388e3c (green)
- Decision: #fff9c4 (light yellow)
- Text: #1e1e1e (dark gray)
3. Neutral Gray
- Primary Fill: #f5f5f5 (light gray)
- Accent/Border: #616161 (gray)
- Decision: #e0e0e0 (medium gray)
- Text: #1e1e1e (dark gray)
4. Warm Orange
- Primary Fill: #fff3e0 (light orange)
- Accent/Border: #f57c00 (orange)
- Decision: #ffe0b2 (peach)
- Text: #1e1e1e (dark gray)
5. Custom Colors - Define your own color palette
</action>
<action>WAIT for user selection (1-5)</action>
<action>Store selection in {{theme_choice}}</action>
<check if="selection is 5 (Custom)">
<action>Ask: "Primary fill color (hex code)?"</action>
<action>WAIT for user input</action>
<action>Store in {{custom_colors.primary_fill}}</action>
<action>Ask: "Accent/border color (hex code)?"</action>
<action>WAIT for user input</action>
<action>Store in {{custom_colors.accent}}</action>
<action>Ask: "Decision color (hex code)?"</action>
<action>WAIT for user input</action>
<action>Store in {{custom_colors.decision}}</action>
</check>
<action>Create theme.json with selected colors, including semantic color mapping per {{helpers}}</action>
<action>Show theme preview with all colors</action>
<action>Ask: "Theme looks good?"</action>
<action>Present numbered options:
1. Yes, use this theme - Proceed with theme
2. No, adjust colors - Modify color selections
3. Start over - Choose different preset
</action>
<action>WAIT for selection (1-3)</action>
<check if="selection is 2 or 3">
<action>Repeat Step 4</action>
</check>
</step>
<step n="5" goal="Plan Flowchart Layout">
<action>List all steps and decision points based on gathered requirements</action>
<action>Apply the selected visual pattern to the layout plan</action>
<action>Show user the planned structure</action>
<action>Ask: "Structure looks correct? (yes/no)"</action>
<action>WAIT for user response</action>
<check if="user says no">
<action>Adjust structure based on feedback</action>
<action>Repeat this step</action>
</check>
</step>
<step n="6" goal="Load Template and Resources">
<action>Load {{templates}} file</action>
<action>Extract `flowchart` section from YAML</action>
<action>Load visual_patterns from {{templates}} for the selected pattern</action>
<action>Load {{library}} file</action>
<action>Load theme.json and merge colors with template</action>
<action>Load {{helpers}} for element creation guidelines</action>
</step>
<step n="7" goal="Build Flowchart Elements">
<critical>Apply the design philosophy from {{helpers}}: This flowchart must ARGUE a point about the process, not just list steps. Follow the selected visual pattern for layout.</critical>
<critical>Use descriptive string IDs per {{helpers}} ID conventions (e.g., "validate_input_rect" not "rect_3")</critical>
<critical>Prefer free-floating text for section labels, annotations, and flow descriptions. Target less than 30% containerized text per {{helpers}} Text Strategy.</critical>
<action>Build ONE section at a time following these rules:</action>
<substep>For Each Shape with Label:
1. Generate descriptive string IDs per {{helpers}} ID conventions (e.g., start_flow_ellipse, start_flow_txt, start_flow_grp)
2. Create shape with groupIds: [group-id]
3. Calculate text width: (text.length * fontSize * 0.6) + 20, round to nearest 10
4. Create text element with:
- containerId: shape-id
- groupIds: [group-id] (SAME as shape)
- textAlign: "center"
- verticalAlign: "middle"
- width: calculated width
5. Add boundElements to shape referencing text
6. Apply semantic color based on element role (primary for process, accent for decision, success for happy path)
</substep>
<substep>For Each Arrow:
1. Determine arrow type needed:
- Straight: For forward flow (left-to-right, top-to-bottom)
- Elbow: For upward flow, backward flow, or complex routing
2. Create arrow with startBinding and endBinding
3. Set startBinding.elementId to source shape ID
4. Set endBinding.elementId to target shape ID
5. Set gap: 10 for both bindings
6. If elbow arrow, add intermediate points for direction changes
7. Update boundElements on both connected shapes
8. Apply semantic color (success for main flow, warning for conditional branches, danger for error paths)
</substep>
<substep>Add Free-Floating Text:
- Section labels above logical groups of steps
- "Yes"/"No" annotations near decision branch arrows (as free-floating text near the arrow)
- Phase or stage descriptions
</substep>
<substep>Alignment:
- Snap all x, y to 20px grid
- Align shapes vertically (same x for vertical flow)
- Space elements: 60px between shapes
- Follow the selected visual pattern's layout rules from {{templates}}
</substep>
<substep>Build Order:
1. Start point (circle) with label
2. Each process step (rectangle) with label
3. Each decision point (diamond) with label
4. End point (circle) with label
5. Connect all with bound arrows
6. Add free-floating annotations and section labels
</substep>
<check if="planned element count exceeds 30">
<action>Switch to section-by-section generation per {{helpers}} Section-by-Section Generation Protocol</action>
<action>Identify logical sections (e.g., by flow phase, swim lane, or decision branch)</action>
<action>Generate each section separately, using namespaced seeds</action>
<action>After all sections: merge, validate cross-section arrows, verify boundElements</action>
</check>
<check if="depth is Comprehensive/Technical">
<action>Add evidence artifacts per {{helpers}} Evidence Artifacts guide</action>
<action>Embed real code/JSON/data shapes next to relevant steps (max 5)</action>
</check>
</step>
<step n="8" goal="Optimize and Save">
<action>Strip unused elements and elements with isDeleted: true</action>
<action>Save to {{default_output_file}}</action>
</step>
<step n="9" goal="Validate JSON Syntax">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{default_output_file}}', 'utf8')); console.log('Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "Flowchart created at {{default_output_file}}. Open to view?"</action>
</step>
<step n="10" goal="Visual Preview (Optional)" optional="true">
<action>Load {{render_validate}}</action>
<action>Run: python3 {{render_script}} {{default_output_file}}</action>
<check if="exit code is 2 (Playwright not installed)">
<action>Skip: "Playwright not available — skipping PNG preview. Flowchart is still valid."</action>
</check>
<check if="exit code is 0">
<action>View the generated PNG file</action>
<action>Audit against design vision: Does the flowchart ARGUE its point about the process?</action>
<action>Check: overlapping text, misaligned arrows, spacing issues, color rendering</action>
<check if="issues found">
<action>Fix the JSON</action>
<action>Re-render (max 3 cycles)</action>
</check>
<action>Ask: "Keep the PNG preview file? (yes/no)"</action>
</check>
</step>
<step n="11" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {faos}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
Quality Checklist
Create Flowchart - Validation Checklist
Design Quality
Generation Quality
Element Structure
Layout and Alignment
Connections
Theme and Styling
Composition
Output Quality
Functional Requirements
1---2name: excalidraw-flowchart3description: "Create flowchart visualizations in Excalidraw format for processes, pipelines, or logic flows."4tags: [excalidraw, diagrams, flowchart, visualization]5metadata:6 source: https://skillmd.com/skills/frank-luongt/excalidraw-flowchart7---89# Create Flowchart - Workflow Instructions1011```xml12<critical>The workflow execution engine is governed by: {project_root}/.faos/core/tasks/workflow.xml</critical>13<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>14<critical>This workflow creates a flowchart visualization in Excalidraw format for processes, pipelines, or logic flows.</critical>1516<workflow>1718 <step n="0" goal="Contextual Analysis (Smart Elicitation)">19 <critical>Before asking any questions, analyze what the user has already told you</critical>2021 <action>Review the user's initial request and conversation history</action>22 <action>Extract any mentioned: flowchart type, complexity, decision points, save location</action>2324 <check if="ALL requirements are clear from context">25 <action>Summarize your understanding</action>26 <action>Skip directly to Step 5 (Plan Flowchart Layout)</action>27 </check>2829 <check if="SOME requirements are clear">30 <action>Note what you already know</action>31 <action>Only ask about missing information in Step 2</action>32 </check>3334 <check if="requirements are unclear or minimal">35 <action>Proceed with full elicitation in Step 2</action>36 </check>37 </step>3839 <step n="1" goal="Assess Depth and Select Visual Pattern">40 <action>Based on the user's request, determine the flowchart depth level per {{helpers}} Depth Assessment:</action>41 <action>Present assessment:42 - Simple/Conceptual (10-20 elements): Quick process, 3-5 steps, few decisions43 - Standard (20-40 elements): Standard workflow, 6-10 steps, some branching44 - Comprehensive/Technical (40-50 elements): Detailed process, 11-20 steps, multiple decision points45 </action>46 <action>State your assessment: "This looks like a [depth] flowchart because [reason]"</action>47 <action>Select the best visual pattern from {{helpers}} Visual Pattern Library. For flowcharts, common patterns are:48 - pipeline: Default for linear sequential flows49 - cycle: For processes with feedback loops or retry logic50 - tree: For decision-heavy flows that branch significantly51 - fan-out: For processes that distribute to parallel paths52 - convergence: For parallel paths that merge back together53 </action>54 <action>State: "I recommend the [pattern] pattern because it argues that [specific argument]"</action>55 <action>Ask: "Does this depth and pattern match your intent? (yes/adjust)"</action>56 <action>WAIT for confirmation</action>57 <check if="user says adjust">58 <action>Revise depth and/or pattern based on feedback</action>59 <action>Confirm revised choices</action>60 </check>61 </step>6263 <step n="2" goal="Gather Requirements" elicit="true">64 <action>Ask Question 1: "What type of process flow do you need to visualize?"</action>65 <action>Present numbered options:66 1. Business Process Flow - Document business workflows, approval processes, or operational procedures67 2. Algorithm/Logic Flow - Visualize code logic, decision trees, or computational processes68 3. User Journey Flow - Map user interactions, navigation paths, or experience flows69 4. Data Processing Pipeline - Show data transformation, ETL processes, or processing stages70 5. Other - Describe your specific flowchart needs71 </action>72 <action>WAIT for user selection (1-5)</action>7374 <action>Ask Question 2: "How many main steps are in this flow?"</action>75 <action>Present numbered options:76 1. Simple (3-5 steps) - Quick process with few decision points77 2. Medium (6-10 steps) - Standard workflow with some branching78 3. Complex (11-20 steps) - Detailed process with multiple decision points79 4. Very Complex (20+ steps) - Comprehensive workflow requiring careful layout80 </action>81 <action>WAIT for user selection (1-4)</action>82 <action>Store selection in {{complexity}}</action>8384 <action>Ask Question 3: "Does your flow include decision points (yes/no branches)?"</action>85 <action>Present numbered options:86 1. No decisions - Linear flow from start to end87 2. Few decisions (1-2) - Simple branching with yes/no paths88 3. Multiple decisions (3-5) - Several conditional branches89 4. Complex decisions (6+) - Extensive branching logic90 </action>91 <action>WAIT for user selection (1-4)</action>92 <action>Store selection in {{decision_points}}</action>9394 <action>Ask Question 4: "Where should the flowchart be saved?"</action>95 <action>Present numbered options:96 1. Default location - docs/flowcharts/[auto-generated-name].excalidraw97 2. Custom path - Specify your own file path98 3. Project root - Save in main project directory99 4. Specific folder - Choose from existing folders100 </action>101 <action>WAIT for user selection (1-4)</action>102 <check if="selection is 2 or 4">103 <action>Ask for specific path</action>104 <action>WAIT for user input</action>105 </check>106 <action>Store final path in {{default_output_file}}</action>107 </step>108109 <step n="3" goal="Check for Existing Theme" elicit="true">110 <action>Check if theme.json exists at output location</action>111 <check if="theme.json exists">112 <action>Ask: "Found existing theme. Use it? (yes/no)"</action>113 <action>WAIT for user response</action>114 <check if="user says yes">115 <action>Load and use existing theme</action>116 <action>Skip to Step 5</action>117 </check>118 <check if="user says no">119 <action>Proceed to Step 4</action>120 </check>121 </check>122 <check if="theme.json does not exist">123 <action>Proceed to Step 4</action>124 </check>125 </step>126127 <step n="4" goal="Create Theme" elicit="true">128 <action>Ask: "Let's create a theme for your flowchart. Choose a color scheme:"</action>129 <action>Present numbered options:130 1. Professional Blue131 - Primary Fill: #e3f2fd (light blue)132 - Accent/Border: #1976d2 (blue)133 - Decision: #fff3e0 (light orange)134 - Text: #1e1e1e (dark gray)135136 2. Success Green137 - Primary Fill: #e8f5e9 (light green)138 - Accent/Border: #388e3c (green)139 - Decision: #fff9c4 (light yellow)140 - Text: #1e1e1e (dark gray)141142 3. Neutral Gray143 - Primary Fill: #f5f5f5 (light gray)144 - Accent/Border: #616161 (gray)145 - Decision: #e0e0e0 (medium gray)146 - Text: #1e1e1e (dark gray)147148 4. Warm Orange149 - Primary Fill: #fff3e0 (light orange)150 - Accent/Border: #f57c00 (orange)151 - Decision: #ffe0b2 (peach)152 - Text: #1e1e1e (dark gray)153154 5. Custom Colors - Define your own color palette155 </action>156 <action>WAIT for user selection (1-5)</action>157 <action>Store selection in {{theme_choice}}</action>158159 <check if="selection is 5 (Custom)">160 <action>Ask: "Primary fill color (hex code)?"</action>161 <action>WAIT for user input</action>162 <action>Store in {{custom_colors.primary_fill}}</action>163 <action>Ask: "Accent/border color (hex code)?"</action>164 <action>WAIT for user input</action>165 <action>Store in {{custom_colors.accent}}</action>166 <action>Ask: "Decision color (hex code)?"</action>167 <action>WAIT for user input</action>168 <action>Store in {{custom_colors.decision}}</action>169 </check>170171 <action>Create theme.json with selected colors, including semantic color mapping per {{helpers}}</action>172 <action>Show theme preview with all colors</action>173 <action>Ask: "Theme looks good?"</action>174 <action>Present numbered options:175 1. Yes, use this theme - Proceed with theme176 2. No, adjust colors - Modify color selections177 3. Start over - Choose different preset178 </action>179 <action>WAIT for selection (1-3)</action>180 <check if="selection is 2 or 3">181 <action>Repeat Step 4</action>182 </check>183 </step>184185 <step n="5" goal="Plan Flowchart Layout">186 <action>List all steps and decision points based on gathered requirements</action>187 <action>Apply the selected visual pattern to the layout plan</action>188 <action>Show user the planned structure</action>189 <action>Ask: "Structure looks correct? (yes/no)"</action>190 <action>WAIT for user response</action>191 <check if="user says no">192 <action>Adjust structure based on feedback</action>193 <action>Repeat this step</action>194 </check>195 </step>196197 <step n="6" goal="Load Template and Resources">198 <action>Load {{templates}} file</action>199 <action>Extract `flowchart` section from YAML</action>200 <action>Load visual_patterns from {{templates}} for the selected pattern</action>201 <action>Load {{library}} file</action>202 <action>Load theme.json and merge colors with template</action>203 <action>Load {{helpers}} for element creation guidelines</action>204 </step>205206 <step n="7" goal="Build Flowchart Elements">207 <critical>Apply the design philosophy from {{helpers}}: This flowchart must ARGUE a point about the process, not just list steps. Follow the selected visual pattern for layout.</critical>208 <critical>Use descriptive string IDs per {{helpers}} ID conventions (e.g., "validate_input_rect" not "rect_3")</critical>209 <critical>Prefer free-floating text for section labels, annotations, and flow descriptions. Target less than 30% containerized text per {{helpers}} Text Strategy.</critical>210211 <action>Build ONE section at a time following these rules:</action>212213 <substep>For Each Shape with Label:214 1. Generate descriptive string IDs per {{helpers}} ID conventions (e.g., start_flow_ellipse, start_flow_txt, start_flow_grp)215 2. Create shape with groupIds: [group-id]216 3. Calculate text width: (text.length * fontSize * 0.6) + 20, round to nearest 10217 4. Create text element with:218 - containerId: shape-id219 - groupIds: [group-id] (SAME as shape)220 - textAlign: "center"221 - verticalAlign: "middle"222 - width: calculated width223 5. Add boundElements to shape referencing text224 6. Apply semantic color based on element role (primary for process, accent for decision, success for happy path)225 </substep>226227 <substep>For Each Arrow:228 1. Determine arrow type needed:229 - Straight: For forward flow (left-to-right, top-to-bottom)230 - Elbow: For upward flow, backward flow, or complex routing231 2. Create arrow with startBinding and endBinding232 3. Set startBinding.elementId to source shape ID233 4. Set endBinding.elementId to target shape ID234 5. Set gap: 10 for both bindings235 6. If elbow arrow, add intermediate points for direction changes236 7. Update boundElements on both connected shapes237 8. Apply semantic color (success for main flow, warning for conditional branches, danger for error paths)238 </substep>239240 <substep>Add Free-Floating Text:241 - Section labels above logical groups of steps242 - "Yes"/"No" annotations near decision branch arrows (as free-floating text near the arrow)243 - Phase or stage descriptions244 </substep>245246 <substep>Alignment:247 - Snap all x, y to 20px grid248 - Align shapes vertically (same x for vertical flow)249 - Space elements: 60px between shapes250 - Follow the selected visual pattern's layout rules from {{templates}}251 </substep>252253 <substep>Build Order:254 1. Start point (circle) with label255 2. Each process step (rectangle) with label256 3. Each decision point (diamond) with label257 4. End point (circle) with label258 5. Connect all with bound arrows259 6. Add free-floating annotations and section labels260 </substep>261262 <check if="planned element count exceeds 30">263 <action>Switch to section-by-section generation per {{helpers}} Section-by-Section Generation Protocol</action>264 <action>Identify logical sections (e.g., by flow phase, swim lane, or decision branch)</action>265 <action>Generate each section separately, using namespaced seeds</action>266 <action>After all sections: merge, validate cross-section arrows, verify boundElements</action>267 </check>268269 <check if="depth is Comprehensive/Technical">270 <action>Add evidence artifacts per {{helpers}} Evidence Artifacts guide</action>271 <action>Embed real code/JSON/data shapes next to relevant steps (max 5)</action>272 </check>273 </step>274275 <step n="8" goal="Optimize and Save">276 <action>Strip unused elements and elements with isDeleted: true</action>277 <action>Save to {{default_output_file}}</action>278 </step>279280 <step n="9" goal="Validate JSON Syntax">281 <critical>NEVER delete the file if validation fails - always fix syntax errors</critical>282 <action>Run: node -e "JSON.parse(require('fs').readFileSync('{{default_output_file}}', 'utf8')); console.log('Valid JSON')"</action>283 <check if="validation fails (exit code 1)">284 <action>Read the error message carefully - it shows the syntax error and position</action>285 <action>Open the file and navigate to the error location</action>286 <action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>287 <action>Save the file</action>288 <action>Re-run validation with the same command</action>289 <action>Repeat until validation passes</action>290 </check>291 <action>Once validation passes, confirm with user: "Flowchart created at {{default_output_file}}. Open to view?"</action>292 </step>293294 <step n="10" goal="Visual Preview (Optional)" optional="true">295 <action>Load {{render_validate}}</action>296 <action>Run: python3 {{render_script}} {{default_output_file}}</action>297 <check if="exit code is 2 (Playwright not installed)">298 <action>Skip: "Playwright not available — skipping PNG preview. Flowchart is still valid."</action>299 </check>300 <check if="exit code is 0">301 <action>View the generated PNG file</action>302 <action>Audit against design vision: Does the flowchart ARGUE its point about the process?</action>303 <action>Check: overlapping text, misaligned arrows, spacing issues, color rendering</action>304 <check if="issues found">305 <action>Fix the JSON</action>306 <action>Re-render (max 3 cycles)</action>307 </check>308 <action>Ask: "Keep the PNG preview file? (yes/no)"</action>309 </check>310 </step>311312 <step n="11" goal="Validate Content">313 <invoke-task>Validate against checklist at {{validation}} using {faos}/core/tasks/validate-workflow.xml</invoke-task>314 </step>315316</workflow>317```318319320## Quality Checklist321322# Create Flowchart - Validation Checklist323324## Design Quality325326- [ ] Flowchart makes a clear visual argument about the process (not just listing steps)327- [ ] Isomorphism Test: Flow structure communicates without labels328- [ ] Education Test: Unfamiliar viewer understands the process in 30 seconds329- [ ] Visual pattern applied consistently (pipeline/cycle/tree/fan-out/convergence)330- [ ] Depth level matches user intent (Simple/Standard/Comprehensive)331- [ ] Free-floating text used for section labels and annotations (target <30% containerized)332- [ ] Semantic colors encode element roles (primary for process, accent for decision)333- [ ] All IDs are descriptive strings (e.g., "validate_input_rect" not "rect_3")334335## Generation Quality336337- [ ] If >30 elements: section-by-section generation used with namespaced seeds338- [ ] Descriptive string IDs follow `{component}_{role}_{type}` pattern339- [ ] Cross-section arrows have valid startBinding and endBinding340- [ ] Evidence artifacts present for Comprehensive/Technical depth (if applicable)341- [ ] Evidence artifacts use dark rectangle styling with monospace text342- [ ] Element count within limit (under 50)343344## Element Structure345346- [ ] All shapes with labels have matching `groupIds`347- [ ] All text elements have `containerId` pointing to parent shape348- [ ] Text width calculated properly (no cutoff)349- [ ] Text alignment set (`textAlign` + `verticalAlign`)350351## Layout and Alignment352353- [ ] All elements snapped to 20px grid354- [ ] Consistent spacing between elements (60px minimum)355- [ ] Vertical alignment maintained for flow direction356- [ ] No overlapping elements357358## Connections359360- [ ] All arrows have `startBinding` and `endBinding`361- [ ] `boundElements` array updated on connected shapes362- [ ] Arrow types appropriate (straight for forward, elbow for backward/upward)363- [ ] Gap set to 10 for all bindings364365## Theme and Styling366367- [ ] Theme colors applied consistently368- [ ] All shapes use theme primary fill color369- [ ] All borders use theme accent color370- [ ] Text color is readable (#1e1e1e)371372## Composition373374- [ ] Element count under 50375- [ ] Library components referenced where possible376- [ ] No duplicate element definitions377378## Output Quality379380- [ ] No elements with `isDeleted: true`381- [ ] JSON is valid382- [ ] File saved to correct location383384## Functional Requirements385386- [ ] Start point clearly marked387- [ ] End point clearly marked388- [ ] All process steps labeled389- [ ] Decision points use diamond shapes390- [ ] Flow direction is clear and logical391