DEV Community

Vildanden
Vildanden

Posted on

A Small AGENTS.md Baseline for Next.js Teams

A lightweight baseline prevents every coding agent from inventing its own workflow.

What to put in AGENTS.md

Start with the rules that are stable across the repository:

  • how to install dependencies and run tests
  • the expected Node.js version and package manager
  • where application code, tests, and generated files live
  • the commands that must pass before opening a pull request
  • boundaries for secrets, migrations, and production changes

Keep tool-specific instructions in their native files. For example, use scoped Cursor rules for editor behavior and a short CLAUDE.md pointer when Claude Code needs extra context. This keeps the shared baseline readable and makes the rules easy to review.

A practical review loop

  1. Ask the agent to summarize the relevant rules before it edits.
  2. Make the smallest change that satisfies the task.
  3. Run the repository checks listed in AGENTS.md.
  4. Review the diff, including generated files and dependency changes.
  5. Update the rule only when the workflow truly changed.

Vildanden's free Agent Config sample includes a ready-to-adapt Next.js baseline, Cursor rules, and a CLAUDE.md pointer:

https://fairly-charlie-907.rehost.page/

The goal is not more prompt text. It is a small, explicit contract that keeps the agent's work scoped to the repository.

Top comments (0)