Community编程与开发github.com

FSWP Core Contributor - WordPress 核心贡献

指导贡献者为 WordPress 核心寻找或创建 Trac 工单,搭建开发环境,编写符合编码规范、文档和测试的补丁或 PR,并正确处理 Gutenberg 和安全性变更。

FSWP Core Contributor - WordPress 核心贡献 是什么?

FSWP Core Contributor 技能是 Full-Stack WP Developer 工作流中专用于 WordPress 核心贡献的模块。它引导贡献者完成从问题路由到提交补丁的完整流程:首先根据变更类型(PHP 代码、块编辑器、安全性、文档等)确定正确的提交渠道(Trac、Gutenberg 仓库或私有安全流程);然后指导搜索或创建 Trac 工单、基于 wordpress-develop 仓库搭建 Docker + Node 开发环境并运行 PHPUnit 测试;编写补丁时强制执行 WordPress 编码标准(PHPCS、Yoda 条件、转义/清理)、PHPDoc 内联文档、向后兼容性(使用 `_deprecated_function` 而非删除)及 `@ticket` 标记的单元测试;最后指导用户通过 .diff 附件或 GitHub PR 提交,并在 Trac 上附上结构化注释。该技能还路由块编辑器相关变更至 `WordPress/gutenberg` 仓库,安全漏洞指向私有流程,并最终调用 QA 工程师进行回归验证。支持 Cursor、Claude Code 等 AI 编程助手平台。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/syncwin/fswp-developer/tree/main/skills/fswp-core-contributor

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

FSWP Core Contributor(核心贡献者)

基础性规范(始终适用): fswp-developer/references/lean-coding.md(少写代码、优先复用)、fswp-developer/references/coding-standards.md(编码规范、文档、国际化、无障碍),以及 fswp-security-engineer(输入、输出、授权)。

此处工作流事实已根据贡献者手册于 2026-09-28 核对。核心流程会随时间变化;在提供建议前,请对任何时效性信息在 fswp-developer/references/official-docs.md 中进行确认。此处所有内容均不会替用户提交任何内容:用户需自行提交工单和发起拉取请求(GitHub 自动化有保留,请参见 fswp-developer/references/github-foundation.md)。

首先确定变更的归属

变更类型对应的提交位置
安全漏洞核心手册中链接的私有安全流程。绝不允许公开发布工单或拉取请求。立即停止并告知用户。
PHP、管理界面、API、测试、大部分核心代码在 WordPress/wordpress-develop 仓库下,通过 Trac 工单并附带补丁或拉取请求(使用本技能)。
块编辑器(Gutenberg 包、编辑器界面、站点编辑器)在 WordPress/gutenberg 仓库中提交 Issue 和拉取请求;核心从该仓库接收更新。请阅读该仓库的贡献指南。
插件或主题缺陷不属于核心;请使用 fswp-maintainer 技能,并向对应项目报告。
文档相应手册的文档团队流程。

先创建工单

  1. 在 Trac(https://core.trac.wordpress.org/)上搜索相关症状。阅读工单历史记录及所有补丁。
  2. 如果没有相关工单,请草拟一个:精确的标题、WordPress/PHP 版本、复现步骤、预期结果与实际结果,并说明这是缺陷(bug)还是增强。用户需将其提交到正确的组件下。
  3. 留意工单上的工作流关键词(例如要求单元测试),并遵循这些要求。

开发环境

请使用开发版本库,而非普通站点:

  1. 克隆 WordPress/wordpress-develop(即规范仓库(由 Subversion 管理)的 Git 镜像)。
  2. 需要 Docker 和 Node 以进行标准工作流。在版本库根目录下执行:npm install、npm run build:dev、npm run env:start、npm run env:install。
  3. 使用 npm run test:php 运行 PHP 测试。在双破折号后传递 PHPUnit 参数,例如 -- --group formatting。标记为 @ticket 的测试可按工单号作为测试组运行。多站点模式有独立配置(-c tests/phpunit/multisite.xml);AJAX 测试使用 --group ajax 运行。
  4. 也存在非 Docker 工作流(Composer、PHPUnit PHAR);请参见手册中的 PHPUnit 页面。

编写变更

  • 从主干分支(trunk)创建分支;分支名称应包含工单编号(例如 12345-short-description)。使变更集中在一个工单上。
  • 编码规范: 遵循 WordPress PHP、JS、CSS 和 HTML 规范,包括 Yoda 条件、制表符、间距以及转义/清理规则。在已更改文件上运行 PHPCS。
  • 内联文档: 对新增或变更的函数、钩子和类使用 Core 风格的 PHPDoc,并以工单里程碑指定的版本设置 @since。
  • 向后兼容性: Core 几乎从不破坏公开行为。应使用弃用(_deprecated_function() 等)而非直接删除;保持过滤器和操作稳定;保留函数签名。
  • 测试: 添加或更新 PHPUnit 测试,使其在应用补丁前失败、应用后通过,并使用 @ticket 标记。一个缺少测试的缺陷补丁通常会被要求补充测试。
  • 安全性和性能: 与任何 WordPress 代码(fswp-security-engineer、fswp-performance-engineer)相同的规则,但标准更高。
  • 不要捆绑无关的格式化或重构。

提交(由用户完成)

  • 向 Trac 工单附加一个以工单编号命名的 .diff 文件,或向 WordPress/wordpress-develop 发起一个引用该工单的拉取请求。拉取请求用于审查;它们不会在 GitHub 上合并,因为提交者通过规范仓库进行提交。
  • 发布工单评论:说明补丁的作用、测试方式、供测试者遵循的步骤以及任何待解答问题。请使用 references/ticket-comment-template.md 模板为用户草拟该评论。
  • 预期会收到审查、修改要求以及较慢的迭代周期。在工单上回复,更新补丁,并保持其与主干分支(trunk)的变基。

移交前验证

使用核心检查清单运行 fswp-qa-engineer:缺陷在应用前复现、应用后消失;相关测试组通过;已更改行的编码规范检查无误;文档齐全;向后兼容性完好。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

fswp-api-developer

Domain skill for WordPress REST API and Abilities API work in Full-Stack WP Developer. Covers registering routes with schemas, argument validation and sanitization, permission callbacks, controller classes, exposing post types and meta, authentication (cookie nonce, application passwords), pagination and errors, and registering abilities with input and output schemas and safety annotations. Use for any custom endpoint or machine-readable capability in a plugin or theme.

fswp-architect

Planning stage of Full-Stack WP Developer. Classifies the work (new plugin, new theme, update to an existing plugin or theme, add-on for another product, or WordPress Core patch), triages existing code with a bundled detection script, asks one round of essential questions, does competitive research, and produces one reviewable PRD or change brief with a single approval gate. Also covers Migration mode and multi-session handoff docs. Invoked by fswp-developer before any code is written; consult directly for PRD, change-brief, or handoff-doc questions.

fswp-block-developer

Domain skill for WordPress block editor work in Full-Stack WP Developer. Covers building custom Gutenberg blocks (block.json, static and dynamic rendering, attributes, supports, InnerBlocks, variations, deprecations, block bindings), block patterns, and the Interactivity API (data-wp directives, stores, server-side state), with the @wordpress/scripts build workflow. Use for any custom block, pattern, or front-end interactivity in a plugin or theme.

fswp-devops-engineer

Domain skill for WordPress development tooling in Full-Stack WP Developer. Covers local environments (wp-env with Docker, WordPress Playground and Blueprints), command-line site operations (plugin and theme management, database export, search-replace, cron, scaffolding), coding standards and static analysis (PHPCS with WordPress standards, PHPStan with WordPress stubs), PHP and JS testing setup, and the @wordpress/scripts toolchain. Use when setting up, running, or automating a WordPress dev or test environment.

fswp-maintainer

Change stage for existing WordPress code in Full-Stack WP Developer. Updates, fixes, refactors, and upgrades existing plugins and themes without breaking them, and builds add-ons for products you do not own (WooCommerce extensions, page-builder elements, extensions of other plugins) using hooks instead of edits to third-party files. Covers reading before changing, parity lists, deprecation, host compatibility, upgrade paths, and patch delivery. Invoked by fswp-developer after an approved change brief; consult directly for safe-change or add-on questions.

fswp-qa-engineer

Verification stage of Full-Stack WP Developer. Runs the mechanical gate for plugins and themes (house-rule scripts, PHP lint, PHPCS with WordPress standards, PHP compatibility, PHPStan with WordPress stubs), the manual checklist, PRD or change-brief scenario tests, and the pre-release check. Reports PASS, FAIL, or NOT RUN and never implies a skipped check passed. Invoked by fswp-developer after a build and again before delivery; consult directly to audit any plugin or theme folder.

fswp-reviewer

Independent review stage of Full-Stack WP Developer. Reviews a finished WordPress plugin, theme, add-on, or Core patch through a security lens (WordPress-specific vulnerabilities, REST and AJAX authorization with an API risk map, AI-generated-code risks), a quality lens (error handling, data and upgrade safety, performance, i18n, accessibility, comment accuracy, test gaps, class and type design, scope), and an optional lean lens for trimming over-engineering, reporting only high-confidence findings in a fixed format. Invoked by fswp-developer after the verify gate, normally through the fswp-code-reviewer agent; consult directly to review or optimize any WordPress code.

fswp-theme-developer

Theme build stage of Full-Stack WP Developer. Builds custom WordPress themes - block themes (theme.json, templates, template parts, patterns, style variations), classic themes (template hierarchy, functions.php, theme supports), hybrids, and child themes - with accessibility, escaping, and directory readiness built in, plus a scaffold script. Invoked by fswp-developer after an approved PRD for a new theme; consult directly for a specific theme pattern. For changes to an existing theme use fswp-maintainer.

syncwin/fswp-plugin-developer

Plugin build stage of Full-Stack WP Developer. House standards and code templates for real WordPress plugins (not shortcode snippets) - folder anatomy, activation/uninstall lifecycle, custom post types and tables, admin UI tiers, front-end output on the Atomic Framework, REST and cron, i18n, distribution, and the Tier 3 React admin stack - plus a scaffold script. Also the base structure for add-ons. Invoked by fswp-developer after an approved PRD; consult directly for a specific plugin build pattern.

相关技能