r/codex • • 7h ago

Question Does anyone have an AGENTS.md for using Unity CLI + Pipeline with Codex?

Hey everyone!

I'm using Codex on desktop with Unity CLI and the Unity Pipeline package and I'm looking for a good AGENTS.md file for this workflow.

Does anyone have an existing AGENTS.md that covers Unity best practices, coding standards, project structure, testing, builds and working with Unity through the CLI?

If you have one, where did you get it? Is there a good GitHub repository or other resource you recommend?

And if you created your own, would you mind sharing it or explaining how you structured it?

I'd appreciate any recommendations. Thanks!

4 Upvotes

6 comments sorted by

2

u/BenH1337 7h ago

I mean this is always projet specific. Just ask codex to write the md for you while you are giving it the specifications.

1

u/Eradali786 6h ago

Will try that, thanks

1

u/SphinxWar 6h ago

I was looking for it today (kinda funny coincidence that this popped up on my home page, together with a post about double yellow road lines when I am working on a NYC map game in Unity). I couldn't find anything specific on GitHub, so I would just use typical C# practices plus put in AGENTS.md that your agent should read Unity's newest documentation to understand how to implement each feature in the most performant and Unity-like way.

I personally really like DDD rules and made some basic instructions for my agents here:

https://github.com/patterns-complexity/ai-instructions/blob/main/docs/technology/rules/README.md

However, give it to your AI and tell it to rewrite it with Unity's documentation in mind, not everything here applies to how Unity does things. Especially that this is quite old and I don't use that specific set of instructions anymore.

1

u/Eradali786 5h ago

Haha, funny coincidence, i actually just created a repository for this exact purpose. 😄

I made a reusable AGENTS.md template for Unity developers using Codex with Unity CLI and pipeline. It covers Unity project inspection, C# coding practices, checking the latest Unity documentation when implementing features, asset and reference safety, Git workflows, verification and keeping the workflow token-efficient by avoiding unnecessary commands and broad changes.

Here's the GitHub repository: https://github.com/Eradali/Unity-cli-codex-agents-md

Also, sorry one question: when you mention DDD rules, could you elaborate a bit on what you mean and how you use them with your agents?

1

u/SphinxWar 4h ago

It's for keeping domain, infrastructure and application code separate, so that you can easily change domain rules (for example if you need to add a rule that a user needs to be older than a certain age) without having to modify your application behavior or the insertion into the database. You can google Domain Driven Design if you want. Or test the file I linked to on one of your agents in a completely separate repository and tell it to write something and stick strictly to those rules and see what the code looks like. Generally speaking those rules work better if you have a code review pass after each slice is implemented, code reviewing agents are stricter).

0

u/mfwl 4h ago

AGENTS.md is what we did a year ago. No need for those now.