@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
|
@@ -22,7 +22,7 @@ Vérifier la conformité aux conventions Python :
|
|
|
22
22
|
- [ ] Espaces : autour des opérateurs, après virgules
|
|
23
23
|
- [ ] Docstrings : présentes pour modules, classes, fonctions publiques
|
|
24
24
|
|
|
25
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
25
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 python -m flake8 /app --max-line-length=88`
|
|
26
26
|
|
|
27
27
|
**Référence** : `rules/03-coding-standards.md` section "PEP 8 Compliance"
|
|
28
28
|
|
|
@@ -35,7 +35,7 @@ Contrôler l'utilisation du typage statique :
|
|
|
35
35
|
- [ ] Utilisation de `typing` pour types complexes (Optional, Union, List, Dict)
|
|
36
36
|
- [ ] Pas d'erreurs MyPy en mode strict
|
|
37
37
|
|
|
38
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
38
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 python -m mypy /app --strict`
|
|
39
39
|
|
|
40
40
|
**Référence** : `rules/03-coding-standards.md` section "Type Hints"
|
|
41
41
|
|
|
@@ -48,7 +48,7 @@ Analyser le code avec Ruff (remplace Flake8, isort, pydocstyle) :
|
|
|
48
48
|
- [ ] Complexité cyclomatique acceptable (<10)
|
|
49
49
|
- [ ] Respect des règles de sécurité (S-rules)
|
|
50
50
|
|
|
51
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
51
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 pip install ruff && ruff check /app`
|
|
52
52
|
|
|
53
53
|
**Référence** : `rules/06-tooling.md` section "Linting and Formatting"
|
|
54
54
|
|
|
@@ -60,7 +60,7 @@ Vérifier la cohérence du formatage :
|
|
|
60
60
|
- [ ] Pas de différences après `black --check`
|
|
61
61
|
- [ ] Line length cohérente (88 caractères)
|
|
62
62
|
|
|
63
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
63
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 pip install black && black --check /app`
|
|
64
64
|
|
|
65
65
|
**Référence** : `rules/06-tooling.md` section "Code Formatting"
|
|
66
66
|
|
|
@@ -22,7 +22,7 @@ Scanner le code avec Bandit pour détecter les vulnérabilités :
|
|
|
22
22
|
- [ ] Pas d'injection de commandes shell
|
|
23
23
|
- [ ] Cryptographie sécurisée (pas de MD5/SHA1)
|
|
24
24
|
|
|
25
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
25
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 sh -c "pip install bandit && bandit -r /app -f json"`
|
|
26
26
|
|
|
27
27
|
**Référence** : `rules/06-tooling.md` section "Security Analysis"
|
|
28
28
|
|
|
@@ -67,7 +67,7 @@ Analyser les dépendances pour vulnérabilités connues :
|
|
|
67
67
|
- [ ] Utilisation de `pip-audit` ou `safety`
|
|
68
68
|
- [ ] Pas de dépendances obsolètes
|
|
69
69
|
|
|
70
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
70
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 sh -c "pip install pip-audit && pip-audit --requirement /app/requirements.txt"`
|
|
71
71
|
|
|
72
72
|
**Référence** : `rules/06-tooling.md` section "Dependency Management"
|
|
73
73
|
|
|
@@ -32,7 +32,7 @@ Mesurer la couverture des tests :
|
|
|
32
32
|
- [ ] Fichiers critiques à 100%
|
|
33
33
|
- [ ] Configuration coverage dans pyproject.toml
|
|
34
34
|
|
|
35
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
35
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 sh -c "pip install pytest pytest-cov && pytest /app --cov=/app --cov-report=term-missing"`
|
|
36
36
|
|
|
37
37
|
**Référence** : `rules/07-testing.md` section "Code Coverage"
|
|
38
38
|
|
|
@@ -91,7 +91,7 @@ Analyser la performance des tests :
|
|
|
91
91
|
- [ ] Configuration pytest dans pyproject.toml
|
|
92
92
|
- [ ] CI/CD avec exécution automatique des tests
|
|
93
93
|
|
|
94
|
-
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.
|
|
94
|
+
**Commande** : Exécuter `docker run --rm -v $(pwd):/app python:3.15 sh -c "pip install pytest && pytest /app -v --duration=10"`
|
|
95
95
|
|
|
96
96
|
**Référence** : `rules/07-testing.md` section "Test Performance"
|
|
97
97
|
|
|
@@ -52,7 +52,6 @@ pip audit
|
|
|
52
52
|
import subprocess
|
|
53
53
|
import json
|
|
54
54
|
from dataclasses import dataclass
|
|
55
|
-
from typing import Optional
|
|
56
55
|
|
|
57
56
|
|
|
58
57
|
@dataclass
|
|
@@ -62,7 +61,7 @@ class Vulnerability:
|
|
|
62
61
|
vulnerability_id: str
|
|
63
62
|
severity: str
|
|
64
63
|
description: str
|
|
65
|
-
fixed_in:
|
|
64
|
+
fixed_in: str | None
|
|
66
65
|
|
|
67
66
|
|
|
68
67
|
def run_pip_audit() -> list[Vulnerability]:
|
|
@@ -47,7 +47,6 @@ app/
|
|
|
47
47
|
```python
|
|
48
48
|
# app/models/{resource}.py
|
|
49
49
|
from datetime import datetime
|
|
50
|
-
from typing import Optional
|
|
51
50
|
from sqlalchemy import Column, String, DateTime, Boolean, Text
|
|
52
51
|
from sqlalchemy.dialects.postgresql import UUID
|
|
53
52
|
import uuid
|
|
@@ -74,7 +73,6 @@ class {Resource}(Base):
|
|
|
74
73
|
```python
|
|
75
74
|
# app/schemas/{resource}.py
|
|
76
75
|
from datetime import datetime
|
|
77
|
-
from typing import Optional
|
|
78
76
|
from uuid import UUID
|
|
79
77
|
from pydantic import BaseModel, Field, ConfigDict
|
|
80
78
|
|
|
@@ -82,7 +80,7 @@ from pydantic import BaseModel, Field, ConfigDict
|
|
|
82
80
|
class {Resource}Base(BaseModel):
|
|
83
81
|
"""Schéma de base pour {Resource}."""
|
|
84
82
|
name: str = Field(..., min_length=1, max_length=255, description="Nom de la ressource")
|
|
85
|
-
description:
|
|
83
|
+
description: str | None = Field(None, description="Description optionnelle")
|
|
86
84
|
is_active: bool = Field(True, description="Statut actif/inactif")
|
|
87
85
|
|
|
88
86
|
|
|
@@ -93,9 +91,9 @@ class {Resource}Create({Resource}Base):
|
|
|
93
91
|
|
|
94
92
|
class {Resource}Update(BaseModel):
|
|
95
93
|
"""Schéma pour la mise à jour (tous les champs optionnels)."""
|
|
96
|
-
name:
|
|
97
|
-
description:
|
|
98
|
-
is_active:
|
|
94
|
+
name: str | None = Field(None, min_length=1, max_length=255)
|
|
95
|
+
description: str | None = None
|
|
96
|
+
is_active: bool | None = None
|
|
99
97
|
|
|
100
98
|
|
|
101
99
|
class {Resource}InDB({Resource}Base):
|
|
@@ -125,7 +123,6 @@ class {Resource}List(BaseModel):
|
|
|
125
123
|
|
|
126
124
|
```python
|
|
127
125
|
# app/crud/{resource}.py
|
|
128
|
-
from typing import Optional
|
|
129
126
|
from uuid import UUID
|
|
130
127
|
from sqlalchemy import select, func
|
|
131
128
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
@@ -140,7 +137,7 @@ class CRUD{Resource}(CRUDBase[{Resource}, {Resource}Create, {Resource}Update]):
|
|
|
140
137
|
|
|
141
138
|
async def get_by_name(
|
|
142
139
|
self, db: AsyncSession, *, name: str
|
|
143
|
-
) ->
|
|
140
|
+
) -> {Resource} | None:
|
|
144
141
|
"""Récupère par nom."""
|
|
145
142
|
result = await db.execute(
|
|
146
143
|
select({Resource}).where({Resource}.name == name)
|
|
@@ -165,7 +162,7 @@ class CRUD{Resource}(CRUDBase[{Resource}, {Resource}Create, {Resource}Update]):
|
|
|
165
162
|
*,
|
|
166
163
|
page: int = 1,
|
|
167
164
|
size: int = 20,
|
|
168
|
-
is_active:
|
|
165
|
+
is_active: bool | None = None,
|
|
169
166
|
) -> tuple[list[{Resource}], int]:
|
|
170
167
|
"""Récupère avec pagination."""
|
|
171
168
|
query = select({Resource})
|
|
@@ -195,7 +192,6 @@ class CRUD{Resource}(CRUDBase[{Resource}, {Resource}Create, {Resource}Update]):
|
|
|
195
192
|
|
|
196
193
|
```python
|
|
197
194
|
# app/api/v1/endpoints/{resource}.py
|
|
198
|
-
from typing import Optional
|
|
199
195
|
from uuid import UUID
|
|
200
196
|
from fastapi import APIRouter, Depends, HTTPException, Query, status
|
|
201
197
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
@@ -218,7 +214,7 @@ async def list_{resource}s(
|
|
|
218
214
|
db: AsyncSession = Depends(get_db),
|
|
219
215
|
page: int = Query(1, ge=1, description="Numéro de page"),
|
|
220
216
|
size: int = Query(20, ge=1, le=100, description="Taille de page"),
|
|
221
|
-
is_active:
|
|
217
|
+
is_active: bool | None = Query(None, description="Filtrer par statut"),
|
|
222
218
|
current_user: User = Depends(get_current_user),
|
|
223
219
|
) -> {Resource}List:
|
|
224
220
|
"""
|
|
@@ -39,7 +39,7 @@ Identifier :
|
|
|
39
39
|
# app/models/{model}.py
|
|
40
40
|
from datetime import datetime
|
|
41
41
|
from decimal import Decimal
|
|
42
|
-
from typing import TYPE_CHECKING
|
|
42
|
+
from typing import TYPE_CHECKING
|
|
43
43
|
from uuid import UUID, uuid4
|
|
44
44
|
|
|
45
45
|
from sqlalchemy import (
|
|
@@ -106,7 +106,7 @@ class {Model}(Base):
|
|
|
106
106
|
unique=True,
|
|
107
107
|
index=True,
|
|
108
108
|
)
|
|
109
|
-
description: Mapped[
|
|
109
|
+
description: Mapped[str | None] = mapped_column(
|
|
110
110
|
Text,
|
|
111
111
|
nullable=True,
|
|
112
112
|
)
|
|
@@ -125,7 +125,7 @@ class {Model}(Base):
|
|
|
125
125
|
)
|
|
126
126
|
|
|
127
127
|
# Foreign Keys
|
|
128
|
-
category_id: Mapped[
|
|
128
|
+
category_id: Mapped[UUID | None] = mapped_column(
|
|
129
129
|
PGUUID(as_uuid=True),
|
|
130
130
|
ForeignKey("categories.id", ondelete="SET NULL"),
|
|
131
131
|
nullable=True,
|
|
@@ -144,7 +144,7 @@ class {Model}(Base):
|
|
|
144
144
|
)
|
|
145
145
|
|
|
146
146
|
# Relations
|
|
147
|
-
category: Mapped[
|
|
147
|
+
category: Mapped["Category | None"] = relationship(
|
|
148
148
|
"Category",
|
|
149
149
|
back_populates="{model}s",
|
|
150
150
|
lazy="selectin",
|
|
@@ -262,13 +262,13 @@ class Product(Base):
|
|
|
262
262
|
__tablename__ = "products"
|
|
263
263
|
|
|
264
264
|
id: Mapped[UUID] = mapped_column(PGUUID(as_uuid=True), primary_key=True)
|
|
265
|
-
category_id: Mapped[
|
|
265
|
+
category_id: Mapped[UUID | None] = mapped_column(
|
|
266
266
|
PGUUID(as_uuid=True),
|
|
267
267
|
ForeignKey("categories.id", ondelete="SET NULL"),
|
|
268
268
|
)
|
|
269
269
|
|
|
270
270
|
# Relation vers le parent
|
|
271
|
-
category: Mapped[
|
|
271
|
+
category: Mapped["Category | None"] = relationship(
|
|
272
272
|
"Category",
|
|
273
273
|
back_populates="products",
|
|
274
274
|
)
|
|
@@ -217,11 +217,8 @@ Les entités sont des objets avec une identité unique.
|
|
|
217
217
|
|
|
218
218
|
```python
|
|
219
219
|
# src/myproject/domain/entities/user.py
|
|
220
|
-
from __future__ import annotations
|
|
221
|
-
|
|
222
220
|
from dataclasses import dataclass, field
|
|
223
221
|
from datetime import datetime, timezone
|
|
224
|
-
from typing import Optional
|
|
225
222
|
from uuid import UUID, uuid4
|
|
226
223
|
|
|
227
224
|
from myproject.domain.value_objects.email import Email
|
|
@@ -242,7 +239,7 @@ class User:
|
|
|
242
239
|
name: str = field(default="")
|
|
243
240
|
is_active: bool = field(default=True)
|
|
244
241
|
created_at: datetime = field(default_factory=lambda: datetime.now(timezone.utc))
|
|
245
|
-
updated_at:
|
|
242
|
+
updated_at: datetime | None = field(default=None)
|
|
246
243
|
|
|
247
244
|
# Domain events (pattern Event Sourcing)
|
|
248
245
|
_events: list = field(default_factory=list, init=False, repr=False)
|
|
@@ -314,8 +311,6 @@ Les value objects sont immuables et définis par leurs attributs.
|
|
|
314
311
|
|
|
315
312
|
```python
|
|
316
313
|
# src/myproject/domain/value_objects/email.py
|
|
317
|
-
from __future__ import annotations
|
|
318
|
-
|
|
319
314
|
from dataclasses import dataclass
|
|
320
315
|
from email_validator import validate_email, EmailNotValidError
|
|
321
316
|
|
|
@@ -359,8 +354,6 @@ class Email:
|
|
|
359
354
|
|
|
360
355
|
|
|
361
356
|
# src/myproject/domain/value_objects/money.py
|
|
362
|
-
from __future__ import annotations
|
|
363
|
-
|
|
364
357
|
from dataclasses import dataclass
|
|
365
358
|
from decimal import Decimal, ROUND_HALF_UP
|
|
366
359
|
from typing import Union
|
|
@@ -528,7 +521,7 @@ Interfaces définissant comment accéder aux entités, sans implémentation.
|
|
|
528
521
|
```python
|
|
529
522
|
# src/myproject/domain/repositories/user_repository.py
|
|
530
523
|
from abc import ABC, abstractmethod
|
|
531
|
-
from typing import
|
|
524
|
+
from typing import Protocol
|
|
532
525
|
from uuid import UUID
|
|
533
526
|
|
|
534
527
|
from myproject.domain.entities.user import User
|
|
@@ -558,7 +551,7 @@ class UserRepository(Protocol):
|
|
|
558
551
|
"""
|
|
559
552
|
...
|
|
560
553
|
|
|
561
|
-
def find_by_id(self, user_id: UUID) ->
|
|
554
|
+
def find_by_id(self, user_id: UUID) -> User | None:
|
|
562
555
|
"""
|
|
563
556
|
Trouve un utilisateur par son ID.
|
|
564
557
|
|
|
@@ -570,7 +563,7 @@ class UserRepository(Protocol):
|
|
|
570
563
|
"""
|
|
571
564
|
...
|
|
572
565
|
|
|
573
|
-
def find_by_email(self, email: Email) ->
|
|
566
|
+
def find_by_email(self, email: Email) -> User | None:
|
|
574
567
|
"""
|
|
575
568
|
Trouve un utilisateur par son email.
|
|
576
569
|
|
|
@@ -618,7 +611,7 @@ class UserRepositoryABC(ABC):
|
|
|
618
611
|
pass
|
|
619
612
|
|
|
620
613
|
@abstractmethod
|
|
621
|
-
def find_by_id(self, user_id: UUID) ->
|
|
614
|
+
def find_by_id(self, user_id: UUID) -> User | None:
|
|
622
615
|
"""Trouve un utilisateur par ID."""
|
|
623
616
|
pass
|
|
624
617
|
```
|
|
@@ -630,7 +623,6 @@ class UserRepositoryABC(ABC):
|
|
|
630
623
|
```python
|
|
631
624
|
# src/myproject/application/use_cases/user/create_user.py
|
|
632
625
|
from dataclasses import dataclass
|
|
633
|
-
from typing import Optional
|
|
634
626
|
from uuid import UUID
|
|
635
627
|
|
|
636
628
|
from myproject.domain.entities.user import User
|
|
@@ -722,11 +714,8 @@ class CreateUserUseCase:
|
|
|
722
714
|
|
|
723
715
|
```python
|
|
724
716
|
# src/myproject/application/dtos/user_dto.py
|
|
725
|
-
from __future__ import annotations
|
|
726
|
-
|
|
727
717
|
from dataclasses import dataclass
|
|
728
718
|
from datetime import datetime
|
|
729
|
-
from typing import Optional
|
|
730
719
|
from uuid import UUID
|
|
731
720
|
|
|
732
721
|
from myproject.domain.entities.user import User
|
|
@@ -746,7 +735,7 @@ class UserDTO:
|
|
|
746
735
|
name: str
|
|
747
736
|
is_active: bool
|
|
748
737
|
created_at: datetime
|
|
749
|
-
updated_at:
|
|
738
|
+
updated_at: datetime | None
|
|
750
739
|
|
|
751
740
|
@classmethod
|
|
752
741
|
def from_entity(cls, user: User) -> UserDTO:
|
|
@@ -778,7 +767,6 @@ class UserDTO:
|
|
|
778
767
|
|
|
779
768
|
```python
|
|
780
769
|
# src/myproject/infrastructure/database/repositories/user_repository_impl.py
|
|
781
|
-
from typing import Optional
|
|
782
770
|
from uuid import UUID
|
|
783
771
|
|
|
784
772
|
from sqlalchemy.orm import Session
|
|
@@ -820,7 +808,7 @@ class UserRepositoryImpl:
|
|
|
820
808
|
self._session.rollback()
|
|
821
809
|
raise RepositoryError(f"Failed to save user: {e}") from e
|
|
822
810
|
|
|
823
|
-
def find_by_id(self, user_id: UUID) ->
|
|
811
|
+
def find_by_id(self, user_id: UUID) -> User | None:
|
|
824
812
|
"""Trouve un utilisateur par ID."""
|
|
825
813
|
user_model = self._session.query(UserModel).filter(
|
|
826
814
|
UserModel.id == user_id
|
|
@@ -828,7 +816,7 @@ class UserRepositoryImpl:
|
|
|
828
816
|
|
|
829
817
|
return self._to_entity(user_model) if user_model else None
|
|
830
818
|
|
|
831
|
-
def find_by_email(self, email: Email) ->
|
|
819
|
+
def find_by_email(self, email: Email) -> User | None:
|
|
832
820
|
"""Trouve un utilisateur par email."""
|
|
833
821
|
user_model = self._session.query(UserModel).filter(
|
|
834
822
|
UserModel.email == str(email)
|
|
@@ -1014,10 +1002,7 @@ async def get_user(
|
|
|
1014
1002
|
|
|
1015
1003
|
```python
|
|
1016
1004
|
# src/myproject/infrastructure/api/schemas/user_schema.py
|
|
1017
|
-
from __future__ import annotations
|
|
1018
|
-
|
|
1019
1005
|
from datetime import datetime
|
|
1020
|
-
from typing import Optional
|
|
1021
1006
|
from uuid import UUID
|
|
1022
1007
|
|
|
1023
1008
|
from pydantic import BaseModel, EmailStr, Field, ConfigDict
|
|
@@ -1051,7 +1036,7 @@ class UserResponseSchema(BaseModel):
|
|
|
1051
1036
|
name: str
|
|
1052
1037
|
is_active: bool
|
|
1053
1038
|
created_at: datetime
|
|
1054
|
-
updated_at:
|
|
1039
|
+
updated_at: datetime | None = None
|
|
1055
1040
|
|
|
1056
1041
|
model_config = ConfigDict(from_attributes=True)
|
|
1057
1042
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import os
|
|
10
10
|
import sys
|
|
11
11
|
from datetime import datetime
|
|
12
|
-
from typing import
|
|
12
|
+
from typing import Protocol
|
|
13
13
|
from uuid import UUID, uuid4
|
|
14
14
|
|
|
15
15
|
# 2. Related third party imports
|
|
@@ -32,7 +32,7 @@ from myproject.application.use_cases.create_user import CreateUserUseCase
|
|
|
32
32
|
|
|
33
33
|
```python
|
|
34
34
|
# ✅ BON: Imports explicites
|
|
35
|
-
from typing import
|
|
35
|
+
from typing import List, Dict
|
|
36
36
|
|
|
37
37
|
# ❌ MAUVAIS: Import wildcard
|
|
38
38
|
from typing import *
|
|
@@ -220,7 +220,7 @@ class MyClass:
|
|
|
220
220
|
### Types de Base
|
|
221
221
|
|
|
222
222
|
```python
|
|
223
|
-
from typing import
|
|
223
|
+
from typing import Union, List, Dict, Set, Tuple, Any
|
|
224
224
|
|
|
225
225
|
# ✅ BON: Type hints sur tout
|
|
226
226
|
def greet(name: str) -> str:
|
|
@@ -245,7 +245,7 @@ numbers: List[int] = [1, 2, 3]
|
|
|
245
245
|
scores: Dict[str, float] = {"math": 95.5}
|
|
246
246
|
|
|
247
247
|
# Optional (peut être None)
|
|
248
|
-
def find_user(user_id: int) ->
|
|
248
|
+
def find_user(user_id: int) -> User | None:
|
|
249
249
|
"""Retourne un User ou None."""
|
|
250
250
|
return user or None
|
|
251
251
|
|
|
@@ -277,7 +277,7 @@ from collections.abc import Sequence, Iterable, Mapping
|
|
|
277
277
|
# Generic Types
|
|
278
278
|
T = TypeVar('T')
|
|
279
279
|
|
|
280
|
-
def first(items: list[T]) ->
|
|
280
|
+
def first(items: list[T]) -> T | None:
|
|
281
281
|
"""Retourne le premier élément ou None."""
|
|
282
282
|
return items[0] if items else None
|
|
283
283
|
|
|
@@ -403,7 +403,7 @@ class User:
|
|
|
403
403
|
|
|
404
404
|
# Forward reference (pour références circulaires)
|
|
405
405
|
class Node:
|
|
406
|
-
def __init__(self, value: int, parent:
|
|
406
|
+
def __init__(self, value: int, parent: Node | None = None):
|
|
407
407
|
self.value = value
|
|
408
408
|
self.parent = parent
|
|
409
409
|
```
|
|
@@ -432,6 +432,18 @@ def process_order(order: Order) -> None:
|
|
|
432
432
|
reveal_type(my_variable) # mypy affichera le type inféré
|
|
433
433
|
```
|
|
434
434
|
|
|
435
|
+
### Nouveautés Python 3.15
|
|
436
|
+
|
|
437
|
+
Python 3.15 (stable depuis le 9 octobre 2026) apporte notamment :
|
|
438
|
+
- **PEP 810**: imports paresseux explicites (`lazy import json`, niveau module uniquement).
|
|
439
|
+
- **PEP 814** (`frozendict`): dictionnaire immuable natif.
|
|
440
|
+
- **PEP 661** (`sentinel`): type natif pour des valeurs sentinelles uniques (remplace les `_MISSING = object()` artisanaux).
|
|
441
|
+
- **PEP 686 / PEP 798**: UTF-8 par défaut pour `open()` sans `encoding` ; dépaquetage `*` / `**` dans les compréhensions.
|
|
442
|
+
- **PEP 799** (`profiling`): `profiling.tracing` (ex-`cProfile`, conservé comme alias) et `profiling.sampling` (profileur statistique Tachyon) ; le module `profile` est déprécié (retrait en 3.17).
|
|
443
|
+
- **`re.prefixmatch()`**: nom explicite de `re.match()`, désormais "soft deprecated".
|
|
444
|
+
|
|
445
|
+
Source: docs.python.org/3.15/whatsnew/3.15.html
|
|
446
|
+
|
|
435
447
|
## Docstrings
|
|
436
448
|
|
|
437
449
|
### Style Google (Recommandé)
|
|
@@ -440,7 +452,7 @@ reveal_type(my_variable) # mypy affichera le type inféré
|
|
|
440
452
|
def calculate_order_total(
|
|
441
453
|
order_id: int,
|
|
442
454
|
apply_discount: bool = True,
|
|
443
|
-
discount_code:
|
|
455
|
+
discount_code: str | None = None
|
|
444
456
|
) -> float:
|
|
445
457
|
"""
|
|
446
458
|
Calcule le total d'une commande avec discounts optionnels.
|
|
@@ -20,7 +20,7 @@ Le pattern Repository:
|
|
|
20
20
|
# src/myproject/domain/repositories/[entity]_repository.py
|
|
21
21
|
"""Interface du repository pour [Entity]."""
|
|
22
22
|
|
|
23
|
-
from typing import
|
|
23
|
+
from typing import Protocol
|
|
24
24
|
from uuid import UUID
|
|
25
25
|
|
|
26
26
|
from myproject.domain.entities.[entity] import [Entity]
|
|
@@ -54,7 +54,7 @@ class [Entity]Repository(Protocol):
|
|
|
54
54
|
"""
|
|
55
55
|
...
|
|
56
56
|
|
|
57
|
-
def find_by_id(self, entity_id: UUID) ->
|
|
57
|
+
def find_by_id(self, entity_id: UUID) -> [Entity] | None:
|
|
58
58
|
"""
|
|
59
59
|
Trouve une [entity] par son ID.
|
|
60
60
|
|
|
@@ -89,7 +89,7 @@ class [Entity]Repository(Protocol):
|
|
|
89
89
|
...
|
|
90
90
|
|
|
91
91
|
# Méthodes de recherche spécifiques
|
|
92
|
-
def find_by_[attribute](self, [attribute]: Type) ->
|
|
92
|
+
def find_by_[attribute](self, [attribute]: Type) -> [Entity] | None:
|
|
93
93
|
"""
|
|
94
94
|
Trouve une [entity] par [attribute].
|
|
95
95
|
|
|
@@ -141,7 +141,6 @@ class [Entity]Repository(Protocol):
|
|
|
141
141
|
# src/myproject/infrastructure/database/repositories/[entity]_repository_impl.py
|
|
142
142
|
"""Implémentation du repository [Entity] avec SQLAlchemy."""
|
|
143
143
|
|
|
144
|
-
from typing import Optional
|
|
145
144
|
from uuid import UUID
|
|
146
145
|
|
|
147
146
|
from sqlalchemy.orm import Session
|
|
@@ -207,7 +206,7 @@ class [Entity]RepositoryImpl:
|
|
|
207
206
|
self._session.rollback()
|
|
208
207
|
raise RepositoryError(f"Failed to save [entity]: {e}") from e
|
|
209
208
|
|
|
210
|
-
def find_by_id(self, entity_id: UUID) ->
|
|
209
|
+
def find_by_id(self, entity_id: UUID) -> [Entity] | None:
|
|
211
210
|
"""
|
|
212
211
|
Trouve une [entity] par ID.
|
|
213
212
|
|
|
@@ -263,7 +262,7 @@ class [Entity]RepositoryImpl:
|
|
|
263
262
|
self._session.rollback()
|
|
264
263
|
raise RepositoryError(f"Failed to delete [entity]: {e}") from e
|
|
265
264
|
|
|
266
|
-
def find_by_[attribute](self, [attribute]: Type) ->
|
|
265
|
+
def find_by_[attribute](self, [attribute]: Type) -> [Entity] | None:
|
|
267
266
|
"""Trouve par [attribute]."""
|
|
268
267
|
model = (
|
|
269
268
|
self._session.query([Entity]Model)
|
|
@@ -396,7 +395,7 @@ class [Entity]Model(Base):
|
|
|
396
395
|
|
|
397
396
|
```python
|
|
398
397
|
# domain/repositories/user_repository.py
|
|
399
|
-
from typing import
|
|
398
|
+
from typing import Protocol
|
|
400
399
|
from uuid import UUID
|
|
401
400
|
|
|
402
401
|
from myproject.domain.entities.user import User
|
|
@@ -407,8 +406,8 @@ class UserRepository(Protocol):
|
|
|
407
406
|
"""Repository pour User."""
|
|
408
407
|
|
|
409
408
|
def save(self, user: User) -> User: ...
|
|
410
|
-
def find_by_id(self, user_id: UUID) ->
|
|
411
|
-
def find_by_email(self, email: Email) ->
|
|
409
|
+
def find_by_id(self, user_id: UUID) -> User | None: ...
|
|
410
|
+
def find_by_email(self, email: Email) -> User | None: ...
|
|
412
411
|
def exists_with_email(self, email: Email) -> bool: ...
|
|
413
412
|
def find_active_users(self) -> list[User]: ...
|
|
414
413
|
def delete(self, user_id: UUID) -> None: ...
|
|
@@ -435,7 +434,7 @@ class UserRepositoryImpl:
|
|
|
435
434
|
self._session.refresh(model)
|
|
436
435
|
return self._to_entity(model)
|
|
437
436
|
|
|
438
|
-
def find_by_email(self, email: Email) ->
|
|
437
|
+
def find_by_email(self, email: Email) -> User | None:
|
|
439
438
|
model = (
|
|
440
439
|
self._session.query(UserModel)
|
|
441
440
|
.filter(UserModel.email == str(email))
|
|
@@ -42,7 +42,7 @@ src/
|
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
44
|
// src/components/{ComponentName}/{ComponentName}.types.ts
|
|
45
|
-
import { ReactNode, HTMLAttributes } from 'react';
|
|
45
|
+
import { ReactNode, HTMLAttributes, Ref } from 'react';
|
|
46
46
|
|
|
47
47
|
export type {ComponentName}Variant = 'primary' | 'secondary' | 'outline';
|
|
48
48
|
export type {ComponentName}Size = 'sm' | 'md' | 'lg';
|
|
@@ -91,6 +91,11 @@ export interface {ComponentName}Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
91
91
|
* ID pour les tests
|
|
92
92
|
*/
|
|
93
93
|
testId?: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Ref vers l'élément racine (prop ordinaire en React 19, sans forwardRef)
|
|
97
|
+
*/
|
|
98
|
+
ref?: Ref<HTMLDivElement>;
|
|
94
99
|
}
|
|
95
100
|
```
|
|
96
101
|
|
|
@@ -98,7 +103,7 @@ export interface {ComponentName}Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
98
103
|
|
|
99
104
|
```tsx
|
|
100
105
|
// src/components/{ComponentName}/{ComponentName}.tsx
|
|
101
|
-
import {
|
|
106
|
+
import { memo } from 'react';
|
|
102
107
|
import { clsx } from 'clsx';
|
|
103
108
|
|
|
104
109
|
import type { {ComponentName}Props } from './{ComponentName}.types';
|
|
@@ -115,55 +120,51 @@ import styles from './{ComponentName}.module.css';
|
|
|
115
120
|
* ```
|
|
116
121
|
*/
|
|
117
122
|
export const {ComponentName} = memo(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
styles
|
|
145
|
-
styles
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
</div>
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
)
|
|
123
|
+
({
|
|
124
|
+
children,
|
|
125
|
+
variant = 'primary',
|
|
126
|
+
size = 'md',
|
|
127
|
+
isLoading = false,
|
|
128
|
+
isDisabled = false,
|
|
129
|
+
onClick,
|
|
130
|
+
className,
|
|
131
|
+
testId,
|
|
132
|
+
ref,
|
|
133
|
+
...rest
|
|
134
|
+
}: {ComponentName}Props) => {
|
|
135
|
+
const handleClick = () => {
|
|
136
|
+
if (!isDisabled && !isLoading && onClick) {
|
|
137
|
+
onClick();
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<div
|
|
143
|
+
ref={ref}
|
|
144
|
+
className={clsx(
|
|
145
|
+
styles.root,
|
|
146
|
+
styles[variant],
|
|
147
|
+
styles[size],
|
|
148
|
+
{
|
|
149
|
+
[styles.loading]: isLoading,
|
|
150
|
+
[styles.disabled]: isDisabled,
|
|
151
|
+
},
|
|
152
|
+
className
|
|
153
|
+
)}
|
|
154
|
+
onClick={handleClick}
|
|
155
|
+
data-testid={testId}
|
|
156
|
+
aria-disabled={isDisabled}
|
|
157
|
+
aria-busy={isLoading}
|
|
158
|
+
{...rest}
|
|
159
|
+
>
|
|
160
|
+
{isLoading ? (
|
|
161
|
+
<span className={styles.loader} aria-hidden="true" />
|
|
162
|
+
) : (
|
|
163
|
+
children
|
|
164
|
+
)}
|
|
165
|
+
</div>
|
|
166
|
+
);
|
|
167
|
+
}
|
|
167
168
|
);
|
|
168
169
|
|
|
169
170
|
{ComponentName}.displayName = '{ComponentName}';
|