Agents.md needs to be built before the session start of the agent so it is in effect the moment the agent takes over, deleted or built to a surrogate file when an AGENTS.md already exists, needs to transition from a previous version of AGENTS.md to the next candidate version with as little or no practical gap as possible--renaming the new AGENTS.md and overwriting the old seems like a possible way, and needs to not exist in the branch when a branch is submitted so as to not cause collisions when merged.
We can come up with a setup script to meet the first requirement to some degree: https://jules.google/docs/environment/
Agents.md needs to be built before the session start of the agent so it is in effect the moment the agent takes over, deleted or built to a surrogate file when an AGENTS.md already exists, needs to transition from a previous version of AGENTS.md to the next candidate version with as little or no practical gap as possible--renaming the new AGENTS.md and overwriting the old seems like a possible way, and needs to not exist in the branch when a branch is submitted so as to not cause collisions when merged.
We can come up with a setup script to meet the first requirement to some degree: https://jules.google/docs/environment/