Why AI-generated code for your Go project compiles but still needs a rewrite

A familiar scene

You ask Claude Code, Cursor, or whatever AI coding tool you're using to "add a product management module." Most of the time it produces something that compiles. The endpoints respond. You can even hit them from Postman.

Then you open the frontend, and the menu item isn't there. Or it is, and clicking into it gives you a 403. Or the code works, but it's written in a completely different style from the rest of the codebase, and two weeks later you can't tell which parts were AI-written and which weren't.

The model isn't the problem. It just has no idea what your project actually looks like right now.