Lurker News
I love making diagrams to help understand, plan, etc. However, the options are (A) auto-placement languages like Mermaid or Graphviz (which don't let me decide how the diagram looks), or (B) software like Draw.io which are powerful but are very time consuming (and inefficient for agents to manipulate).

I wanted to have the benefits of both, where you can define a diagram in a diagram language, but also retain a high degree of control over what the diagram looks like.
I also wanted this to work well for humans and agents.
On the Github link, there's a playground where you can try it out without installation. There's also instructions for a simple npm install and for installing a skill you can use with Claude or other agents.

Comments (119) 47 threads

Earlier comments
kinduff1 reply#
I love it, and I wish it was part of Mermaid. I've always struggled with the presentation and agents tend to hack or just straight use SVG lol
jpwalsh234#
Thanks! Mermaid is so cool, but I wanted this relative placement, too. I've played with having Claude make me infographics in HTML and also using SVG. They can be surprisingly decent, until you want something complicated, then it gets messy! I figure, let the agents just say what they want, and let the tool (Reladraw) worry about the arithmetic. No use having an agent burning tokens to recompute coordinates with dubious results! >.<'
squidlib1 reply#
OP, is this something I could use when someone is explaining their architecture and this simply can interpret their words into a diagram?
jpwalsh234#
Not by itself, but an agent using Reladraw could. The real smarts would be the agent, and Reladraw just gives it a language and tool to express itself clearly and efficiently.

You could take someone's explanation of their architecture, give it to an agent, and ask it to render it as a diagram using Graphviz, Mermaid, Draw.io, etc. The problem is that some of those don't give the agent control over what the diagram looks like (Graphviz, Mermaid) and others are inefficient and fiddly for an agent to manipulate (Draw.io). Reladraw aims to be easy for an agent (or human) to edit (like Mermaid) but have the expressiveness and positioning like you'd be able to achieve with a carefully crafted Draw.io diagram.

Garlef1 reply#
1. awesome ~ this seems to be in a sweet spot! (yes, mermaid is fine; but often looks bad - esp when visualizing large diagrams)

2. it would be great to have this as a layouting layer for C4
3. which brings me to a suggestion: i think it would make sense to allow for decoupling the topological parts of the language (arrows, groupings, etc) from the layouting concerns (left of, right of, etc)

jpwalsh2341 reply#
Super interesting. So, you'd have something like "use architecture.dsl" (to "load" the C4 model definitions), and then begin to specify layout?
Garlef#
Yes this would be one way. But maybe a suite of plungins that allows other renerers to consume .rel files might make for a better ecosystem.

To explain the use case: One advantage would be: maintain model (and views) in C4, provide layout on top.
We recently generated a big C4 model of the whole company. Good and informative since you can click through it! But it doesn't look nice and doesn't tell a coherent picture visually.

shellerik1 reply#
This is a wonderful idea that fills a gap that has caused me much pain! When it's more stable I'll be looking for (or creating) an Obsidian plugin, a VS Code extension, etc.

Opening reladraw/docs/index.html to make a diagram then copy-pasting to save it is a little cumbersome.

jpwalsh2341 reply#
Thanks very much. And, I totally agree. The workflow at present without these quality of life features is a bit rough around the edges :)
shellerik#
I'll use it next week for a diagram I've been trying to create for work and I'll let you know if I run into anything it can't handle.

Load more comments