> It removed all the documentation and logging, reducing the size to about 2,500 lines. [..] but now impossible to understand.

Nice. Lol.

> At this point, I gave up, threw out the LLM code, and rewrote the code. It’s currently about 1,400 lines (about 50% is documentation), and works great.

I've had similar experiences. But I must be "holding it wrong", judging by all the other articles on HN..