Community编程与开发github.com

FSWP QA 工程师

对已构建的插件或主题文件夹执行机械门控(代码规范、PHP 语法、PHPCS、PHPStan 等)、对照 PRD 进行场景测试、手动检查清单以及预发布核对,并输出明确的 PASS/FAIL/NOT RUN 报告。

FSWP QA 工程师 是什么?

该技能是 **FSWP(全栈 WordPress 开发者)** 工作流中的质量保证环节,由 `fswp-qa-engineer` 负责。它在构建后和交付前被自动调用,也可手动对任意插件/主题文件夹进行审计。其核心价值在于“只报告,不修复”——所有问题都先记录,再由路由器的修复循环处理,确保质量门禁严格、独立。 技能定义了两个关键脚本:`run_gate.sh` 自动区分为主题运行 `theme_check.py` 或插件运行 `qa_check.py`,并叠加 PHP 语法检查、PHPCS(WordPress-Extra 标准)、PHP 兼容性检查以及 PHPStan 级别 5(带 WordPress stubs)。每个检查项都输出 **PASS / FAIL / NOT RUN**,并标明工具版本;对于缺失的工具(如 PHP、Composer)会明确告知用户应运行的命令,绝不会将“未运行”的检查项隐式标记为通过。 此外,该技能还包含**范围蔓延检测**(对比 diff 与已批准的概要)、**手动检查清单**、**按工作类型(主题、更新、插件、核心补丁)定制的场景测试**,以及**预发布检查**。最终输出格式为清晰的表格,包含检查项、状态与详细信息,并汇总失败列表及文件/行号。对于多会话构建,需将表格复制到 `HANDOFF.md` 中。

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

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

在你喜欢的 AI 中提问

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

文档

FSWP QA 工程师 是做什么的?

验证已构建的文件夹,在门控过程中不要修复。先报告,然后在路由器的修复循环中修复。

1. 机械门控

bash scripts/setup_toolchain.sh              # 每个环境运行一次(仅限 apt + GitHub,无 Composer)
bash scripts/run_gate.sh <dir> [min-php] [--fix]

run_gate.sh 检测主题(包含“Theme Name”头部的 style.css)并运行 scripts/theme_check.py;否则运行 scripts/qa_check.py。两者仅使用 Python 标准库,始终有效。然后,如果 PHP 和相应工具存在,会依次执行:php -l、PHPCS WordPress-Extra(错误视为失败,警告仅列出)、针对最低 PHP 版本的兼容性检查、以及包含 WordPress 存根的 PHPStan 级别 5。

  • --fix 会首先运行 phpcbf(WordPress 标准)。在脚手架搭建后或大量编辑后使用;请审查差异。
  • 插件检查 需要 WordPress 安装和命令行工具(wp plugin check <slug>);在其他环境中标记为 NOT RUN。告诉用户在提交 WordPress.org 插件之前运行它。对于主题,等效检查是 Theme Check 插件或目录的自动审查。
  • theme_check.py <dir> [--directory]:不加标志时,真实缺陷标记为 FAIL,目录专用规则标记为 WARN;加上 --directory 时,WordPress.org 主题目录的要求(缺少头部、截图尺寸和比例、禁止的文件、插件领域代码、必需的主题经典函数调用)标记为 FAIL。
  • qa_check.py 还检查插件头部和 readme 规则(来自手册:描述长度、唯一的 Plugin URI、最多 5 个标签、无 Stable tag: trunk、数字格式的 Tested up to、简短描述长度)并输出警告。
  • qa_check.py 对插件强制执行以下检查:ABSPATH 防护、版本匹配(头部、常量、readme 的 Stable tag)、无 example.com 或 CDN 或托管字体、每个路由上必须有 permission_callback(注释的 __return_true 除外)、数据库升级检查、在回调内部进行入队、禁止的函数、卸载防护、仅 rem 单位、JS 翻译、源代码随编译输出一起提供、字体许可证。theme_check.py 检查头部、许可证、入口模板、theme.json 有效性、禁止的函数、未转义的 echo 启发式检查、远程资源、文本域、截图和 readme。

报告规则: 每个检查项输出 PASS、FAIL 或 NOT RUN,并附上使用的工具版本。NOT RUN 绝不能视为通过,也不能被概括为“干净”。如果缺少 PHP 或某个工具,需明确说明并指出应该运行哪个命令。

1a. 范围检查

将差异或文件列表与已批准的概要进行比较。计划中未要求的文件、钩子、选项或依赖项报告为范围蔓延(参见 fswp-developer/references/lean-coding.md)。统计新增行数与删除行数,若比例悬殊则给出注释。

2. 手动检查清单

references/checklist.md:仅包含脚本无法判断的项目。在机械门控全部通过后运行。

3. 场景测试

PRD(由 fswp-architect 提供)中的每个编号场景都获得 PASS、FAIL 或 NOT RUN 状态并附上证据。始终包含:

  • 全新安装(无先前的选项或表):无通知或无致命错误。
  • 停用后重新激活:无重复的调度任务或选项。
  • 从先前版本的存储数据升级,而不重新激活:在加载时迁移模式和选项。
  • 卸载:仅移除插件拥有的数据。
  • 迁移模式:导出差异,并对 baseline/ 进行视觉回归门控(由 fswp-architect 提供)。

根据工作类型,添加:

  • 主题: PRD 列出的每种模板类型均使用真实内容和空内容渲染;编辑器与前端一致;仅键盘导航正常;主题切换到其他再切换回来不会导致致命错误。
  • 更新: 变更概要中每一项都重新检查并标记;从先前版本存储数据升级正常;概要之外无任何变更(读取差异)。
  • 附加组件: 主机处于活跃状态且在支持的范围内(正常工作);主机停用(附加组件保持静默,显示通知,无致命错误);主机低于支持的版本(干净地拒绝)。
  • 核心补丁: 工单的复现步骤在修复前失败,修复后通过;相关的 PHPUnit 测试组通过;更改的行通过 PHPCS 检查;参见 fswp-core-contributor。

在可以运行 PHP 的地方,使用一个小型 PHP 脚本执行激活和迁移逻辑;否则通过阅读代码进行追踪,并标记为“已追踪,未运行”。

4. 发布检查

在上述所有步骤通过后:references/release-check.md。

输出

一张表格:检查项 | PASS/FAIL/NOT RUN | 详细信息。然后是失败列表(包含文件与行号),以及用户必须自己运行的内容。对于多会话构建,将表格复制到 HANDOFF.md 中。

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-core-contributor

WordPress Core contribution stage of Full-Stack WP Developer. Guides a contributor through finding or filing a Trac ticket, setting up the wordpress-develop checkout and test environment, writing a patch or GitHub pull request that follows Core coding standards, inline documentation, backward compatibility and tests, and preparing the ticket comment; also routes block-editor changes to the Gutenberg repository and security reports to the private process. Invoked by fswp-developer for Core patches; consult directly for Core workflow questions.

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-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.

相关技能