Hacker News new | ask | show | jobs
by pards 4 days ago
> I have found it difficult for the agents to follow the set of rules I want them to follow for projects that were not developed by them from scratch.

This reflects my experience too.

6 comments

And then in PRs and meetings, we're told to fix the agents file when we see it get something wrong. But the agents file already has the rule. And then the agent gets the rule wrong again. And the cycle continues because we get so much more lines of code!
If it doesn't work you need to move it out of band, to the strongest layer you can that makes sense. The best is compiler enforcement, one layer lower is a linter, then some other form of progrmmatic test, and failing that you can have separate agent reviewer plugged into your CI process / software factory.

You can't just dump all considerations on a single agent and expect them to follow every single rule while also making the right tradeoffs. Fundamentally the game is how do you orchestrate agents to elevate the right considerations for human awareness and input. Models and harnesses will continue to get better which will continue to raise the ceiling on what you can naively throw at a single agent, but the buck always needs to stop with human at some point, because otherwise what are we even doing here?

I think the leading advice nowadays is to put these things into deterministic "gates" like unit tests, lint rules, ast matchers, typechecks, etc. Updating agent files to fix behavior has been deemed insufficient by the industry by and large.
I've had the opposite experience: the only way to get what I want is to write much of the initial code and my own rules.

Then they seem to have no trouble.

If I have a prompt, I put it in 3 different chats and filter the result & input trough all 3 chats. Claude is the best in my opinion, coding and daily chat. Do you have a specific way how to input the prompt/rules ?
“rewrite this project to be exactly the same but also as if you had written it”
I’ve tried “another instance of you wrote this”.

No formal measurements but it feels better

Well TBF, I have the same difficulty with humans. Either you're the only* developer on a codebase and you can have an unenforced "set of rules", or you're not and you need to somehow enforce them.

*okay I've seen it work in small, competent, tight-knit teams... and even then, it often relies on someone particularly caring about those rules, even if the others are generally in agreement

Lol what is this shilling? Who is it for? It is not even comparable.
I don't understand what you're saying, or why you're saying it, sorry
AI code review[1] can check that guidelines in AGENTS.md (and the like) are being followed in PRs

1. https://www.sourcery.ai/ - disclosure, I'm the CEO