Operator Field Manual
TemplateOperating Docs

AGENTS.md Template For AI Coding Agents

A practical AGENTS.md structure for keeping Codex, Claude Code, Cursor, and other coding agents aligned across real software projects.

Intent
The reader wants a usable AGENTS.md pattern for AI coding agents.
Audience
Builders using Codex, Claude Code, Cursor, or agentic coding workflows.
Read time
6 min
Reviewed
May 25, 2026

Key takeaways

  • AGENTS.md is not a prompt dump; it is an operating contract.
  • The file should define context, stack, rules, verification, and boundaries.
  • A good operating doc reduces drift across sessions and tools.
01

Short Answer

An AGENTS.md file tells AI coding agents how to operate inside a project. It should define the product context, stack, folder rules, coding standards, verification commands, design expectations, and boundaries. The goal is not to make the agent obey a magic prompt. The goal is to give every future agent session the same operating context.

02

What An AGENTS.md Should Contain

  • Project identity: what this product is and what it is not.
  • Current strategic frame: goals, audience, funnel, offer, and proof assets.
  • Architecture rules: stack, routes, data, env vars, integrations, and known constraints.
  • Design rules: visual direction, component habits, accessibility, and mobile standards.
  • Execution rules: how to inspect, edit, verify, document, commit, and deploy.
  • Hard boundaries: what agents must not rename, fake, overbuild, or silently break.
03

Template Preview

AGENTS.md
# AGENTS.md

## Project Identity
This project is [product/company]. It exists to [business outcome]. It is not [common wrong frame].

## Current Goal
The active milestone is [specific slice]. Success means [observable acceptance criteria].

## Product Context
- Audience: [who uses it]
- Primary job: [what they are trying to do]
- Conversion/action: [what the app should drive]

## Engineering Rules
- Stack: [framework/runtime/deploy target]
- Do not introduce new dependencies unless they remove real complexity.
- Keep changes scoped to the requested slice.
- Preserve existing patterns before inventing new abstractions.

## Design Rules
- Follow the existing design system.
- Verify desktop and mobile.
- No text overlap, clipped CTAs, fake screenshots, or decorative filler.

## Verification
Run:
- npm run typecheck
- npm run lint
- npm run build

Record what changed and what remains open.
04

Operator Proof

05

Bad AGENTS.md Patterns

  • A giant motivational prompt with no project facts.
  • Tool-specific instructions that ignore the actual product.
  • Rules that say be careful but never define verification commands.
  • A stale file that contradicts the current architecture.
  • Instructions that hide business context from the agent and then blame the agent for drifting.

Related field notes

Keep building the operating layer.

View all
GuideBuild Real Software

How To Build Real Software With AI Agents

A practical Operator Class workflow for going from idea to operating docs, spec, agent execution, QA, deployment, and first launch.

7 minReviewed May 25, 2026

ComparisonAgent Workflows

Cursor vs Claude Code vs Codex For Real Projects

An honest operator comparison of Cursor, Claude Code, and Codex for building real software — a decision frame based on how you work, not a winner crowned for everyone.

8 minReviewed May 31, 2026

GuideAgent Workflows

Claude Code Workflow For Building Real Software

An operator-grade Claude Code workflow: operating docs, scoped specs, planned execution, reviewed diffs, real QA, and careful deploy — not a feature tour.

8 minReviewed May 31, 2026