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

apinstein4 replies#
This is very needed in the AI coding age! I find diagramming is one of the best ways for high bandwidth alignment between my mental model and the agent’s. I have been working on this problem a bit as I see good visuals as a key bottleneck in faster development while maintaining a real architecture.

Will def be adding this to my list of diagramming tools the agent can use!

jpwalsh2341 reply#
It's funny, you articulated it very similar to how I feel! Seems like we need ways to maintain mental models at a high enough level of abstraction when working with agents.

There's a skill in the repo that you can install using `npx skills` to get started with. I'm sure the integration of Reladraw with agents can be made way better, though. It's just a bit... basic/rudimentary right now!

Towaway69#
Won’t it be a good idea to stay at the visual level?

Instead of generating visuals from text and then back to text, just communicate visually with your agents.
Something like UML provides a certain granularity to be able to code something usefully in pure visual language. Of course there are other visual programming languages that provide more depth and would probably be better suited.
Point remains that a solution based on constantly mapping better two different representations of the same thing won’t be a long term efficient solution.

tamimio#
I tried most of the diagrams out there, the best thing is installing drawio skill and make it generate one for you based on your description.
WillAdams#
For my part, I've found Literate Programming to be the best lever on this for my own work, and there has been some discussion of other folks being successful applying it to LLM work:

https://news.ycombinator.com/item?id=47300747

loveTech#
Exactly! I'd like to give it a try as well!
atombender1 reply#
The readme says:

> Mermaid, Graphviz and D2 let you declare boxes and connections, then determine positions for you. If you have a particular picture in mind, these aren't the right tool.
D2's layout engine TALA [1] actually allows you to provide a lot of manual control. TALA used to be commercial, but is now open source.
In my own testing, TALA tends to produce much better layouts than Mermaid, including the ELK layout algorithm (which is not Mermaid's default; D2 also supports ELK).
TALA supports controlling direction per container, defining which shapes have to be near each other, and so on. I've not played with this yet, though.
[1] https://d2lang.com/tour/tala/

jpwalsh234#
Thanks for mentioning TALA. I feel like TALA does add more control than Mermaid, but in spirit sits closer to Mermaid than Reladraw. It keeps the auto layout, but with extra ways to coax the diagram into a different shape, by saying things like "keep this node pinned over here" or "keep these nodes close to one another".

For the diagrams I usually want to create, that's still not enough control to create what I envision.

jpwalsh2341 reply#
Thanks for making that! Just a heads up, reladraw is changing super fast - I think the rendering/highlighting will work smoothly with syntax changes, the more annoying thing would be any JS API breaking changes.
picardo#
No problem! I hooked up dependabot to detect upstream changes, so when you bump up the version number, it should create a PR and bump the version number of the extension, and I will merge. I think the unit tests should catch any regression.

Load more comments