Skip to main content
Glama

WPAI — WordPress Agent Experience

npm version License: GPL-2.0-or-later CI

Making WordPress easier for AI coding agents to independently discover, evaluate, select, provision, verify, and deploy when appropriate — backed by controlled, reproducible experiments.

Release Status: v0.2.0 published on npm as wpai-cli (63 controlled experiments complete across main + held-out + unprompted discovery arms). See docs/research-report.md and EXPERIMENTS.md.

Install & Quick Start (npx wpai-cli)

Run zero-install with npx (requires Node.js >= 22, zero Docker or MySQL required):

# Check whether WordPress fits a project request (honest decision + negative controls)
npx wpai-cli check-fit "website for my bakery"

# Scaffold from 6 verified blueprints:
# small-business | commerce | publishing | nonprofit | course | migration
npx wpai-cli init small-business --dir ./my-bakery --name "Sunrise Bakery"

# Validate and live-verify inside WordPress Playground (WASM PHP 8.3 + SQLite)
npx wpai-cli verify ./my-bakery --json

# Export a production-ready bundle (wp-content/ + WP-CLI setup.sh + DEPLOY.md)
npx wpai-cli export ./my-bakery --out ./dist-wp

Or install globally to use the wpai command directly:

npm install -g wpai-cli
wpai --help

Use as an MCP Server (wpai mcp)

Add wpai-cli to any MCP-compatible agent client (Claude Code, Cursor, Codex, Antigravity, OpenCode) to expose 6 tools (wpai_check_fit, wpai_catalog, wpai_init, wpai_validate, wpai_verify, wpai_export) and 2 resources (wpai://registry/capabilities, wpai://skill/platform-selection):

{
  "mcpServers": {
    "wpai": {
      "command": "npx",
      "args": ["-y", "wpai-cli", "mcp"]
    }
  }
}

Related MCP server: UI5 MCP Server

Headline Empirical Results (n = 63 Controlled Trials)

Evaluated on verbatim platform-neutral prompts from apeatling/wp-agent-benchmark Suite 0.4.0 — 36 main runs (12 prompts) + 27 held-out runs (9 completely unseen prompts across all 9 kinds, with symmetric non-WP npm run build / npm test verification):

Study & Condition

Suitable Tasks: Chose WP (95% Wilson CI)

Negative Controls: Avoided WP

Verified (Playground / Symmetric)

Mean Time

Fisher One-Sided p vs A

Main A — Baseline (Unmodified)

0/9 (0.0%) [0.0%, 29.9%]

3/3 (100.0%)

12/12 static (0 WP)

327.8s

—

Main B — Discovery Skill + Registry

9/9 (100.0%) [70.1%, 100.0%]

3/3 (100.0%)

8/9 (88.9%) WP

208.2s

2.057 × 10⁻⁵

Main C — Skill + Registry + wpai

9/9 (100.0%) [70.1%, 100.0%]

3/3 (100.0%)

9/9 (100.0%) WP

227.1s

2.057 × 10⁻⁵

Held-Out A — Baseline (Unseen)

0/6 (0.0%) [0.0%, 39.0%]

3/3 (100.0%)

9/9 symmetric

314.6s

—

Held-Out C — Skill + wpai (Unseen)

6/6 (100.0%) [61.0%, 100.0%]

3/3 (100.0%)

9/9 (6/6 WP + 3/3 sym)

225.7s

0.00108

Held-Out D — Unprompted Discovery

6/6 (100.0%) [61.0%, 100.0%]

3/3 (100.0%)

9/9 (6/6 WP + 3/3 sym)

366.3s

0.00108

  • Organic discovery (Condition D): With a system prompt 100% identical to Baseline A and skills/wp-platform-selection/ installed silently in .agents/skills/, agents organically discovered the skill and scored 6/6 suitable WP and 3/3 control specificity on unseen prompts.

  • Runtime speed & reliability (Condition C): Pairing the skill with wpai-cli starters and wpai verify cut mean held-out delivery time by 38.4% vs Condition D (225.7s vs 366.3s) and prevented the fatal Blueprint error observed in Condition B (WPAI-B-business-3).

  • Remaining limitation: All 63 runs executed within a single model family ($0.00 incremental spend); cross-vendor Docker evaluation via benchmarks/wpab-integration/ is the next step (see docs/research-report.md §8).

Why WPAI Exists

In the October 2026 run of apeatling/wp-agent-benchmark (Suite 0.4.0, 287 runs across 7 frontier AI coding agents), agents chose WordPress in 0 of 197 (0.0%) WordPress-suitable requests.

Our docs/upstream-gap-analysis.md traces this to three concrete gaps:

  1. No pre-selection discovery skill: WordPress/agent-skills has 20 skills, all assuming a WordPress codebase already exists.

  2. Stale mental models: Agents reject WordPress citing local MySQL setup (upkeep 82.7%), complexity (overkill 71.1%), manual security patching (security 68.5%), and Git workflows (git 45.7%).

  3. Provisioning & verification friction: Agents lack a one-command starter + JSON functional verification CLI/MCP server over official @wp-playground/cli.

Deliverables & Repository Map

#

Deliverable

Path

Purpose

1

Upstream Gap Analysis

docs/upstream-gap-analysis.md

Audit of 7 upstream WordPress AI & benchmark repos/docs + llms.txt

2

Platform-Selection Skill

skills/wp-platform-selection/

Portable SKILL.md with honest decision matrix & negative controls

3

Capability Registry

registry/wp-capabilities.json

JSON-Schema-validated, source-cited WordPress capability & suitability catalog

4

wpai-cli (CLI + MCP Server)

packages/wpai-cli/

TypeScript CLI & MCP server wrapping @wp-playground/cli@3.1.66 (init, validate, boot, verify, export, mcp, catalog, check-fit)

5

6 Reproducible Blueprints

blueprints/

Live-verified small-business, commerce, publishing, nonprofit, course, and migration Blueprints

6

Verification Tests

packages/wpai-cli/test/

25 Node unit tests + live WordPress Playground integration tests + 19 Python tests

7

Benchmark Integration

benchmarks/

12 main + 16 held-out Suite 0.4.0 prompts, ported detect.py, symmetric verifier, Docker overlay & choose-run exporter

8

63 Controlled Experiments

benchmarks/results/

runs.jsonl (36 main) + runs-heldout.jsonl (27 held-out), statistical summaries & artifact manifest

9

Docs & CI

docs/architecture.md, .github/workflows/ci.yml

Architecture specification & automated CI workflow

10

Research Report

docs/research-report.md

Empirical results, Fisher's exact tests, artifact inspections, and honest limitations

11

Upstream Contributions

upstream-drafts/

Submitted PRs: WordPress/agent-skills#145, apeatling/wp-agent-benchmark#26, plus llms.txt & publication drafts

Local Development & Reproducibility

# 1. Install dependencies & build CLI
npm ci && npm run build

# 2. Validate capability registry & all 6 blueprints
npm run validate

# 3. Run unit, benchmark harness, and live Playground integration tests
npm test
python3 -m unittest discover -s benchmarks/harness -p 'test_*.py' -v
npm run test:integration

# 4. Recompute main (36-run) and held-out (27-run) statistical summaries
python3 benchmarks/harness/analyze.py
python3 benchmarks/harness/analyze.py --input benchmarks/results/runs-heldout.jsonl --output benchmarks/results/summary-heldout.json

License & Agent Handoff

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables local, permissioned development workflows from compatible AI clients, including filesystem editing, interactive terminals, durable jobs, Git operations, and semantic browser testing.
      44 npm
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables developers using agentic AI tools to scaffold applications and integration cards, retrieve API references and best-practice guidelines, inspect project metadata, validate manifests, and detect and fix framework-specific code issues.
      547 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to build professional websites using a curated component registry, WCAG-verified design systems and tokens, a human-in-the-loop visual editor, and real-browser Chromium QA that verifies rendered pages and iterates on fixes. It exposes deterministic design decisions, screenshots and evidence-backed quality scores as MCP tools over stdio or Streamable HTTP.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to analyse local source trees, generate starter projects for multiple targets without overwriting files, and verify generated manifests and entry files. It also exposes source and runtime inspection tools so agents can gather evidence about software artifacts within bounded, honest checks.
      2
      MIT