Reladraw fixes diagram generation for AI agents with relative text

A new text-to-diagram tool lets AI agents and developers dictate relative layout without wrestling with absolute coordinates.

Tools ยท Source: Hacker News

What happened

Reladraw is a new open-source diagramming language that bridges the gap between Mermaid and Draw.io. It uses text to define diagrams but allows relative placement commands like right of or below. Developers get control over the layout without dragging boxes on a canvas.

The tool is written in TypeScript with zero runtime dependencies. It compiles text files directly into SVG images. The project is currently at version 0.8.0 and has already gathered over 680 stars on GitHub.

The standout feature is native integration for AI coding agents. Developers can install a Reladraw skill for Claude Code, Cursor, or Copilot. This lets agents generate custom diagrams without calculating absolute coordinates or writing verbose XML.

Key facts

Why it matters

Current diagramming tools fail when paired with AI. Mermaid forces auto-layout. This ruins specific architectural visions. Draw.io requires absolute coordinate math. Language models are terrible at calculating exact pixels. Reladraw gives language models a semantic way to build visual layouts.

This unlocks automated documentation that actually looks good. Agents can now reliably generate system architecture diagrams from code context using relative text. Technical documentation becomes a cheap byproduct of writing code rather than a tedious chore.

For builders

Automate architecture diagrams with AI

Integrate the Reladraw skill into Cursor or Claude Code. Prompt your agent to document your system architecture visually. The agent writes the relative text and Reladraw outputs the SVG.

Embed diagrams in your build process

Reladraw has zero runtime dependencies and runs via a simple CLI. You can easily add it to your build process to generate fresh SVG diagrams from text files on every deploy.

My take

I am tired of wrestling with Mermaid and its unpredictable auto-layout. Reladraw is exactly what we need for AI-driven documentation. Giving agents a relative spatial language is a massive unlock for founders sharing system designs.

Original reporting: Hacker News. This is my rewrite and opinion.

More AI news for builders