Skip to content

Add AGENTS.md for AI coding agent instructions#1279

Merged
ernilambar merged 1 commit intotrunkfrom
1277-add-agentsmd-for-ai-coding-agent-instructions
Apr 29, 2026
Merged

Add AGENTS.md for AI coding agent instructions#1279
ernilambar merged 1 commit intotrunkfrom
1277-add-agentsmd-for-ai-coding-agent-instructions

Conversation

@davidperezgar
Copy link
Copy Markdown
Member

What?

Closes #1277

Adds an AGENTS.md file at the repository root to provide standardized context for AI coding agents (Claude Code, OpenAI Codex, Gemini CLI, GitHub Copilot, etc.).

Why?

Several contributors use AI coding tools that can automatically load project context from a well-known file at the repository root (AGENTS.md, CLAUDE.md, etc.). Without this file, each contributor has to manually provide context about coding standards, architecture, and commands every time they start a new session, leading to inconsistent results and extra setup overhead.

How?

Adds a single AGENTS.md file at the repository root. The file covers:

  • Project overview – What Plugin Check is and how it works (WP Admin UI + WP-CLI).
  • Repository structure – Annotated directory tree of all key folders.
  • Coding standards – WordPress Coding Standards, PHP/WP minimum versions, namespace, docblock rules.
  • Architecture guide – How to create static and runtime checks, register them, and choose the right trait/category.
  • Common commands – Setup, linting (PHP/JS/Gherkin), PHPStan, PHPUnit, Behat.
  • Running locally – WordPress Playground CLI as a zero-Docker option for manual testing.
  • WP-CLI usage – Examples for static, runtime, and ZIP-based checks.
  • Testing guidelines – Where tests and testdata go; requirement for a test per check.
  • Contribution guidelines – License, Code of Conduct, links to CONTRIBUTING.md and SECURITY.md.
  • Key documentation links – Direct links to all docs in the docs directory.

Testing Instructions

  1. Clone the repository and open it in any AI coding agent (Claude Code, GitHub Copilot, Gemini CLI, etc.).
  2. Verify the agent automatically loads the AGENTS.md context at the start of the session.
  3. Ask the agent a question about the project (e.g., "How do I add a new check?") and confirm it gives an accurate answer based on the file contents.

AI Usage Disclosure

  • This PR includes AI-assisted code or content

Claude was used to draft the AGENTS.md content based on the existing repository documentation, README.md, CONTRIBUTING.md, composer.json, package.json, and the docs directory.

Co-authored-by: Copilot <copilot@github.com>
@davidperezgar davidperezgar linked an issue Apr 26, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 26, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
Co-authored-by: ernilambar <nilambar@git.wordpress.org>
Co-authored-by: frantorres <frantorres@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ernilambar ernilambar requested a review from frantorres April 27, 2026 03:45
@ernilambar ernilambar added this to the 2.0.0 milestone Apr 29, 2026
@ernilambar ernilambar merged commit 61f2c08 into trunk Apr 29, 2026
4 checks passed
@ernilambar ernilambar deleted the 1277-add-agentsmd-for-ai-coding-agent-instructions branch April 29, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AGENTS.md for AI coding agent instructions

3 participants