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.4---56# Create Flowchart - Workflow Instructions78```xml9<critical>The workflow execution engine is governed by: {project_root}/.faos/core/tasks/workflow.xml</critical>10<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>11<critical>This workflow creates a flowchart visualization in Excalidraw format for processes, pipelines, or logic flows.</critical>1213<workflow>1415 <step n="0" goal="Contextual Analysis (Smart Elicitation)">16 <critical>Before asking any questions, analyze what the user has already told you</critical>1718 <action>Review the user's initial request and conversation history</action>19 <action>Extract any mentioned: flowchart type, complexity, decision points, save location</action>2021 <check if="ALL requirements are clear from context">22 <action>Summarize your understanding</action>23 <action>Skip directly to Step 5 (Plan Flowchart Layout)</action>24 </check>2526 <check if="SOME requirements are clear">27 <action>Note what you already know</action>28 <action>Only ask about missing information in Step 2</action>29 </check>3031 <check if="requirements are unclear or minimal">32 <action>Proceed with full elicitation in Step 2</action>33 </check>34 </step>3536 <step n="1" goal="Assess Depth and Select Visual Pattern">37 <action>Based on the user's request, determine the flowchart depth level per {{helpers}} Depth Assessment:</action>38 <action>Present assessment:39 - Simple/Conceptual (10-20 elements): Quick process, 3-5 steps, few decisions40 - Standard (20-40 elements): Standard workflow, 6-10 steps, some branching41 - Comprehensive/Technical (40-50 elements): Detailed process, 11-20 steps, multiple decision points42 </action>43 <action>State your assessment: "This looks like a [depth] flowchart because [reason]"</action>44 <action>Select the best visual pattern from {{helpers}} Visual Pattern Library. For flowcharts, common patterns are:45 - pipeline: Default for linear sequential flows46 - cycle: For processes with feedback loops or retry logic47 - tree: For decision-heavy flows that branch significantly48 - fan-out: For processes that distribute to parallel paths49 - convergence: For parallel paths that merge back together50 </action>51 <action>State: "I recommend the [pattern] pattern because it argues that [specific argument]"</action>52 <action>Ask: "Does this depth and pattern match your intent? (yes/adjust)"</action>53 <action>WAIT for confirmation</action>54 <check if="user says adjust">55 <action>Revise depth and/or pattern based on feedback</action>56 <action>Confirm revised choices</action>57 </check>58 </step>5960 <step n="2" goal="Gather Requirements" elicit="true">61 <action>Ask Question 1: "What type of process flow do you need to visualize?"</action>62 <action>Present numbered options:63 1. Business Process Flow - Document business workflows, approval processes, or operational procedures64 2. Algorithm/Logic Flow - Visualize code logic, decision trees, or computational processes65 3. User Journey Flow - Map user interactions, navigation paths, or experience flows66 4. Data Processing Pipeline - Show data transformation, ETL processes, or processing stages67 5. Other - Describe your specific flowchart needs68 </action>69 <action>WAIT for user selection (1-5)</action>7071 <action>Ask Question 2: "How many main steps are in this flow?"</action>72 <action>Present numbered options:73 1. Simple (3-5 steps) - Quick process with few decision points74 2. Medium (6-10 steps) - Standard workflow with some branching75 3. Complex (11-20 steps) - Detailed process with multiple decision points76 4. Very Complex (20+ steps) - Comprehensive workflow requiring careful layout77 </action>78 <action>WAIT for user selection (1-4)</action>79 <action>Store selection in {{complexity}}</action>8081 <action>Ask Question 3: "Does your flow include decision points (yes/no branches)?"</action>82 <action>Present numbered options:83 1. No decisions - Linear flow from start to end84 2. Few decisions (1-2) - Simple branching with yes/no paths85 3. Multiple decisions (3-5) - Several conditional branches86 4. Complex decisions (6+) - Extensive branching logic87 </action>88 <action>WAIT for user selection (1-4)</action>89 <action>Store selection in {{decision_points}}</action>9091 <action>Ask Question 4: "Where should the flowchart be saved?"</action>92 <action>Present numbered options:93 1. Default location - docs/flowcharts/[auto-generated-name].excalidraw94 2. Custom path - Specify your own file path95 3. Project root - Save in main project directory96 4. Specific folder - Choose from existing folders97 </action>98 <action>WAIT for user selection (1-4)</action>99 <check if="selection is 2 or 4">100 <action>Ask for specific path</action>101 <action>WAIT for user input</action>102 </check>103 <action>Store final path in {{default_output_file}}</action>104 </step>105106 <step n="3" goal="Check for Existing Theme" elicit="true">107 <action>Check if theme.json exists at output location</action>108 <check if="theme.json exists">109 <action>Ask: "Found existing theme. Use it? (yes/no)"</action>110 <action>WAIT for user response</action>111 <check if="user says yes">112 <action>Load and use existing theme</action>113 <action>Skip to Step 5</action>114 </check>115 <check if="user says no">116 <action>Proceed to Step 4</action>117 </check>118 </check>119 <check if="theme.json does not exist">120 <action>Proceed to Step 4</action>121 </check>122 </step>123124 <step n="4" goal="Create Theme" elicit="true">125 <action>Ask: "Let's create a theme for your flowchart. Choose a color scheme:"</action>126 <action>Present numbered options:127 1. Professional Blue128 - Primary Fill: #e3f2fd (light blue)129 - Accent/Border: #1976d2 (blue)130 - Decision: #fff3e0 (light orange)131 - Text: #1e1e1e (dark gray)132133 2. Success Green134 - Primary Fill: #e8f5e9 (light green)135 - Accent/Border: #388e3c (green)136 - Decision: #fff9c4 (light yellow)137 - Text: #1e1e1e (dark gray)138139 3. Neutral Gray140 - Primary Fill: #f5f5f5 (light gray)141 - Accent/Border: #616161 (gray)142 - Decision: #e0e0e0 (medium gray)143 - Text: #1e1e1e (dark gray)144145 4. Warm Orange146 - Primary Fill: #fff3e0 (light orange)147 - Accent/Border: #f57c00 (orange)148 - Decision: #ffe0b2 (peach)149 - Text: #1e1e1e (dark gray)150151 5. Custom Colors - Define your own color palette152 </action>153 <action>WAIT for user selection (1-5)</action>154 <action>Store selection in {{theme_choice}}</action>155156 <check if="selection is 5 (Custom)">157 <action>Ask: "Primary fill color (hex code)?"</action>158 <action>WAIT for user input</action>159 <action>Store in {{custom_colors.primary_fill}}</action>160 <action>Ask: "Accent/border color (hex code)?"</action>161 <action>WAIT for user input</action>162 <action>Store in {{custom_colors.accent}}</action>163 <action>Ask: "Decision color (hex code)?"</action>164 <action>WAIT for user input</action>165 <action>Store in {{custom_colors.decision}}</action>166 </check>167168 <action>Create theme.json with selected colors, including semantic color mapping per {{helpers}}</action>169 <action>Show theme preview with all colors</action>170 <action>Ask: "Theme looks good?"</action>171 <action>Present numbered options:172 1. Yes, use this theme - Proceed with theme173 2. No, adjust colors - Modify color selections174 3. Start over - Choose different preset175 </action>176 <action>WAIT for selection (1-3)</action>177 <check if="selection is 2 or 3">178 <action>Repeat Step 4</action>179 </check>180 </step>181182 <step n="5" goal="Plan Flowchart Layout">183 <action>List all steps and decision points based on gathered requirements</action>184 <action>Apply the selected visual pattern to the layout plan</action>185 <action>Show user the planned structure</action>186 <action>Ask: "Structure looks correct? (yes/no)"</action>187 <action>WAIT for user response</action>188 <check if="user says no">189 <action>Adjust structure based on feedback</action>190 <action>Repeat this step</action>191 </check>192 </step>193194 <step n="6" goal="Load Template and Resources">195 <action>Load {{templates}} file</action>196 <action>Extract `flowchart` section from YAML</action>197 <action>Load visual_patterns from {{templates}} for the selected pattern</action>198 <action>Load {{library}} file</action>199 <action>Load theme.json and merge colors with template</action>200 <action>Load {{helpers}} for element creation guidelines</action>201 </step>202203 <step n="7" goal="Build Flowchart Elements">204 <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>205 <critical>Use descriptive string IDs per {{helpers}} ID conventions (e.g., "validate_input_rect" not "rect_3")</critical>206 <critical>Prefer free-floating text for section labels, annotations, and flow descriptions. Target less than 30% containerized text per {{helpers}} Text Strategy.</critical>207208 <action>Build ONE section at a time following these rules:</action>209210 <substep>For Each Shape with Label:211 1. Generate descriptive string IDs per {{helpers}} ID conventions (e.g., start_flow_ellipse, start_flow_txt, start_flow_grp)212 2. Create shape with groupIds: [group-id]213 3. Calculate text width: (text.length * fontSize * 0.6) + 20, round to nearest 10214 4. Create text element with:215 - containerId: shape-id216 - groupIds: [group-id] (SAME as shape)217 - textAlign: "center"218 - verticalAlign: "middle"219 - width: calculated width220 5. Add boundElements to shape referencing text221 6. Apply semantic color based on element role (primary for process, accent for decision, success for happy path)222 </substep>223224 <substep>For Each Arrow:225 1. Determine arrow type needed:226 - Straight: For forward flow (left-to-right, top-to-bottom)227 - Elbow: For upward flow, backward flow, or complex routing228 2. Create arrow with startBinding and endBinding229 3. Set startBinding.elementId to source shape ID230 4. Set endBinding.elementId to target shape ID231 5. Set gap: 10 for both bindings232 6. If elbow arrow, add intermediate points for direction changes233 7. Update boundElements on both connected shapes234 8. Apply semantic color (success for main flow, warning for conditional branches, danger for error paths)235 </substep>236237 <substep>Add Free-Floating Text:238 - Section labels above logical groups of steps239 - "Yes"/"No" annotations near decision branch arrows (as free-floating text near the arrow)240 - Phase or stage descriptions241 </substep>242243 <substep>Alignment:244 - Snap all x, y to 20px grid245 - Align shapes vertically (same x for vertical flow)246 - Space elements: 60px between shapes247 - Follow the selected visual pattern's layout rules from {{templates}}248 </substep>249250 <substep>Build Order:251 1. Start point (circle) with label252 2. Each process step (rectangle) with label253 3. Each decision point (diamond) with label254 4. End point (circle) with label255 5. Connect all with bound arrows256 6. Add free-floating annotations and section labels257 </substep>258259 <check if="planned element count exceeds 30">260 <action>Switch to section-by-section generation per {{helpers}} Section-by-Section Generation Protocol</action>261 <action>Identify logical sections (e.g., by flow phase, swim lane, or decision branch)</action>262 <action>Generate each section separately, using namespaced seeds</action>263 <action>After all sections: merge, validate cross-section arrows, verify boundElements</action>264 </check>265266 <check if="depth is Comprehensive/Technical">267 <action>Add evidence artifacts per {{helpers}} Evidence Artifacts guide</action>268 <action>Embed real code/JSON/data shapes next to relevant steps (max 5)</action>269 </check>270 </step>271272 <step n="8" goal="Optimize and Save">273 <action>Strip unused elements and elements with isDeleted: true</action>274 <action>Save to {{default_output_file}}</action>275 </step>276277 <step n="9" goal="Validate JSON Syntax">278 <critical>NEVER delete the file if validation fails - always fix syntax errors</critical>279 <action>Run: node -e "JSON.parse(require('fs').readFileSync('{{default_output_file}}', 'utf8')); console.log('Valid JSON')"</action>280 <check if="validation fails (exit code 1)">281 <action>Read the error message carefully - it shows the syntax error and position</action>282 <action>Open the file and navigate to the error location</action>283 <action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>284 <action>Save the file</action>285 <action>Re-run validation with the same command</action>286 <action>Repeat until validation passes</action>287 </check>288 <action>Once validation passes, confirm with user: "Flowchart created at {{default_output_file}}. Open to view?"</action>289 </step>290291 <step n="10" goal="Visual Preview (Optional)" optional="true">292 <action>Load {{render_validate}}</action>293 <action>Run: python3 {{render_script}} {{default_output_file}}</action>294 <check if="exit code is 2 (Playwright not installed)">295 <action>Skip: "Playwright not available — skipping PNG preview. Flowchart is still valid."</action>296 </check>297 <check if="exit code is 0">298 <action>View the generated PNG file</action>299 <action>Audit against design vision: Does the flowchart ARGUE its point about the process?</action>300 <action>Check: overlapping text, misaligned arrows, spacing issues, color rendering</action>301 <check if="issues found">302 <action>Fix the JSON</action>303 <action>Re-render (max 3 cycles)</action>304 </check>305 <action>Ask: "Keep the PNG preview file? (yes/no)"</action>306 </check>307 </step>308309 <step n="11" goal="Validate Content">310 <invoke-task>Validate against checklist at {{validation}} using {faos}/core/tasks/validate-workflow.xml</invoke-task>311 </step>312313</workflow>314```315316317## Quality Checklist318319# Create Flowchart - Validation Checklist320321## Design Quality322323- [ ] Flowchart makes a clear visual argument about the process (not just listing steps)324- [ ] Isomorphism Test: Flow structure communicates without labels325- [ ] Education Test: Unfamiliar viewer understands the process in 30 seconds326- [ ] Visual pattern applied consistently (pipeline/cycle/tree/fan-out/convergence)327- [ ] Depth level matches user intent (Simple/Standard/Comprehensive)328- [ ] Free-floating text used for section labels and annotations (target <30% containerized)329- [ ] Semantic colors encode element roles (primary for process, accent for decision)330- [ ] All IDs are descriptive strings (e.g., "validate_input_rect" not "rect_3")331332## Generation Quality333334- [ ] If >30 elements: section-by-section generation used with namespaced seeds335- [ ] Descriptive string IDs follow `{component}_{role}_{type}` pattern336- [ ] Cross-section arrows have valid startBinding and endBinding337- [ ] Evidence artifacts present for Comprehensive/Technical depth (if applicable)338- [ ] Evidence artifacts use dark rectangle styling with monospace text339- [ ] Element count within limit (under 50)340341## Element Structure342343- [ ] All shapes with labels have matching `groupIds`344- [ ] All text elements have `containerId` pointing to parent shape345- [ ] Text width calculated properly (no cutoff)346- [ ] Text alignment set (`textAlign` + `verticalAlign`)347348## Layout and Alignment349350- [ ] All elements snapped to 20px grid351- [ ] Consistent spacing between elements (60px minimum)352- [ ] Vertical alignment maintained for flow direction353- [ ] No overlapping elements354355## Connections356357- [ ] All arrows have `startBinding` and `endBinding`358- [ ] `boundElements` array updated on connected shapes359- [ ] Arrow types appropriate (straight for forward, elbow for backward/upward)360- [ ] Gap set to 10 for all bindings361362## Theme and Styling363364- [ ] Theme colors applied consistently365- [ ] All shapes use theme primary fill color366- [ ] All borders use theme accent color367- [ ] Text color is readable (#1e1e1e)368369## Composition370371- [ ] Element count under 50372- [ ] Library components referenced where possible373- [ ] No duplicate element definitions374375## Output Quality376377- [ ] No elements with `isDeleted: true`378- [ ] JSON is valid379- [ ] File saved to correct location380381## Functional Requirements382383- [ ] Start point clearly marked384- [ ] End point clearly marked385- [ ] All process steps labeled386- [ ] Decision points use diamond shapes387- [ ] Flow direction is clear and logical388