Skip to content

Commit ffa67c7

Browse files
noelsaw1claude
andcommitted
Add scanner quick reference and MCP server docs to AGENTS.md
- New "WP Code Check Scanner — Quick Reference" section with CLI flags, output locations, MCP server config, and pattern library pointer - Updated version tag to v2.2.9 - Include user-created CLAUDE.md that points agents to AGENTS.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 24f2d75 commit ffa67c7

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

AGENTS.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WordPress Development Guidelines for AI Agents
22

3-
_Last updated: v2.2.0 — 2026-01-15_
3+
_Last updated: v2.2.9 — 2026-03-24_
44

55
You are a seasoned CTO with 25 years of experience. Your goal is to build usable v1.0 systems that balance time, effort, and risk. You do not take shortcuts that incur unmanageable technical debt. You build modularized systems with centralized helpers (SOT) adhering strictly to DRY principles. Measure twice, build once, and deliver immediate value without sacrificing security, quality, or performance.
66

@@ -23,6 +23,51 @@ This document defines the principles, constraints, and best practices that AI ag
2323

2424
## 🤖 Project-Specific AI Tasks
2525

26+
### WP Code Check Scanner — Quick Reference
27+
28+
WP Code Check is a zero-dependency static analysis toolkit for WordPress. AI agents should know the scanner entrypoint, key flags, and integration points.
29+
30+
**Scanner CLI:**
31+
```bash
32+
dist/bin/check-performance.sh --paths /path/to/plugin --format json
33+
```
34+
35+
**Key flags:**
36+
| Flag | Purpose |
37+
|------|---------|
38+
| `--paths <dir>` | Directory to scan (required) |
39+
| `--format json\|text` | Output format (default: json, generates HTML report) |
40+
| `--strict` | Fail on warnings (useful for CI) |
41+
| `--no-log` | Suppress file logging (JSON still goes to stdout) |
42+
| `--generate-baseline` | Generate baseline for legacy code suppression |
43+
| `--project <name>` | Use a saved template configuration |
44+
| `--severity-config <path>` | Custom severity overrides |
45+
46+
**Output locations:**
47+
- JSON logs: `dist/logs/[TIMESTAMP].json`
48+
- HTML reports: `dist/reports/[TIMESTAMP].html`
49+
- HTML from JSON: `python3 dist/bin/json-to-html.py <input.json> <output.html>`
50+
51+
**MCP Server (Model Context Protocol):**
52+
WPCC includes an MCP server at `dist/bin/mcp-server.js` that exposes scan results to AI assistants (Claude Desktop, Cline, etc.). Configure in your MCP client:
53+
```json
54+
{
55+
"mcpServers": {
56+
"wp-code-check": {
57+
"command": "node",
58+
"args": ["/absolute/path/to/wp-code-check/dist/bin/mcp-server.js"]
59+
}
60+
}
61+
}
62+
```
63+
See [MCP-README.md](dist/bin/MCP-README.md) for full setup.
64+
65+
**End-to-end workflow:** For scan → AI triage → HTML report → GitHub issue, see [_AI_INSTRUCTIONS.md](dist/TEMPLATES/_AI_INSTRUCTIONS.md).
66+
67+
**Pattern library:** JSON pattern definitions live in `dist/patterns/*.json`. Each has an `id`, `severity`, `search_pattern`, and optional `exclude_patterns`.
68+
69+
---
70+
2671
### Template Completion for Performance Checks
2772

2873
This project includes a **Project Templates** feature (alpha) that allows users to save configuration for frequently-scanned WordPress plugins/themes. When a user creates a minimal template file (just a path), AI agents can auto-complete it with full metadata.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please review AGENTS.md for instructions that Claude Code should follow.

0 commit comments

Comments
 (0)