Developer Fabien Sanglard has shared the project instructions he uses to address recurring problems in AI-generated code. The file grew from corrections he kept making during review, including unclear structure and unnecessary changes outside the requested feature.

His rules ask agents to keep related code behind clear interfaces and seek approval before changing which parts of a component other code can access. For a bug fix, the agent must first write a test, observe it fail, then verify that the proposed fix makes it pass.

The instructions also target the conversation itself: short explanations, specific wording and no automatic praise. Sanglard stores the rules in a project file and links it to the instruction filename expected by the coding tool.

He describes better results from his own workflow, not a controlled benchmark. He still reviews the generated code, but says more of that review now concerns architecture rather than repeated style corrections. When adherence drops during a long session, he asks the agent to reload the instructions.