I kept maintaining the same rules in three different files. CLAUDE.md, .cursor/rules/main.mdc, .github/copilot-instructions.md. Every time I updated one I forgot the others. Two weeks later Cursor was still running on old instructions.
So I built agentfile. You define one contract.yaml, commit it to the repo, and run sync. It generates the correct file for each agent in its native format. Claude gets plain markdown, Cursor gets .mdc files with frontmatter, Copilot gets compact inline context blocks. Generated files are gitignored so every developer independently picks which agents they use without touching the repo.
A few things I found interesting to build:
Skills are defined once in the contract and rendered differently per agent. For Cursor that means individual .mdc files in .cursor/rules/skills/. For Claude they get appended as structured sections. For Copilot they become single-line bullets. Same data, three different formats, zero duplication.
Adding a new agent is just dropping a config.yaml and a template.md into ai/agents/. No generator changes needed. AGENTS.md is supported out of the box which means Codex and Windsurf are covered natively since both read it.
For monorepos you can drop an ai.override.yaml in any package directory to inject extra context without touching the shared contract.
Still early but it works well for my own workflow. Curious whether others have run into this problem and how you handled it.
bychanzey•1h ago
So I built agentfile. You define one contract.yaml, commit it to the repo, and run sync. It generates the correct file for each agent in its native format. Claude gets plain markdown, Cursor gets .mdc files with frontmatter, Copilot gets compact inline context blocks. Generated files are gitignored so every developer independently picks which agents they use without touching the repo.
A few things I found interesting to build:
Skills are defined once in the contract and rendered differently per agent. For Cursor that means individual .mdc files in .cursor/rules/skills/. For Claude they get appended as structured sections. For Copilot they become single-line bullets. Same data, three different formats, zero duplication.
Adding a new agent is just dropping a config.yaml and a template.md into ai/agents/. No generator changes needed. AGENTS.md is supported out of the box which means Codex and Windsurf are covered natively since both read it.
For monorepos you can drop an ai.override.yaml in any package directory to inject extra context without touching the shared contract.
Still early but it works well for my own workflow. Curious whether others have run into this problem and how you handled it.