Conversation
Adds a concise reference file that points contributors (and AI coding tools) to the right docs for setup, architecture, testing, and workflow rules. Removes AGENTS.md from .gitignore so it is tracked in the repo. Closes #307 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #308 +/- ##
=============================================
+ Coverage 56.69% 58.03% +1.33%
- Complexity 505 576 +71
=============================================
Files 32 37 +5
Lines 2568 2955 +387
=============================================
+ Hits 1456 1715 +259
- Misses 1112 1240 +128
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Example: Screen.Recording.2026-03-16.at.12.02.10.mov |
|
Note to self: step 3 contradicts the "prefer
Should also mention why: the npm wrappers run inside the wp-env Docker container, ensuring a consistent PHP version and WordPress environment regardless of local setup. |
There was a problem hiding this comment.
Pull request overview
This PR adds a tracked AGENTS.md file intended as a quick routing/onboarding reference for contributors (and AI coding tools), and updates .gitignore so the file is no longer excluded from the repository.
Changes:
- Add
AGENTS.mdwith links to key contributor/developer/testing docs plus workflow guidance. - Remove
AGENTS.mdfrom.gitignoreso it is committed to the repo.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| AGENTS.md | New onboarding/routing reference with doc links and recommended workflow commands |
| .gitignore | Stops ignoring AGENTS.md so it can be versioned |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jeffpaul
left a comment
There was a problem hiding this comment.
Note that I left a question on the linked issue via #307 (comment) that ideally we can sort out before going much further on this PR
There was a problem hiding this comment.
@gziolo You seemed to have ignored the PR template - and more specifically the AI Disclosure section which is making it hard to give feedback. Please backfill that so a proper review can be done. (Marked Request Changes so it's clear it's incomplete in this state)
Also helpful would be
- explicit testing instructions (of the AGENTS.md file. what you currently wrote are instructions for testing whether github or your harness reads it).
- your explicit results from testing them: token usage and outcome comparison
- Your environment info (harness + model, skills/cache config if you're unable to disable them for the testing)
- Anything else that could help substantiate
The file is agent-agnostic and works with any AI coding tool (Copilot, Cursor, Claude Code, Windsurf, etc.)
Left a few broad notes below, but based on your PR description as currently without the above and the changes it really seems like you're trying to use AGENTS.md to solve something best handled by fixing our docs directly.
| @@ -0,0 +1,28 @@ | |||
| # AI Agent Instructions | |||
|
|
|||
| WordPress AI Experiments plugin — canonical WordPress plugin for testing AI capabilities. | |||
There was a problem hiding this comment.
Why do you think this is important to inject into every window? IMO this is wasteful
|
|
||
| ## References | ||
|
|
||
| Read these before making changes: |
There was a problem hiding this comment.
This seems heavy handed for both users and agents. Instead we should rely on progressive disclosure. if it knows the what/where, inference will tell it when to read the what.
I'd
- get rid of the instruction
- Drop the number of entrypoints in our docs to two (contributing + development), and ensure the primary one has a detailed directory tree that includes the other docs and what they include.
| ## Workflow | ||
|
|
||
| - PHP-related npm scripts wrap `wp-env`; some JavaScript/tooling scripts call `wp-scripts`/`tsc` directly. Prefer `npm run` over direct `composer`, `vendor/bin`, or `wp-env` calls. | ||
| - Run `npm run lint:php`, `npm run lint:php:stan`, `npm run lint:js`, and `npm run typecheck` before submitting PRs. | ||
| - Use `npm run lint:php:fix` and `npm run lint:js:fix` to auto-fix. |
There was a problem hiding this comment.
I would streamline this for readability + tokenization.
Not by my desk to eval, but anecdotally, something along the lines of:
##
Prefer NPM scripts defined in `package.json` over direct tooling calls. This ensures they run in the `wp-env` environment.
### Common Scripts
```bash
# Use the wp-env environment
npm run wp-env start # Start the environment
npm run wp-env start -- --xdebug=coverage # Start the environment with coverage running
npm run wp-env clean all # Reset the wp-env databases
npm run wp-env {cli|tests-cli} run -- --env-cwd=wp-content/plugins/ai {your command} Run a command directly inside the specified wp-env container.
# Code Quality Checking
npm run lint:php # PHPCS
npm run lint:php:fix # PHPCBF
npm run lint:php:stan # PHPStan
npm run lint:js # Run eslint
npm run lint:js:fix # Fix autofixable eslint errors
npm run typecheck # Run tsc
## Testing
npm run test:php # PHPUnit tests
npm run test:e2e # Playwright E2E tests
## Building
npm run build
\```
For more usage information see ./docs/{DOC.md}
(Replace the above with the actual scripts)
There was a problem hiding this comment.
Sorry, for some reason the PR comments only loaded for me after I submitted my review. This suggestion is basically this
| ## Helping Contributors Get Started | ||
|
|
||
| When a contributor asks for help getting started: | ||
|
|
||
| 1. Read the relevant doc from the references list based on their topic. If no topic is given, read `CONTRIBUTING.md` and walk them through setup, dev environment, and first experiment creation. | ||
| 2. Give a concise, actionable answer with exact commands. | ||
| 3. When asked to set up the project, run: `composer install`, `npm i`, `npm run build`, and `npm run test:e2e:env:start`. Run independent steps in parallel where possible. |
There was a problem hiding this comment.
I would remove this entire section. The only thing here that isn't directly inferable already (after updating per the above) is the tone command.
If you really feel 3 deserves specific mention then we definitely don't want to tell it every single time to analyze and infer what should be independent. Also, the composer install violates your above Prefer... So id recommend adding something like this to the above bash:
Initial Repo Setup
# Initial Local setup:
nvm use && npm install && npm run build
npm run test:e2e:env:start -- --update
npm run wp-env run cli -- --env-cdw=wp-content/plugins/ai composer install|
Thanks @justlevine — this feedback makes sense to me. The main goal of this PR was not to argue for this exact So I’m aligned with the core points in review:
I don’t have strong attachment to this file as such. If |
Summary
AGENTS.md— a concise reference file that routes contributors (and AI coding tools) to the right docs for setup, architecture, testing, and workflow rulesAGENTS.mdfrom.gitignoreso it is tracked in the repoCloses #307
Context
New contributors currently need to discover and read multiple docs before they can start working.
AGENTS.mdacts as a quick-start routing table — it doesn't duplicate existing docs, it links to them and codifies workflow rules (e.g., usenpm runscripts instead of directcomposercalls).The file is agent-agnostic and works with any AI coding tool (Copilot, Cursor, Claude Code, Windsurf, etc.) as well as being a useful human-readable reference.
Test plan
AGENTS.mdis no longer gitignoredAGENTS.mdresolve correctly🤖 Generated with Claude Code