Step 0: Assess Depth Required
Before anything else, determine if this diagram needs to be:Simple/Conceptual
Abstract shapes, labels, relationships. Use for mental models and philosophies.
Comprehensive/Technical
Concrete examples, code snippets, real data. Use for systems, architectures, and tutorials.
Simple/Conceptual Diagrams
Use abstract shapes when:- Explaining a mental model or philosophy
- The audience doesn’t need technical specifics
- The concept IS the abstraction (e.g., “separation of concerns”)
Comprehensive/Technical Diagrams
Use concrete examples when:- Diagramming a real system, protocol, or architecture
- The diagram will be used to teach or explain (e.g., YouTube video)
- The audience needs to understand what things actually look like
- You’re showing how multiple technologies integrate
If comprehensive: Do research first. Look up actual specs, formats, event names, APIs.
Step 1: Understand Deeply
Read the content thoroughly. For each concept, ask:What does this concept DO?
Focus on behavior, not just definitions. “What IS it” leads to static labels; “What does it DO” leads to dynamic visual patterns.
Step 2: Map Concepts to Patterns
For each concept, find the visual pattern that mirrors its behavior:| If the concept… | Use this pattern |
|---|---|
| Spawns multiple outputs | Fan-out (radial arrows from center) |
| Combines inputs into one | Convergence (funnel, arrows merging) |
| Has hierarchy/nesting | Tree (lines + free-floating text) |
| Is a sequence of steps | Timeline (line + dots + free-floating labels) |
| Loops or improves continuously | Spiral/Cycle (arrow returning to start) |
| Is an abstract state or context | Cloud (overlapping ellipses) |
| Transforms input to output | Assembly line (before → process → after) |
| Compares two things | Side-by-side (parallel with contrast) |
| Separates into phases | Gap/Break (visual separation between sections) |
Example: Mapping a Streaming Protocol
If you’re diagramming a protocol that:- Starts with a connection request (single trigger)
- Streams multiple events over time (sequence)
- Each event triggers different handlers (fan-out)
- Results aggregate into final state (convergence)
- Ellipse for the connection trigger
- Timeline for the event sequence
- Fan-out for event → handler relationships
- Convergence for handlers → final state
Step 3: Ensure Variety
For multi-concept diagrams: each major concept must use a different visual pattern.Bad vs Good
| Bad (Displaying) | Good (Arguing) |
|---|---|
| 5 equal boxes with labels | Each concept has a shape that mirrors its behavior |
| Card grid layout | Visual structure matches conceptual structure |
| Icons decorating text | Shapes that ARE the meaning |
| Same container for everything | Distinct visual vocabulary per concept |
Step 4: Sketch the Flow
Before generating JSON, mentally trace how the eye moves through the diagram.Identify the entry point
Where does the viewer’s eye land first? Usually top-left or the largest element.
Trace the primary path
What’s the main visual journey through the diagram? There should be a clear narrative flow.
Check for dead ends
Are there isolated elements with no connections? Every element should relate to the story.
Flow Direction Guidelines
- Left → Right: Standard for sequences, processes, pipelines
- Top → Bottom: Good for hierarchies, timelines, cascading flows
- Radial (center → out): Perfect for fan-out, hub-and-spoke, central triggers
- Circular: For loops, cycles, iterative processes
Step 5: Generate JSON
Only now create the Excalidraw elements.For comprehensive or technical diagrams, you MUST build the JSON one section at a time. See the Large Diagram Strategy documentation for the complete workflow.
Section-by-Section Approach
Create the base file
Start with the JSON wrapper (
type, version, appState, files) and the first section of elements.Add one section per edit
Each section gets its own dedicated pass. Use descriptive string IDs (e.g.,
"trigger_rect", "arrow_fan_left").Step 6: Render & Validate (MANDATORY)
After generating or editing the Excalidraw JSON, you cannot judge quality from JSON alone. You must:- Render to PNG using the render script
- View the image using the Read tool
- Audit against your vision (Steps 1-4)
- Check for visual defects
- Fix issues in the JSON
- Re-render and repeat until perfect
The Render Command
Audit Checklist
Before looking for bugs, compare the rendered result to your original design:Visual Structure Match
Visual Structure Match
Does the visual structure match the conceptual structure you planned in Steps 1-4?
Pattern Fidelity
Pattern Fidelity
Does each section use the pattern you intended (fan-out, convergence, timeline, etc.)?
Eye Flow
Eye Flow
Does the eye flow through the diagram in the order you designed?
Visual Hierarchy
Visual Hierarchy
Are hero elements dominant and supporting elements appropriately smaller?
Evidence Artifacts (Technical Diagrams)
Evidence Artifacts (Technical Diagrams)
Are code snippets and data examples readable and properly placed?
Visual Defect Checklist
- Text clipped by or overflowing its container
- Text or shapes overlapping other elements
- Arrows crossing through elements instead of routing around them
- Arrows landing on the wrong element or pointing into empty space
- Labels floating ambiguously (not clearly anchored)
- Uneven spacing between elements that should be evenly spaced
- Sections with too much whitespace next to cramped sections
- Text too small to read at the rendered size
- Overall composition feels lopsided or unbalanced
Common Fixes
- Widen containers when text is clipped
- Adjust x/y coordinates to fix spacing and alignment
- Add waypoints to arrow
pointsarrays to route around elements - Reposition labels closer to the element they describe
- Resize elements to rebalance visual weight across sections
When to Stop
The loop is done when:- The rendered diagram matches the conceptual design from your planning steps
- No text is clipped, overlapping, or unreadable
- Arrows route cleanly and connect to the right elements
- Spacing is consistent and the composition is balanced
- You’d be comfortable showing it to someone without caveats
Complete Process Summary
Map to Patterns
Match each concept’s behavior to the right visual pattern (fan-out, convergence, timeline, etc.).