logoalt Hacker News

santiagobasulto • today at 5:06 PM • 1 reply • view on HN

Regarding agents following instructions, my recommendation is to split in as many `AGENTS.md` file as possible, and use the root AGENTS.md as an index reference.

For example, this would be the resulting structure:

    src/
        billing/
            AGENTS.md
        products/
            AGENTS.models.md
            AGENTS.api.md
            AGENTS.md
    AGENTS.md
Then in the core AGENTS.md you can reference the main subsystems of your project and instruct the agent to reference the specific AGENTS.md. And `products` is a concrete example of a module so big that you can split instructions in multiple agents files.

This usually keeps the context very clean and working locally reading files is very fast.


Replies

armcat • today at 5:09 PM

This is great advice and something I apply everywhere even with skills, where I have SKILL.md as just front matter plus index/ToC. It aligns well with progressive disclosure principles