Skip to content

Commit 3058a70

Browse files
committed
Document Cursor native plugin testing
1 parent 9b3fa65 commit 3058a70

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
@@ -2179,7 +2179,7 @@ const pluginTargets = [
21792179
manifestDir: ".cursor-plugin",
21802180
manifestFileName: "plugin.json",
21812181
manifestContents: cursorPluginManifest,
2182-
readmeIntro: `It is a Cursor plugin built from the same shared skills as the Codex and Claude Code plugins.
2182+
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.
21832183
21842184
- The generated \`plugins/cursor/\` folder uses Cursor's single-plugin layout
21852185
- Cursor discovers plugin skills from \`skills/\`
@@ -2188,6 +2188,55 @@ const pluginTargets = [
21882188
- WordPress request routing stays shared across surfaces
21892189
- Studio-backed site, theme, block, plugin, and audit workflows stay shared
21902190
2191+
## Local Cursor install and test flow
2192+
2193+
Build the generated package first:
2194+
2195+
\`\`\`bash
2196+
pnpm build
2197+
\`\`\`
2198+
2199+
Install it into Cursor's local native plugin directory:
2200+
2201+
\`\`\`bash
2202+
mkdir -p ~/.cursor/plugins/local
2203+
rm -rf ~/.cursor/plugins/local/wordpress-studio
2204+
cp -R plugins/cursor ~/.cursor/plugins/local/wordpress-studio
2205+
\`\`\`
2206+
2207+
For faster iteration from a source checkout, use a symlink instead of copying:
2208+
2209+
\`\`\`bash
2210+
mkdir -p ~/.cursor/plugins/local
2211+
rm -rf ~/.cursor/plugins/local/wordpress-studio
2212+
ln -s "$PWD/plugins/cursor" ~/.cursor/plugins/local/wordpress-studio
2213+
\`\`\`
2214+
2215+
Reload Cursor after installing or updating the local plugin. The local plugin root should contain these files:
2216+
2217+
- \`.cursor-plugin/plugin.json\`
2218+
- \`README.md\`
2219+
- \`mcp.json\`
2220+
- \`rules/wordpress-studio.mdc\`
2221+
- \`skills/<skill>/SKILL.md\` for each bundled skill
2222+
2223+
## MCP visibility checks
2224+
2225+
In Cursor's MCP or tools settings, confirm both plugin-provided servers are visible and enabled:
2226+
2227+
- \`wordpress-studio\`, which launches \`studio mcp\`
2228+
- \`wordpress-telemetry\`, which launches the bundled telemetry bootstrap from \`mcp.json\`
2229+
2230+
If the servers are missing, inspect \`~/.cursor/plugins/local/wordpress-studio/mcp.json\`, confirm \`studio --version\` works in a normal shell, then reload Cursor.
2231+
2232+
## Rules and skills visibility checks
2233+
2234+
Confirm Cursor loads the plugin guidance before doing Marketplace or standalone-repo work:
2235+
2236+
- The always-on rule from \`rules/wordpress-studio.mdc\` is available in Cursor's rules view or applies to WordPress requests.
2237+
- 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\`.
2238+
- A WordPress site, theme, block, plugin, or audit request routes through the shared WordPress creator guidance and prefers Studio MCP tools before shell fallbacks.
2239+
21912240
## Standalone export and listing
21922241
21932242
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.
@@ -2200,9 +2249,17 @@ pnpm verify
22002249
pnpm export:cursor -- --dry-run
22012250
\`\`\`
22022251
2203-
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.
2252+
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.
2253+
2254+
## Marketplace checklist
2255+
2256+
Before submitting or updating the Cursor listing:
22042257
2205-
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.`,
2258+
- Confirm the exported standalone branch contains the expected \`.cursor-plugin/plugin.json\`, \`README.md\`, \`mcp.json\`, \`rules/wordpress-studio.mdc\`, and full \`skills/\` tree.
2259+
- Review the listing-facing manifest fields for name, display name, version, description, author, homepage, repository, license, keywords, rules, skills, and MCP server paths.
2260+
- Install the standalone branch locally at \`~/.cursor/plugins/local/wordpress-studio\` and repeat the MCP, rules, and skills visibility checks above.
2261+
- Open or update the standalone repository pull request from \`sync/from-build-with-wordpress\` into \`main\` and wait for review.
2262+
- Submit to Cursor Marketplace only after the standalone repository PR is accepted and the local native-plugin test flow passes.`,
22062263
includeMcpConfig: true,
22072264
mcpConfigPath: "mcp.json",
22082265
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)