That's a much nicer read! I'm interested in some of your Claude experiences though.
I tested Claude heavily, and I have to be direct, it consistently fell below my quality bar. Even with strict, detailed guidelines, the code it produced was riddled with subtle issues, off-by-one errors, improper error handling, and a complete disregard for my idiomatic Go patterns.
Which Claude model were you using? Opus 3.7 & 3.8 tend to do a very good job at things like that. It catches my off-by-one issues much better than I do... They are, however, a bit slower as you point out. But my local models on an NVidia 3070 with only 8Gig of VRAM are garbage...
Single-letter variable names might be fine for tight loops, but when you’re generating thousands of lines of code via AI, i, j, and k become impossible to trace.
I find that if I drop in a CLAUDE.MD some style guides that it does a good job of following them. In particular I hate the Python idiom of prepending "_" to "private" variables and functions. If I put a note in there it stops it from doing it.
As an aside - i, j, and k for loop variables is a very old tradition going back to FORTRAN where i, j, and k were always integer variables. So i is the outer loop, j the inner loop, and k the inner-inner loop. If you have more nested loops than that you're doing it wrong...
But if you don't like it the style hint should help.