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.
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 ?
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