Skip to content

Add wp-docs skill for WordPress documentation standards#30

Open
galatanovidiu wants to merge 6 commits intotrunkfrom
add/wp-docs-skill
Open

Add wp-docs skill for WordPress documentation standards#30
galatanovidiu wants to merge 6 commits intotrunkfrom
add/wp-docs-skill

Conversation

@galatanovidiu
Copy link
Contributor

What

Add a new wp-docs skill that helps WordPress developers write and review documentation following WordPress.org standards.

New files:

  • skills/wp-docs/SKILL.md — Main skill with write/review modes (109 lines)
  • skills/wp-docs/references/phpdoc-standards.md — WordPress PHP Documentation Standards
  • skills/wp-docs/references/markdown-standards.md — User-facing markdown documentation standards
  • skills/wp-docs/references/wordpress-patterns.md — WordPress-specific doc patterns (hooks, REST API, capabilities, migration guides)
  • eval/scenarios/wp-docs-review-phpdoc.json — Eval scenario for PHPDoc review mode
  • eval/scenarios/wp-docs-write-guide.json — Eval scenario for guide writing mode

Modified files:

  • docs/skill-set-v1.md — Added wp-docs to the current skills list
  • skills/wordpress-router/references/decision-tree.md — Added routing entry for documentation tasks

Why

There was no skill covering documentation standards. Developers working on WordPress plugins and themes need consistent guidance for:

  • Writing PHPDoc comments that follow the WordPress PHP Documentation Standards (summaries, @param, @return, @since, hook docs)
  • Writing user-facing markdown docs that follow WordPress conventions (sentence case headings, second person voice, Diataxis framework)
  • Documenting hooks, REST endpoints, capabilities, and migration guides using established WordPress patterns
  • Reviewing existing documentation against these standards with severity-graded findings (FIX/IMPROVE/PASS)

The closest existing skill (wp-phpstan) covers type annotations for static analysis, not documentation standards — the boundary between the two is clearly defined in the skill's Escalation section.

Testing

node eval/harness/run.mjs

Additionally tested by running the skill's review mode against a real WordPress plugin PHP file (ToolRegistry.php). The skill correctly identified 18 FIX items (missing @since tags, bare @return tags), 3 IMPROVE suggestions, and 9 passing categories.

Cross-model code review performed with Claude + Codex CLI. All findings addressed in fix commits.

Add new wp-docs skill for writing and reviewing WordPress documentation
following WordPress.org standards. Includes main SKILL.md with write/review
modes, PHPDoc standards reference, and markdown standards reference.
Add wordpress-patterns.md covering hook, REST API, capability, and
migration guide documentation templates. Add two eval scenarios for
review-phpdoc and write-guide modes.
Add routing entry for documentation-related intents (PHPDoc, write docs,
review docs, documentation standards) to the router decision tree.
Move checklist into Verification section (no extra sections beyond
the 6 required). Fix PHPDoc reference: remove declare() from file-level
example, fix escaped pipe in @return, clarify @return void guidance,
reconcile @throws tag order, remove unnecessary accepted_args default.
Fix @SInCE guidance (n.e.x.t for plugins, Unknown for core). Clarify
WordPress array shape convention vs PHPStan syntax. Broaden file-level
doc guidance per upstream standard. Fix incorrect @hook reference in eval
scenario. Replace MCP-specific examples with WordPress-specific ones.
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: galatanovidiu <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@galatanovidiu galatanovidiu marked this pull request as draft March 16, 2026 22:39
@galatanovidiu galatanovidiu marked this pull request as ready for review March 16, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant