Are these experts in the room with us right now? Because if even the creators of Claude seemingly can't prompt non spaghetti code (see: Claude Code leak), I'd like to know who can.
How do you know they weren't? Have you analyzed the prompt they used?
There's no shortage of examples of unmaintainable spaghetti AI code, Claude Code is just one of many. If you have examples of good codebases maintained by "prompting experts", I'd love to see them.
Pretty much any existing project (that started before LLMs were a thing) who accepts LLM-generated code, I would argue fits your requirement, since the PRs adhere to their existing code style and guidelines, or they wouldn't be accepted in the first place. In those cases it may be impossible to tell that an LLM was even involved.
Recent notable examples would be the Linux kernel or cURL.
I can absolutely prompt AI to following established patterns and produce nice, clean output in a legacy codebase. I also have a completely separate set of skill files that I’ve been building organically by allowing the agent to do make most decisions about conventions. The latter produces code that would be a nightmare to modify by hand, but I’m still able to iterate on it many times faster than I could in the codebase where code quality is a requirement.
“Code quality” is mostly “human readability”, and I’m simply not sure that’s a valuable attribute anymore.
I waited a while to respond to this one - partly out of embarrassment, as what I said wasn't exactly what I meant, and partly out of respect for the community rules because I don't want to start a flamewar about it.
I was using "human readability" very liberally. Let me try that statement again:
"Code quality" describes a set of standard practices that are largely intended to ensure the resultant code is maintainable by humans. That means it should require minimal cognitive load to understand enough context to make everyday changes, and the most complex areas and overall architecture of the system should be well-documented, consistent, and with enforced rules to ensure that consistency.
AI changes this substantially, because the things that we were previously optimizing for are not longer the constraints that the system is operating under.
Before AI, I placed a much higher value on consistency in design patterns across an organization and even moreso within a single codebase. After AI, I no longer need to think in terms of many levels of abstraction at the same time - I'm working on architecture without needing to look at every line, or I'm focused on a small area with a performance bottleneck or other issue. As long as I'm able to quickly grok what's happening within that single block - defined inputs, outputs, and purpose - that's generally good enough.
In short - our notions of code quality are optimizing for a process that no longer works the same way, and we should be critical when implementing "best practices" and making sure that the problems those practices were intended to mitigate are still actually problems. In most cases I'm finding that they're not, and have come to the conclusion that many of the heuristics that I've developed over 20+ years in this industry aren't much different from a cargo cult.