@the-bearded-bear/claude-craft 9.2.0-next.8903976 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/Dev/scripts/check-config.sh +1 -1
  2. package/Dev/scripts/install-from-config.sh +0 -3
  3. package/README.md +2 -5
  4. package/bundles/cursor/.cursorrules +1 -2
  5. package/bundles/windsurf/.windsurfrules +1 -2
  6. package/cli/lib/tech-registry.js +0 -10
  7. package/package.json +1 -1
  8. package/Dev/i18n/base/WordPress/checklists/new-feature.md +0 -59
  9. package/Dev/i18n/base/WordPress/checklists/pre-commit.md +0 -125
  10. package/Dev/i18n/base/WordPress/checks/all.md +0 -257
  11. package/Dev/i18n/base/WordPress/checks/architecture.md +0 -157
  12. package/Dev/i18n/base/WordPress/checks/code-quality.md +0 -158
  13. package/Dev/i18n/base/WordPress/checks/security.md +0 -158
  14. package/Dev/i18n/base/WordPress/checks/testing.md +0 -157
  15. package/Dev/i18n/base/WordPress/commands/check.md +0 -28
  16. package/Dev/i18n/base/WordPress/rules/00-project-context.md.template +0 -169
  17. package/Dev/i18n/base/WordPress/rules/02-architecture-wordpress.md +0 -172
  18. package/Dev/i18n/base/WordPress/rules/03-coding-standards.md +0 -98
  19. package/Dev/i18n/base/WordPress/rules/06-tooling.md +0 -146
  20. package/Dev/i18n/base/WordPress/rules/07-testing-wordpress.md +0 -150
  21. package/Dev/i18n/base/WordPress/rules/08-quality-tools.md +0 -161
  22. package/Dev/i18n/base/WordPress/rules/11-security-wordpress.md +0 -174
  23. package/Dev/i18n/base/WordPress/skills/woocommerce/REFERENCE.md +0 -214
  24. package/Dev/i18n/base/WordPress/skills/woocommerce/SKILL.md +0 -40
  25. package/Dev/i18n/base/WordPress/skills/woocommerce/checklist.md +0 -66
  26. package/Dev/i18n/base/WordPress/templates/block.md +0 -235
  27. package/Dev/i18n/base/WordPress/templates/plugin-bootstrap.md +0 -215
  28. package/Dev/i18n/base/WordPress/templates/rest-endpoint.md +0 -246
  29. package/Dev/i18n/de/WordPress/CLAUDE.md.template +0 -100
  30. package/Dev/i18n/de/WordPress/agents/wordpress-reviewer.md +0 -348
  31. package/Dev/i18n/de/WordPress/checks/all.md +0 -242
  32. package/Dev/i18n/de/WordPress/commands/check.md +0 -28
  33. package/Dev/i18n/en/WordPress/CLAUDE.md.template +0 -100
  34. package/Dev/i18n/en/WordPress/agents/wordpress-reviewer.md +0 -348
  35. package/Dev/i18n/en/WordPress/checks/all.md +0 -241
  36. package/Dev/i18n/en/WordPress/commands/check.md +0 -28
  37. package/Dev/i18n/es/WordPress/CLAUDE.md.template +0 -100
  38. package/Dev/i18n/es/WordPress/agents/wordpress-reviewer.md +0 -348
  39. package/Dev/i18n/es/WordPress/checks/all.md +0 -241
  40. package/Dev/i18n/es/WordPress/commands/check.md +0 -28
  41. package/Dev/i18n/fr/WordPress/CLAUDE.md.template +0 -100
  42. package/Dev/i18n/fr/WordPress/agents/wordpress-reviewer.md +0 -348
  43. package/Dev/i18n/fr/WordPress/checks/all.md +0 -242
  44. package/Dev/i18n/fr/WordPress/commands/check.md +0 -28
  45. package/Dev/i18n/pt/WordPress/CLAUDE.md.template +0 -100
  46. package/Dev/i18n/pt/WordPress/agents/wordpress-reviewer.md +0 -348
  47. package/Dev/i18n/pt/WordPress/checks/all.md +0 -241
  48. package/Dev/i18n/pt/WordPress/commands/check.md +0 -28
  49. package/Dev/scripts/install-wordpress-rules.sh +0 -153
  50. package/Dev/stack-profiles/wordpress/permissions.txt +0 -10
  51. package/Dev/stack-profiles/wordpress/quality.md +0 -4
  52. package/Dev/stack-profiles/wordpress/stack.txt +0 -2
@@ -237,7 +237,7 @@ check_common_installation() {
237
237
  # ─────────────────────────────────────────────────────────────────────────────
238
238
  # Techs connues (namespace de commandes = clé de la techno)
239
239
  # ─────────────────────────────────────────────────────────────────────────────
240
- DEV_TECHS=" symfony flutter react reactnative angular csharp laravel vuejs php python vite vercel paperclip ruby rust tauri wordpress "
240
+ DEV_TECHS=" symfony flutter react reactnative angular csharp laravel vuejs php python vite vercel paperclip ruby rust tauri "
241
241
  INFRA_TECHS=" docker coolify kubernetes opentofu ansible hcloud pgbouncer frankenphp "
242
242
 
243
243
  # Vérifie la présence d'agents d'un préfixe donné (agents infra : <tech>-*.md)
@@ -453,9 +453,6 @@ get_install_script() {
453
453
  tauri)
454
454
  script="${SCRIPT_DIR}/install-tauri-rules.sh"
455
455
  ;;
456
- wordpress)
457
- script="${SCRIPT_DIR}/install-wordpress-rules.sh"
458
- ;;
459
456
  common)
460
457
  script="${SCRIPT_DIR}/install-common-rules.sh"
461
458
  ;;
package/README.md CHANGED
@@ -32,8 +32,6 @@ A comprehensive framework for AI-assisted development with [Claude Code](https:/
32
32
 
33
33
  **Deux nouveaux stacks (2026-11-09, v9.2.0) :** Rust / Axum (15e) et Tauri (16e), Claude Code recommandé : 2.1.319. Détails : [CHANGELOG](CHANGELOG.md#920---2026-11-09).
34
34
 
35
- **Nouveau stack WordPress (2026-11-10) :** `--tech=wordpress` (communautaire) installe WordPress 7.1 pour plugins et thèmes blocs : 6 règles en anglais (architecture plugin/thème, hooks, `block.json`/`render.php`, REST `permission_callback`, WP-CLI, WPCS/PHPStan, wp-env, tests `WP_UnitTestCase` / Playwright), l'agent `@wordpress-reviewer` et `/wordpress:check <axe>` dans les 5 langues. **Modulaire** : WooCommerce 11.2 (HPOS, Store API, blocs Cart/Checkout) est livré comme skill `woocommerce` chargé à la demande, absent du contexte d'un WordPress simple. Détails : [CHANGELOG](CHANGELOG.md#unreleased).
36
-
37
35
  **Nouveau stack Tauri v2 (2026-11-09) :** `--tech=tauri` (communautaire) installe Tauri 2.12 pour applications desktop et mobile (cœur Rust, front web agnostique) : 6 règles en anglais (architecture `src-tauri/`, commands/IPC, capabilities et permissions, CSP, pattern Isolation, updater signé, tests mock runtime / `mockIPC` / WebdriverIO), l'agent `@tauri-reviewer` et `/tauri:check <axe>` dans les 5 langues. Détails : [CHANGELOG](CHANGELOG.md#920---2026-11-09).
38
36
 
39
37
  **Nouveau stack Rust / Axum (2026-11-08) :** `--tech=rust` installe Rust 1.99 (édition 2024) + Axum 0.8 (workspace en couches, Tokio, Tower, SQLx, thiserror + RFC 9457, cargo-nextest, Clippy, cargo-deny) dans les 5 langues : 6 règles, l'agent `@rust-reviewer` et `/rust:check <axe>`. Détails : [CHANGELOG](CHANGELOG.md#920---2026-11-09).
@@ -228,7 +226,6 @@ Claude Code is powerful on its own. Claude Craft makes it **consistent and team-
228
226
  | **Vite** _(community)_ | 8.3 | `--tech=vite` |
229
227
  | **Vercel** _(community)_ | 63.1.2 | `--tech=vercel` |
230
228
  | **Tauri** _(community)_ | 2.12 (desktop + mobile) | `--tech=tauri` |
231
- | **WordPress** _(community)_ | 7.1 (plugins + block themes, WooCommerce opt-in) | `--tech=wordpress` |
232
229
  | **React Native** | 0.87 (New Architecture) | `--tech=reactnative` |
233
230
  | **C# / .NET** | 10 LTS / C# 14 | `--tech=csharp` |
234
231
  | **Laravel** | 13.x / PHP 8.3+ (8.5 recommandé) | `--tech=laravel` |
@@ -253,7 +250,7 @@ See [Technologies](docs/TECHNOLOGIES.md) for full details.
253
250
  | Category | Count | Examples |
254
251
  |----------|-------|---------|
255
252
  | **Agents** | 31 default (+ 39 infra on-demand) | `@tdd-coach`, `@api-designer`, `@symfony-reviewer`, `@kubernetes-architect`, `@hcloud-architect` |
256
- | **Commands** | 143 across 18 namespaces (201 total with infra/project, including 66 redirect stubs kept until 10.0) | `/workflow:init`, `/team:audit`, `/react:generate-component` |
253
+ | **Commands** | 143 across 18 namespaces (200 total with infra/project, including 66 redirect stubs kept until 10.0) | `/workflow:init`, `/team:audit`, `/react:generate-component` |
257
254
  | **Skills** | 55 | Architecture, testing, security, DDD best practices |
258
255
  | **Templates** | 21 | Code generation patterns, BMAD project templates |
259
256
  | **Checklists** | 10 | Commit, feature, release quality gates |
@@ -295,7 +292,7 @@ These are the commands you'll use most:
295
292
  | `/common:ralph-run "task"` | Run Claude in continuous loop until task is done |
296
293
  | `/qa:recette` | Automated acceptance testing via Chrome |
297
294
 
298
- See [CLI Reference](docs/CLI-REFERENCE.md) for all 143 commands across 18 namespaces (201 total including infra, project management and the redirect stubs kept until 10.0).
295
+ See [CLI Reference](docs/CLI-REFERENCE.md) for all 143 commands across 18 namespaces (200 total including infra, project management and the redirect stubs kept until 10.0).
299
296
 
300
297
  ## Installation
301
298
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  **Version:** 9.2.0 | **Languages:** en, fr, es, de, pt
12
12
 
13
- A comprehensive AI-assisted development framework for Claude Code with 17 technology stacks, 33 specialized agents (+39 infra agents on-demand), 143 commands across 18 namespaces, and BMAD v6 project management.
13
+ A comprehensive AI-assisted development framework for Claude Code with 16 technology stacks, 33 specialized agents (+39 infra agents on-demand), 143 commands across 18 namespaces, and BMAD v6 project management.
14
14
 
15
15
  ---
16
16
 
@@ -28,7 +28,6 @@ A comprehensive AI-assisted development framework for Claude Code with 17 techno
28
28
  | **Vite** _(community, framework-agnostic)_ | 8.3 | Vanilla / Library / Multi-page | `build.lib`, `vite-plugin-dts`, `input` multi-page, Workers/WASM |
29
29
  | **Vercel** _(community, deployment platform)_ | 63.1.2 | Platform config (framework-agnostic) | `vercel.json`, Functions (Node.js/Fluid Compute), ISR, Cron Jobs, Storage |
30
30
  | **Tauri** _(community, desktop & mobile)_ | 2.12 | Rust core + web frontend (framework-agnostic) | Commands/IPC, capabilities & permissions, CSP, Isolation, plugins, signed updater, iOS/Android |
31
- | **WordPress** _(community, plugins & block themes)_ | 7.1 / PHP 7.4+ (8.3+ recommandé) | Plugin/theme + hooks | block.json, theme.json, REST API, WP-CLI, WPCS, PHPStan, wp-env ; WooCommerce 11.2 via skill optionnel |
32
31
  | **Laravel** | 13.x / PHP 8.3+ (8.5 recommandé) | Clean Architecture | Actions, Pest 4/5 (Pest 5 : PHP 8.4+), Sanctum, AI SDK, Passkey |
33
32
  | **Python** | 3.15 / 3.14+ | Clean Architecture / Hexagonal | FastAPI, async/await, Pydantic, free-threading, JIT |
34
33
  | **PHP** | 8.5 (Property Hooks 8.4+) | Clean Architecture | PER-CS 3.0 (ex-PSR-12), PHPStan Level 10, Pest 5 |
@@ -10,7 +10,7 @@
10
10
 
11
11
  **Version:** 9.2.0 | **Languages:** en, fr, es, de, pt
12
12
 
13
- A comprehensive AI-assisted development framework for Claude Code with 17 technology stacks, 33 specialized agents (+39 infra agents on-demand), 143 commands across 18 namespaces, and BMAD v6 project management.
13
+ A comprehensive AI-assisted development framework for Claude Code with 16 technology stacks, 33 specialized agents (+39 infra agents on-demand), 143 commands across 18 namespaces, and BMAD v6 project management.
14
14
 
15
15
  ---
16
16
 
@@ -28,7 +28,6 @@ A comprehensive AI-assisted development framework for Claude Code with 17 techno
28
28
  | **Vite** _(community, framework-agnostic)_ | 8.3 | Vanilla / Library / Multi-page | `build.lib`, `vite-plugin-dts`, `input` multi-page, Workers/WASM |
29
29
  | **Vercel** _(community, deployment platform)_ | 63.1.2 | Platform config (framework-agnostic) | `vercel.json`, Functions (Node.js/Fluid Compute), ISR, Cron Jobs, Storage |
30
30
  | **Tauri** _(community, desktop & mobile)_ | 2.12 | Rust core + web frontend (framework-agnostic) | Commands/IPC, capabilities & permissions, CSP, Isolation, plugins, signed updater, iOS/Android |
31
- | **WordPress** _(community, plugins & block themes)_ | 7.1 / PHP 7.4+ (8.3+ recommandé) | Plugin/theme + hooks | block.json, theme.json, REST API, WP-CLI, WPCS, PHPStan, wp-env ; WooCommerce 11.2 via skill optionnel |
32
31
  | **Laravel** | 13.x / PHP 8.3+ (8.5 recommandé) | Clean Architecture | Actions, Pest 4/5 (Pest 5 : PHP 8.4+), Sanctum, AI SDK, Passkey |
33
32
  | **Python** | 3.15 / 3.14+ | Clean Architecture / Hexagonal | FastAPI, async/await, Pydantic, free-threading, JIT |
34
33
  | **PHP** | 8.5 (Property Hooks 8.4+) | Clean Architecture | PER-CS 3.0 (ex-PSR-12), PHPStan Level 10, Pest 5 |
@@ -134,16 +134,6 @@ const TECH_REGISTRY = {
134
134
  version: '2.12',
135
135
  tier: 3,
136
136
  },
137
- wordpress: {
138
- name: 'wordpress',
139
- displayName: 'WordPress',
140
- desc: 'Plugins & block themes: blocks (block.json), REST API, WP-CLI, WPCS/PHPStan, wp-env; WooCommerce as opt-in skill',
141
- namespace: 'wordpress',
142
- i18nDir: 'WordPress',
143
- installScript: 'install-wordpress-rules.sh',
144
- version: '7.1',
145
- tier: 3,
146
- },
147
137
  php: {
148
138
  name: 'php',
149
139
  displayName: 'PHP',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-bearded-bear/claude-craft",
3
- "version": "9.2.0-next.8903976",
3
+ "version": "9.2.0",
4
4
  "description": "A comprehensive framework for AI-assisted development with Claude Code. Install standardized rules, agents, and commands for your projects.",
5
5
  "type": "module",
6
6
  "main": "cli/index.js",
@@ -1,59 +0,0 @@
1
- # New Feature Checklist - WordPress
2
-
3
- Use this checklist when adding a feature to a plugin or block theme (a block, an admin screen, a REST endpoint, a WP-CLI command, a setting, a template). Apply the TDD cycle: write the failing test first, then the code.
4
-
5
- ## 1. Analysis (before code)
6
-
7
- - [ ] Goal, acceptance criteria and user roles that can use the feature are written down
8
- - [ ] Assumptions stated: minimum WordPress and PHP versions, whether multisite is supported, expected data volume, front-end versus admin context
9
- - [ ] Core already offers it? Check core APIs, blocks, block bindings, patterns and `theme.json` before writing custom code
10
- - [ ] Extension points identified: which hooks the feature uses, and which prefixed actions and filters it exposes
11
- - [ ] Risk assessed: touches data model, uploads, remote calls, capabilities, or front-end output
12
- - [ ] Impact written down (files, migrations, uninstall changes) and validated if more than 5 files or any breaking change
13
-
14
- ## 2. Design
15
-
16
- - [ ] Domain logic planned as plain PHP classes (no WordPress calls); hook callbacks stay thin adapters
17
- - [ ] Data storage chosen: option (array, `autoload` false), registered meta, custom post type/taxonomy, or custom table with `dbDelta()` and a version option
18
- - [ ] Capability model defined: which capability gates each action; custom capabilities added on activation and removed on uninstall
19
- - [ ] Namespace/prefix, text domain, script handles and REST namespace follow the project convention
20
- - [ ] Performance considered: bounded queries (no `posts_per_page => -1`), `no_found_rows`, no meta_query on large tables, caching and invalidation plan
21
- - [ ] Accessibility and i18n considered (labels, focus, translatable strings, RTL)
22
-
23
- ## 3. Implementation (TDD)
24
-
25
- - [ ] Failing tests written first (unit for domain, `WP_UnitTestCase` for hooks/REST/DB, Jest for blocks, Playwright for the main journey)
26
- - [ ] Hooks registered in one `register()` method on the right hook (`init`, `rest_api_init`, `admin_init`, ...)
27
- - [ ] REST route: `permission_callback`, `args` with validate and sanitize callbacks, schema, proper `WP_Error` statuses (see `templates/rest-endpoint.md`)
28
- - [ ] Block: `block.json` apiVersion 3, `render.php` with late escaping, deprecations if markup changes, registration through the build manifest (see `templates/block.md`)
29
- - [ ] Admin screen or setting: Settings API, capability on the menu entry, nonce on custom forms
30
- - [ ] WP-CLI command: registered under `WP_CLI`, reuses the domain services, documents synopsis and examples
31
- - [ ] Assets: enqueued only where needed with `*.asset.php` dependencies; no inline tags
32
- - [ ] Strings translatable with the literal text domain; JS translations loaded with `wp_set_script_translations()`
33
- - [ ] Capability check and nonce on every state change; input sanitized, output escaped; SQL prepared
34
-
35
- ## 4. Quality
36
-
37
- - [ ] `phpcs`, `phpstan`, `wp-scripts lint-js` clean
38
- - [ ] Coverage >= 80%; authorization and sanitization paths covered, including denied cases
39
- - [ ] Plugin Check has no new errors
40
- - [ ] Tested on the minimum and the latest declared PHP and WordPress versions (and multisite if supported)
41
- - [ ] Manual check in `wp-env` with `WP_DEBUG` on: no notices, warnings or deprecated calls
42
-
43
- ## 5. Lifecycle
44
-
45
- - [ ] Activation routine idempotent; deactivation unschedules cron events
46
- - [ ] `uninstall.php` removes the feature's options, tables, cron events, roles and capabilities
47
- - [ ] Upgrade routine handles existing installs (`db_version` comparison)
48
- - [ ] Privacy exporter and eraser registered if personal data is stored
49
-
50
- ## 6. Documentation and Delivery
51
-
52
- - [ ] Hooks documented with docblocks (`@since`, `@param`); README / `readme.txt` updated
53
- - [ ] CHANGELOG entry added; version bumped consistently if releasing
54
- - [ ] Atomic Conventional Commits (`feat(rest): add reports endpoint`)
55
- - [ ] Pull request lists the capability, nonce, escaping and SQL decisions for the reviewer
56
-
57
- ## 7. If the project depends on WooCommerce
58
-
59
- If the project depends on WooCommerce (plugin header `Requires Plugins: woocommerce`, `wc_*` calls, `before_woocommerce_init` hook), also apply `.claude/skills/woocommerce/checklist.md` (HPOS compatibility, CRUD usage, Store API and block checkout extensibility, payment and webhook security).
@@ -1,125 +0,0 @@
1
- # Pre-Commit Checklist - WordPress
2
-
3
- ## Quick Validation Before Each Commit
4
-
5
- All commands run in Docker (`docker compose exec app ...`); suites that need WordPress loaded run in the `wp-env` containers (`npx wp-env run tests-cli ...`). Keep one script or `make ci` target that chains the steps below so the local gate equals the CI gate.
6
-
7
- ### Code Quality (PHP)
8
-
9
- - [ ] WordPress Coding Standards pass (`vendor/bin/phpcs`), auto-fix with `vendor/bin/phpcbf`
10
- - [ ] PHPStan passes at the project level (`vendor/bin/phpstan analyse`), baseline not grown
11
- - [ ] New `phpcs:ignore` comments name the sniff, are one line and carry a reason
12
- - [ ] No `var_dump`, `print_r`, `error_log`, `die()` or commented-out code left behind
13
- - [ ] Every new global has the project prefix or namespace; every new PHP file has `defined( 'ABSPATH' ) || exit;` when directly reachable
14
- - [ ] Code does not use syntax newer than the declared `Requires PHP`
15
- - [ ] Methods < 10 lines (limit 20), nesting <= 3, parameters <= 4
16
-
17
- ### Code Quality (JavaScript / Blocks)
18
-
19
- - [ ] `npx wp-scripts lint-js` and `lint-style` pass with zero warnings
20
- - [ ] `npx wp-scripts format --check` passes
21
- - [ ] `build/` regenerated (`npx wp-scripts build --blocks-manifest`) when block sources changed, if `build/` is committed
22
- - [ ] Block markup changes include a `deprecated` entry and a fixture
23
- - [ ] Strings use `__()` from `@wordpress/i18n` with the plugin text domain
24
-
25
- ### Tests
26
-
27
- - [ ] PHPUnit passes (`npx wp-env run tests-cli --env-cwd=wp-content/plugins/<slug> vendor/bin/phpunit`)
28
- - [ ] Jest passes (`npx wp-scripts test-unit-js`)
29
- - [ ] New behavior has tests written first (Red, Green, Refactor)
30
- - [ ] New handlers and routes have denied-path tests (logged out, wrong role, bad nonce, invalid input)
31
- - [ ] Bug fixes include a regression test that failed before the fix
32
- - [ ] Coverage maintained at 80% or higher
33
- - [ ] No `markTestSkipped`, `test.skip` or `test.only` added without a ticket
34
-
35
- ### Security
36
-
37
- - [ ] Every state-changing handler checks `current_user_can()` with a specific capability and verifies a nonce
38
- - [ ] Every REST route has a `permission_callback`; writes never use `__return_true`
39
- - [ ] Superglobals read with existence check, `wp_unslash()` and a sanitizer
40
- - [ ] All output escaped late (`esc_html`, `esc_attr`, `esc_url`, `wp_kses_post`)
41
- - [ ] All SQL with variables uses `$wpdb->prepare()`
42
- - [ ] No `unserialize()` on user data, no `eval`, no dynamic `include`
43
- - [ ] No secrets, keys or `.env` staged
44
- - [ ] `composer audit` and `npm audit --omit=dev --audit-level=moderate` pass
45
-
46
- ### Internationalization and Assets
47
-
48
- - [ ] New user-facing strings are translatable with a literal text domain
49
- - [ ] Scripts and styles enqueued with `*.asset.php` dependencies and version; no inline tags
50
- - [ ] `.pot` regenerated if strings changed (`wp i18n make-pot`) when the project commits it
51
-
52
- ### Release Metadata
53
-
54
- - [ ] Plugin header, `readme.txt` (`Stable tag`, `Tested up to`, `Requires at least`, `Requires PHP`) and `package.json` versions consistent when releasing
55
- - [ ] Plugin Check has no errors on the built ZIP when releasing
56
- - [ ] `uninstall.php` updated when new options, tables, cron events or roles are added
57
-
58
- ### Documentation and Git
59
-
60
- - [ ] README / readme.txt / docs updated when features, hooks or settings changed
61
- - [ ] CHANGELOG updated if applicable
62
- - [ ] Commit message follows Conventional Commits (`feat(blocks): add report block`)
63
- - [ ] Commit is atomic; branch up to date with `main`
64
- - [ ] No unrelated files staged (`git status`, `git diff --staged`)
65
-
66
- ### If the project depends on WooCommerce
67
-
68
- If the project depends on WooCommerce (plugin header `Requires Plugins: woocommerce`, `wc_*` calls, `before_woocommerce_init` hook), also apply `.claude/skills/woocommerce/checklist.md`.
69
-
70
- ## Automated Validation
71
-
72
- ### CI gate script
73
-
74
- ```bash
75
- #!/usr/bin/env bash
76
- # scripts/ci.sh - same steps locally and in CI
77
- set -euo pipefail
78
-
79
- vendor/bin/phpcs
80
- vendor/bin/phpstan analyse --memory-limit=1G
81
- npx wp-scripts lint-js
82
- npx wp-scripts lint-style
83
- npx wp-scripts test-unit-js
84
- npx wp-env start
85
- npx wp-env run tests-cli --env-cwd=wp-content/plugins/my-plugin vendor/bin/phpunit
86
- composer audit
87
- npm audit --omit=dev --audit-level=moderate
88
- ```
89
-
90
- ### Git pre-commit hook (Lefthook)
91
-
92
- ```yaml
93
- # lefthook.yml
94
- pre-commit:
95
- parallel: true
96
- commands:
97
- phpcs:
98
- glob: "*.php"
99
- run: docker compose exec -T app vendor/bin/phpcs {staged_files}
100
- js:
101
- glob: "*.{js,jsx,ts,tsx}"
102
- run: docker compose exec -T app npx wp-scripts lint-js {staged_files}
103
- pre-push:
104
- commands:
105
- phpstan:
106
- run: docker compose exec -T app vendor/bin/phpstan analyse --memory-limit=1G
107
- tests:
108
- run: docker compose exec -T app sh -c 'npx wp-scripts test-unit-js && npx wp-env run tests-cli --env-cwd=wp-content/plugins/my-plugin vendor/bin/phpunit'
109
- ```
110
-
111
- Hooks are requirements, CLAUDE.md is a suggestion.
112
-
113
- ## Quick Commands
114
-
115
- ```bash
116
- docker compose exec app vendor/bin/phpcbf
117
- docker compose exec app vendor/bin/phpcs
118
- docker compose exec app vendor/bin/phpstan analyse
119
- docker compose exec app npx wp-scripts lint-js --fix
120
- docker compose exec app npx wp-env run tests-cli --env-cwd=wp-content/plugins/my-plugin vendor/bin/phpunit
121
- ```
122
-
123
- ## Final Check
124
-
125
- If any box is unchecked, do not commit. Fix first, then re-run `./scripts/ci.sh`.
@@ -1,257 +0,0 @@
1
- # Check Complete WordPress Compliance
2
-
3
- ## Arguments
4
-
5
- $ARGUMENTS (optional: path to the plugin or theme to analyze)
6
-
7
- ## Plan Mode
8
-
9
- > Plan mode is activated automatically when the scope spans PHP, block JavaScript and theme configuration, or requires cross-cutting investigation.
10
-
11
- ## MISSION
12
-
13
- Perform a complete compliance audit of the WordPress plugin or block theme (WordPress 7.1 line; PHP 7.4 minimum, 8.3+ recommended) by orchestrating the 4 major checks: Architecture, Code Quality, Tests, and Security. Produce a consolidated report with an overall score out of 100 points. Out of scope: Bedrock, hosting and multi-environment deployment, generic PHP design (see the `php` stack), frontend frameworks outside the block editor.
14
-
15
- ### Step 1: Audit Preparation
16
-
17
- Prepare audit environment:
18
- - [ ] Identify project path to audit
19
- - [ ] Verify presence of configuration files (main plugin file header, `composer.json`, `package.json`, `.wp-env.json`, `.phpcs.xml.dist`, `phpstan.neon.dist`, `phpunit.xml.dist`, `readme.txt`, `theme.json`, `block.json`, `playwright.config.ts`)
20
- - [ ] List main directories (`src/`, `includes/`, `build/`, `blocks/`, `templates/`, `parts/`, `patterns/`, `tests/`, `languages/`)
21
- - [ ] Identify WordPress minimum and tested versions, PHP minimum, project type (plugin, block theme, both), block count, and whether WooCommerce is a dependency
22
-
23
- ```bash
24
- docker compose exec app sh -c 'head -40 *.php | grep -nE "Plugin Name|Version|Requires at least|Requires PHP|Requires Plugins|Text Domain"'
25
- docker compose exec app cat .wp-env.json
26
- docker compose exec app grep -nE '"(wordpress|php)"|"require(-dev)?"|szepeviktor|wp-coding-standards|phpunit-polyfills' composer.json
27
- docker compose exec app grep -nE '@wordpress/(scripts|env|create-block|e2e-test-utils-playwright)|@playwright/test' package.json
28
- ```
29
-
30
- **Note**: If $ARGUMENTS provided, use it as project path, otherwise use current directory.
31
-
32
- ### Step 2: Architecture Audit (25 points)
33
-
34
- Execute architecture check: `/wordpress:check architecture` or follow `.claude/references/wordpress/checks/architecture.md`
35
-
36
- **Evaluated Criteria**:
37
- - Plugin/theme layout and bootstrap (5 pts)
38
- - Hooks and separation of concerns (6 pts)
39
- - Blocks, themes and the Interactivity API (5 pts)
40
- - REST API, settings and data (4 pts)
41
- - i18n, assets and compatibility (5 pts)
42
-
43
- **Reference**: `.claude/references/wordpress/checks/architecture.md`
44
-
45
- ### Step 3: Code Quality Audit (25 points)
46
-
47
- Execute code quality check: `/wordpress:check code-quality` or follow `.claude/references/wordpress/checks/code-quality.md`
48
-
49
- **Evaluated Criteria**:
50
- - PHP standards (PHPCS WordPress) and static analysis (PHPStan with phpstan-wordpress) (7 pts)
51
- - JavaScript and block editor code (`@wordpress/scripts`, ESLint) (5 pts)
52
- - WordPress API usage and performance (queries, options, caching) (5 pts)
53
- - KISS/DRY/YAGNI and complexity (3 pts)
54
- - Error handling, documentation and release hygiene (Plugin Check, readme) (5 pts)
55
-
56
- **Reference**: `.claude/references/wordpress/checks/code-quality.md`
57
-
58
- ### Step 4: Testing Audit (25 points)
59
-
60
- Execute testing check: `/wordpress:check testing` or follow `.claude/references/wordpress/checks/testing.md`
61
-
62
- **Evaluated Criteria**:
63
- - Code coverage, 80% minimum (5 pts)
64
- - PHP integration and unit tests (`WP_UnitTestCase`, wp-env) (7 pts)
65
- - JavaScript and block tests (4 pts)
66
- - End-to-end tests (Playwright) (5 pts)
67
- - Isolation, speed and structure (4 pts)
68
-
69
- **Reference**: `.claude/references/wordpress/checks/testing.md`
70
-
71
- ### Step 5: Security Audit (25 points)
72
-
73
- Execute security check: `/wordpress:check security` or follow `.claude/references/wordpress/checks/security.md`
74
-
75
- **Evaluated Criteria**:
76
- - Authorization and nonces (7 pts)
77
- - Sanitization and escaping (7 pts)
78
- - Database and injection (4 pts)
79
- - REST, AJAX and outbound requests (3 pts)
80
- - Files, secrets and supply chain (4 pts)
81
-
82
- **Reference**: `.claude/references/wordpress/checks/security.md`
83
-
84
- ### Step 6: WooCommerce Extension (conditional, not scored here)
85
-
86
- If the project depends on WooCommerce (plugin header `Requires Plugins: woocommerce`, `wc_*` calls, `before_woocommerce_init` hook), also apply `.claude/skills/woocommerce/checklist.md` and report its findings in a separate section after the scored report.
87
-
88
- ### Step 7: Consolidation and Global Scoring
89
-
90
- - [ ] Sum the 4 scores (max 100 points)
91
- - [ ] Identify critical categories (<50%)
92
- - [ ] List all critical cross-cutting issues
93
- - [ ] Prioritize actions by impact/effort
94
- - [ ] Produce final consolidated report
95
-
96
- **Grading Scale**:
97
- - 90-100: Excellent - Reference project
98
- - 75-89: Very Good - Some minor improvements
99
- - 60-74: Acceptable - Requires improvements
100
- - 40-59: Insufficient - Major refactoring required
101
- - 0-39: Critical - Complete overhaul necessary
102
-
103
- ### Step 8: Recommendations and Action Plan
104
-
105
- - [ ] Identify top 3 priority actions across all categories
106
- - [ ] Estimate effort (Low/Medium/High) and impact (Low/Medium/High) for each
107
- - [ ] Propose implementation order
108
- - [ ] Suggest quick wins (high impact/effort ratio)
109
-
110
- **Version health** (reported in the executive summary, not scored):
111
- - WordPress 7.1 is the reference line; flag a `Tested up to` that lags the current release, and a `Requires at least` far below the APIs actually used.
112
- - PHP: 7.4 is the WordPress minimum, 8.3+ is recommended; flag a plugin that raises its floor without updating `Requires PHP` and `composer.json`.
113
- - Tooling references: `@wordpress/scripts` 37, `@wordpress/env` 12, WPCS 3.4, `szepeviktor/phpstan-wordpress` 2.0, `yoast/phpunit-polyfills` 4.0, Playwright 1.65; flag major versions behind.
114
- - Report the release readiness: Plugin Check result, `readme.txt` consistency, translation readiness.
115
-
116
- ## OUTPUT FORMAT
117
-
118
- ```
119
- WORDPRESS COMPLIANCE AUDIT - COMPLETE REPORT
120
- ============================================
121
-
122
- OVERALL SCORE: XX/100
123
-
124
- COMPLIANCE LEVEL: [Excellent/Very Good/Acceptable/Insufficient/Critical]
125
-
126
- WordPress: X.Y PHP: X.Y Type: [plugin/block theme/both] WooCommerce: [yes/no] E2E: [playwright/none]
127
-
128
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
129
-
130
- SCORES BY CATEGORY:
131
-
132
- ARCHITECTURE : XX/25 [██████████░░░░░░░░░░] XX%
133
- CODE QUALITY : XX/25 [██████████░░░░░░░░░░] XX%
134
- TESTS : XX/25 [██████████░░░░░░░░░░] XX%
135
- SECURITY : XX/25 [██████████░░░░░░░░░░] XX%
136
-
137
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
138
-
139
- OVERALL STRENGTHS:
140
- 1. [Strength identified in multiple categories]
141
- 2. [Other major strength]
142
- 3. [Third strength]
143
-
144
- OVERALL IMPROVEMENTS:
145
- 1. [Cross-cutting improvement]
146
- 2. [Other recommended improvement]
147
- 3. [Third improvement]
148
-
149
- CRITICAL ISSUES:
150
- 1. [Critical issue #1 - affected category]
151
- 2. [Critical issue #2 - affected category]
152
- 3. [Critical issue #3 - affected category]
153
-
154
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
155
-
156
- DETAILS BY CATEGORY:
157
-
158
- ┌─────────────────────────────────────────────┐
159
- │ ARCHITECTURE (XX/25) │
160
- └─────────────────────────────────────────────┘
161
-
162
- Sub-scores:
163
- • Layout and bootstrap : XX/5
164
- • Hooks and separation of concerns : XX/6
165
- • Blocks, themes, Interactivity API : XX/5
166
- • REST, settings and data : XX/4
167
- • i18n, assets and compatibility : XX/5
168
-
169
- Strengths:
170
- - [Architecture strengths]
171
-
172
- Issues:
173
- - [Architecture issues]
174
-
175
- [Similar sections for Code Quality, Tests, and Security...]
176
-
177
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
178
-
179
- WOOCOMMERCE EXTENSION (only if applicable, not scored):
180
- - [Findings from .claude/skills/woocommerce/checklist.md]
181
-
182
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
183
-
184
- TOP 3 PRIORITY ACTIONS (ALL CATEGORIES):
185
-
186
- 1. CRITICAL - [Action #1]
187
- Category : [Architecture/Quality/Tests/Security]
188
- Impact : [High/Medium/Low]
189
- Effort : [High/Medium/Low]
190
- Priority : IMMEDIATE
191
-
192
- Detailed description:
193
- [Explanation of problem and proposed solution]
194
-
195
- Affected files:
196
- - [file:line]
197
-
198
- Correction example:
199
- [Code or correction command]
200
-
201
- 2. IMPORTANT - [Action #2]
202
- [Same format...]
203
-
204
- 3. RECOMMENDED - [Action #3]
205
- [Same format...]
206
-
207
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
208
-
209
- QUICK WINS (High Impact / Low Effort):
210
-
211
- - [Quick win #1] - Category: [X] - Impact: [X] - Effort: [X]
212
- - [Quick win #2] - Category: [X] - Impact: [X] - Effort: [X]
213
- - [Quick win #3] - Category: [X] - Impact: [X] - Effort: [X]
214
-
215
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
216
-
217
- RECOMMENDED ACTION PLAN:
218
-
219
- WEEK 1 (Immediate):
220
- - [ ] [Critical action #1]
221
- - [ ] [Priority quick win]
222
-
223
- WEEK 2-4 (Short term):
224
- - [ ] [Important action #2]
225
- - [ ] [Other quick wins]
226
-
227
- MONTH 2-3 (Medium term):
228
- - [ ] [Recommended action #3]
229
- - [ ] [Progressive improvements]
230
-
231
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
232
-
233
- EXECUTIVE SUMMARY:
234
-
235
- [Summary paragraph on overall project state, major strengths,
236
- major weaknesses, version health (WordPress, PHP, tooling),
237
- release readiness (Plugin Check, readme, translations), and
238
- recommended trajectory. Say whether the project is
239
- production-ready, requires corrections, or needs refactoring.]
240
-
241
- General Recommendation: [Production-ready / Minor corrections /
242
- Major refactoring / Overhaul necessary]
243
-
244
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
245
- ```
246
-
247
- ## IMPORTANT NOTES
248
-
249
- - This command orchestrates the 4 specialized audits
250
- - Use Docker for all analysis tools (`docker compose exec app ...`, `npx wp-env run ...` for suites that need WordPress loaded)
251
- - Provide concrete examples with file:line for each problem
252
- - Prioritize actions based on Impact/Effort matrix
253
- - Security problems are ALWAYS top priority; missing capability checks, injectable queries and unauthenticated write routes are release blockers
254
- - Generic PHP concerns are delegated to the `php` stack; frontend frameworks outside the block editor to their own stacks
255
- - Propose automatable corrections (CI workflow with PHPCS, PHPStan, Plugin Check, wp-env tests; pre-commit hooks)
256
- - Report must be actionable, not just descriptive
257
- - Adapt recommendations to project business context