Agent Wranglers

Setting up the project Required

Write one instructions file for agents

Keep one instructions file at the root of the repository that tells every agent how to build, test and change the project.

How to do it

Name it AGENTS.md, which most agents read. Claude Code reads it too, but only when the project has no CLAUDE.md. If you keep a CLAUDE.md, import the shared file from it with a line reading @AGENTS.md. List the commands to install, test and run the project. Then add the conventions and the rules that must never break. Keep it under about 200 lines, because agents read it on every task. Add a nested AGENTS.md in a subproject only when its rules differ, since the nearest file wins. Name the one command that runs every check, as the engineering playbook describes.

Example

# AGENTS.md

## Commands
- Install: `npm ci`
- Check everything: `./check.sh` (must pass before every commit)
- Run locally: `npm run dev`, then open http://localhost:3000

## Conventions
- TypeScript strict mode. No `any`.
- One feature per folder under `src/features/`.

## Never
- Never edit files under `migrations/` that have already run.
- Never commit `.env` files or keys.

How to check

Start a fresh agent session and ask it how to run the tests and what it must never do. It answers from the file, without reading the code first.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers ai development playbook: https://agentwranglers.se/playbook/ai-assisted-development/setting-up-the-project/instructions-file.