@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,246 @@
|
|
|
1
|
+
# Template: REST Endpoint
|
|
2
|
+
|
|
3
|
+
A custom REST route with a mandatory `permission_callback`, an `args` schema with validation and sanitization, `WP_Error` responses and a PHPUnit test. Targets the WordPress 7.1 line (PHP 7.4 minimum).
|
|
4
|
+
|
|
5
|
+
## Conventions
|
|
6
|
+
|
|
7
|
+
- Register on `rest_api_init` with a vendor namespace and version (`acme/v1`)
|
|
8
|
+
- `permission_callback` is required on every route; write routes never use `__return_true`
|
|
9
|
+
- `args` declare `type`, `required`, `validate_callback` and `sanitize_callback` (or `enum` / `format` / `minimum`)
|
|
10
|
+
- The controller maps request to a domain service call to a response; business rules live in the service
|
|
11
|
+
- Return `WP_REST_Response` for success and `WP_Error` (with a `status`) for failures
|
|
12
|
+
- Per-object authorization uses the id from the request (`current_user_can( 'edit_post', $id )`)
|
|
13
|
+
- Cookie-authenticated clients send the `X-WP-Nonce` header (`wp_rest` action); `@wordpress/api-fetch` adds it automatically
|
|
14
|
+
|
|
15
|
+
## Controller (src/Rest/Reports_Controller.php)
|
|
16
|
+
|
|
17
|
+
```php
|
|
18
|
+
<?php
|
|
19
|
+
declare( strict_types=1 );
|
|
20
|
+
|
|
21
|
+
namespace Acme\Reports\Rest;
|
|
22
|
+
|
|
23
|
+
use WP_Error;
|
|
24
|
+
use WP_REST_Request;
|
|
25
|
+
use WP_REST_Response;
|
|
26
|
+
use WP_REST_Server;
|
|
27
|
+
|
|
28
|
+
defined( 'ABSPATH' ) || exit;
|
|
29
|
+
|
|
30
|
+
final class Reports_Controller {
|
|
31
|
+
|
|
32
|
+
private const NAMESPACE = 'acme/v1';
|
|
33
|
+
|
|
34
|
+
public function register_routes(): void {
|
|
35
|
+
register_rest_route(
|
|
36
|
+
self::NAMESPACE,
|
|
37
|
+
'/reports',
|
|
38
|
+
array(
|
|
39
|
+
array(
|
|
40
|
+
'methods' => WP_REST_Server::READABLE,
|
|
41
|
+
'callback' => array( $this, 'get_items' ),
|
|
42
|
+
'permission_callback' => array( $this, 'can_read' ),
|
|
43
|
+
'args' => array(
|
|
44
|
+
'per_page' => array(
|
|
45
|
+
'type' => 'integer',
|
|
46
|
+
'default' => 10,
|
|
47
|
+
'minimum' => 1,
|
|
48
|
+
'maximum' => 100,
|
|
49
|
+
'sanitize_callback' => 'absint',
|
|
50
|
+
),
|
|
51
|
+
),
|
|
52
|
+
),
|
|
53
|
+
array(
|
|
54
|
+
'methods' => WP_REST_Server::CREATABLE,
|
|
55
|
+
'callback' => array( $this, 'create_item' ),
|
|
56
|
+
'permission_callback' => array( $this, 'can_create' ),
|
|
57
|
+
'args' => $this->create_args(),
|
|
58
|
+
),
|
|
59
|
+
'schema' => array( $this, 'get_item_schema' ),
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** @return array<string, array<string, mixed>> */
|
|
65
|
+
private function create_args(): array {
|
|
66
|
+
return array(
|
|
67
|
+
'title' => array(
|
|
68
|
+
'type' => 'string',
|
|
69
|
+
'required' => true,
|
|
70
|
+
'minLength' => 1,
|
|
71
|
+
'maxLength' => 200,
|
|
72
|
+
'sanitize_callback' => 'sanitize_text_field',
|
|
73
|
+
'validate_callback' => static function ( $value ): bool {
|
|
74
|
+
return is_string( $value ) && '' !== trim( $value );
|
|
75
|
+
},
|
|
76
|
+
),
|
|
77
|
+
'status' => array(
|
|
78
|
+
'type' => 'string',
|
|
79
|
+
'enum' => array( 'draft', 'publish' ),
|
|
80
|
+
'default' => 'draft',
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public function can_read(): bool {
|
|
86
|
+
return current_user_can( 'read' );
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public function can_create() {
|
|
90
|
+
if ( ! current_user_can( 'publish_posts' ) ) {
|
|
91
|
+
return new WP_Error(
|
|
92
|
+
'acme_reports_forbidden',
|
|
93
|
+
__( 'You are not allowed to create reports.', 'acme-reports' ),
|
|
94
|
+
array( 'status' => rest_authorization_required_code() )
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public function get_items( WP_REST_Request $request ): WP_REST_Response {
|
|
101
|
+
$query = new \WP_Query(
|
|
102
|
+
array(
|
|
103
|
+
'post_type' => 'acme_report',
|
|
104
|
+
'posts_per_page' => (int) $request['per_page'],
|
|
105
|
+
'no_found_rows' => true,
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
$items = array_map( array( $this, 'prepare_item' ), $query->posts );
|
|
110
|
+
|
|
111
|
+
return rest_ensure_response( $items );
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** @return WP_REST_Response|WP_Error */
|
|
115
|
+
public function create_item( WP_REST_Request $request ) {
|
|
116
|
+
$id = wp_insert_post(
|
|
117
|
+
array(
|
|
118
|
+
'post_type' => 'acme_report',
|
|
119
|
+
'post_title' => $request['title'],
|
|
120
|
+
'post_status' => $request['status'],
|
|
121
|
+
),
|
|
122
|
+
true
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
if ( is_wp_error( $id ) ) {
|
|
126
|
+
$id->add_data( array( 'status' => 500 ) );
|
|
127
|
+
return $id;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
$response = new WP_REST_Response( $this->prepare_item( get_post( $id ) ), 201 );
|
|
131
|
+
$response->header( 'Location', rest_url( self::NAMESPACE . '/reports/' . $id ) );
|
|
132
|
+
|
|
133
|
+
return $response;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** @return array<string, mixed> */
|
|
137
|
+
private function prepare_item( \WP_Post $post ): array {
|
|
138
|
+
return array(
|
|
139
|
+
'id' => $post->ID,
|
|
140
|
+
'title' => get_the_title( $post ),
|
|
141
|
+
'status' => $post->post_status,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** @return array<string, mixed> */
|
|
146
|
+
public function get_item_schema(): array {
|
|
147
|
+
return array(
|
|
148
|
+
'$schema' => 'http://json-schema.org/draft-04/schema#',
|
|
149
|
+
'title' => 'report',
|
|
150
|
+
'type' => 'object',
|
|
151
|
+
'properties' => array(
|
|
152
|
+
'id' => array( 'type' => 'integer', 'readonly' => true ),
|
|
153
|
+
'title' => array( 'type' => 'string' ),
|
|
154
|
+
'status' => array( 'type' => 'string', 'enum' => array( 'draft', 'publish' ) ),
|
|
155
|
+
),
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Notes:
|
|
162
|
+
- Without a `validate_callback`, REST validates each argument against its declared schema keywords (`type`, `enum`, `minimum`, `maximum`, `minLength`, `maxLength`, `format`) and returns a 400 on failure
|
|
163
|
+
- A custom `validate_callback` or `sanitize_callback` replaces that default handling for the argument: re-check the constraints you still need inside it, or use the callback only for rules the schema cannot express
|
|
164
|
+
- Never return fields the caller should not see (emails, tokens, internal paths); the response schema defines the contract
|
|
165
|
+
- Public read routes may use `'permission_callback' => '__return_true'` deliberately, with a comment; never for writes
|
|
166
|
+
- For heavy features extend `WP_REST_Controller` and implement `get_items_permissions_check()`, `create_item_permissions_check()`, `prepare_item_for_response()`
|
|
167
|
+
|
|
168
|
+
## Registration
|
|
169
|
+
|
|
170
|
+
```php
|
|
171
|
+
add_action( 'rest_api_init', array( new Acme\Reports\Rest\Reports_Controller(), 'register_routes' ) );
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Calling It from JavaScript
|
|
175
|
+
|
|
176
|
+
```js
|
|
177
|
+
import apiFetch from '@wordpress/api-fetch';
|
|
178
|
+
|
|
179
|
+
const report = await apiFetch( {
|
|
180
|
+
path: '/acme/v1/reports',
|
|
181
|
+
method: 'POST',
|
|
182
|
+
data: { title: 'Q4', status: 'draft' },
|
|
183
|
+
} );
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Test (PHPUnit, integration)
|
|
187
|
+
|
|
188
|
+
```php
|
|
189
|
+
<?php
|
|
190
|
+
class Reports_Controller_Test extends WP_UnitTestCase {
|
|
191
|
+
|
|
192
|
+
public function set_up(): void {
|
|
193
|
+
parent::set_up();
|
|
194
|
+
register_post_type( 'acme_report' );
|
|
195
|
+
do_action( 'rest_api_init' );
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
public function test_anonymous_cannot_create(): void {
|
|
199
|
+
wp_set_current_user( 0 );
|
|
200
|
+
|
|
201
|
+
$request = new WP_REST_Request( 'POST', '/acme/v1/reports' );
|
|
202
|
+
$request->set_body_params( array( 'title' => 'Q4' ) );
|
|
203
|
+
|
|
204
|
+
$this->assertSame( 401, rest_do_request( $request )->get_status() );
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
public function test_subscriber_cannot_create(): void {
|
|
208
|
+
wp_set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) );
|
|
209
|
+
|
|
210
|
+
$request = new WP_REST_Request( 'POST', '/acme/v1/reports' );
|
|
211
|
+
$request->set_body_params( array( 'title' => 'Q4' ) );
|
|
212
|
+
|
|
213
|
+
$this->assertSame( 403, rest_do_request( $request )->get_status() );
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
public function test_missing_title_is_rejected(): void {
|
|
217
|
+
wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) );
|
|
218
|
+
|
|
219
|
+
$response = rest_do_request( new WP_REST_Request( 'POST', '/acme/v1/reports' ) );
|
|
220
|
+
|
|
221
|
+
$this->assertSame( 400, $response->get_status() );
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
public function test_editor_creates_and_title_is_sanitized(): void {
|
|
225
|
+
wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) );
|
|
226
|
+
|
|
227
|
+
$request = new WP_REST_Request( 'POST', '/acme/v1/reports' );
|
|
228
|
+
$request->set_body_params( array( 'title' => '<b>Q4</b>' ) );
|
|
229
|
+
$response = rest_do_request( $request );
|
|
230
|
+
|
|
231
|
+
$this->assertSame( 201, $response->get_status() );
|
|
232
|
+
$this->assertSame( 'Q4', $response->get_data()['title'] );
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Run: `npx wp-env run tests-cli --env-cwd=wp-content/plugins/acme-reports vendor/bin/phpunit --filter Reports_Controller_Test`.
|
|
238
|
+
|
|
239
|
+
## Checklist
|
|
240
|
+
|
|
241
|
+
- [ ] `register_rest_route()` on `rest_api_init`, vendor namespace and version
|
|
242
|
+
- [ ] `permission_callback` on every route; writes never `__return_true`; object-level capability where relevant
|
|
243
|
+
- [ ] `args` with `type`, `required`, validation and sanitization; response schema declared
|
|
244
|
+
- [ ] Errors are `WP_Error` with a `status`; success uses the right HTTP status (201 on create)
|
|
245
|
+
- [ ] No sensitive fields in responses
|
|
246
|
+
- [ ] Tests for anonymous (401), wrong role (403), invalid input (400) and success
|
|
@@ -26,7 +26,8 @@ src/app/
|
|
|
26
26
|
### Architektur: Feature-Based + Standalone
|
|
27
27
|
- **Standalone Components**: Keine NgModules
|
|
28
28
|
- **Signals**: Reaktives State Management
|
|
29
|
-
- **OnPush**:
|
|
29
|
+
- **OnPush**: Standard seit Angular 22.0.0 (`changeDetection` weglassen; `ChangeDetectionStrategy.Eager` nur zum Abwählen)
|
|
30
|
+
- **Signal I/O**: `input()`, `output()`, `model()` statt `@Input`/`@Output`/`EventEmitter`; kein `standalone: true` (Standard)
|
|
30
31
|
- **Modern Control Flow**: @if, @for, @switch
|
|
31
32
|
|
|
32
33
|
Siehe `rules/02-architecture.md` fuer Muster.
|
|
@@ -55,17 +55,31 @@ Ist der Zustand synchron und wird für das Rendering verwendet?
|
|
|
55
55
|
- Import aus `@angular/forms/signals`
|
|
56
56
|
- Interoperabilität mit bestehenden Reactive Forms über `SignalFormControl`-Bridge
|
|
57
57
|
|
|
58
|
-
**OnPush als Standard :**
|
|
59
|
-
-
|
|
60
|
-
-
|
|
58
|
+
**OnPush als Standard (22.0.0, Breaking Change) :**
|
|
59
|
+
- Komponenten ohne definiertes `changeDetection` sind jetzt `OnPush`; eine Deklaration ist nicht mehr nötig
|
|
60
|
+
- Um das frühere Verhalten beizubehalten, `changeDetection: ChangeDetectionStrategy.Eager` deklarieren; die `ng update`-Migration `change-detection-eager` ergänzt `Eager` bei allen bestehenden Komponenten
|
|
61
61
|
|
|
62
62
|
**HttpClient Fetch als Standard :**
|
|
63
|
-
-
|
|
63
|
+
- Fetch API ist der Standard-Transport (XHR ist nicht mehr Standard; nur `ServerXhr` in `platform-server` ist veraltet)
|
|
64
64
|
- Bessere SSR-Kompatibilität und Streaming-Unterstützung
|
|
65
65
|
|
|
66
66
|
**TypeScript 6 erforderlich :**
|
|
67
67
|
- TypeScript 5.x wird nicht mehr unterstützt — Upgrade vor Migration auf Angular 22 erforderlich
|
|
68
68
|
|
|
69
|
+
**Weitere Breaking Changes 22.0.0** (https://github.com/angular/angular/blob/main/CHANGELOG.md) **:**
|
|
70
|
+
- Router: `paramsInheritanceStrategy` ist jetzt standardmäßig `'always'` (`'emptyOnly'` setzen, um das alte Verhalten wiederherzustellen); `provideRoutes()` entfernt (`provideRouter()` oder `ROUTES` verwenden); `currentSnapshot` ist in `CanMatchFn` / `CanMatch.canMatch` jetzt erforderlich (Migration vorhanden)
|
|
71
|
+
- Forms: die Validierungsregeln `min` und `max` akzeptieren keine Strings mehr (nur Zahlen oder null)
|
|
72
|
+
- HttpClient: Upload-Fortschrittsmeldungen erfordern `provideHttpClient(withXhr())` (Schematic vorhanden); `withFetch` deprecated; `reportProgress` deprecated zugunsten von `reportUploadProgress` / `reportDownloadProgress`
|
|
73
|
+
- Core: `ComponentFactoryResolver`, `ComponentFactory`, `createNgModuleRef` und `ChangeDetectorRef.checkNoChanges` entfernt
|
|
74
|
+
- Plattform: Hammer.js-Integration entfernt; inkrementelle Hydration ist jetzt das Standardverhalten
|
|
75
|
+
- Compiler: die Diagnosen `nullishCoalescingNotNullable` und `optionalChainNotNullable` greifen jetzt in bestehenden Projekten; Attribute mit `data-`-Präfix binden keine Inputs/Outputs mehr; doppelte Input/Output-Bindungen lösen einen Fehler aus
|
|
76
|
+
|
|
77
|
+
**Neuerungen in Angular 22.2 :**
|
|
78
|
+
- Core: programmatische `ErrorBoundary`-APIs (`@boundary`-Blöcke werden vom Language Service unterstützt)
|
|
79
|
+
- Router: `containsTree` als öffentliche API; das Werfen eines `RedirectCommand` löst eine Weiterleitung aus; Router-Ressourcen sind exponiert
|
|
80
|
+
- Signal Forms: dauerhaft versteckte Felder erlaubt
|
|
81
|
+
- Compiler: Templates können auf private Member zugreifen; die Option `strictUnclaimedEventNames` erkennt falsch geschriebene Output-Bindungen
|
|
82
|
+
|
|
69
83
|
**Resource API stabil (v20+) :**
|
|
70
84
|
- `httpResource()`: Deklaratives Laden mit automatischen Zuständen (loading, error)
|
|
71
85
|
- Streaming Resources (WebSockets, SSE) über `resource()` mit abbrechbaren Lesevorgängen
|
|
@@ -143,7 +157,6 @@ export class CounterComponent {
|
|
|
143
157
|
// KORREKT: standalone + @if/@for Control Flow
|
|
144
158
|
@Component({
|
|
145
159
|
selector: 'app-user-list',
|
|
146
|
-
standalone: true,
|
|
147
160
|
template: `
|
|
148
161
|
@if (loading()) {
|
|
149
162
|
<spinner />
|
|
@@ -179,7 +192,8 @@ private readonly destroyRef = inject(DestroyRef);
|
|
|
179
192
|
|---------|----------|-------------|
|
|
180
193
|
| Signals für lokalen Zustand | signal(), computed(), effect() | BehaviorSubject für synchronen Zustand |
|
|
181
194
|
| RxJS für komplexe Datenflüsse | debounce, switchMap, websockets | RxJS für einen einfachen Boolean |
|
|
182
|
-
| Standalone-Komponenten | standalone: true, lokale Imports | NgModule für neue Komponenten |
|
|
195
|
+
| Standalone-Komponenten | Standalone (Standard seit v19, `standalone: true` überflüssig), lokale Imports | NgModule für neue Komponenten |
|
|
196
|
+
| Signal-Inputs/-Outputs | `input()`, `output()`, `model()` | `@Input()`, `@Output()`, `EventEmitter` |
|
|
183
197
|
| Smart/Dumb Pattern | Container verwaltet Logik, Presentational zeigt an | Geschäftslogik in Templates |
|
|
184
198
|
| inject() | Injection auf Klassenebene | Überladener Konstruktor |
|
|
185
199
|
|
|
@@ -365,6 +379,8 @@ Verwendet die Komponente OnPush?
|
|
|
365
379
|
NEIN --> SCHWERWIEGEND: Grund dokumentieren
|
|
366
380
|
```
|
|
367
381
|
|
|
382
|
+
Seit 22.0.0 ist OnPush der Standard: Komponenten markieren, die `ChangeDetectionStrategy.Eager` ohne Begründung deklarieren.
|
|
383
|
+
|
|
368
384
|
### Entscheidungsbaum: @defer
|
|
369
385
|
|
|
370
386
|
```
|
|
@@ -625,7 +641,7 @@ import { signal, computed } from '@angular/core';
|
|
|
625
641
|
- **Standalone als Standard**: alle neuen Komponenten müssen standalone sein
|
|
626
642
|
- **Neuer Control Flow**: @if/@for/@switch ersetzen *ngIf/*ngFor/*ngSwitch
|
|
627
643
|
- **inject() bevorzugt**: Funktionale Injection statt überladener Konstruktor
|
|
628
|
-
- **OnPush
|
|
644
|
+
- **OnPush als Standard (22.0.0+)**: nicht ohne dokumentierten Grund mit `ChangeDetectionStrategy.Eager` abwählen
|
|
629
645
|
- **@defer strategisch**: Granulares Lazy Loading für sekundäre Inhalte
|
|
630
646
|
|
|
631
647
|
---
|
|
@@ -31,7 +31,7 @@ Sie sind ein **Senior DevOps Engineer** mit über 10 Jahren Erfahrung in CI/CD,
|
|
|
31
31
|
| Docker | Multi-Stage-Builds, Image-Optimierung, Security-Scanning |
|
|
32
32
|
| Docker Compose | Lokale Orchestrierung, Profiles, Extensions |
|
|
33
33
|
| Kubernetes | Deployments, Services, Ingress, ConfigMaps, Secrets |
|
|
34
|
-
| Helm | Charts, Values, Templating | 4.
|
|
34
|
+
| Helm | Charts, Values, Templating | 4.3.1 (Helm 4 = MAJOR — Server-Side Apply, WASM-Plugins, API v4 ; Helm 3 Sicherheits-EOL Nov. 2026) |
|
|
35
35
|
|
|
36
36
|
### Cloud-Provider
|
|
37
37
|
| Provider | Services |
|
|
@@ -12,7 +12,7 @@ hooks:
|
|
|
12
12
|
- matcher: "Bash"
|
|
13
13
|
hooks:
|
|
14
14
|
- type: command
|
|
15
|
-
command: "grep -qiE '(^|[^A-Za-z_])(DROP[[:space:]]+(DATABASE|SCHEMA|TABLE)
|
|
15
|
+
command: "grep -qiE '(^|[^A-Za-z_])(DROP[[:space:]]+(DATABASE|SCHEMA|TABLE)([^A-Za-z_]|$)|TRUNCATE[[:space:]]+[^[:space:]-])' && { echo \"BLOCKIERT: destruktives SQL (DROP DATABASE/SCHEMA/TABLE, TRUNCATE). Den Befehl dem Benutzer zur eigenen Ausführung vorschlagen.\" >&2; exit 2; } || exit 0"
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# Migration Specialist Agent
|
|
@@ -126,13 +126,13 @@ Wählt automatisch das Profil basierend auf Aufgaben-Schlüsselwörtern:
|
|
|
126
126
|
### 5. Hooks-Integration (Claude Code 2.1.23+)
|
|
127
127
|
|
|
128
128
|
```
|
|
129
|
-
SessionStart → session-restore.sh → Ralph-Kontext injizieren
|
|
129
|
+
SessionStart → session-restore.sh → Ralph-Kontext injizieren + DoD auflisten (ohne Ausführung)
|
|
130
130
|
↓
|
|
131
|
-
PreToolUse (
|
|
131
|
+
PreToolUse (Agent|Task) → pre-tool-context.sh → Aktuelle Sprint-Aufgabe in Erinnerung rufen
|
|
132
132
|
↓
|
|
133
133
|
Claude arbeitet...
|
|
134
134
|
↓
|
|
135
|
-
Stop → stop-dod-gate.sh → Blockieren, wenn DoD nicht erfüllt (
|
|
135
|
+
Stop → stop-dod-gate.sh → Blockieren, wenn DoD nicht erfüllt (decision: block)
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
## /goal (interaktiv) oder Ralph (autonom/CI)?
|
|
@@ -112,17 +112,10 @@ Für fehlende Hooks die Templates in `.claude/templates/hooks/` referenzieren:
|
|
|
112
112
|
- `output-filter.json` — PostToolUse für große Output-Filterung
|
|
113
113
|
- `pre-compact.json` — PreCompact für Kontext-Erhaltung
|
|
114
114
|
- `context-reinject.json` — SessionStart für Post-Compaction-Wiederherstellung
|
|
115
|
-
- `post-compact.json` — PostCompact für Kontext-Wiederherstellung nach Compaction
|
|
116
115
|
|
|
117
|
-
####
|
|
116
|
+
#### Kontext-Wiederherstellung nach der Compaction
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
Template: `.claude/templates/hooks/post-compact.json`
|
|
122
|
-
|
|
123
|
-
Der Hook liest `context-essentials.md` (eine Datei mit aktuellem Sitzungszustand) und injiziert sie als System-Nachricht nach der Compaction. Mit dem **PreCompact**-Hook (`pre-compact.json`) kombinieren, der die Essentials vor der Compaction speichert.
|
|
124
|
-
|
|
125
|
-
Geschätzte Einsparung: vermeidet 5-15 Erklärungsrunden pro langer Sitzung (~3-8K Token).
|
|
118
|
+
Einen nützlichen PostCompact-Hook gibt es nicht: Seine Ausgabe erreicht das Modell nie. Stellen Sie das Wesentliche mit `SessionStart` (Matcher `compact`, Template `context-reinject.json`) wieder her, dessen stdout dem Kontext hinzugefügt wird, und steuern Sie die Zusammenfassung mit `PreCompact` (`pre-compact.json`, Klartext-Ausgabe).
|
|
126
119
|
|
|
127
120
|
### 5. Zusammenfassung
|
|
128
121
|
|
|
@@ -1,58 +1,46 @@
|
|
|
1
|
-
# Hooks
|
|
1
|
+
# Hooks-Schnellstart
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Claude-Code-Hooks für automatisierte Qualitätskontrolle und Sicherheit, die claude-craft in Ihrem Projekt installiert.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
1. **
|
|
7
|
+
1. **Mit dem Installer installieren** (kopiert die Skripte nach `.claude/hooks/` und führt die Hooks in `.claude/settings.json` zusammen, ohne Ihre eigenen zu überschreiben):
|
|
8
8
|
```bash
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
bash Dev/scripts/install-common-rules.sh --hooks=default /pfad/zum/projekt
|
|
10
|
+
# oder über die CLI: npx @the-bearded-bear/claude-craft install . --hooks=default
|
|
11
11
|
```
|
|
12
|
+
- `--hooks=default` (Standard): Sicherheitswächter, Secrets-Prüfung, Hinweise bei großen Ausgaben, Wiedereinspeisung des Kontexts nach der Compaction.
|
|
13
|
+
- `--hooks=full`: `default` plus Stop-Testschranke, Lint nach Änderungen, Slack-Benachrichtigung, Sitzungsmetriken und Wiederherstellungshinweise nach Tool-Fehlern.
|
|
14
|
+
- `--hooks=none`: keine Hooks. Mit `,memory` (z. B. `--hooks=default,memory`) kommt das SQLite-Gedächtnis über Sitzungen hinweg hinzu (benötigt `sqlite3` und `jq`).
|
|
12
15
|
|
|
13
|
-
2. **
|
|
14
|
-
Copy the configuration from `hooks/templates/settings-hooks.json` to your `.claude/settings.json`.
|
|
16
|
+
2. **Anpassen**: Bearbeiten Sie die Skripte in `.claude/hooks/` passend zu Ihren Werkzeugen. Ein erneuter Installer-Lauf entfernt oder überschreibt Ihre eigenen Hooks nie.
|
|
15
17
|
|
|
16
|
-
3. **
|
|
18
|
+
3. **Manuell zusammenführen**, falls gewünscht: Die Fragmente heißen `hooks.default.json`, `hooks.full.json` und `hooks.memory.json` (`node <claude-craft>/Dev/scripts/lib/merge-hooks.mjs add --settings .claude/settings.json --fragment <Fragment>`). Anpassbare Beispiele werden nach `.claude/templates/hooks/` kopiert.
|
|
17
19
|
|
|
18
|
-
##
|
|
20
|
+
## Verfügbare Hooks
|
|
19
21
|
|
|
20
|
-
| Hook |
|
|
21
|
-
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
22
|
+
| Hook | Zweck | Event | Profil |
|
|
23
|
+
|------|-------|-------|--------|
|
|
24
|
+
| `guard-network.sh` | Blockiert Herunterladen und Ausführen (`curl \| sh`) | PreToolUse | default |
|
|
25
|
+
| `block-dangerous-commands.sh` | Blockiert `rm -rf /`, `sudo`, `chmod 777`... | PreToolUse | default |
|
|
26
|
+
| `pre-commit-check.sh` | Blockiert Secrets in Commits | PreToolUse | default |
|
|
27
|
+
| `protect-sensitive-files.sh` | Blockiert Änderungen an `.env`, Schlüsseln... | PreToolUse | default |
|
|
28
|
+
| `output-size-hint.sh` | Rät, große Ausgaben zusammenzufassen | PostToolUse | default |
|
|
29
|
+
| `post-edit-lint.sh` | Automatisches Lint nach Änderungen | PostToolUse | full |
|
|
30
|
+
| `quality-gate.sh` | Führt Tests vor dem Abschluss aus | Stop | full |
|
|
31
|
+
| `notify-slack.sh` | Slack-Benachrichtigungen | Notification | full |
|
|
32
|
+
| `session-init.sh` | Erkennt den Stack, exportiert sichere `.env.local`-Variablen | SessionStart | full |
|
|
33
|
+
| `session-end.sh` | Sitzungsprotokoll und Metriken | SessionEnd | full |
|
|
34
|
+
| `post-tool-failure.sh` | Wiederherstellungshinweise nach Tool-Fehlern | PostToolUseFailure | full |
|
|
35
|
+
| `pre-compact.sh` | Sichert den BMAD-Zustand vor der Compaction | PreCompact | optional (nicht eingebunden) |
|
|
36
|
+
| `output-filter.sh` | Kürzt Ausgaben über 50 KB | PostToolUse | optional (Beispiel) |
|
|
29
37
|
|
|
30
|
-
##
|
|
38
|
+
## Gut zu wissen
|
|
31
39
|
|
|
32
|
-
- **
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
- **Setup** - On `--init`, `--init-only`, `--maintenance` (v2.1.20+)
|
|
36
|
-
- **PermissionRequest** - Permission dialogs
|
|
37
|
-
- **UserPromptSubmit** - User input
|
|
38
|
-
- **Notification** - Notifications
|
|
39
|
-
- **PreCompact** - Before context compaction
|
|
40
|
+
- Die Nutzdaten kommen als **JSON über stdin**; nur der **Exit-Code 2** blockiert (jeder andere Wert ungleich null ist ein nicht blockierender Fehler).
|
|
41
|
+
- Nur `hookSpecificOutput.additionalContext` erreicht das Modell; der Klartext-stdout von PreCompact wird als Compaction-Anweisung gelesen.
|
|
42
|
+
- Die Skripte brauchen `jq` oder `node`, um die Nutzdaten zu lesen: Die Sicherheitswächter blockieren, wenn keines verfügbar ist, die informativen Hooks tun nichts.
|
|
40
43
|
|
|
41
|
-
##
|
|
44
|
+
## Weitere Informationen
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
"hooks": {
|
|
48
|
-
"Stop": [{
|
|
49
|
-
"matcher": "",
|
|
50
|
-
"hooks": [{"type": "command", "command": ".claude/hooks/quality-gate.sh"}]
|
|
51
|
-
}]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## More Information
|
|
57
|
-
|
|
58
|
-
See the full documentation: [docs/HOOKS.md](/docs/HOOKS.md)
|
|
46
|
+
Vollständige Dokumentation: [docs/HOOKS.md](/docs/HOOKS.md) und die offizielle Referenz <https://code.claude.com/docs/en/hooks>.
|
|
@@ -372,7 +372,7 @@ Die Geschäftslogik ist von technischen Details isoliert
|
|
|
372
372
|
- [ ] Keine neuen nicht dokumentierten Exceptions
|
|
373
373
|
|
|
374
374
|
#### ISP
|
|
375
|
-
- [ ] Interfaces sind klein und fokussiert (< 5 Methoden)
|
|
375
|
+
- [ ] Interfaces sind klein und fokussiert (interne Heuristik: < 5 Methoden)
|
|
376
376
|
- [ ] Clients hängen nur von den Methoden ab, die sie verwenden
|
|
377
377
|
- [ ] Keine Methoden `throw NotImplementedException()`
|
|
378
378
|
|
|
@@ -387,7 +387,7 @@ Die Geschäftslogik ist von technischen Details isoliert
|
|
|
387
387
|
|
|
388
388
|
- **Buch:** *Clean Architecture* - Robert C. Martin
|
|
389
389
|
- **Buch:** *SOLID Principles* - Uncle Bob
|
|
390
|
-
- **
|
|
390
|
+
- **Article:** [The Relevance of SOLID — Robert C. Martin](https://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html)
|
|
391
391
|
|
|
392
392
|
---
|
|
393
393
|
|
|
@@ -65,7 +65,9 @@ main (production-ready)
|
|
|
65
65
|
[optional footer(s)]
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
###
|
|
68
|
+
### Typen
|
|
69
|
+
|
|
70
|
+
Die Conventional-Commits-Spezifikation 1.0.0 verlangt nur `feat` und `fix`; die übrigen Typen sind eine Teamkonvention (`@commitlint/config-conventional`).
|
|
69
71
|
|
|
70
72
|
| Typ | Beschreibung | Beispiel |
|
|
71
73
|
|-----|-------------|---------|
|
|
@@ -80,6 +82,10 @@ main (production-ready)
|
|
|
80
82
|
| `ci` | CI/CD-Konfiguration | `ci: add lint step to pipeline` |
|
|
81
83
|
| `chore` | Sonstiges (kein Produktivcode) | `chore: update .gitignore` |
|
|
82
84
|
|
|
85
|
+
### Breaking Changes
|
|
86
|
+
|
|
87
|
+
`!` vor dem Doppelpunkt anhängen (`feat(api)!: remove v1 endpoints`) und/oder einen Footer `BREAKING CHANGE: <Beschreibung>` (Großbuchstaben, mit Doppelpunkt) verwenden. Entspricht einem SemVer-MAJOR-Sprung.
|
|
88
|
+
|
|
83
89
|
### Empfohlene Scopes
|
|
84
90
|
|
|
85
91
|
Verwenden Sie die Bounded Contexts oder Module Ihres Projekts:
|
|
@@ -544,8 +544,8 @@ flowchart TD
|
|
|
544
544
|
## Ressourcen
|
|
545
545
|
|
|
546
546
|
- **Keep a Changelog:** [keepachangelog.com](https://keepachangelog.com/)
|
|
547
|
-
- **ADR:** [adr.github.io](https://adr.github.io/)
|
|
548
|
-
- **OpenAPI:** [
|
|
547
|
+
- **ADR:** [adr.github.io](https://adr.github.io/) (MADR 4.0.0)
|
|
548
|
+
- **OpenAPI:** [spec.openapis.org/oas/latest.html](https://spec.openapis.org/oas/latest.html)
|
|
549
549
|
- **Diataxis:** [diataxis.fr](https://diataxis.fr/) (Dokumentations-Framework)
|
|
550
550
|
|
|
551
551
|
---
|
|
@@ -33,7 +33,7 @@ Sicherheit hat **absolute Priorität**. Dieses Dokument stellt die allgemeinen S
|
|
|
33
33
|
> **Quelle:** [OWASP Top 10:2025](https://owasp.org/Top10/2025/) — veröffentlicht November 2025.
|
|
34
34
|
> Wichtige Änderungen vs. 2021: SSRF in A01 konsolidiert, Security Misconfiguration rückt auf A02, Software Supply Chain Failures neu als A03 (übernimmt das frühere „Vulnerable and Outdated Components“), Software or Data Integrity Failures als A08, Mishandling of Exceptional Conditions neu als A10.
|
|
35
35
|
|
|
36
|
-
> **Verwandte Listen:** OWASP Top 10 for Agentic Applications 2026 (veröffentlicht am 2025-12-09) und OWASP Top 10 for LLM Applications
|
|
36
|
+
> **Verwandte Listen:** OWASP Top 10 for Agentic Applications 2026 (veröffentlicht am 2025-12-09) und OWASP Top 10 for LLM Applications 2026 ([genai.owasp.org](https://genai.owasp.org/home/resources/owasp-genai-llm-top-10-2026/)) für KI-Agenten-/LLM-Code; OWASP ASVS 5.0.0 für Verifikationsanforderungen.
|
|
37
37
|
|
|
38
38
|
### A01. Broken Access Control (inkl. konsolidiertem SSRF)
|
|
39
39
|
|
|
@@ -143,7 +143,7 @@ RISIKO
|
|
|
143
143
|
- Credential Stuffing möglich
|
|
144
144
|
|
|
145
145
|
SCHUTZ
|
|
146
|
-
- Richtlinie für starke Passwörter (
|
|
146
|
+
- Richtlinie für starke Passwörter (NIST 800-63B-4: ≥ 15 Zeichen allein, ≥ 8 mit MFA)
|
|
147
147
|
- MFA für sensible Zugriffe
|
|
148
148
|
- Sitzungsablauf
|
|
149
149
|
- Rate Limiting beim Login
|
|
@@ -251,9 +251,9 @@ VALIDIERUNG (Ablehnen) gegenüber SANITIZATION (Transformieren) bevorzugen
|
|
|
251
251
|
|
|
252
252
|
```
|
|
253
253
|
OWASP 2026 Regeln:
|
|
254
|
-
- Mindestens
|
|
255
|
-
-
|
|
256
|
-
-
|
|
254
|
+
- Mindestens 15 Zeichen, wenn das Passwort der einzige Faktor ist (NIST SP 800-63B-4 SHALL), 8 bei Verwendung nur innerhalb einer MFA; mindestens 64 Zeichen akzeptieren
|
|
255
|
+
- Keine Kompositionsregeln (NIST: SHALL NOT) — keine erzwungenen Groß-/Kleinbuchstaben, Ziffern oder Sonderzeichen
|
|
256
|
+
- Gegen eine Blocklist häufiger oder kompromittierter Passwörter prüfen (NIST SHALL)
|
|
257
257
|
- Hash mit Argon2id (OWASP-Minimum 19 MiB RAM, t=2, p=1; interne Empfehlung 128 MiB RAM, t≥3, p=1)
|
|
258
258
|
- NIEMALS MD5/SHA1 ; bcrypt nur als Legacy-Fallback, wenn Argon2id/scrypt nicht verfügbar sind (OWASP-Work-Factor ≥ 10; hier ≥ 12)
|
|
259
259
|
- Einzigartiges Salt pro Benutzer (von Argon2id verwaltet)
|
|
@@ -267,7 +267,7 @@ hash = sha1(password + "static_salt")
|
|
|
267
267
|
hash = bcrypt.hash(password, costFactor=12) // Nicht in neuem Code verwenden
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
-
Quellen: [
|
|
270
|
+
Quellen: [OWASP Password Storage Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html), [NIST SP 800-63B-4](https://pages.nist.gov/800-63-4/sp800-63b.html)
|
|
271
271
|
|
|
272
272
|
### Sitzungen
|
|
273
273
|
|
|
@@ -308,7 +308,7 @@ jwt.sign(payload, ed25519PrivateKey, {
|
|
|
308
308
|
})
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
-
Quellen: [
|
|
311
|
+
Quellen: [RFC 8725 JWT BCP](https://www.rfc-editor.org/rfc/rfc8725), [RFC 9449 DPoP](https://datatracker.ietf.org/doc/html/rfc9449)
|
|
312
312
|
|
|
313
313
|
### Multi-Faktor-Authentifizierung (MFA)
|
|
314
314
|
|
|
@@ -484,7 +484,7 @@ Content-Security-Policy:
|
|
|
484
484
|
|
|
485
485
|
## Supply Chain
|
|
486
486
|
|
|
487
|
-
> **Referenz:** [
|
|
487
|
+
> **Referenz:** [SLSA 1.2](https://slsa.dev/spec/v1.2/), [CycloneDX](https://cyclonedx.org/specification/overview/)
|
|
488
488
|
|
|
489
489
|
### SLSA 1.2 (Supply-chain Levels for Software Artifacts)
|
|
490
490
|
|
|
@@ -701,12 +701,12 @@ Vor der Installation eines MCP-Servers von Drittanbietern:
|
|
|
701
701
|
- **OWASP Top 10:2025:** [owasp.org/Top10/2025/](https://owasp.org/Top10/2025/)
|
|
702
702
|
- **OWASP Cheat Sheets:** [cheatsheetseries.owasp.org](https://cheatsheetseries.owasp.org/)
|
|
703
703
|
- **CWE Top 25:** [cwe.mitre.org/top25](https://cwe.mitre.org/top25/)
|
|
704
|
-
- **NIST
|
|
705
|
-
- **
|
|
704
|
+
- **NIST SP 800-63B-4:** [pages.nist.gov](https://pages.nist.gov/800-63-4/sp800-63b.html)
|
|
705
|
+
- **OWASP Password Storage Cheat Sheet:** [cheatsheetseries.owasp.org](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html)
|
|
706
706
|
- **RFC 9449 DPoP:** [datatracker.ietf.org](https://datatracker.ietf.org/doc/html/rfc9449)
|
|
707
|
-
- **
|
|
707
|
+
- **RFC 8725 JWT BCP:** [rfc-editor.org](https://www.rfc-editor.org/rfc/rfc8725)
|
|
708
708
|
- **HTTP Security Headers 2026:** [thibautprobst.fr](https://thibautprobst.fr/en/posts/http-security-headers/)
|
|
709
|
-
- **
|
|
709
|
+
- **SLSA 1.2 / CycloneDX:** [slsa.dev](https://slsa.dev/spec/v1.2/), [cyclonedx.org](https://cyclonedx.org/specification/overview/)
|
|
710
710
|
|
|
711
711
|
---
|
|
712
712
|
|