Skip to content

Commit 7b277e9

Browse files
authored
Merge branch 'trunk' into add/theme-json-slug-normaliser-gotcha
2 parents b4cc9be + 977b407 commit 7b277e9

15 files changed

Lines changed: 417 additions & 170 deletions

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ See any existing skill for examples.
110110
4. Run validation: `node eval/harness/run.mjs`
111111
5. Commit with a clear message
112112
6. Open a pull request
113+
7. Request a review from @WordPress/agent-skills-maintainers
113114

114115
For significant changes, consider opening an issue first to discuss the approach.
115116

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Agent Skills solve this by giving AI assistants **expert-level WordPress knowled
3333
| **wp-wpcli-and-ops** | WP-CLI commands, automation, multisite, search-replace |
3434
| **wp-performance** | Profiling, caching, database optimization, Server-Timing |
3535
| **wp-phpstan** | PHPStan static analysis for WordPress projects (config, baselines, WP-specific typing) |
36-
| **wp-playground** | WordPress Playground for instant local environments |
36+
| **wp-playground** | WordPress Playground routing, CLI runs, browser previews, and snapshots |
3737
| **wpds** | WordPress Design System |
3838
| **wp-plugin-directory-guidelines** | WordPress Plugin Directory Guidelines |
39-
| **blueprint** | WordPress Playground Blueprints for declarative Playground environment setup |
39+
| **blueprint** | WordPress Playground Blueprints for declarative environment setup |
4040

4141
## How It Works
4242

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "Blueprint uses current schema keys",
3+
"skills": ["blueprint"],
4+
"query": "Create a WordPress Playground Blueprint that installs and activates the Classic Editor plugin, sets the site title, logs me in, and lands on wp-admin.",
5+
"expected_behavior": [
6+
"Step 1: Use the blueprint skill directly because the task is Blueprint JSON authoring",
7+
"Step 2: Include the schema URL https://playground.wordpress.net/blueprint-schema.json",
8+
"Step 3: Use current installPlugin syntax with pluginData, not pluginZipFile or pluginZipUrl",
9+
"Step 4: Use setSiteOptions or siteOptions for the site title",
10+
"Step 5: Include login behavior and landingPage /wp-admin/",
11+
"Step 6: Avoid inventing unsupported top-level keys"
12+
],
13+
"success_criteria": [
14+
"Routes to blueprint without requiring wp-playground first",
15+
"Uses pluginData with a wordpress.org/plugins resource",
16+
"Does not use deprecated pluginZipFile, pluginZipUrl, themeZipFile, or themeZipUrl fields",
17+
"Produces valid JSON-shaped Blueprint content"
18+
]
19+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "Playground CLI auto-mount workflow",
3+
"skills": ["wordpress-router", "wp-playground"],
4+
"query": "Spin up this plugin in WordPress Playground locally with the CLI and auto-mount it so I can test it in wp-admin.",
5+
"expected_behavior": [
6+
"Step 1: Route ambiguous local Playground CLI work to wp-playground",
7+
"Step 2: Read wp-playground/references/cli.md for CLI-specific commands",
8+
"Step 3: Check Node.js 20.18+ before running @wp-playground/cli",
9+
"Step 4: Prefer npx @wp-playground/cli@latest start from the plugin root for the simple local workflow",
10+
"Step 5: Use --port=<free-port> if the default port is busy",
11+
"Step 6: Verify the plugin is installed and active in the Playground instance"
12+
],
13+
"success_criteria": [
14+
"Does not route to a separate playground-cli top-level skill",
15+
"Uses wp-playground as the wrapper and its CLI reference for details",
16+
"Prefers the start command for simple local plugin/theme testing",
17+
"Includes Node version guardrail",
18+
"Includes post-run verification"
19+
]
20+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Playground wrapper delegates by intent",
3+
"skills": ["wordpress-router", "wp-playground", "blueprint"],
4+
"query": "I need a WordPress Playground setup. First write the Blueprint, then tell me how to run it locally and share it as a browser link.",
5+
"expected_behavior": [
6+
"Step 1: Use wp-playground as the wrapper for the multi-part Playground request",
7+
"Step 2: Delegate Blueprint JSON authoring to the blueprint skill",
8+
"Step 3: Use wp-playground/references/cli.md for the local run command",
9+
"Step 4: Use wp-playground/references/website.md for the browser share link guidance",
10+
"Step 5: Avoid duplicating Blueprint schema reference details in wp-playground"
11+
],
12+
"success_criteria": [
13+
"Keeps blueprint as the canonical schema source",
14+
"Keeps CLI and website workflows under wp-playground references",
15+
"Does not introduce or require new top-level playground-cli or playground-website skills",
16+
"Provides distinct verification for Blueprint, local run, and share link"
17+
]
18+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Playground website share URL workflow",
3+
"skills": ["wordpress-router", "wp-playground", "blueprint"],
4+
"query": "Turn this Blueprint into a playground.wordpress.net link I can share with a reviewer.",
5+
"expected_behavior": [
6+
"Step 1: Route to wp-playground for the website/share-link workflow",
7+
"Step 2: Use the blueprint skill if the Blueprint JSON itself needs validation or editing",
8+
"Step 3: Read wp-playground/references/website.md for browser-only constraints",
9+
"Step 4: Use an encodeURIComponent-encoded inline URL fragment only for small Blueprints",
10+
"Step 5: Recommend hosting JSON or a ZIP bundle and using blueprint-url for larger setups",
11+
"Step 6: Require hosted Blueprint URLs and bundles to be public and served with Access-Control-Allow-Origin: *",
12+
"Step 7: Verify the generated link in a fresh browser session"
13+
],
14+
"success_criteria": [
15+
"Does not ask the Playground website to read local filesystem paths",
16+
"Encodes inline Blueprint JSON with encodeURIComponent or uses Base64 when appropriate",
17+
"Uses blueprint-url for hosted large Blueprints or bundles",
18+
"Mentions CORS requirements for hosted Blueprint URLs",
19+
"Includes browser verification",
20+
"Does not require a new top-level playground-website skill"
21+
]
22+
}

‎skills/blueprint/SKILL.md‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: blueprint
3-
description: Use when creating, editing, or reviewing WordPress Playground blueprint JSON files. Triggers on mentions of blueprints, playground configuration, or requests to set up a WordPress demo environment.
3+
description: Use when the deliverable is WordPress Playground Blueprint JSON or a Blueprint bundle, including creating, editing, reviewing, validating schema keys, choosing steps/resources, and debugging Blueprint files. For only running or sharing a Playground environment, use wp-playground.
44
compatibility: "WordPress 7.0+, PHP 7.4.0+. Optionally Playground CLI or a browser"
55
---
66

@@ -31,9 +31,11 @@ All optional. Only documented keys are allowed — the schema rejects unknown pr
3131
|----------|------|-------|
3232
| `$schema` | string | Always `"https://playground.wordpress.net/blueprint-schema.json"` |
3333
| `landingPage` | string | Relative path, e.g. `/wp-admin/` |
34+
| `description` | string | Deprecated optional top-level description. Prefer `meta.description` for new Blueprints |
3435
| `meta` | object | `{ title, author, description?, categories? }` — title and author required |
3536
| `preferredVersions` | object | `{ php, wp }` — both required when present |
3637
| `features` | object | `{ networking?: boolean, intl?: boolean }`**only** these two keys, nothing else. Networking defaults to `true` |
38+
| `phpExtensionBundles` | any | Deprecated/no longer used; the schema leaves the value unconstrained and says to remove it from Blueprints |
3739
| `extraLibraries` | array | `["wp-cli"]` — auto-included when any `wp-cli` step is present |
3840
| `constants` | object | Shorthand for `defineWpConfigConsts`. Values: string/boolean/number |
3941
| `plugins` | array | Shorthand for `installPlugin` steps. Strings = wp.org slugs |
@@ -43,8 +45,8 @@ All optional. Only documented keys are allowed — the schema rejects unknown pr
4345

4446
### preferredVersions Values
4547

46-
- **php:** Major.minor only (e.g. `"8.3"`, `"7.4"`), or `"latest"`. Patch versions like `"7.4.1"` are invalid. Check the schema for currently supported versions.
47-
- **wp:** Recent major versions (e.g. `"6.7"`, `"6.8"`), `"latest"`, `"nightly"`, `"beta"`, or a URL to a custom zip. Check the schema for the full list.
48+
- **php:** Major.minor only: `"7.4"`, `"8.0"`, `"8.1"`, `"8.2"`, `"8.3"`, `"8.4"`, `"8.5"`, or `"latest"`. Patch versions like `"7.4.1"` are invalid. Check the schema for currently supported versions.
49+
- **wp:** Recent major versions, `"latest"`, `"beta"`, `"nightly"`/`"trunk"`, or a URL to a custom zip. The schema also accepts `false` for PHP-only Playground; do not combine `wp: false` with WordPress-only fields such as `plugins`, `siteOptions`, `login`, or WordPress-only steps.
4850

4951
### Shorthands vs Steps
5052

@@ -388,13 +390,13 @@ dashboard-widget-bundle/
388390

389391
### Inline Blueprints (quick test, no bundles)
390392

391-
Minify the blueprint JSON (no extra whitespace), prepend `https://playground.wordpress.net/#`, and open the URL in a browser:
393+
Minify the blueprint JSON (no extra whitespace), encode it once with `encodeURIComponent()`, prepend `https://playground.wordpress.net/#`, and open the URL in a browser:
392394

393395
```
394-
https://playground.wordpress.net/#{"$schema":"https://playground.wordpress.net/blueprint-schema.json","preferredVersions":{"php":"8.3","wp":"latest"},"steps":[{"step":"login"}]}
396+
https://playground.wordpress.net/#%7B%22%24schema%22%3A%22https%3A%2F%2Fplayground.wordpress.net%2Fblueprint-schema.json%22%2C%22preferredVersions%22%3A%7B%22php%22%3A%228.3%22%2C%22wp%22%3A%22latest%22%7D%2C%22steps%22%3A%5B%7B%22step%22%3A%22login%22%7D%5D%7D
395397
```
396398

397-
Very large blueprints may exceed browser URL length limits; use the CLI instead.
399+
Very large blueprints may exceed browser URL length limits; use the CLI or a hosted Blueprint URL instead. For share-link details, use `wp-playground/references/website.md`.
398400

399401
### Local CLI Testing
400402

@@ -412,6 +414,6 @@ npx @wp-playground/cli server --blueprint=./bundle.zip
412414
npx @wp-playground/cli run-blueprint --blueprint=./my-bundle/ --blueprint-may-read-adjacent-files
413415
```
414416

415-
### Testing with the wordpress-playground-server Skill
417+
### Testing with WordPress Playground
416418

417-
Use the `wordpress-playground-server` skill to start a local Playground instance with `--blueprint /path/to/blueprint.json`, then verify the expected state with Playwright MCP. For directory bundles, pass `--blueprint-may-read-adjacent-files` as an extra argument.
419+
Use the `wp-playground` skill for local or browser testing. For CLI testing, follow `wp-playground/references/cli.md` with `--blueprint=<path-or-url>`; for directory bundles, pass `--blueprint-may-read-adjacent-files`.

‎skills/wordpress-router/references/decision-tree.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ Route by intent even if repo kind is broad (like `wp-site`):
2525
- Route → `wp-interactivity-api`.
2626
- **Abilities API / wp_register_ability / wp-abilities/v1 / @wordpress/abilities**
2727
- Route → `wp-abilities-api`.
28-
- **Playground / run-blueprint / build-snapshot / @wp-playground/cli / playground.wordpress.net**
29-
- Route → `wp-playground`.
28+
- **Ambiguous WordPress Playground requests**
29+
- Route → `wp-playground`, then follow its routing wrapper.
30+
- **Blueprint JSON / Blueprint schema / Blueprint steps / Blueprint bundles**
31+
- Route → `blueprint`.
32+
- **@wp-playground/cli / server / run-blueprint / build-snapshot / auto-mount / Xdebug**
33+
- Route → `wp-playground`, then read `references/cli.md` or `references/debugging.md`.
34+
- **playground.wordpress.net / Blueprint Editor / share links / browser-only Playground**
35+
- Route → `wp-playground`, then read `references/website.md`.
3036
- **Blocks / block.json / registerBlockType / attributes / save serialization**
3137
- Route → `wp-block-development`.
3238
- **theme.json / Global Styles / templates/*.html / patterns/**

‎skills/wp-patterns/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: wp-patterns
33
description: "Generate technically correct, design-distinctive WordPress block patterns. Use when creating block patterns, starter page patterns, template patterns, template part patterns, or improving pattern design quality. Covers pattern registration (PHP headers, auto/manual), block markup syntax, theme.json design tokens, categories, template types, accessibility, and i18n/escaping."
4-
compatibility: "WordPress 6.9 with PHP 7.2.24 or later. Requires 6.0+ for auto-registration, 6.7+ for full preset support. Patterns use block markup (HTML comments with JSON), PHP file headers, and theme.json presets."
4+
compatibility: "Targets WordPress 7.0+ (PHP 7.4.0+). Patterns use block markup (HTML comments with JSON), PHP file headers, and theme.json presets."
55
---
66

77
# WordPress Block Patterns

0 commit comments

Comments
 (0)