Hacker News new | ask | show | jobs
by dilap 22 days ago
Yeah, it has a tendency to default to "smallest local hack that will work" and code as defensively as possible.

BUT I have had great success using AGENTS.md and becoming better at prompting to get it to not be like this.

Basic approach in AGENTS.md: don't code defensively, yada yada, we have a validation layer at X, no need to check for anything behind that layer. Works well.

An approach I've found helpful when prompting: What would be the best architecture for this change? If you say "do X" it'll tend to just do the hackiest, shortest path thing. If you say, "what's the best way to do X?" it will think more holistically.

That said, who knows, maybe when it's PHP it just really wants to hack ;-)

(Also, yes, you still need to review the code -- it will still do stupid things, so you can't just be pure hands off w/o ending up with quality degredations. The same is true of humans too though in my experience...)