Skip to content

Commit df9bade

Browse files
authored
Merge pull request #89 from Automattic/cursor-native-polish
Document Cursor native plugin testing
2 parents d810ef5 + 3058a70 commit df9bade

4 files changed

Lines changed: 154 additions & 8 deletions

File tree

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ For manual smoke tests, open or copy the relevant folder from `plugins/` into th
121121

122122
## Cursor Publishing
123123

124-
Cursor requires a standalone plugin repository. This repo remains the source of truth; the publishable Cursor repository lives at:
124+
Cursor requires a standalone native plugin repository. The generated Cursor package is not a VS Code extension, is not installed from a `.vsix`, and should not use VS Code Marketplace packaging or publishing tooling. This repo remains the source of truth; the publishable Cursor repository lives at:
125125

126126
https://github.com/Automattic/wordpress-cursor-plugin
127127

@@ -135,6 +135,16 @@ pnpm export:cursor -- --dry-run
135135

136136
The dry run prints the exact subtree split and push commands without creating a split branch, pushing to the standalone repository, or mutating the standalone checkout.
137137

138+
For local Cursor testing, install the generated package at Cursor's native local plugin path:
139+
140+
```bash
141+
mkdir -p ~/.cursor/plugins/local
142+
rm -rf ~/.cursor/plugins/local/wordpress-studio
143+
cp -R plugins/cursor ~/.cursor/plugins/local/wordpress-studio
144+
```
145+
146+
Reload Cursor and confirm the local plugin contains `.cursor-plugin/plugin.json`, `README.md`, `mcp.json`, `rules/wordpress-studio.mdc`, and the full `skills/` tree. In Cursor's MCP or tools settings, confirm `wordpress-studio` and `wordpress-telemetry` are visible and enabled. In Cursor's rules and skills surfaces, confirm `rules/wordpress-studio.mdc` and the bundled WordPress skills are visible before submitting marketplace changes.
147+
138148
When maintainers are ready to update the standalone repository, run the non-dry-run export from a clean source worktree:
139149

140150
```bash
@@ -143,4 +153,4 @@ pnpm export:cursor
143153

144154
The export command runs `git subtree split --prefix=plugins/cursor` and pushes the result to `Automattic/wordpress-cursor-plugin` on `sync/from-build-with-wordpress`. Open or update a PR from that branch into the standalone repo's `main` branch.
145155

146-
Before submitting or updating the Cursor listing, confirm the standalone branch includes the expected generated files, review `.cursor-plugin/plugin.json` listing metadata, verify the README and MCP setup match the generated source, and submit to Cursor only after the standalone repository PR is accepted.
156+
Before submitting or updating the Cursor listing, confirm the standalone branch includes the expected generated files, review `.cursor-plugin/plugin.json` listing metadata including rules, skills, and MCP server paths, verify the README and MCP setup match the generated source, repeat the local native-plugin test flow from `~/.cursor/plugins/local/wordpress-studio`, and submit to Cursor only after the standalone repository PR is accepted.

plugins/cursor/README.md

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This Cursor plugin packages shared WordPress skills from the `build-with-wordpress` source repo as WordPress Studio.
44

5-
It is a Cursor plugin built from the same shared skills as the Codex and Claude Code plugins.
5+
It is a Cursor-native plugin built from the same shared skills as the Codex and Claude Code plugins. It is not a VS Code extension, it is not installed from a `.vsix`, and it should not be packaged with VS Code Marketplace tooling.
66

77
- The generated `plugins/cursor/` folder uses Cursor's single-plugin layout
88
- Cursor discovers plugin skills from `skills/`
@@ -11,6 +11,55 @@ It is a Cursor plugin built from the same shared skills as the Codex and Claude
1111
- WordPress request routing stays shared across surfaces
1212
- Studio-backed site, theme, block, plugin, and audit workflows stay shared
1313

14+
## Local Cursor install and test flow
15+
16+
Build the generated package first:
17+
18+
```bash
19+
pnpm build
20+
```
21+
22+
Install it into Cursor's local native plugin directory:
23+
24+
```bash
25+
mkdir -p ~/.cursor/plugins/local
26+
rm -rf ~/.cursor/plugins/local/wordpress-studio
27+
cp -R plugins/cursor ~/.cursor/plugins/local/wordpress-studio
28+
```
29+
30+
For faster iteration from a source checkout, use a symlink instead of copying:
31+
32+
```bash
33+
mkdir -p ~/.cursor/plugins/local
34+
rm -rf ~/.cursor/plugins/local/wordpress-studio
35+
ln -s "$PWD/plugins/cursor" ~/.cursor/plugins/local/wordpress-studio
36+
```
37+
38+
Reload Cursor after installing or updating the local plugin. The local plugin root should contain these files:
39+
40+
- `.cursor-plugin/plugin.json`
41+
- `README.md`
42+
- `mcp.json`
43+
- `rules/wordpress-studio.mdc`
44+
- `skills/<skill>/SKILL.md` for each bundled skill
45+
46+
## MCP visibility checks
47+
48+
In Cursor's MCP or tools settings, confirm both plugin-provided servers are visible and enabled:
49+
50+
- `wordpress-studio`, which launches `studio mcp`
51+
- `wordpress-telemetry`, which launches the bundled telemetry bootstrap from `mcp.json`
52+
53+
If the servers are missing, inspect `~/.cursor/plugins/local/wordpress-studio/mcp.json`, confirm `studio --version` works in a normal shell, then reload Cursor.
54+
55+
## Rules and skills visibility checks
56+
57+
Confirm Cursor loads the plugin guidance before doing Marketplace or standalone-repo work:
58+
59+
- The always-on rule from `rules/wordpress-studio.mdc` is available in Cursor's rules view or applies to WordPress requests.
60+
- The bundled skills are visible from the local plugin, including `wordpress-creator`, `site-creator`, `theme-creator`, `block-creator`, `plugin-creator`, `design-previews-creator`, `auditing`, and `studio`.
61+
- A WordPress site, theme, block, plugin, or audit request routes through the shared WordPress creator guidance and prefers Studio MCP tools before shell fallbacks.
62+
1463
## Standalone export and listing
1564

1665
Build with WordPress is the source of truth for this generated package. The standalone Cursor plugin repository is https://github.com/Automattic/wordpress-cursor-plugin and should be updated through the repository export script, not by manually editing exported files.
@@ -23,9 +72,17 @@ pnpm verify
2372
pnpm export:cursor -- --dry-run
2473
```
2574

26-
When maintainers are ready to update the standalone repository, run `pnpm export:cursor` from a clean source worktree. The exporter creates a subtree split of `plugins/cursor/` and pushes it to `sync/from-build-with-wordpress` in the standalone repository.
75+
When maintainers are ready to update the standalone repository, run `pnpm export:cursor` from a clean source worktree. The exporter creates a subtree split of `plugins/cursor/` and pushes it to `sync/from-build-with-wordpress` in the standalone repository. Do not manually edit generated Cursor output in the standalone repository; fix the generator or shared skills here, rebuild, verify, and export.
76+
77+
## Marketplace checklist
78+
79+
Before submitting or updating the Cursor listing:
2780

28-
Before submitting or updating the Cursor listing, confirm the exported standalone branch contains the expected `.cursor-plugin/plugin.json`, `README.md`, `mcp.json`, `rules/wordpress-studio.mdc`, and full `skills/` tree; review the listing-facing manifest fields for name, display name, version, description, author, homepage, repository, license, and keywords; then open or update the standalone repository pull request for review. Submit to Cursor only after the standalone repository PR is accepted.
81+
- Confirm the exported standalone branch contains the expected `.cursor-plugin/plugin.json`, `README.md`, `mcp.json`, `rules/wordpress-studio.mdc`, and full `skills/` tree.
82+
- Review the listing-facing manifest fields for name, display name, version, description, author, homepage, repository, license, keywords, rules, skills, and MCP server paths.
83+
- Install the standalone branch locally at `~/.cursor/plugins/local/wordpress-studio` and repeat the MCP, rules, and skills visibility checks above.
84+
- Open or update the standalone repository pull request from `sync/from-build-with-wordpress` into `main` and wait for review.
85+
- Submit to Cursor Marketplace only after the standalone repository PR is accepted and the local native-plugin test flow passes.
2986

3087
It ships the shared skills from this repo so all supported surfaces stay aligned while we iterate on surface-specific packaging details.
3188

scripts/build-plugins.mjs

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,7 @@ const pluginTargets = [
23482348
manifestDir: ".cursor-plugin",
23492349
manifestFileName: "plugin.json",
23502350
manifestContents: cursorPluginManifest,
2351-
readmeIntro: `It is a Cursor plugin built from the same shared skills as the Codex and Claude Code plugins.
2351+
readmeIntro: `It is a Cursor-native plugin built from the same shared skills as the Codex and Claude Code plugins. It is not a VS Code extension, it is not installed from a \`.vsix\`, and it should not be packaged with VS Code Marketplace tooling.
23522352
23532353
- The generated \`plugins/cursor/\` folder uses Cursor's single-plugin layout
23542354
- Cursor discovers plugin skills from \`skills/\`
@@ -2357,6 +2357,55 @@ const pluginTargets = [
23572357
- WordPress request routing stays shared across surfaces
23582358
- Studio-backed site, theme, block, plugin, and audit workflows stay shared
23592359
2360+
## Local Cursor install and test flow
2361+
2362+
Build the generated package first:
2363+
2364+
\`\`\`bash
2365+
pnpm build
2366+
\`\`\`
2367+
2368+
Install it into Cursor's local native plugin directory:
2369+
2370+
\`\`\`bash
2371+
mkdir -p ~/.cursor/plugins/local
2372+
rm -rf ~/.cursor/plugins/local/wordpress-studio
2373+
cp -R plugins/cursor ~/.cursor/plugins/local/wordpress-studio
2374+
\`\`\`
2375+
2376+
For faster iteration from a source checkout, use a symlink instead of copying:
2377+
2378+
\`\`\`bash
2379+
mkdir -p ~/.cursor/plugins/local
2380+
rm -rf ~/.cursor/plugins/local/wordpress-studio
2381+
ln -s "$PWD/plugins/cursor" ~/.cursor/plugins/local/wordpress-studio
2382+
\`\`\`
2383+
2384+
Reload Cursor after installing or updating the local plugin. The local plugin root should contain these files:
2385+
2386+
- \`.cursor-plugin/plugin.json\`
2387+
- \`README.md\`
2388+
- \`mcp.json\`
2389+
- \`rules/wordpress-studio.mdc\`
2390+
- \`skills/<skill>/SKILL.md\` for each bundled skill
2391+
2392+
## MCP visibility checks
2393+
2394+
In Cursor's MCP or tools settings, confirm both plugin-provided servers are visible and enabled:
2395+
2396+
- \`wordpress-studio\`, which launches \`studio mcp\`
2397+
- \`wordpress-telemetry\`, which launches the bundled telemetry bootstrap from \`mcp.json\`
2398+
2399+
If the servers are missing, inspect \`~/.cursor/plugins/local/wordpress-studio/mcp.json\`, confirm \`studio --version\` works in a normal shell, then reload Cursor.
2400+
2401+
## Rules and skills visibility checks
2402+
2403+
Confirm Cursor loads the plugin guidance before doing Marketplace or standalone-repo work:
2404+
2405+
- The always-on rule from \`rules/wordpress-studio.mdc\` is available in Cursor's rules view or applies to WordPress requests.
2406+
- The bundled skills are visible from the local plugin, including \`wordpress-creator\`, \`site-creator\`, \`theme-creator\`, \`block-creator\`, \`plugin-creator\`, \`design-previews-creator\`, \`auditing\`, and \`studio\`.
2407+
- A WordPress site, theme, block, plugin, or audit request routes through the shared WordPress creator guidance and prefers Studio MCP tools before shell fallbacks.
2408+
23602409
## Standalone export and listing
23612410
23622411
Build with WordPress is the source of truth for this generated package. The standalone Cursor plugin repository is https://github.com/Automattic/wordpress-cursor-plugin and should be updated through the repository export script, not by manually editing exported files.
@@ -2369,9 +2418,17 @@ pnpm verify
23692418
pnpm export:cursor -- --dry-run
23702419
\`\`\`
23712420
2372-
When maintainers are ready to update the standalone repository, run \`pnpm export:cursor\` from a clean source worktree. The exporter creates a subtree split of \`plugins/cursor/\` and pushes it to \`sync/from-build-with-wordpress\` in the standalone repository.
2421+
When maintainers are ready to update the standalone repository, run \`pnpm export:cursor\` from a clean source worktree. The exporter creates a subtree split of \`plugins/cursor/\` and pushes it to \`sync/from-build-with-wordpress\` in the standalone repository. Do not manually edit generated Cursor output in the standalone repository; fix the generator or shared skills here, rebuild, verify, and export.
2422+
2423+
## Marketplace checklist
2424+
2425+
Before submitting or updating the Cursor listing:
23732426
2374-
Before submitting or updating the Cursor listing, confirm the exported standalone branch contains the expected \`.cursor-plugin/plugin.json\`, \`README.md\`, \`mcp.json\`, \`rules/wordpress-studio.mdc\`, and full \`skills/\` tree; review the listing-facing manifest fields for name, display name, version, description, author, homepage, repository, license, and keywords; then open or update the standalone repository pull request for review. Submit to Cursor only after the standalone repository PR is accepted.`,
2427+
- Confirm the exported standalone branch contains the expected \`.cursor-plugin/plugin.json\`, \`README.md\`, \`mcp.json\`, \`rules/wordpress-studio.mdc\`, and full \`skills/\` tree.
2428+
- Review the listing-facing manifest fields for name, display name, version, description, author, homepage, repository, license, keywords, rules, skills, and MCP server paths.
2429+
- Install the standalone branch locally at \`~/.cursor/plugins/local/wordpress-studio\` and repeat the MCP, rules, and skills visibility checks above.
2430+
- Open or update the standalone repository pull request from \`sync/from-build-with-wordpress\` into \`main\` and wait for review.
2431+
- Submit to Cursor Marketplace only after the standalone repository PR is accepted and the local native-plugin test flow passes.`,
23752432
includeMcpConfig: true,
23762433
mcpConfigPath: "mcp.json",
23772434
displayName: cursorPluginDisplayName,

scripts/verify-plugins.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,28 @@ async function verifyCursorPlugin(skillNames) {
292292
if (!ruleRaw.includes("alwaysApply: true")) {
293293
throw new Error("Cursor rule is missing alwaysApply frontmatter");
294294
}
295+
296+
const readme = await readFile(path.join(cursorPluginDir, "README.md"), "utf8");
297+
const requiredReadmePhrases = [
298+
"Cursor-native plugin",
299+
"not a VS Code extension",
300+
"not installed from a `.vsix`",
301+
"~/.cursor/plugins/local/wordpress-studio",
302+
"Local Cursor install and test flow",
303+
"MCP visibility checks",
304+
"Rules and skills visibility checks",
305+
"Marketplace checklist",
306+
"wordpress-studio`, which launches `studio mcp`",
307+
"wordpress-telemetry",
308+
"Do not manually edit generated Cursor output",
309+
"rules, skills, and MCP server paths",
310+
];
311+
312+
for (const phrase of requiredReadmePhrases) {
313+
if (!readme.includes(phrase)) {
314+
throw new Error(`Cursor README is missing required guidance: ${phrase}`);
315+
}
316+
}
295317
}
296318

297319
async function verifyContinueOutput() {

0 commit comments

Comments
 (0)