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
whizzter1 reply#
I like it, drawing stuff around can get tedious if an engine like this can do it "automatically" when adding more stuff instead of copy-paste-move.

As a compiler writer I'm pondering if it'd be possible to parametrise to a degree with data-sources or you think that's something better suited to custom script generators (right now, it feels like you want to write a lot of this manually, but the grouping system does lend itself to wildcard expansions from data.

jpwalsh2341 reply#
That's an interesting idea. I already have planned for some programmer-like features (functions, custom attributes, variables). However, what you're talking about seems like maybe it would want to take in an outside file (e.g., CSV, JSON) and say "loop over every entity in add as a child in this container", that sort of thing?

Am I getting that right? Super curious, because that sounds cool.

whizzter#
Exactly, like a server map f.ex., would be neat to have it rendered from a dataset or when developing you often have the ability to spit out CSV,JSON,etc.

It's a great starting point and I can see functions,etc being useful for other purposes so I think there's a tightrope to be walked in the design to be extensible but not get bogged down early either (if a function can result in an enumeration, you don't need a specific CSV/JSON syntax if it's just the result of a function.. but that adds other complciations naturally).

aktenlage1 reply#
That is damn interesting. When I made copilot write a script that creates a .dot diagram, I found it funny that it had the same problems with placement that I have when doing it manually.
jpwalsh234#
Thanks very much! Yea, with .dot, the layout engine decides where things go. So, the agent doesn't know what the result looks like, leading to render, look, fiddle loops. And, depending on how much you care about layout, .dot might not give you enough knobs to turn to make it look like what you want.

The idea with Reladraw is that a human or agent could just state "I want this node to the right of this other one", rather than have a layout engine decide. Hopefully less fiddling for agents!

light_hue_11 reply#
I wish this just implement tikz without latex. I've yet to see a better drawing library that is both simple and has the depth to build the most complicated things.
jpwalsh234#
tikz looks super powerful. Reladraw is opting for a narrower job - making diagrams with boxes, groups, arrows, where you can say relative positions and let Reladraw save you extra work.
s1mon2 replies#
I’m excited to see this, but switching many of the examples from “dark” to “light” or “print” theme leaves the boxes black and the text unreadable.
jpwalsh234#
Thanks, I think I see what the issue is!
jpwalsh234#
Themes in the playground examples are fixed!

Load more comments