Case Study: Scaling AGENTS.md in a Monorepo

2024-02-15

The challenge

Monorepos have multiple packages. Each may need its own AGENTS.md.

Solution: Composition

Use AgentMD's compose feature with **/agents-md/**/*.md fragments.

packages/
  core/agents-md/build.md
  web/agents-md/test.md

Directives

<!-- agents-md: target=nearest --> — compose into each package dir

<!-- agents-md: target=root --> — single root AGENTS.md

Result

One agentmd compose . generates AGENTS.md files per package.