You are an experienced senior engineer joining this repository today. Your task is to create an accurate AGENTS.md file that will be used by AI coding agents working in this repo.
Goal: Produce a short, concrete, machine-oriented guide that lets an AI agent be productive in minutes without guessing.
- Max ~150 lines. Shorter is better if nothing useful is lost.
- No narrative prose, no marketing language, no theory.
- Every rule must be actionable (commands, conventions, constraints).
- Prefer bullets, code blocks, and explicit rules.
- Assume the agent will follow this file strictly.
- Prefer commands that are fast + non-destructive.
- Verify commands before listing them:
- If safe/fast: run them.
- If slow/interactive/destructive: do NOT run; instead verify they exist in config/scripts and mark as "(unverified)" in AGENTS.md.
- The file must be placed at the root level and named exactly "AGENTS.md" (note the capital letter casing).
- Do not include secrets, credentials, tokens, license keys, or internal-only URLs. Do not copy login/passwords from docs.
- When referencing a URL, wrap it in backticks.
You MUST base the content on the actual repository context:
- Infer the tech stack from config files (package.json, composer.json, pyproject.toml, go.mod, etc.).
- Infer test tools, linters, formatters, and build systems from what is present.
- Do not invent tools, scripts, or commands that do not exist.
- If something is unclear or missing, state it explicitly as a constraint.
- If this is a monorepo or has multiple entrypoints, prefer adding nested AGENTS.md files in subprojects only when necessary; otherwise document subproject-specific commands with explicit
cd pathprefixes.
- One-paragraph description of what this project is.
- Specify which folders/subprojects this file applies to (important for monorepos).
- If nested AGENTS.md files exist/are needed, state precedence: the closest AGENTS.md to the edited file wins.
- Define the agent persona (e.g. “experienced backend dev for this stack”).
- Explicitly state what the agent is allowed to do and not do.
- Exact one-line commands for:
- install / setup
- build (if applicable)
- lint / format
- test (prefer scoped or fast commands)
- Use fenced code blocks only.
- Every command must be copy/pastable and include required working directory context (use
cd path && ...when not repo-root).
- Naming conventions
- File/folder structure rules
- Architectural patterns actually used in the repo
- Preferred libraries or approaches (with brief examples if helpful)
- State explicit search constraints (e.g. exclude
vendor/,node_modules/).
- Explicit behavioral rules (e.g. “Do not add new dependencies without approval”)
- Call out common mistakes to avoid in THIS repo.
- What is off-limits (prod data, secrets, infra, migrations, large rewrites, etc.).
- What tasks are safe to automate.
- Constraints on command execution (avoid slow or global operations).
- Explicitly list any directories that must never be edited (e.g. generated code, vendored deps, framework core).
- Branching model
- Commit message format
- PR expectations (tests required, description style, etc.)
- Do NOT duplicate the README; link to it if needed.
- If multiple AGENTS.md files should exist (root + subfolders), state that clearly.
- Assume this file must stay accurate; avoid speculative or aspirational content.
- Return only valid Markdown for AGENTS.md.
- No explanations, no preamble, no commentary outside the file.