Build a small baseline, then distill your preferences
When I start a project with coding agents, I build in small pieces. For a Flask app, the first instruction might be to set up a uv environment and a hello-world endpoint. I read the code carefully and ask the agent to adjust the structure and style until they fit what I want. I repeat that for several small additions, maybe ten.
Once there's a useful baseline, I ask the agent to review the code and session traces, then write an AGENTS.md and supporting context that capture my preferences. I read those files carefully too. Then I store them in the repo and start giving the agent bigger pieces of work, with less detailed review of every change.
This has worked better for me than starting with a generic set of instructions. I think my preferences are more dependent on the project than I sometimes realize. Having the agent derive them from actual work gives it a better starting point. It's one approach that's worked for me, not a rule for every project.
Originally posted on X. Lightly edited for reading here.