Skip to content

Releases: tymrtn/pcp-ai-addon

v0.3.1 — fixes from codex adversarial review

Choose a tag to compare

@tymrtn tymrtn released this 22 Apr 17:55

Patch release from codex exec review adversarial QA on v0.3.0. Three real issues fixed; a subsequent verification pass against developer.wordpress.org found that 5 guideline anchors were wrong, not the 1 codex caught.

Fixes

🔗 5 wrong guideline deep-link anchors
Clicking "See:" on a FAIL/UNCLEAR for any of these guidelines landed on the guidelines page but not the intended rule. G13 actively opened the wrong heading (it had G11's anchor pasted in).

ID Before After
G7 #7-no-unauthorized-collection-of-user-data #7-plugins-may-not-track-users-without-their-consent
G10 #10-external-links-on-the-public-site-must-be-optional #10-plugins-may-not-embed-external-links-or-credits…
G13 #13-plugins-should-not-hijack-the-admin-dashboard (wrong rule!) #13-plugins-must-use-wordpress-default-libraries
G15 #15-version-numbers-must-be-incremented-for-every-new-release #15-plugin-version-numbers-must-be-incremented-for-each-new-release
G18 #18-wordpress-org-reserves-the-right… #18-we-reserve-the-right-to-maintain-the-plugin-directory…

🔇 Silent verdict drops
If the model omitted a required verdict line or formatted it in a way the regex didn't capture, the rollup displayed "3 PASS / 0 FAIL / 0 UNCLEAR (of 4 checkable)" with no indication of the missing guideline. v0.3.1 iterates the authoritative guideline list from WPOrg_Guidelines::for_category() and emits every expected guideline — omissions surface as UNCLEAR — Model did not emit a verdict line for this guideline. The rollup math now always matches.

📝 Misleading prompt example
The example line in the prompt was [Gxx] PASS — plugin header declares 'License: GPL-2.0-or-later'…, where Gxx was the first guideline ID for the category. For the 4 non-plugin_repo categories the ID didn't match the evidence, seeding the model with an irrelevant PASS example. New prompt uses a neutral [Gxx] placeholder and lists the required IDs explicitly in order.

Upgrade

cd wp-content/plugins/pcp-ai-addon
git fetch --tags && git checkout v0.3.1

Credits

Adversarial QA: codex exec review on commit f6b131d (gpt-5.4, xhigh reasoning).

v0.3.0 — per-guideline verdicts: the plugin now does its actual job

Choose a tag to compare

@tymrtn tymrtn released this 21 Apr 14:22

The whole point of this add-on is to help other plugins pass the WordPress.org Detailed Plugin Guidelines. Until this release, the AI prompts were generic — they said "focus on security" or "focus on plugin_repo" without citing the actual 18 numbered rules. Guideline coverage was incidental. That's now fixed.

What changed

A registry for the 18 guidelines
PCP_AI_Addon\Guidelines\WPOrg_Guidelines catalogs each of the 18 rules on developer.wordpress.org with id, title, summary, category, ai_checkable, and deep-link URL. 14 of the 18 are AI-checkable and mapped to one of the 5 review categories; the other 4 are procedural (G2, G9, G14, G18) and sit in the registry as reference.

Prompts now cite the rules verbatim
Every category prompt now ends with a WORDPRESS.ORG PLUGIN GUIDELINES TO EVALUATE block listing the relevant guidelines for that category, and demands a verdict line per guideline in this exact shape:

[G7] FAIL — plugin calls api.evil.com without readme.txt disclosure
[G16] FAIL — Packaging Wizard page renders only "coming soon" copy
[G17] UNCLEAR — slug uses "PCP" prefix which could imply Plugin Check affiliation

Verdicts surface in the Plugin Check UI

  • FAIL → emitted as a PCP error with evidence + deep link.
  • UNCLEAR → emitted as an info message.
  • PASS → rolls up into a compliance line on the category summary: "Compliance: 11 PASS / 2 FAIL / 1 UNCLEAR (of 14 checkable)."

Robust parsing
The extract_verdicts() regex tolerates bold markers, backticks, list numbering, and both / - / : separators. Smoke-tested against 14 realistic AI output shapes before ship.

Coverage map (14 checkable / 4 meta)

ID Title Category
G1 GPL-compatible license plugin_repo
G3 Stable version available plugin_repo
G4 Human-readable code security
G5 No trialware plugin_repo
G6 Legitimate external services plugin_repo
G7 No unauthorized tracking / external contact security
G8 No third-party executable code security
G10 No unconsented external links general
G11 No dashboard hijacking general
G12 No readme spam plugin_repo
G13 Use WordPress default libraries performance
G15 Increment version numbers plugin_repo
G16 Complete plugin at submission general
G17 Respect trademarks and copyrights plugin_repo

Meta (non-code-checkable): G2, G9, G14, G18.

Upgrade

cd wp-content/plugins/pcp-ai-addon
git fetch --tags
git checkout v0.3.0

Then run Plugin Check on any plugin — the AI categories will now surface per-guideline verdicts with evidence and direct links to the relevant WP.org rule.

What's next (Sprint 2 candidates)

  • Compliance dashboard widget that aggregates verdicts across runs.
  • Capability-manifest inference (answer to EmDash's framing).
  • Scoped WPScan integration for plugin updates (historical CVE context).

v0.2.0 — MCP server, REST endpoint, model selector

Choose a tag to compare

@tymrtn tymrtn released this 19 Apr 20:50

First real release. Baseline is security-hardened and public-safe; this tag adds the agent-addressable surface.

What's new

Model selector

  • Settings page now has a curated AI model dropdown — Claude Opus 4.7 (default), Sonnet 4.6, Haiku 4.5, GPT-5, Grok — plus a Custom field for any OpenRouter slug.
  • LLM_Client::call() reads the selection at runtime; DEFAULT_MODEL remains the ultimate fallback.

REST endpoint

  • GET /wp-json/pcp-ai/v1/review?plugin=<slug>[&format=md] — returns a structured AI review as JSON or Markdown.
  • Gated by manage_options; auth via WordPress Application Passwords for headless agent clients.
  • 15-minute transient cache per plugin basename.

MCP server

  • POST /wp-json/pcp-ai/v1/mcp — minimal JSON-RPC 2.0 Model Context Protocol server.
  • Implements initialize, tools/list, tools/call.
  • Single tool pcp_ai.review — inputs { plugin, no_cache? }, returns severity / summary / issues / recommendations plus a Markdown rendering.
  • Addressable by Claude Code, Cursor, Codex, and the Plugin Directory MCP Server.

Security carried forward from earlier work

  • Hardcoded API key removed; encryption uses correct wp_salt() scheme.
  • Stored API key masked in the Settings UI (no plaintext in page source).
  • Plugin metadata sanitized before LLM prompts (prompt-injection defense).
  • Per-user rate limit (10 calls/min) on LLM calls.
  • ABSPATH guards, capability checks, and openssl_encrypt failure handling across the codebase.

Install

cd wp-content/plugins/
git clone --branch v0.2.0 https://github.com/tymrtn/pcp-ai-addon.git

Then activate PCP AI Reviewer Add-on on the Plugins screen and set your OpenRouter key at Settings → PCP AI Add-on.

Smoke-test the MCP endpoint

npx @modelcontextprotocol/inspector --cli https://your-site/wp-json/pcp-ai/v1/mcp \\
  -H "Authorization: Basic $(echo -n user:app-password | base64)"

Requirements

  • WordPress 6.3+
  • PHP 7.4+
  • Plugin Check plugin active
  • OpenRouter API key