Hacker News new | ask | show | jobs
by nilirl 12 days ago
How do you do this? I really struggle to get the agents to follow my architectural invariants and coding conventions.

I use Cursor and Codex but the agents keep making regressions and breaking rules. They'll even take shortcuts sometimes, by doing things to make tests pass but with code that would be dangerous in prod.

Now, I use them file by file but it feels more like a typing assistant than something much more.

2 comments

As of today they can't. You have to tell them what the new API looks like, which new classes they have to create and describe them in detail, etc... You have new projects that try to add good practices in the prompt [0] or audit your code once in a while [1] but it's not enough.

Right now they can be autonomous to finding bugs and inconsistencies. But not architecture or even just creating a long enough PR without any guidance and feedback.

[0] https://github.com/ChristopherKahler/carl

[1] https://github.com/ChristopherKahler/aegis

When your AI slides, make a permanent test that catches that particular slide. Then have it run all the tests every time it does something significant.

We have as much test code as deployable code because the AI keeps finding ways to do what we told it to, but not what we meant.