This page describes the day-to-day workflows for maintainers changing Build with WordPress. Use it with the Architecture and Generated outputs references when preparing a pull request.
- Node.js compatible with the repository's scripts. The telemetry bundle targets Node 18.
pnpm10.8.1, as declared bypackage.json.- WordPress Studio installed when manually testing generated packages that launch
studio mcpor use the Studio CLI. - Git access to
Automattic/wordpress-cursor-pluginonly when running the Cursor export workflow.
Install dependencies:
pnpm installCI-parity install:
pnpm install --frozen-lockfile| Command | Source | Purpose |
|---|---|---|
pnpm build |
package.json |
Bundles telemetry MCP and regenerates all plugin packages. |
pnpm build:telemetry-mcp |
package.json |
Rebuilds only dist/wordpress-telemetry-mcp.mjs. |
pnpm verify |
package.json |
Runs generated-output verification across plugin packages. |
pnpm export:cursor |
package.json |
Exports plugins/cursor/ to the standalone Cursor plugin repository branch. |
- Identify the source boundary for the change:
- portable WordPress behavior:
skills/; - generated package layout or manifest logic:
scripts/build-plugins.mjs; - generated-output test contract:
scripts/verify-plugins.mjs; - telemetry MCP behavior:
scripts/wordpress-telemetry-mcp.mjsand possiblyscripts/build-telemetry-mcp.mjs.
- portable WordPress behavior:
- Make the source change.
- Run
pnpm build. - Run
pnpm verify. - Inspect generated package diffs under
plugins/. - Update documentation when the architecture, public generated files, setup workflow, or integration contract changes.
Avoid editing generated packages as the only source of a change. If a file under plugins/ should change, update the generator or skill source that writes it.
-
Edit the relevant skill in
skills/. -
If the skill appears in a new location or requires new metadata, update
scripts/build-plugins.mjs. -
Run:
pnpm build pnpm verify
-
Spot-check representative generated skill copies in plugin outputs.
- Update the MCP generation logic in
scripts/build-plugins.mjs. - Update
scripts/verify-plugins.mjsso it fails on the old or invalid config shape. - Run
pnpm build && pnpm verify. - Manually smoke test at least one MCP-enabled generated surface if the command, args, or server names changed.
Expected MCP server names are:
wordpress-studiowordpress-telemetry
-
Edit
scripts/wordpress-telemetry-mcp.mjs. -
Keep the tool name
record_workflow_eventstable unless you also update every generated instruction and verification contract that refers to it. -
Run:
pnpm build:telemetry-mcp pnpm build pnpm verify
-
Confirm telemetry remains non-blocking and respects
WP_SITE_CREATOR_NO_TELEMETRY=1.
- Add generator support in
scripts/build-plugins.mjs. - Add a generated output directory under
plugins/<surface>/through the build. - Include skills when the surface supports them.
- Include
wordpress-studioandwordpress-telemetryMCP setup when the surface supports MCP. - Add a verifier function in
scripts/verify-plugins.mjsfor the files users or marketplaces consume. - Add the surface to the package matrix in
README.mdand Generated outputs. - Run
pnpm build && pnpm verify.
Cursor output has an additional publishing workflow because Cursor consumes a standalone plugin repository.
Reviewable dry run:
pnpm build
pnpm verify
pnpm export:cursor -- --dry-runThe dry run prints the subtree split, push target, and cleanup command without creating a local split branch, pushing to the standalone repository, or touching a standalone checkout.
Maintainer export:
pnpm export:cursorThe export script pushes a subtree split of plugins/cursor to Automattic/wordpress-cursor-plugin on sync/from-build-with-wordpress. Open or update a pull request from that branch to the standalone repository's main branch.
Before submitting or updating the Cursor listing:
- Confirm the standalone branch contains
.cursor-plugin/plugin.json,README.md,mcp.json,rules/wordpress-studio.mdc, and the generatedskills/tree. - Review
.cursor-plugin/plugin.jsonfor the listing-facingname,displayName,version,description,author,homepage,repository,license,keywords,rules,skills, andmcpServersfields. - Confirm the standalone README describes the generated package, export source of truth, and MCP setup.
- Submit to Cursor only after the standalone repository PR is accepted.
After verification passes, manually test representative generated output when the change affects runtime behavior:
- Open or copy a generated
plugins/<surface>/package into the corresponding agent's expected project root. - Confirm the agent sees the WordPress instructions and skills.
- For MCP-enabled surfaces, confirm
wordpress-studioandwordpress-telemetryare available. - Try representative tasks:
- create a new site;
- build or edit a theme;
- create a custom block;
- create a custom plugin;
- run a performance, accessibility, or frontend audit.
- If Studio MCP is unavailable, confirm the generated Studio guidance routes the agent to the Studio CLI fallback path.
The repository includes GitHub Actions workflows for documentation maintenance and skills maintenance under .github/workflows/:
developer-docs-agent.ymlruns the technical documentation agent lane for bootstrap and maintenance documentation updates.skills-agent.ymlruns the skills maintenance lane.
Manual documentation runs default to maintenance and should make the smallest source-grounded documentation update needed for newly merged code or finish with no changes when docs are current. Select bootstrap only to intentionally create or improve the initial documentation structure.
developer-docs-agent.yml calls the reusable Automattic/docs-agent/.github/workflows/maintain-docs.yml workflow for the technical documentation lane. The caller grants its github.token the publication permissions declared by the workflow and explicitly forwards OPENAI_API_KEY for live runs and the required EXTERNAL_PACKAGE_SOURCE_POLICY package allowlist.
workflow_dispatchoffersrun_kindchoices ofmaintenance(the default) andbootstrap; pushes totrunkrun withrun_kind: maintenance.docs_branchisdocs-agent/build-with-wordpress-developer-docs-v2andbase_refistrunk.- writable documentation paths are limited to
README.md,docs/**, andplugins/**/README.md. - Docs Agent selects its native package from the reusable workflow revision pinned in this file:
Automattic/docs-agent/.github/workflows/maintain-docs.yml@7b67d341eea16b75b8e055507d36a8d8e69a1fe3. - maintenance is bounded to the known Figma Studio handoff diagnostics source delta from PR #100; that delta is marked as not requiring a documentation change, so the technical lane may finish with no changes after confirming the Figma handoff documentation still matches source behavior. Bootstrap requires
README.md,docs/README.md, at least three topic pages, and a README link to the docs index. - manual
workflow_dispatchruns setrequire_pr: true; push-triggered maintenance runs do not require a PR and may finish with no changes when the documentation already matches source behavior. - verification commands are
pnpm install --frozen-lockfile,pnpm build, andpnpm verify. - the developer-docs drift check is scoped to non-documentation paths:
git diff --exit-code -- . ':(top,exclude)README.md' ':(top,glob,exclude)docs/**' ':(top,glob,exclude)plugins/**/README.md'. This means the build must not produce uncommitted generated-package or source changes outside the workflow's writable documentation paths.
When changing the docs workflow, keep this contract aligned with the repository documentation structure in the docs index. When changing generated-output behavior, update the generator, verifier, documentation, and generated files in the same pull request so maintenance runs can finish cleanly.
skills-agent.yml uses the same pinned reusable Docs Agent workflow with audience: skills. It is triggered manually and on a weekly Monday schedule, writes only to skills/**, generated skill copies under plugins/**/skills/**, and plugin README files, and runs the same install, build, and verify commands as the developer-docs workflow. Its bounded source delta covers the live skill sources, package generator scripts, and packaged skill outputs, and permits an evidence-backed no-change result when those surfaces are current. Its drift check is intentionally broad: git diff --exit-code, so generated skill package output must be committed after the build. The workflow does not pass run_kind or require_pr; the native skills lane should make the smallest source-grounded skill update needed or finish with no changes when skills are current. Keep this workflow focused on live skill content; generated package structure and developer documentation belong in the technical docs workflow and the generator/verifier source.
The CI workflow provides automated validation for pull requests and pushes to trunk and feat/native-docs-agent. It checks out Docs Agent at 7b67d341eea16b75b8e055507d36a8d8e69a1fe3 and the accepted WP Codebox reusable-workflow and helper revision at a6fe2d208e990a8d04104aa74aacbb8d1539fbc1, installs pnpm 10.8.1, runs pnpm test, then runs pnpm build and pnpm verify. The workflow contract test rejects producer revision, reusable workflow, source-delta, bootstrap, secret forwarding, writable path, verification command, drift check, or schema drift. This repository does not currently require the workflow as a merge gate.
Before requesting review:
- Source changes are in
skills/orscripts/, not only in generated output. -
pnpm buildhas been run when generated output should change. -
pnpm verifypasses locally or in CI. - Generated package diffs are expected and bounded.
- Documentation is updated for public contracts, setup commands, generated files, or integration behavior.
- Cursor export dry run has been run when
plugins/cursor/changes, and non-dry-run export is intentionally run or intentionally deferred.
- Prefer one shared source of WordPress behavior and many native generated package shapes.
- Keep the generated output reviewable by making verifier expectations explicit.
- Preserve stable public names:
wordpress-studio,wordpress-telemetry,WordPress Studio, andrecord_workflow_event. - Keep telemetry non-blocking and opt-out aware.
- Keep Studio runtime ownership separate from this repository's agent-facing packaging responsibilities.