UI: Add initial agents guidance mapping to contributing guidelines - #81400
UI: Add initial agents guidance mapping to contributing guidelines#81400aduth wants to merge 2 commits into
Conversation
|
I'll also caveat that some of this could and probably should be linted with ESLint rules as a better quality gate. For example, we could probably lint to encourage the use of design tokens for specific properties like |
|
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. |
|
Should we coordinate the changes from this PR with the existing #80597? Apart from that, a couple of higher-level comments:
|
It's a good question. Yes, we should. I had also considered that this might supersede some of the previous I think we could want both skills and What you've implemented in #80597 could likely be pretty successful at solving the underlying pain point, possibly even to the extent that we wouldn't need In any case, I think regardless how we choose to proceed, one of the driving factors here was taking the real-world feedback we've seen and translating it into what an agent will most obviously and concisely absorb into its context when working in these packages. I'd like to make sure that the examples included here are captured. |
|
Yes, it feels like we should agree on the approach and pick the best of each currently opened PR (this PR, #80597, #78166, #77264)
In my experience, using AGENTS.md and skills as a way to point to existing documentation works quite well — of course, that documentation needs to be clear, understandable, and not overly large as a file (breaking it down into multiple files may help). One thing that we should also work on is a way to eval these changes systematically (@jeryj worked on a potential approach in #80812), otherwise it's quite hard to understand their impact |
|
Maybe as a starting point, we can just add One of my biggest concerns right now is that we've written substantial documentation in |
What?
Adds an initial
packages/ui/AGENTS.mdagents context document as a compacted snapshot of existing contributing guidelines, adding a new "Design Principles" section to the contributing guidelines in the process.Why?
Ultimately, the goal here is to try to reduce the amount of back-and-forth review that can happen for contributions to the design system based on basic tenets of building components, and reducing the up-front effort of the contributor in the process.
This also keeps us accountable to the principles around review feedback being documented somewhere, and not trapped within any one individual or group's personal knowledge.
We already have contributing guidelines, but these aren't readily accessible to an AI agent. And even if they were, they're quite verbose and written for human readers to rationalize decisions.
How?
First, I'll caveat to say this isn't meant to be exhaustive. It's a starting point.
But what was devised here was based on real-world observations on things that either come up in review or are flagged as intentional differences from how alternative equivalent components had been written (e.g. see #81358 "Differences from
@wordpress/components").@wordpress/uicomponents [...] remove the need for custom markup/styles"@wordpress/themestyle tokens."@wordpress/components[...] WPDS tokens"contentandinteractiveelements [...]neutralandbrandtones for different states of the same UI"@wordpress/components[...]prefers-reduced-motion"Testing Instructions
Review documents for accuracy.
Use of AI Tools
Research and implementation with Cursor IDE + Auto model, given related context for preexisting examples from pull requests and existing guidance. AI-produced content was reviewed for accuracy and manually edited accordingly.