Repository navigation
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.68 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Navigates the list via UP/DOWN arrow keys from action buttons in
|
bdbf4ed to
38bd7c4
Compare
|
Related (closes?): #85972 Excited to see this 🙏
I'm not sure how much this will catch on in other package managers, but I wonder if we should generally lead with the use-case of other, more conventional package managers like npm, putting the As a first use-case: Could we integrate this in Gutenberg itself? And possibly remove or trim some of the other existing skills in the process? That could happen as a separate follow-on as well. |
True, I think that's valid point.
Yeah; let's do it in a follow-up. It'll need more thought on what to leave to "contributing" docs and what was generic enough to package to NPM package skills. One guide where I found a lot of overlap was copy writing guidance #86741 Later in follow-ups we should also consider if we can package skills about data layer which have a lot of common pitfalls, and some UX quirks guidance for DataViews/DataForms, etc. |
cd49819 to
9544577
Compare
|
This would be good for a review; it includes a few skills (setting up, migrating, working) with Theme and UI. Later this could expand to Admin UI, DataViews/DataForms, WP Build, Data and more. I'm also looking into UI copy skill separately. I can pull this back to just simpler skill to mostly scaffold the structure and PR skills separately if we need more time finetuning them; I've built them based on lots of the reviewing I've done in products from actual component usage & migrations. My initial approach was to add some scripts for simple tasks like analysing the repo before setup , but I pulled them back for now to keep starting point simpler. I'm also testing the setup in practise in PRs in woocommerce/woocommerce#70299 and Automattic/jetpack#55018 |
9544577 to
967e8eb
Compare
Add `wp-theme`, `wp-theme-setup`, `wp-ui`, `wp-ui-migration` and `wp-ui-setup` skills under each package's `skills/<name>/SKILL.md` and publish them via `files`, so package managers that link skills from dependencies (such as pnpm 12.11+) can copy them into consumer projects. The token reference is bundled with `wp-theme` and generated by the token build. Split the Storybook "Using with AI" docs into MCP and Skills pages, with install instructions for pnpm, npm and Yarn. Document maintaining the published skills in the design-system-contribution skill.
…skills Add a `tokens.mjs` script to the `wp-theme` skill that searches and checks design tokens against the installed `@wordpress/theme`, and suggests the closest tokens for an unknown name. Add a read-only `inspect-project.mjs` script to the `wp-theme-setup` and `wp-ui-setup` skills that reports the package manager, linter and build configuration, installed WordPress packages, and which setup steps already look done. Add a step to the `wp-ui-migration` skill that builds the migration inventory from ESLint's JSON output of `use-recommended-components`, with links to each component's migration guide. Document in the contribution skill how to maintain the scripts.
Remove the `tokens.mjs` and `inspect-project.mjs` scripts from the agent skills. The `wp-theme` skill now searches the bundled token reference with grep and checks tokens with the project's Stylelint and ESLint rules, and the setup skills describe how to inspect a project in plain instructions. Run linters through the project's installed binaries instead of a bare `npx`, which downloads packages that are not installed.
7e320d9 to
fb08fd2
Compare
What?
Ship agent skills with
@wordpress/themeand@wordpress/ui, so tools that link skills from dependencies (such as pnpm 12.11+) give consumer projects' agents guidance on using the design system.@wordpress/themewp-theme@wordpress/themewp-theme-setup@wordpress/uiwp-ui@wordpress/uiwp-ui-migration@wordpress/componentsto@wordpress/ui, including gradual migration with lint suppressions.@wordpress/uiwp-ui-setupThe Storybook "Using with AI" docs are split into MCP and Skills pages, with install instructions for pnpm, npm and Yarn.
Why?
While we provide the design system MCP server to provide info and context for building with the design system, we rely on each individual developer working on a repo setting it up.
Agent files meanwhile can be automated within the entire repo, so anyone working on that repo then ends up using them.
Tooling doing PR reviews (such as CodeRabbit) also cannot very easily use MCP server in the reviews; while they support it, consumer (or we) would need to ship a hosted version of it and ensure that every versioned package is supported. Files meanwhile can be committed to the repo where review tool can see them, and they can be version controlled with NPM and Git.
How?
Adds agent skills to
@wordpress/themeand@wordpress/ui, so package managers that link skills from dependencies (for example pnpm 12.11+) can copy them into consumer projects.packages/<package>/skills/<name>/SKILL.mdand are published throughfiles:wp-themeandwp-theme-setupin@wordpress/theme,wp-ui,wp-ui-migrationandwp-ui-setupin@wordpress/ui.wp-themeskill bundlesreferences/tokens.md. The token build generates it as a second output of the existing token docs plugin, so it stays in sync withdocs/tokens.md.design-system-contributionskill documents how to maintain the published skills.pnpm links skills natively after
pnpm approve. npm and Yarn don't link skills from dependencies yet, so the docs use the communityskillsCLI.Testing Instructions
npm run storybook:devto test Design System / Using with AI page. See screenshot below.npm pack --dry-run -w @wordpress/theme -w @wordpress/ui 2>&1 | grep skills/should list the files atskills/to see how skills are included in the tarballs.pnpm approve, and check the skills appear in.claude/skills. Example PRs in Woocommerce and Jetpack.Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools
yes