Files
draw_diag/README.md
T
wassname eeefc69f5a init
2026-01-29 20:20:14 +08:00

1.1 KiB

draw_diag

CeTZ/Typst diagrams with Claude Code iteration loop.

Setup

sudo snap install typst

Usage

./render_diagram.sh diagrams/example/my_diagram.typ

Claude Code iteration workflow

  1. Read source code, create .typ file with source docs in comments
  2. Render: ./render_diagram.sh diagram.typ
  3. Use a sub-agent to review the PNG (critical - avoids confirmation bias):
    Task tool, subagent_type: general-purpose
    "Look at this PNG and explain what concept it conveys. No context - just describe what you see. Maybe give constructive criticism and describe any issues you have with the task"
    
  4. Fix issues based on sub-agent feedback
    1. Each time make a new file: diagram_v2.typ, diagram_v3.typ, etc. So we can visualize the changes over time.
  5. Repeat until sub-agent correctly understands the diagram without hints

References

example of usage