Guide
What you get: The agent writes an AGENTS.md (about 100 lines) with run/lint/build commands, a folder map, conventions, a never-do list and a definition of done. Best for Anyone starting a project with coding agents who wants them to follow the team's rules instead of guessing..
Before you start
- A repository the agent can read
- Fill in project description and stack
- If the repo already has an AGENTS.md (create-next-app 16 ships one), check the agent kept it
Worked example (Oct 17, 2026, Claude Code 2.1.296; Codex 0.151.0 (gpt-5.6-sol))
Input
Project: Acme Notes, a note-taking web app for small teams (still the create-next-app starter). Stack: Next.js 16 App Router, React 19, TypeScript, ESLint, CSS Modules, npm.
Result
Codex: "- Test: no automated test runner or `npm test` script is configured yet." Claude Code: "| Tests | No test runner yet. Do not invent `npm test`."
Both kept the existing Next.js managed block. Every command in both files exists and worked when we ran it (npm run lint, npm run build, npx tsc --noEmit for Claude's file). Codex's file was accurate and labeled not-yet-existing folders as 'create for'. Claude Code's file had inaccuracies: its folder map lists src/components, src/lib, src/server, src/app/(app) and src/app/api without saying none of them exist yet; it states 'Each top-level route segment has an error.tsx' (there is none); it invents '2-20 people per workspace'; and it copied the tester's personal ~/.claude/CLAUDE.md git/Vercel rules into the project file. Claude Code's file in this test had four errors (listed folders that don't exist, an invented error.tsx rule, an invented workspace size, and copied the tester's personal instructions), so only Codex is listed as passing. After this test the prompt tells the agent to check every fact, mark planned folders and keep an existing AGENTS.md.
How to check it worked
- Run every command listed in the file
- Check every path in the folder map exists, or is clearly marked as where new code will go
- Remove details you didn't give the agent (user counts, features)
Common problems
- Planned folders described as if they already exist
- Rules written as facts (e.g. 'each route has an error.tsx')
- Personal agent settings leaking into a shared project file
- Invented product details
Log in to join the discussion.