@the-bearded-bear/claude-craft 9.2.0 → 9.2.1
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.
- package/Dev/i18n/base/Angular/rules/00-project-context.md.template +1 -1
- package/Dev/i18n/base/Angular/rules/03-coding-standards.md +17 -16
- package/Dev/i18n/base/Angular/rules/06-tooling.md +2 -2
- package/Dev/i18n/base/CSharp/rules/06-tooling.md +8 -6
- package/Dev/i18n/base/Common/hooks/scripts/block-dangerous-commands.sh +93 -48
- package/Dev/i18n/base/Common/hooks/scripts/guard-network.sh +58 -0
- package/Dev/i18n/base/Common/hooks/scripts/lib/hook-io.sh +181 -0
- package/Dev/i18n/base/Common/hooks/scripts/notify-slack.sh +21 -32
- package/Dev/i18n/base/Common/hooks/scripts/output-filter.sh +23 -0
- package/Dev/i18n/base/Common/hooks/scripts/output-size-hint.sh +19 -0
- package/Dev/i18n/base/Common/hooks/scripts/post-edit-lint.sh +29 -53
- package/Dev/i18n/base/Common/hooks/scripts/post-tool-failure.sh +50 -0
- package/Dev/i18n/base/Common/hooks/scripts/pre-commit-check.sh +59 -63
- package/Dev/i18n/base/Common/hooks/scripts/pre-compact.sh +52 -0
- package/Dev/i18n/base/Common/hooks/scripts/protect-sensitive-files.sh +16 -0
- package/Dev/i18n/base/Common/hooks/scripts/quality-gate.sh +49 -92
- package/Dev/i18n/base/Common/hooks/scripts/session-end.sh +51 -0
- package/Dev/i18n/base/Common/hooks/scripts/session-init.sh +45 -69
- package/Dev/i18n/base/Common/hooks/templates/examples/README.md +59 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/auto-format.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/block-dangerous-commands.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/context-reinject.json +28 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/output-filter.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/pre-compact.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/protect-files.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/security-block.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/stop-hook.json +16 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/user-prompt-submit.json +16 -0
- package/Dev/i18n/base/Common/hooks/templates/hooks.default.json +72 -0
- package/Dev/i18n/base/Common/hooks/templates/{settings-hooks.json → hooks.full.json} +22 -23
- package/Dev/i18n/base/Common/hooks/templates/hooks.memory.json +62 -0
- package/Dev/i18n/base/Common/templates/AGENTS.md.template +1 -1
- package/Dev/i18n/base/Common/templates/settings.json.template +46 -0
- package/Dev/i18n/base/Flutter/rules/00-project-context.md.template +9 -9
- package/Dev/i18n/base/Laravel/checks/code-quality.md +1 -1
- package/Dev/i18n/base/Laravel/rules/00-project-context.md.template +2 -2
- package/Dev/i18n/base/Laravel/rules/06-tooling.md +10 -8
- package/Dev/i18n/base/Laravel/rules/07-testing-laravel.md +2 -0
- package/Dev/i18n/base/Laravel/rules/08-quality-tools.md +2 -2
- package/Dev/i18n/base/PHP/rules/00-project-context.md.template +2 -2
- package/Dev/i18n/base/Tauri/rules/02-architecture-tauri.md +1 -0
- package/Dev/i18n/base/Vercel/checks/all.md +1 -1
- package/Dev/i18n/base/Vercel/checks/architecture.md +1 -1
- package/Dev/i18n/base/Vercel/rules/02-architecture-vercel.md +4 -2
- package/Dev/i18n/base/Vercel/rules/06-tooling.md +7 -5
- package/Dev/i18n/base/Vercel/rules/11-security-vercel.md +1 -1
- package/Dev/i18n/base/Vite/rules/06-tooling.md +2 -1
- package/Dev/i18n/base/Vite/rules/08-quality-tools.md +1 -1
- package/Dev/i18n/base/VueJS/rules/06-tooling.md +3 -3
- package/Dev/i18n/base/VueJS/rules/07-testing-vuejs.md +9 -8
- package/Dev/i18n/base/VueJS/rules/08-quality-tools.md +1 -1
- package/Dev/i18n/base/WordPress/checklists/new-feature.md +59 -0
- package/Dev/i18n/base/WordPress/checklists/pre-commit.md +125 -0
- package/Dev/i18n/base/WordPress/checks/all.md +257 -0
- package/Dev/i18n/base/WordPress/checks/architecture.md +157 -0
- package/Dev/i18n/base/WordPress/checks/code-quality.md +158 -0
- package/Dev/i18n/base/WordPress/checks/security.md +158 -0
- package/Dev/i18n/base/WordPress/checks/testing.md +157 -0
- package/Dev/i18n/base/WordPress/commands/check.md +28 -0
- package/Dev/i18n/base/WordPress/rules/00-project-context.md.template +169 -0
- package/Dev/i18n/base/WordPress/rules/02-architecture-wordpress.md +174 -0
- package/Dev/i18n/base/WordPress/rules/03-coding-standards.md +98 -0
- package/Dev/i18n/base/WordPress/rules/06-tooling.md +146 -0
- package/Dev/i18n/base/WordPress/rules/07-testing-wordpress.md +150 -0
- package/Dev/i18n/base/WordPress/rules/08-quality-tools.md +161 -0
- package/Dev/i18n/base/WordPress/rules/11-security-wordpress.md +175 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/REFERENCE.md +214 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/SKILL.md +40 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/checklist.md +66 -0
- package/Dev/i18n/base/WordPress/templates/block.md +235 -0
- package/Dev/i18n/base/WordPress/templates/plugin-bootstrap.md +215 -0
- package/Dev/i18n/base/WordPress/templates/rest-endpoint.md +246 -0
- package/Dev/i18n/de/Angular/CLAUDE.md.template +2 -1
- package/Dev/i18n/de/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/de/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/de/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/de/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/de/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/de/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/de/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/de/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/de/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/de/Common/rules/11-security.md +12 -12
- package/Dev/i18n/de/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/de/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/de/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/de/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/de/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/de/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/de/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/de/Paperclip/README.md +1 -1
- package/Dev/i18n/de/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/de/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/de/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/de/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/de/Python/checks/security.md +2 -2
- package/Dev/i18n/de/Python/checks/testing.md +2 -2
- package/Dev/i18n/de/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/de/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/de/Python/templates/repository.md +2 -2
- package/Dev/i18n/de/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/de/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/de/React/templates/component.md +11 -9
- package/Dev/i18n/de/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/de/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/de/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/de/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/de/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/de/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/de/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/de/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/de/Symfony/adr/README.md +1 -1
- package/Dev/i18n/de/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/de/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/de/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/de/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/de/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/de/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/de/Symfony/templates/README.md +1 -1
- package/Dev/i18n/de/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/de/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/de/Vercel/checks/all.md +1 -1
- package/Dev/i18n/de/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/de/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/de/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/de/WordPress/checks/all.md +242 -0
- package/Dev/i18n/de/WordPress/commands/check.md +28 -0
- package/Dev/i18n/en/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/en/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/en/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/en/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/en/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/en/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/en/Common/hooks/HOOKS-QUICKSTART.md +31 -43
- package/Dev/i18n/en/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/en/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/en/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/en/Common/rules/11-security.md +12 -12
- package/Dev/i18n/en/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/en/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/en/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/en/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/en/Laravel/CLAUDE.md.template +1 -1
- package/Dev/i18n/en/Laravel/agents/laravel-reviewer.md +3 -3
- package/Dev/i18n/en/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/en/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/en/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/en/Paperclip/README.md +1 -1
- package/Dev/i18n/en/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/en/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/en/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/en/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/en/Python/checks/security.md +2 -2
- package/Dev/i18n/en/Python/checks/testing.md +2 -2
- package/Dev/i18n/en/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/en/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/en/Python/templates/repository.md +2 -2
- package/Dev/i18n/en/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/en/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/en/React/templates/component.md +11 -9
- package/Dev/i18n/en/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/en/ReactNative/rules/02-architecture.md +4 -4
- package/Dev/i18n/en/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/en/ReactNative/rules/07-testing-reactnative.md +1 -1
- package/Dev/i18n/en/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/en/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/en/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/en/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/en/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/en/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/en/Symfony/adr/README.md +1 -1
- package/Dev/i18n/en/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/en/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/en/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/en/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/en/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/en/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/en/Symfony/templates/README.md +1 -1
- package/Dev/i18n/en/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/en/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/en/Vercel/checks/all.md +1 -1
- package/Dev/i18n/en/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/en/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/en/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/en/WordPress/checks/all.md +241 -0
- package/Dev/i18n/en/WordPress/commands/check.md +28 -0
- package/Dev/i18n/es/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/es/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/es/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/es/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/es/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/es/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/es/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/es/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/es/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/es/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/es/Common/rules/11-security.md +12 -12
- package/Dev/i18n/es/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/es/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/es/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/es/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/es/Laravel/agents/laravel-reviewer.md +2 -2
- package/Dev/i18n/es/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/es/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/es/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/es/Paperclip/README.md +1 -1
- package/Dev/i18n/es/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/es/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/es/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/es/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/es/Python/checks/security.md +2 -2
- package/Dev/i18n/es/Python/checks/testing.md +2 -2
- package/Dev/i18n/es/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/es/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/es/Python/templates/repository.md +2 -2
- package/Dev/i18n/es/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/es/React/templates/component.md +11 -9
- package/Dev/i18n/es/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/es/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/es/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/es/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/es/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/es/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/es/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/es/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/es/Symfony/adr/README.md +1 -1
- package/Dev/i18n/es/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/es/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/es/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/es/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/es/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/es/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/es/Symfony/templates/README.md +1 -1
- package/Dev/i18n/es/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/es/Vercel/agents/vercel-reviewer.md +2 -1
- package/Dev/i18n/es/Vercel/checks/all.md +1 -1
- package/Dev/i18n/es/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/es/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/es/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/es/WordPress/checks/all.md +241 -0
- package/Dev/i18n/es/WordPress/commands/check.md +28 -0
- package/Dev/i18n/fr/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/fr/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/fr/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/fr/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/fr/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/fr/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/fr/Common/hooks/HOOKS-QUICKSTART.md +32 -44
- package/Dev/i18n/fr/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/fr/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/fr/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/fr/Common/rules/11-security.md +12 -12
- package/Dev/i18n/fr/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/fr/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/fr/Flutter/rules/02-architecture.md +4 -4
- package/Dev/i18n/fr/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/fr/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/fr/Laravel/CLAUDE.md.template +1 -1
- package/Dev/i18n/fr/Laravel/agents/laravel-reviewer.md +3 -3
- package/Dev/i18n/fr/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/fr/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/fr/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/fr/Paperclip/README.md +1 -1
- package/Dev/i18n/fr/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/fr/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/fr/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/fr/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/fr/Python/checks/security.md +2 -2
- package/Dev/i18n/fr/Python/checks/testing.md +2 -2
- package/Dev/i18n/fr/Python/commands/dependency-audit.md +1 -2
- package/Dev/i18n/fr/Python/commands/generate-endpoint.md +7 -11
- package/Dev/i18n/fr/Python/commands/generate-model.md +6 -6
- package/Dev/i18n/fr/Python/rules/02-architecture.md +9 -24
- package/Dev/i18n/fr/Python/rules/03-coding-standards.md +19 -7
- package/Dev/i18n/fr/Python/templates/repository.md +9 -10
- package/Dev/i18n/fr/React/commands/generate-component.md +52 -51
- package/Dev/i18n/fr/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/fr/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/fr/React/templates/component.md +11 -9
- package/Dev/i18n/fr/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/fr/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/fr/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/fr/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/fr/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/fr/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/fr/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/fr/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/fr/Symfony/adr/README.md +1 -1
- package/Dev/i18n/fr/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/fr/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/fr/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/fr/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/fr/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/fr/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/fr/Symfony/templates/README.md +1 -1
- package/Dev/i18n/fr/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/fr/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/fr/Vercel/checks/all.md +1 -1
- package/Dev/i18n/fr/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/fr/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/fr/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/fr/WordPress/checks/all.md +242 -0
- package/Dev/i18n/fr/WordPress/commands/check.md +28 -0
- package/Dev/i18n/pt/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/pt/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/pt/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/pt/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/pt/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/pt/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/pt/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/pt/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/pt/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/pt/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/pt/Common/rules/11-security.md +12 -12
- package/Dev/i18n/pt/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/pt/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/pt/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/pt/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/pt/Laravel/agents/laravel-reviewer.md +2 -2
- package/Dev/i18n/pt/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/pt/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/pt/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/pt/Paperclip/README.md +1 -1
- package/Dev/i18n/pt/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/pt/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/pt/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/pt/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/pt/Python/checks/security.md +2 -2
- package/Dev/i18n/pt/Python/checks/testing.md +2 -2
- package/Dev/i18n/pt/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/pt/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/pt/Python/templates/repository.md +2 -2
- package/Dev/i18n/pt/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/pt/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/pt/React/templates/component.md +12 -10
- package/Dev/i18n/pt/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/pt/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/pt/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/pt/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/pt/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/pt/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/pt/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/pt/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/pt/Symfony/adr/README.md +1 -1
- package/Dev/i18n/pt/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/pt/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/pt/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/pt/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/pt/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/pt/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/pt/Symfony/templates/README.md +1 -1
- package/Dev/i18n/pt/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/pt/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/pt/Vercel/checks/all.md +1 -1
- package/Dev/i18n/pt/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/pt/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/pt/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/pt/WordPress/checks/all.md +241 -0
- package/Dev/i18n/pt/WordPress/commands/check.md +28 -0
- package/Dev/scripts/check-config.sh +1 -1
- package/Dev/scripts/install-common-rules.sh +65 -0
- package/Dev/scripts/install-from-config.sh +3 -0
- package/Dev/scripts/install-paperclip-rules.sh +1 -1
- package/Dev/scripts/install-wordpress-rules.sh +153 -0
- package/Dev/scripts/lib/merge-hooks.mjs +110 -0
- package/Dev/scripts/memory-lifecycle/README.md +10 -9
- package/Dev/scripts/memory-lifecycle/_db.sh +1 -1
- package/Dev/scripts/memory-lifecycle/post-tool.sh +1 -1
- package/Dev/scripts/memory-lifecycle/pre-compact.sh +5 -5
- package/Dev/scripts/memory-lifecycle/prompt-submit.sh +1 -1
- package/Dev/scripts/memory-lifecycle/session-end.sh +1 -1
- package/Dev/scripts/memory-lifecycle/session-start.sh +5 -4
- package/Dev/stack-profiles/wordpress/permissions.txt +10 -0
- package/Dev/stack-profiles/wordpress/quality.md +4 -0
- package/Dev/stack-profiles/wordpress/stack.txt +2 -0
- package/Infra/i18n/de/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/de/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/de/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/de/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/de/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/de/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/de/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/de/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/de/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/de/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/de/Hcloud/agents/hcloud-architect.md +16 -14
- package/Infra/i18n/de/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/de/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/de/Hcloud/agents/hcloud-security.md +1 -1
- package/Infra/i18n/de/Hcloud/commands/architecture.md +2 -2
- package/Infra/i18n/de/Hcloud/commands/debug.md +3 -3
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/de/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/de/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/de/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/de/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/de/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/en/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/en/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/en/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/en/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/en/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/en/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/en/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/en/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/en/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/en/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/en/Hcloud/agents/hcloud-architect.md +10 -8
- package/Infra/i18n/en/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/en/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/en/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/en/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/en/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/en/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/en/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/es/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/es/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/es/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/es/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/es/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/es/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/es/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/es/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/es/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/es/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/es/Hcloud/agents/hcloud-architect.md +11 -9
- package/Infra/i18n/es/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/es/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/es/Hcloud/commands/debug.md +1 -1
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/es/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/es/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/es/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/es/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/es/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/fr/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/fr/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/fr/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/fr/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/fr/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/fr/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/fr/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/fr/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/fr/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/fr/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/fr/Hcloud/agents/hcloud-architect.md +7 -5
- package/Infra/i18n/fr/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/fr/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/fr/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/fr/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/pt/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/pt/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/pt/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/pt/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/pt/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/pt/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/pt/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/pt/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/pt/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/pt/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/pt/Hcloud/agents/hcloud-architect.md +9 -7
- package/Infra/i18n/pt/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/pt/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/pt/Hcloud/commands/architecture.md +1 -1
- package/Infra/i18n/pt/Hcloud/commands/debug.md +1 -1
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/pt/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/pt/PgBouncer/commands/deploy-setup.md +1 -1
- package/README.md +27 -15
- package/Tools/PluginExport/export-plugin.sh +15 -17
- package/Tools/Ralph/README.md +17 -7
- package/Tools/Ralph/hooks/lib/ralph-common.sh +101 -0
- package/Tools/Ralph/hooks/pre-tool-context.sh +28 -0
- package/Tools/Ralph/hooks/session-restore.sh +94 -0
- package/Tools/Ralph/hooks/stop-dod-gate.sh +60 -0
- package/Tools/Ralph/lib/hooks-generator.sh +109 -93
- package/bundles/cursor/.cursorrules +11 -10
- package/bundles/windsurf/.windsurfrules +11 -10
- package/cli/index.js +1 -0
- package/cli/lib/doctor.js +4 -3
- package/cli/lib/help.js +1 -0
- package/cli/lib/installer.js +1 -1
- package/cli/lib/parse-args.js +12 -0
- package/cli/lib/tech-registry.js +15 -5
- package/package.json +2 -1
- package/Dev/i18n/de/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/de/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/de/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/de/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/en/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/en/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/en/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/en/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/es/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/es/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/es/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/es/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/fr/Common/hooks/scripts/post-tool-failure.sh +0 -88
- package/Dev/i18n/fr/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/fr/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/fr/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/pt/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/pt/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/pt/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/pt/Common/templates/settings.json.template +0 -128
- package/Tools/Ralph/.ralph/hooks/pre-tool-context.sh +0 -100
- package/Tools/Ralph/.ralph/hooks/session-restore.sh +0 -118
- package/Tools/Ralph/.ralph/hooks/status-injector.sh +0 -147
- package/Tools/Ralph/.ralph/hooks/stop-dod-gate.sh +0 -137
|
@@ -0,0 +1,257 @@
|
|
|
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
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Check WordPress Architecture
|
|
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 several plugins/themes, or mixes PHP, block JavaScript and theme configuration.
|
|
10
|
+
|
|
11
|
+
## MISSION
|
|
12
|
+
|
|
13
|
+
Audit the architecture of a WordPress plugin or block theme (WordPress 7.1 line; PHP 7.4 minimum, 8.3+ recommended). Stance: **extend core through its public APIs (hooks, blocks, REST, Settings API) and keep the plugin a thin wiring layer over plain, testable PHP classes**. Never modify core, never fork behavior that a filter can change. Out of scope: Bedrock, hosting and multi-environment deployment, generic PHP design (see the `php` stack), frontend frameworks outside the block editor.
|
|
14
|
+
|
|
15
|
+
All commands run in Docker (`docker compose exec app ...`, or `npx wp-env run cli ...` when WordPress itself must be loaded).
|
|
16
|
+
|
|
17
|
+
### Step 1: Plugin / Theme Layout and Bootstrap (5 points)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
docker compose exec app ls
|
|
21
|
+
docker compose exec app sh -c 'head -40 *.php | grep -nE "Plugin Name|Version|Requires at least|Requires PHP|Requires Plugins|Text Domain|Domain Path|License"'
|
|
22
|
+
docker compose exec app grep -rnE "defined\( *'ABSPATH' *\)" --include=*.php . --exclude-dir=vendor --exclude-dir=node_modules
|
|
23
|
+
docker compose exec app ls uninstall.php composer.json readme.txt theme.json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Checklist:
|
|
27
|
+
- [ ] Main plugin file has a complete header: `Plugin Name`, `Version`, `Requires at least`, `Requires PHP`, `Text Domain` matching the slug, `License`; `Requires Plugins` lists hard dependencies by slug
|
|
28
|
+
- [ ] The main file only bootstraps: constants, autoloader, activation/deactivation hooks, one `plugins_loaded` (or later) call that starts the plugin; no feature logic at file scope
|
|
29
|
+
- [ ] Every PHP file that can be requested directly starts with `defined( 'ABSPATH' ) || exit;` (files that only declare classes are still guarded)
|
|
30
|
+
- [ ] Unique prefix or namespace for every global (functions, constants, options, hooks, post types, REST namespaces, script handles); no generic names like `init_settings()`
|
|
31
|
+
- [ ] Composer PSR-4 autoload (or a single documented autoloader); no `require_once` chains scattered through the code
|
|
32
|
+
- [ ] Activation, deactivation and `uninstall.php` (or `register_uninstall_hook`) exist and are idempotent; uninstall removes options, custom tables and cron events the plugin created
|
|
33
|
+
- [ ] Block themes: `theme.json` (version 3), `style.css` header, `templates/`, `parts/`, `patterns/`; classic PHP templates only where justified
|
|
34
|
+
|
|
35
|
+
**Scoring**: 5 pts, minus 1 per violation (min 0).
|
|
36
|
+
|
|
37
|
+
### Step 2: Hooks and Separation of Concerns (6 points)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
docker compose exec app grep -rnE "add_(action|filter)\(" --include=*.php . --exclude-dir=vendor --exclude-dir=node_modules
|
|
41
|
+
docker compose exec app grep -rnE "remove_(action|filter)\(" --include=*.php . --exclude-dir=vendor
|
|
42
|
+
docker compose exec app grep -rnE '\bglobal \$|\$GLOBALS' --include=*.php . --exclude-dir=vendor
|
|
43
|
+
docker compose exec app grep -rnE "add_(action|filter)\( *'[a-z_]+' *, *function" --include=*.php . --exclude-dir=vendor
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Checklist:
|
|
47
|
+
- [ ] Hooks are registered in one place per feature (a `register()` / `boot()` method), not inside constructors of value objects or at file scope
|
|
48
|
+
- [ ] Callbacks are class methods or named functions, so they can be removed with `remove_action()` and tested; anonymous closures only for hooks that never need removal
|
|
49
|
+
- [ ] Priorities are explicit when order matters and documented; `remove_*` calls run late enough (priority and hook) to find the callback
|
|
50
|
+
- [ ] Business logic lives in plain classes with injected dependencies (including `$wpdb`, clock, HTTP client); hook callbacks are thin adapters
|
|
51
|
+
- [ ] Heavy work does not run on every request: guard with `is_admin()`, `wp_doing_ajax()` or load classes lazily on the relevant hook (`admin_init`, `rest_api_init`, `init`)
|
|
52
|
+
- [ ] The plugin exposes its own extension points (`apply_filters()` / `do_action()`) with prefixed names for behavior that integrators may change, documented with a docblock
|
|
53
|
+
- [ ] Globals (`$post`, `$wp_query`) are read through functions (`get_post()`, `get_queried_object()`); any temporary global change is restored (`wp_reset_postdata()`)
|
|
54
|
+
- [ ] Custom post types, taxonomies and meta are registered on `init` with `show_in_rest` where the editor or REST needs them; rewrite rules are flushed only on activation/deactivation
|
|
55
|
+
|
|
56
|
+
**Scoring**: 6 pts. Deduct 1 per feature mixing business rules with hook plumbing, 1 per irremovable callback that integrators need, 1 per file-scope side effect, max -6.
|
|
57
|
+
|
|
58
|
+
### Step 3: Blocks, Themes and the Interactivity API (5 points)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
docker compose exec app find . -name block.json -not -path "./node_modules/*" -not -path "./vendor/*"
|
|
62
|
+
docker compose exec app grep -rnE "wp_register_block_types_from_metadata_collection|register_block_type\(|blocks-manifest" --include=*.php . --exclude-dir=vendor
|
|
63
|
+
docker compose exec app grep -rnE "\"apiVersion\"|\"viewScriptModule\"|\"render\"|\"supports\"" --include=block.json . --exclude-dir=node_modules
|
|
64
|
+
docker compose exec app grep -nE '"version"|"[$]schema"' theme.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Checklist:
|
|
68
|
+
- [ ] Each block has a `block.json` with `apiVersion` 3, a namespaced `name`, `title`, `category`, `textdomain`, and declared `attributes`, `supports`, `editorScript` / `style` / `render` as needed
|
|
69
|
+
- [ ] Blocks are registered from metadata: `wp_register_block_types_from_metadata_collection()` with a `blocks-manifest.php` produced by `wp-scripts build-blocks-manifest`, or `register_block_type( __DIR__ . '/build/<block>' )` for a single block
|
|
70
|
+
- [ ] Dynamic blocks use `render.php` (or a `render_callback`) that escapes late and relies on `$attributes`, `$content`, `$block`; static markup is saved in JS only when it never changes server-side
|
|
71
|
+
- [ ] Block deprecations are provided when saved markup or attributes change
|
|
72
|
+
- [ ] Interactive front-end behavior uses the Interactivity API (`viewScriptModule`, `data-wp-interactive`, `data-wp-on--click`, a namespaced `store()`), not ad-hoc jQuery on the front end
|
|
73
|
+
- [ ] Block themes configure design in `theme.json` (settings, styles, `templateParts`, `customTemplates`) rather than custom CSS; patterns live in `patterns/` with a header (`Title`, `Slug`, `Categories`)
|
|
74
|
+
- [ ] Front-end assets are enqueued only where needed (block `style` / `viewScriptModule`, or conditional `wp_enqueue_scripts`) using the `*.asset.php` dependencies and version
|
|
75
|
+
|
|
76
|
+
**Scoring**: 5 pts (2 block metadata and registration, 1 dynamic rendering, 1 Interactivity API, 1 theme.json and patterns). Mark items N/A when the project has no blocks or no theme, and rescale.
|
|
77
|
+
|
|
78
|
+
### Step 4: REST API, Settings and Data (4 points)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
docker compose exec app grep -rnE "register_rest_route|permission_callback|register_setting|add_settings_(section|field)|add_options_page|add_menu_page" --include=*.php . --exclude-dir=vendor
|
|
82
|
+
docker compose exec app grep -rnE "(get|update|add)_option\(|(get|set)_transient\(|wp_cache_(get|set)\(" --include=*.php . --exclude-dir=vendor
|
|
83
|
+
docker compose exec app grep -rnE 'dbDelta|[$]wpdb->(query|get_results|get_var|insert|update)' --include=*.php . --exclude-dir=vendor
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Checklist:
|
|
87
|
+
- [ ] Custom endpoints use `register_rest_route()` on `rest_api_init` with a vendor namespace and version (`vendor/v1`), a `permission_callback` on every route, and `args` with `type`, `required`, `sanitize_callback` and `validate_callback`
|
|
88
|
+
- [ ] Controllers extend `WP_REST_Controller` (or follow its schema conventions) and return `WP_REST_Response` / `WP_Error` with proper status codes
|
|
89
|
+
- [ ] Settings use `register_setting()` with `type`, `sanitize_callback`, `default`, and `show_in_rest` when needed; admin pages use the Settings API, not hand-rolled forms
|
|
90
|
+
- [ ] Options are namespaced, grouped (one array option per feature instead of many scalar options), and large or rarely read ones use `autoload` set to false
|
|
91
|
+
- [ ] Expensive computations use transients or the object cache (`wp_cache_*` with a group) with an explicit expiration and invalidation on change
|
|
92
|
+
- [ ] Custom tables are created with `dbDelta()` on activation, versioned (a `{prefix}_db_version` option) with upgrade routines, and always accessed through `$wpdb` with the table prefix
|
|
93
|
+
- [ ] WP-CLI commands (when present) register via `WP_CLI::add_command()` inside `if ( defined( 'WP_CLI' ) && WP_CLI )` and reuse the same service classes as hooks and REST
|
|
94
|
+
|
|
95
|
+
**Scoring**: 4 pts (1 per group: REST, settings, options and caching, custom tables / WP-CLI).
|
|
96
|
+
|
|
97
|
+
### Step 5: Internationalization, Assets and Compatibility (5 points)
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
docker compose exec app grep -rnE "load_plugin_textdomain|wp_set_script_translations|esc_html__|_x\(|_n\(" --include=*.php . --exclude-dir=vendor
|
|
101
|
+
docker compose exec app grep -rnE "wp_(register|enqueue)_(script|style)|\.asset\.php" --include=*.php . --exclude-dir=vendor
|
|
102
|
+
docker compose exec app grep -rnE "<script|<style|<link rel=.stylesheet" --include=*.php . --exclude-dir=vendor
|
|
103
|
+
docker compose exec app grep -rnE "wp_remote_(get|post)|file_get_contents\( *'http|curl_init" --include=*.php . --exclude-dir=vendor
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Checklist:
|
|
107
|
+
- [ ] All user-facing strings use `__()`, `_x()`, `_n()`, `esc_html__()` with a single literal text domain matching the plugin slug (no variables as domain or string); a `.pot` file is generated with `wp i18n make-pot`
|
|
108
|
+
- [ ] JavaScript strings use `@wordpress/i18n` and `wp_set_script_translations( $handle, $domain, $path )`; `Domain Path` header set when translations ship in the plugin
|
|
109
|
+
- [ ] Assets are registered/enqueued with `wp_enqueue_script/style` and the dependencies and version from `build/*.asset.php`; no inline `<script>` / `<style>` tags in templates (use `wp_add_inline_script` / `wp_add_inline_style`)
|
|
110
|
+
- [ ] Scripts load in the footer or with the `strategy` argument set to `defer` where possible; admin assets are limited to the relevant screen via the hook suffix
|
|
111
|
+
- [ ] Bundled libraries come from npm and are built, not copied minified without source; no remote CDN assets that leak visitor data
|
|
112
|
+
- [ ] Outbound HTTP uses the HTTP API (`wp_remote_get` / `wp_safe_remote_get`) with timeouts and error handling, never raw cURL
|
|
113
|
+
- [ ] Declared `Requires at least` / `Requires PHP` match the APIs actually used; deprecated functions are not called (check with Plugin Check and `WP_DEBUG` logs)
|
|
114
|
+
- [ ] Multisite: `switch_to_blog()` / `restore_current_blog()` are paired; network-wide data uses the network option variants
|
|
115
|
+
|
|
116
|
+
**Scoring**: 5 pts (2 i18n, 2 assets and HTTP, 1 compatibility declarations).
|
|
117
|
+
|
|
118
|
+
### Step 6: WooCommerce Extension (conditional, not scored here)
|
|
119
|
+
|
|
120
|
+
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.
|
|
121
|
+
|
|
122
|
+
## OUTPUT FORMAT
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
WORDPRESS ARCHITECTURE AUDIT
|
|
126
|
+
============================
|
|
127
|
+
|
|
128
|
+
SCORE: XX/25
|
|
129
|
+
|
|
130
|
+
WordPress: X.Y PHP: X.Y Type: [plugin/block theme/both] Blocks: N REST routes: N Hooks: N
|
|
131
|
+
|
|
132
|
+
SUB-SCORES:
|
|
133
|
+
Layout and bootstrap : XX/5
|
|
134
|
+
Hooks and separation of concerns : XX/6
|
|
135
|
+
Blocks, themes, Interactivity API : XX/5
|
|
136
|
+
REST, settings and data : XX/4
|
|
137
|
+
i18n, assets and compatibility : XX/5
|
|
138
|
+
|
|
139
|
+
STRENGTHS:
|
|
140
|
+
- [...]
|
|
141
|
+
|
|
142
|
+
ISSUES (by severity):
|
|
143
|
+
- CRITICAL: [file:line] [description] -> [fix]
|
|
144
|
+
- IMPORTANT: ...
|
|
145
|
+
- MINOR: ...
|
|
146
|
+
|
|
147
|
+
RECOMMENDATIONS:
|
|
148
|
+
1. [Action] (effort: Low/Medium/High, impact: Low/Medium/High)
|
|
149
|
+
2. ...
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## IMPORTANT NOTES
|
|
153
|
+
|
|
154
|
+
- Findings must cite `file:line` and propose a concrete refactoring (for example "move the pricing rules out of the `save_post` callback into `Pricing\Calculator` so it can be unit-tested")
|
|
155
|
+
- Do not recommend a DI container, custom abstraction layers or service providers for a small plugin (YAGNI)
|
|
156
|
+
- Never edit WordPress core or third-party plugins in the audit; propose a hook or a filter instead
|
|
157
|
+
- Generic PHP design belongs to the `php` stack; hosting and deployment (Bedrock, multi-environment) are out of scope
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Check WordPress Code Quality
|
|
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 several plugins/themes, or mixes PHP and block JavaScript.
|
|
10
|
+
|
|
11
|
+
## MISSION
|
|
12
|
+
|
|
13
|
+
Audit the code quality of a WordPress plugin or block theme (WordPress 7.1 line; PHP 7.4 minimum, 8.3+ recommended). The quality gate is: **WordPress Coding Standards through PHPCS, static analysis with PHPStan (szepeviktor/phpstan-wordpress), the `@wordpress/eslint-plugin` ruleset for JavaScript, and Plugin Check for repository-level rules**. KISS / DRY / YAGNI and SOLID apply (cognitive complexity < 10, methods < 20 lines). Generic PHP style belongs to the `php` stack; this check covers the WordPress-specific parts.
|
|
14
|
+
|
|
15
|
+
All commands run in Docker (`docker compose exec app ...`).
|
|
16
|
+
|
|
17
|
+
### Step 1: PHP Standards and Static Analysis (7 points)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
docker compose exec app composer validate --strict
|
|
21
|
+
docker compose exec app vendor/bin/phpcs --standard=WordPress -s --report=summary
|
|
22
|
+
docker compose exec app vendor/bin/phpcs -i
|
|
23
|
+
docker compose exec app vendor/bin/phpstan analyse --memory-limit=1G
|
|
24
|
+
docker compose exec app grep -nE 'level|phpstan-wordpress|bootstrapFiles|stubFiles' phpstan.neon phpstan.neon.dist
|
|
25
|
+
docker compose exec app cat .phpcs.xml.dist phpcs.xml.dist
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Checklist:
|
|
29
|
+
- [ ] A committed `.phpcs.xml.dist` uses `WordPress` (or `WordPress-Core` + `WordPress-Extra` + `WordPress-Docs`), sets `minimum_wp_version`, `testVersion` (PHPCompatibilityWP) matching `Requires PHP`, `text_domain` and `prefixes` so i18n and prefix sniffs are enforced
|
|
30
|
+
- [ ] `phpcs` passes with zero errors; warnings are triaged; `phpcs:ignore` / `phpcs:disable` comments carry a reason and are scoped to one line
|
|
31
|
+
- [ ] PHPStan runs with `szepeviktor/phpstan-wordpress` (and `php-stubs/wordpress-stubs`), at level 6 minimum and a documented target of 8 or higher; the baseline, if any, only shrinks
|
|
32
|
+
- [ ] WordPress functions are typed through stubs, not suppressed with `@phpstan-ignore` wholesale; `mixed` from `get_option()` / `get_post_meta()` is narrowed before use
|
|
33
|
+
- [ ] Code matches the declared `Requires PHP`: no syntax newer than the minimum (union types, `match`, enums, readonly) unless the minimum is raised in the header and `composer.json`
|
|
34
|
+
- [ ] Short array syntax and `declare( strict_types=1 )` only where the project standard says so (WPCS itself allows both); consistency matters more than the choice
|
|
35
|
+
- [ ] No `eval`, `create_function`, `extract()`, `compact()` on user data, `@` error suppression, `error_reporting()` or `ini_set()` at runtime
|
|
36
|
+
- [ ] No `var_dump`, `print_r`, `error_log` debugging calls or `die()` left in production paths; logging goes through a guarded logger and respects `WP_DEBUG_LOG`
|
|
37
|
+
|
|
38
|
+
**Scoring**: 7 pts (2 PHPCS config and result, 2 PHPStan, 1 PHP compatibility, 2 forbidden constructs and debug leftovers).
|
|
39
|
+
|
|
40
|
+
### Step 2: JavaScript / Block Editor Code (5 points)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
docker compose exec app npx wp-scripts lint-js
|
|
44
|
+
docker compose exec app npx wp-scripts lint-style
|
|
45
|
+
docker compose exec app npx wp-scripts format --check
|
|
46
|
+
docker compose exec app npx tsc --noEmit
|
|
47
|
+
docker compose exec app grep -rnE '@wordpress/eslint-plugin|wp-scripts' package.json .eslintrc* eslint.config.*
|
|
48
|
+
docker compose exec app grep -rnE 'jQuery|[$][(]' src --include=*.js --include=*.jsx --include=*.ts --include=*.tsx
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Checklist:
|
|
52
|
+
- [ ] `@wordpress/scripts` drives build, lint and test (`wp-scripts build`, `start`, `lint-js`, `lint-style`, `test-unit-js`); no ad-hoc webpack config unless justified
|
|
53
|
+
- [ ] ESLint uses the `@wordpress/eslint-plugin` recommended config; zero errors and warnings in CI
|
|
54
|
+
- [ ] Editor code uses `@wordpress/*` packages (`@wordpress/element`, `@wordpress/components`, `@wordpress/data`, `@wordpress/block-editor`, `@wordpress/i18n`) as externals, not bundled copies of React or lodash
|
|
55
|
+
- [ ] Components are functional with hooks; `useBlockProps()` / `useBlockProps.save()` used on block roots; `edit` and `save` are pure with no side effects at render
|
|
56
|
+
- [ ] Strings in JS go through `__()` from `@wordpress/i18n` with the plugin text domain
|
|
57
|
+
- [ ] No jQuery in new editor or front-end code; the Interactivity API is used for front-end interactivity
|
|
58
|
+
- [ ] Optional TypeScript: strict mode with `@wordpress/*` types; no `any` on block attributes
|
|
59
|
+
|
|
60
|
+
**Scoring**: 5 pts (2 lint and format, 1 package usage and externals, 1 component hygiene, 1 i18n and no jQuery). Mark N/A when no JavaScript exists and rescale.
|
|
61
|
+
|
|
62
|
+
### Step 3: WordPress API Usage and Performance (5 points)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
docker compose exec app grep -rnE 'posts_per_page.*-1|numberposts.*-1|nopaging' --include=*.php . --exclude-dir=vendor
|
|
66
|
+
docker compose exec app grep -rnE 'meta_query|meta_key|orderby.*meta_value' --include=*.php . --exclude-dir=vendor
|
|
67
|
+
docker compose exec app grep -rnE 'new WP_Query|get_posts\(|query_posts\(' --include=*.php . --exclude-dir=vendor
|
|
68
|
+
docker compose exec app grep -rnE 'update_option|add_option' --include=*.php . --exclude-dir=vendor
|
|
69
|
+
docker compose exec app grep -rnE 'wp_remote_(get|post)|sleep\(|file_get_contents' --include=*.php . --exclude-dir=vendor
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Checklist:
|
|
73
|
+
- [ ] No unbounded queries: `posts_per_page => -1` is replaced by pagination or a bounded number; `no_found_rows => true` when the total is not needed; `fields => 'ids'` when only ids are used; `update_post_meta_cache` / `update_post_term_cache` set to false when unused
|
|
74
|
+
- [ ] `meta_query` and `meta_value` ordering are avoided on large sites (unindexed `wp_postmeta`); prefer taxonomies, a custom table or a precomputed field for filterable data
|
|
75
|
+
- [ ] `query_posts()` is never used; secondary loops use `WP_Query` or `get_posts()` and call `wp_reset_postdata()`; the main query is altered with `pre_get_posts`
|
|
76
|
+
- [ ] No queries inside loops (N+1): prime caches (`_prime_post_caches`, `update_meta_cache`) or batch with one query
|
|
77
|
+
- [ ] Options that are large or rarely used set `autoload` to `false` (`add_option( $name, $value, '', false )`, `update_option( $name, $value, false )`); no big arrays in autoloaded options
|
|
78
|
+
- [ ] Remote calls are cached (transients or object cache), have short timeouts, and never run on the front-end critical path without a cache
|
|
79
|
+
- [ ] Code that runs on every request (`init`, `wp_loaded`, `template_redirect`) stays cheap: no remote calls, no file scans, no unbounded database reads
|
|
80
|
+
- [ ] Cron jobs use `wp_schedule_event` / `wp_schedule_single_event` guarded by `wp_next_scheduled()` and are unscheduled on deactivation; long jobs are chunked (batch size, resumable)
|
|
81
|
+
|
|
82
|
+
**Scoring**: 5 pts, minus 1 per violation family (queries, meta, N+1, options, remote or cron), min 0.
|
|
83
|
+
|
|
84
|
+
### Step 4: KISS / DRY / YAGNI and Complexity (3 points)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
docker compose exec app vendor/bin/phpcs --standard=Generic --sniffs=Generic.Metrics.CyclomaticComplexity,Generic.Metrics.NestingLevel --report=summary
|
|
88
|
+
docker compose exec app sh -c 'find . -name "*.php" -not -path "./vendor/*" -not -path "./node_modules/*" | xargs wc -l | sort -rn | head -10'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Checklist:
|
|
92
|
+
- [ ] Cognitive complexity < 10, cyclomatic complexity < 10, nesting <= 3, methods < 20 lines (target 10), at most 4 parameters
|
|
93
|
+
- [ ] Early returns and guard clauses; no `else` after `return`
|
|
94
|
+
- [ ] Rule of three before abstracting; no speculative interfaces, factories or settings
|
|
95
|
+
- [ ] No God classes (the main plugin class does not own settings, REST, admin UI and cron at once)
|
|
96
|
+
- [ ] No duplicated capability / nonce / sanitize snippets: shared helpers or request value objects
|
|
97
|
+
|
|
98
|
+
**Scoring**: 3 pts (1 complexity, 1 duplication, 1 YAGNI and class size).
|
|
99
|
+
|
|
100
|
+
### Step 5: Error Handling, Documentation and Release Hygiene (5 points)
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
docker compose exec app grep -rnE 'is_wp_error|new WP_Error|wp_die\(|trigger_error|_doing_it_wrong|_deprecated_' --include=*.php . --exclude-dir=vendor
|
|
104
|
+
docker compose exec app grep -nE 'Stable tag|Tested up to|Requires at least|Requires PHP' readme.txt
|
|
105
|
+
docker compose exec app npx wp-env run cli wp plugin check <plugin-slug> --format=table
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Checklist:
|
|
109
|
+
- [ ] Functions that can fail return `WP_Error` (or throw a typed exception caught at the hook boundary); callers use `is_wp_error()`; `wp_die()` is limited to admin form handlers
|
|
110
|
+
- [ ] Public hooks and functions have docblocks with `@since`, `@param`, `@return`; hooks are documented with `@param` descriptions for the hook arguments
|
|
111
|
+
- [ ] Deprecations use `_deprecated_function()` / `_deprecated_hook()`; misuse uses `_doing_it_wrong()`
|
|
112
|
+
- [ ] `readme.txt` (WordPress.org format) has `Stable tag`, `Tested up to`, `Requires at least`, `Requires PHP` consistent with the main plugin header; `CHANGELOG` is current
|
|
113
|
+
- [ ] Plugin Check (the `plugin-check` plugin or `wp plugin check`) reports no errors; the PCP ruleset is part of CI
|
|
114
|
+
- [ ] Version is bumped consistently (plugin header, constant, `package.json`, `readme.txt`)
|
|
115
|
+
- [ ] Build output (`build/`) is generated by CI or committed deliberately; `vendor/` and `node_modules/` are excluded from the distributed ZIP (`.distignore`)
|
|
116
|
+
|
|
117
|
+
**Scoring**: 5 pts (2 error handling, 1 documentation, 1 readme and versions, 1 Plugin Check and distribution).
|
|
118
|
+
|
|
119
|
+
### Step 6: WooCommerce Extension (conditional, not scored here)
|
|
120
|
+
|
|
121
|
+
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.
|
|
122
|
+
|
|
123
|
+
## OUTPUT FORMAT
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
WORDPRESS CODE QUALITY AUDIT
|
|
127
|
+
============================
|
|
128
|
+
|
|
129
|
+
SCORE: XX/25
|
|
130
|
+
|
|
131
|
+
WordPress: X.Y PHP: X.Y PHPCS errors: N PHPStan level: N (errors: N) ESLint problems: N Plugin Check errors: N
|
|
132
|
+
|
|
133
|
+
SUB-SCORES:
|
|
134
|
+
PHP standards and static analysis : XX/7
|
|
135
|
+
JavaScript / block editor : XX/5
|
|
136
|
+
WordPress API usage, performance : XX/5
|
|
137
|
+
KISS / DRY / YAGNI, complexity : XX/3
|
|
138
|
+
Errors, docs, release hygiene : XX/5
|
|
139
|
+
|
|
140
|
+
STRENGTHS:
|
|
141
|
+
- [...]
|
|
142
|
+
|
|
143
|
+
ISSUES (by severity):
|
|
144
|
+
- CRITICAL: [file:line] [description] -> [fix]
|
|
145
|
+
- IMPORTANT: ...
|
|
146
|
+
- MINOR: ...
|
|
147
|
+
|
|
148
|
+
RECOMMENDATIONS:
|
|
149
|
+
1. [Action] (effort: Low/Medium/High, impact: Low/Medium/High)
|
|
150
|
+
2. ...
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## IMPORTANT NOTES
|
|
154
|
+
|
|
155
|
+
- Findings must cite `file:line` and show the corrected snippet
|
|
156
|
+
- Prefer automatable fixes: `phpcbf` for style, a PHPStan baseline plan, a CI job running PHPCS, PHPStan, `wp-scripts lint-js` and Plugin Check
|
|
157
|
+
- Do not rewrite working code only to satisfy a stylistic sniff without a team decision; propose a ruleset exclusion with a reason instead
|
|
158
|
+
- Generic PHP design and PER-CS style belong to the `php` stack; hosting concerns are out of scope
|