Day 2 of 30 Products in 30 Days is Snaidhm, a Celtic knotwork generator. You draw breaklines on a grid, the cords reroute around them, and then you bend the grid to fit the thing you’re actually making: an arch, a tapered panel, a ring. Then you download it as an SVG for a laser cutter or an STL for a 3D printer. It’s free.
Snaidhm is Irish for “knot”. It’s pronounced “snime”, to rhyme with “time”.
Why this one
I’ve been obsessed with Celtic knotwork for decades. My mother got the original George Bain book, Celtic Art: The Methods of Construction,1 when I was a kid, and the combination of beautiful artwork generated from a simple grid and process fascinated me then, and still does now.
I’ve written a knotwork generator many times before. It was my koan for learning front-end frameworks: there’s a React version, a Vue version, a Vue 3 version and an Elm version on my disk, all at varying stages of incompleteness. The algorithm in those versions came from Iain Bain’s Celtic Knotwork,2 his son’s step-by-step take on the method.
Every time, the basics were easy. The primary, secondary and tertiary grids, the breaklines, the over-under weave, a few different line styles. And every time I stalled at the same walls:
- Deforming the grid. The original artworks almost never sit on a neat square. The scribes bent their grids to fill arches, borders and roundels, to fit the pattern to the physical thing. Every version I wrote drew each cell straight onto the screen, which made bending the grid more or less impossible.
- Split cords. Sometimes the cord splits into two and the sub-cords interleave at the crossings. It should be simple. I never got my head around the interleaving.
- Animals. Almost all of the originals have animal or human figures woven into the knotwork. That’s hard in code.
So the question for today was: does working with Claude get me past any of them?
The walls
Deformation went first. Claude restructured the whole thing so the knot is worked out on a flat, ideal grid, and the bending only happens at the very end, to the finished geometry. The over-under logic never knows the grid is bent. Once it’s built like that, an arch or a taper or a ring is just a different mapping function. The first version was live 30 minutes after I picked the idea, with a slider that rolls a flat panel up into a ring. That was the moment I knew Claude is a better coder than I will ever be: I’ve tried this a few times and never solved it. Claude did it first try.
Split cords went in on the next iteration. The rule turns out to be the same parity rule that makes the main knot alternate over and under, applied one level finer. A strand crossing beside the main crossing point goes to one diagonal, one above or below it goes to the other, and every strand alternates all the way round. Claude wrote a test that walks every strand on four different designs and checks it. Years of not getting my head around it, and it was done in 5 minutes.
Animals are still a wall. I’ve parked them as a future day. We did get letters, though: type a letter and it’s set in uncial in the middle of the knot, with the cells under it voided so the knot flows around and inside it, gilt with red-lead dots like an illuminated manuscript. Which is close enough to the Book of Kells for one afternoon.
I would love to generate the letters and incorporate them into the knotwork, and then generate animal or human forms and do the same, as the original illustrators did. But I’m happy enough to stop here. Maybe I’ll pick this up again and continue.
Four rounds of feedback
The pattern that worked on Day 1 worked again. Claude builds and deploys, I play with it, and I type comments as I find things. Claude collects them and doesn’t touch anything until I say I’m done, then sorts them into bugs, tweaks and features and works through the lot.
I didn’t use Spec Sergeant for this day’s work, because I was starting with an existing (ancient, obsolete and unused) code base, so the spec was that code. My initial prompt was basically “look at these old projects, we need to do this but better, and add in the deformation”. Then it was a matter of playing with it and giving feedback in rounds.
Each round changed the product:
- Round 1: cords running between two parallel breaklines wiggled when they should run straight. Wide cords fell apart. The Make it buttons looked like a choice rather than downloads. I wanted to drag the corners of the grid around. The font was the safest possible choice for a subject that deserves better.
- Round 2: three of the styles had become the same shape with different widths, and the 3D crossings were janky.
- Round 3: the 3D still didn’t look like actual knotted cord. The fix was to make the height a continuous wave through the crossings instead of plateaus and ramps, and to tilt the cross-section so it stays square to the cord. Now it looks like rope. I also asked for more styles, the doubled cord, and letters.
- Round 4: letters left tiny one-cell knots stranded inside a B, and I wanted to move the initial up and down.

There are now ten styles, including the Elven and Dwarven ones from my old React version. My favourite new one is Urnes, where the cords swell between crossings and thin as they pass under, like late Viking carving. It starts getting very abstract at the extreme settings. The most beautiful one is the new Doubled, which with the colours produces some transfixing patterns.

Claude’s mistakes
It’s not all magic. Claude got some things wrong today, and some of them are worth talking about.
It made up a time. After the first deploy it told me it had taken “about 75 minutes”. The whole turn had taken 21 minutes. When I asked where 75 came from, it admitted it hadn’t measured anything, worked out the real time from the timestamps (30 minutes from picking the idea to a live first version), and added a rule to its own instructions: time things from timestamps, never estimate. Then it did it twice more the same afternoon, writing a time into the notes before checking the clock. It caught and corrected both, and the rule now says to run the clock first.
This is something I’ve noticed, that LLMs are terrible with actual clock time, and estimates. When we started this, Claude said “we only have 12 hours, I don’t think we can add all these features”. 30 minutes later it had done half of them. I’ll have to work out how we can improve this on future days, maybe add something to the CLAUDE.md for time estimation. I’ll post more as I find out.
The rest of the mistakes I never even noticed. It caught them before deploying the site and asking me to test. Claude’s first draft of this post included two more “mistakes” that I never even knew about.
One Cord
The best accidental discovery of the day: it’s a puzzle. The cord counter tells you how many separate cords your knot has, and the scribes preferred a single unbroken one. I love playing with it. Trying to get down to one cord while keeping the design symmetrical horizontally and vertically is a hard puzzle; adding a breakline does non-intuitive things to the cords. I think breaking a smaller cord will integrate it back into the main one, but instead it shatters the main one and now I’ve got 3 extra cords.
So that’s now in my ideas file as a future puzzle game. I don’t know if I’ll use it, but if I do then it’ll use this same engine and refer back to this day’s work.
So, does the experience help?
This one was also odd, because I’ve tried (and partly succeeded) building this product many times before. So yes, the experience helped because I was able to hand Claude a kinda-working version of what I wanted at the start. I didn’t have to explain how the algorithm worked, or what kind of controls I wanted on the page. The speccing process was easy because of that.
But as a developer, this is so humbling. I have wrestled with the geometry of those deformations for weeks, trying to get it to work properly. And Claude was just “oh yeah, you just draw it on a flat grid and then deform it”. And the result is animated, and beautiful. Way better than any of my versions. And the 3D versions, which I’ve always struggled with, are now working and look great.
This is a genuinely useful tool now. I will definitely use this for 3D printing knotwork, and for designing knotwork for decorating my woodwork/leatherwork/metalwork. I’m really happy with the result.
If you make things, or you just want to see how knotwork works, go and make a knot. It’s free, and it runs in your browser.
-
George Bain, Celtic Art: The Methods of Construction (Glasgow: William MacLellan, 1951). It was reprinted through the 1970s, and it’s still in print as a Dover paperback, ISBN 978-0-486-22923-2. The UK Constable paperback from 1977 is ISBN 978-0-09-461830-5. ↩︎
-
Iain Bain, Celtic Knotwork (London: Constable, 1986), ISBN 978-0-09-466060-1. Iain is George Bain’s son. ↩︎