You can write an agent.md file and gradually add to it as you develop the project. The reason junior developers get better is that the context goes from low to high over the time you spend working with them. Yes, "learning".
I've found that maintaining a file that is designed to increase the LLM's awareness of how I want to approach problems, how I build / test / ship code etc, leads to the LLM making fewer annoying assumptions.
Almost all of the annoying assumptions that the LLM makes are "ok, but not how I want it done". I've gotten into the habit of keeping track of these in a file. Like the 10 commandments for LLMs. Now, whenever I'm starting a new context I drop in an agent.md and tell it to read that before starting. Fella like watching Trinity learn how to fly a helicopter before getting into it.
It's still not perfect, but I'm doing waaaay more work now to get annoyed by the LLM's inability to "automatically learn" without my help.