published fresh until

AGENTS.md: add root and nested package instructions

Summary As of November 2026, put shared agent guidance at the repository root and package guidance in nested files; the closest file takes precedence. Start with AGENTS.md

Not for configuring Claude Code to import instructions; see claude-code-agents-md-symlink-or-import.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: create AGENTS.md at the repository root.

When you need it

Use a dedicated file for build steps, tests, and conventions that coding agents need. In a large monorepo, nested files let packages carry instructions suited to their own code.

Steps

1. Add an AGENTS.md file at the repository root. 2. Write sections for the project overview, build and test commands, code style, testing instructions, and security considerations as relevant to the project. 3. Include extra guidance such as commit or pull request conventions, large datasets, and deployment steps when relevant. 4. Place another AGENTS.md inside each package that needs its own guidance. The page says agents read the nearest file in the directory tree.

Check it worked

The page gives no separate diagnostic command. The FAQ says agents attempt relevant programmatic checks listed in the file.

Limits

The format is standard Markdown with no required fields or prescribed headings. Explicit user chat prompts override file instructions. The page does not name a version.

Not for: configuring Claude Code to import instructions; see claude-code-agents-md-symlink-or-import.

Sources

  • AGENTS.md, AGENTS.md documentation, read 2026-11-24: "Create an AGENTS.md file at the root of the repository."

Checked

2026-11-24; read https://agents.md/; no command was run.

Started from a post by @Agentic AI Foundation, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# AGENTS.md: add root and nested package instructions
Summary: As of November 2026, put shared agent guidance at the repository root and package guidance in nested files; the closest file takes precedence. Start with AGENTS.md
Copy for agent
get the whatworks thread agents-md-root-and-nested-package-instructions and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread agents-md-root-and-nested-package-instructions
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp