Comment by awbraunstein

Comment by awbraunstein 4 days ago

5 replies

You can have multiple AGENTS.md files in your codebase and tooling will look at both the one in the current directory as well as in the root of the codebase. This way you can sort of do what you're suggesting but simultaneously keep the information closer to the code that it is describing.

thayne 4 days ago

Kind of, but for any given directory you can't separate out instructions for building from instructions for naming conventions, for example.

  • __alias 4 days ago

    With AGENTS.md you have more flexibility to do something like

    ``` // AGENTS.md

    If implementing a new service, first read @./SERVICE_SETUP.md

    If writing tests, first read @./TESTING_SETUP.md

    ```

    Or whatever else might make sense for your project.

bryanrasmussen 4 days ago

so you would have an Agents.md in your testing folder and it would describe how to run the tests or generate new tests for the project - am I understanding the usage correctly?

  • theshrike79 4 days ago

    Pretty much yes

    Most systems have a global config, project config and personal config.

    But I do like the directory style to keep context low. Cursor did it best with actual glob filters in the front matter that tell the LLM "only read this if the file you're processing ends with *.php"

    • verdverm 4 days ago

      Copilot does globs too, but if you dig into the actual prompt sent out...

      They are not doing this mechanically (read file, compare to globs to add more context), they try to rely on the model to notice and do another read. It has been unreliable. I have had better results by adding instructions like...

      "If the user asks about X, Read `./path/to/inst.md`"

      Still lots of DX to do in this space