@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-bearded-bear/claude-craft",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"description": "A comprehensive framework for AI-assisted development with Claude Code. Install standardized rules, agents, and commands for your projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli/index.js",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"prepublishOnly": "node -e \"import{readFileSync}from'node:fs';const p=JSON.parse(readFileSync('./package.json','utf8'));if(!/^\\d+\\.\\d+\\.\\d+(-[a-z0-9.]+)?$/i.test(p.version)){console.error('Invalid version format');process.exit(1)}\"",
|
|
34
34
|
"metrics:adoption": "node scripts/track-adoption-metrics.mjs",
|
|
35
35
|
"audit:claude-signals": "node scripts/collect-claude-signals.mjs",
|
|
36
|
+
"audit:claude-claims": "node scripts/scan-claude-claims.mjs",
|
|
36
37
|
"mutation": "stryker run",
|
|
37
38
|
"mutation:ci": "stryker run --reporters progress,json",
|
|
38
39
|
"test:e2e:tools": "cd tests/e2e/tools && docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from e2e-runner",
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Post Tool Use Failure Hook: Recovery after tool failure
|
|
3
|
-
# Runs on PostToolUseFailure event
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# Read JSON input from stdin
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name // "unknown"')
|
|
9
|
-
ERROR=$(echo "$INPUT" | jq -r '.error // "unknown"')
|
|
10
|
-
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "unknown"')
|
|
11
|
-
TIMESTAMP=$(date -Iseconds)
|
|
12
|
-
|
|
13
|
-
# Ensure logs directory exists
|
|
14
|
-
mkdir -p .claude/logs
|
|
15
|
-
|
|
16
|
-
# Log the failure for analysis
|
|
17
|
-
log_failure() {
|
|
18
|
-
local severity="$1"
|
|
19
|
-
local message="$2"
|
|
20
|
-
echo "[${TIMESTAMP}] [${severity}] [${TOOL_NAME}] ${message}" >> .claude/logs/tool-failures.log
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
# Provide recovery context based on tool type
|
|
24
|
-
case "$TOOL_NAME" in
|
|
25
|
-
"Bash")
|
|
26
|
-
log_failure "ERROR" "Bash command failed: $ERROR"
|
|
27
|
-
|
|
28
|
-
# Check for common recoverable errors
|
|
29
|
-
if echo "$ERROR" | grep -q "command not found"; then
|
|
30
|
-
echo '{"additionalContext": "Command not found. Check if the command is installed or use Docker container."}'
|
|
31
|
-
elif echo "$ERROR" | grep -q "permission denied"; then
|
|
32
|
-
echo '{"additionalContext": "Permission denied. Check file permissions or use appropriate privileges."}'
|
|
33
|
-
elif echo "$ERROR" | grep -q "No such file or directory"; then
|
|
34
|
-
echo '{"additionalContext": "File or directory not found. Verify the path exists."}'
|
|
35
|
-
elif echo "$ERROR" | grep -q "timeout"; then
|
|
36
|
-
echo '{"additionalContext": "Command timed out. Consider increasing timeout or optimizing the command."}'
|
|
37
|
-
else
|
|
38
|
-
echo '{"continue": true}'
|
|
39
|
-
fi
|
|
40
|
-
;;
|
|
41
|
-
|
|
42
|
-
"Edit"|"Write")
|
|
43
|
-
log_failure "ERROR" "File operation failed: $ERROR"
|
|
44
|
-
|
|
45
|
-
if echo "$ERROR" | grep -q "Permission denied"; then
|
|
46
|
-
echo '{"additionalContext": "File permission denied. Check write permissions on the file."}'
|
|
47
|
-
elif echo "$ERROR" | grep -q "No such file"; then
|
|
48
|
-
echo '{"additionalContext": "Target directory may not exist. Create parent directories first."}'
|
|
49
|
-
elif echo "$ERROR" | grep -q "not unique"; then
|
|
50
|
-
echo '{"additionalContext": "Edit old_string not unique. Provide more context to make it unique."}'
|
|
51
|
-
else
|
|
52
|
-
echo '{"continue": true}'
|
|
53
|
-
fi
|
|
54
|
-
;;
|
|
55
|
-
|
|
56
|
-
"Read")
|
|
57
|
-
log_failure "WARN" "Read failed: $ERROR"
|
|
58
|
-
|
|
59
|
-
if echo "$ERROR" | grep -q "No such file"; then
|
|
60
|
-
echo '{"additionalContext": "File not found. Use Glob to search for the correct file path."}'
|
|
61
|
-
elif echo "$ERROR" | grep -q "Is a directory"; then
|
|
62
|
-
echo '{"additionalContext": "Target is a directory, not a file. Use ls or Glob to list contents."}'
|
|
63
|
-
else
|
|
64
|
-
echo '{"continue": true}'
|
|
65
|
-
fi
|
|
66
|
-
;;
|
|
67
|
-
|
|
68
|
-
"Glob"|"Grep")
|
|
69
|
-
log_failure "WARN" "Search failed: $ERROR"
|
|
70
|
-
echo '{"additionalContext": "Search operation failed. Check pattern syntax and path."}'
|
|
71
|
-
;;
|
|
72
|
-
|
|
73
|
-
"Task")
|
|
74
|
-
log_failure "ERROR" "Sub-agent failed: $ERROR"
|
|
75
|
-
|
|
76
|
-
if echo "$ERROR" | grep -q "timeout"; then
|
|
77
|
-
echo '{"additionalContext": "Sub-agent timed out. Consider breaking the task into smaller parts."}'
|
|
78
|
-
else
|
|
79
|
-
echo '{"continue": true}'
|
|
80
|
-
fi
|
|
81
|
-
;;
|
|
82
|
-
|
|
83
|
-
*)
|
|
84
|
-
log_failure "INFO" "Tool failed: $ERROR"
|
|
85
|
-
echo '{"continue": true}'
|
|
86
|
-
;;
|
|
87
|
-
esac
|
|
88
|
-
|
|
89
|
-
exit 0
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Pre Compact Hook: Save state before memory compaction
|
|
3
|
-
# Runs on PreCompact event
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# Read JSON input from stdin
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
CWD=$(echo "$INPUT" | jq -r '.cwd // "."')
|
|
9
|
-
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "unknown"')
|
|
10
|
-
TIMESTAMP=$(date +%Y%m%d%H%M%S)
|
|
11
|
-
|
|
12
|
-
cd "$CWD" 2>/dev/null || true
|
|
13
|
-
|
|
14
|
-
# Ensure directories exist
|
|
15
|
-
mkdir -p .claude/logs
|
|
16
|
-
mkdir -p .bmad/backups 2>/dev/null || true
|
|
17
|
-
mkdir -p .recette/backups 2>/dev/null || true
|
|
18
|
-
|
|
19
|
-
# Log compaction event
|
|
20
|
-
echo "[$(date -Iseconds)] [COMPACT] Context compaction triggered - session: $SESSION_ID" >> .claude/logs/session.log
|
|
21
|
-
|
|
22
|
-
# Backup BMAD sprint status if exists
|
|
23
|
-
if [[ -f ".bmad/sprint-status.yaml" ]]; then
|
|
24
|
-
cp .bmad/sprint-status.yaml ".bmad/backups/sprint-status-${TIMESTAMP}.yaml"
|
|
25
|
-
echo "[$(date -Iseconds)] [COMPACT] Backed up sprint-status.yaml" >> .claude/logs/session.log
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
# Backup current story context if exists
|
|
29
|
-
if [[ -f ".bmad/current-story.yaml" ]]; then
|
|
30
|
-
cp .bmad/current-story.yaml ".bmad/backups/current-story-${TIMESTAMP}.yaml"
|
|
31
|
-
echo "[$(date -Iseconds)] [COMPACT] Backed up current-story.yaml" >> .claude/logs/session.log
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# Backup recette session if exists
|
|
35
|
-
if [[ -d ".recette/sessions" ]]; then
|
|
36
|
-
ACTIVE_SESSION=$(find .recette/sessions -name "*.yaml" -mmin -60 2>/dev/null | head -1)
|
|
37
|
-
if [[ -n "$ACTIVE_SESSION" ]]; then
|
|
38
|
-
cp "$ACTIVE_SESSION" ".recette/backups/$(basename "$ACTIVE_SESSION" .yaml)-${TIMESTAMP}.yaml"
|
|
39
|
-
echo "[$(date -Iseconds)] [COMPACT] Backed up recette session" >> .claude/logs/session.log
|
|
40
|
-
fi
|
|
41
|
-
fi
|
|
42
|
-
|
|
43
|
-
# Cleanup old backups (keep last 10)
|
|
44
|
-
for backup_dir in .bmad/backups .recette/backups; do
|
|
45
|
-
if [[ -d "$backup_dir" ]]; then
|
|
46
|
-
ls -t "$backup_dir"/*.yaml 2>/dev/null | tail -n +11 | xargs rm -f 2>/dev/null || true
|
|
47
|
-
fi
|
|
48
|
-
done
|
|
49
|
-
|
|
50
|
-
# Output message to preserve in context
|
|
51
|
-
echo '{"additionalContext": "State backed up before compaction. Sprint and story context preserved."}'
|
|
52
|
-
|
|
53
|
-
exit 0
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Session End Hook: Collect metrics and logs at session end
|
|
3
|
-
# Runs on SessionEnd event (called Stop in some versions)
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# Read JSON input from stdin
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
CWD=$(echo "$INPUT" | jq -r '.cwd // "."')
|
|
9
|
-
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "unknown"')
|
|
10
|
-
STOP_REASON=$(echo "$INPUT" | jq -r '.stop_reason // "unknown"')
|
|
11
|
-
TIMESTAMP=$(date -Iseconds)
|
|
12
|
-
DATE_SHORT=$(date +%Y%m%d)
|
|
13
|
-
|
|
14
|
-
cd "$CWD" 2>/dev/null || true
|
|
15
|
-
|
|
16
|
-
# Ensure directories exist
|
|
17
|
-
mkdir -p .claude/logs
|
|
18
|
-
mkdir -p .claude/metrics
|
|
19
|
-
|
|
20
|
-
# Log session end
|
|
21
|
-
{
|
|
22
|
-
echo "[${TIMESTAMP}] [SESSION_END] Session: $SESSION_ID"
|
|
23
|
-
echo "[${TIMESTAMP}] [SESSION_END] Stop reason: $STOP_REASON"
|
|
24
|
-
} >> .claude/logs/session.log
|
|
25
|
-
|
|
26
|
-
# Collect session metrics
|
|
27
|
-
collect_metrics() {
|
|
28
|
-
local metrics_file=".claude/metrics/session-${DATE_SHORT}.jsonl"
|
|
29
|
-
|
|
30
|
-
# Count files modified in this session (last hour)
|
|
31
|
-
local files_modified=$(find . -type f -mmin -60 \
|
|
32
|
-
-not -path "./.git/*" \
|
|
33
|
-
-not -path "./node_modules/*" \
|
|
34
|
-
-not -path "./vendor/*" \
|
|
35
|
-
-not -path "./.claude/*" \
|
|
36
|
-
2>/dev/null | wc -l | tr -d ' ')
|
|
37
|
-
|
|
38
|
-
# Count tool failures if log exists
|
|
39
|
-
local tool_failures=0
|
|
40
|
-
if [[ -f ".claude/logs/tool-failures.log" ]]; then
|
|
41
|
-
tool_failures=$(grep -c "$(date +%Y-%m-%d)" .claude/logs/tool-failures.log 2>/dev/null || echo 0)
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
# Check BMAD status
|
|
45
|
-
local current_story="none"
|
|
46
|
-
local story_status="unknown"
|
|
47
|
-
if [[ -f ".bmad/current-story.yaml" ]]; then
|
|
48
|
-
current_story=$(grep "^id:" .bmad/current-story.yaml 2>/dev/null | cut -d' ' -f2 || echo "none")
|
|
49
|
-
story_status=$(grep "^status:" .bmad/current-story.yaml 2>/dev/null | cut -d' ' -f2 || echo "unknown")
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
# Build metrics JSON
|
|
53
|
-
local metric_entry=$(cat <<EOF
|
|
54
|
-
{"timestamp":"${TIMESTAMP}","session_id":"${SESSION_ID}","stop_reason":"${STOP_REASON}","files_modified":${files_modified},"tool_failures":${tool_failures},"current_story":"${current_story}","story_status":"${story_status}"}
|
|
55
|
-
EOF
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
echo "$metric_entry" >> "$metrics_file"
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
# Generate daily summary if this is the last session of the day
|
|
62
|
-
generate_daily_summary() {
|
|
63
|
-
local metrics_file=".claude/metrics/session-${DATE_SHORT}.jsonl"
|
|
64
|
-
local summary_file=".claude/metrics/daily-summary-${DATE_SHORT}.json"
|
|
65
|
-
|
|
66
|
-
if [[ -f "$metrics_file" ]]; then
|
|
67
|
-
local session_count=$(wc -l < "$metrics_file" | tr -d ' ')
|
|
68
|
-
local total_files=$(jq -s '[.[].files_modified] | add' "$metrics_file" 2>/dev/null || echo 0)
|
|
69
|
-
local total_failures=$(jq -s '[.[].tool_failures] | add' "$metrics_file" 2>/dev/null || echo 0)
|
|
70
|
-
|
|
71
|
-
cat > "$summary_file" <<EOF
|
|
72
|
-
{
|
|
73
|
-
"date": "${DATE_SHORT}",
|
|
74
|
-
"total_sessions": ${session_count},
|
|
75
|
-
"total_files_modified": ${total_files},
|
|
76
|
-
"total_tool_failures": ${total_failures},
|
|
77
|
-
"generated_at": "${TIMESTAMP}"
|
|
78
|
-
}
|
|
79
|
-
EOF
|
|
80
|
-
fi
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
# Run metrics collection
|
|
84
|
-
collect_metrics
|
|
85
|
-
|
|
86
|
-
# Generate summary (runs every time, overwrites previous)
|
|
87
|
-
generate_daily_summary
|
|
88
|
-
|
|
89
|
-
# Cleanup old metrics (keep last 30 days)
|
|
90
|
-
find .claude/metrics -name "*.jsonl" -mtime +30 -delete 2>/dev/null || true
|
|
91
|
-
find .claude/metrics -name "daily-summary-*.json" -mtime +30 -delete 2>/dev/null || true
|
|
92
|
-
|
|
93
|
-
# Cleanup old logs (keep last 7 days)
|
|
94
|
-
find .claude/logs -name "*.log" -mtime +7 -delete 2>/dev/null || true
|
|
95
|
-
|
|
96
|
-
echo '{"continue": true}'
|
|
97
|
-
|
|
98
|
-
exit 0
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
-
|
|
4
|
-
"env": {
|
|
5
|
-
"CLAUDE_CODE_SUBAGENT_MODEL": "claude-sonnet-5-5",
|
|
6
|
-
"CLAUDE_CODE_FORK_SUBAGENT": "1"
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
"spinnerVerbs": {
|
|
10
|
-
"mode": "replace",
|
|
11
|
-
"verbs": ["Thinking", "Processing", "Analyzing", "Working", "Editing", "Writing", "Reading", "Running", "Delegating"]
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
"permissions": {
|
|
15
|
-
"allow": [
|
|
16
|
-
"Read",
|
|
17
|
-
"Edit",
|
|
18
|
-
"Write",
|
|
19
|
-
"Glob",
|
|
20
|
-
"Grep",
|
|
21
|
-
"__STACK_PERMISSIONS__",
|
|
22
|
-
"Bash(git:*)",
|
|
23
|
-
"Bash(make:*)",
|
|
24
|
-
"Bash(docker compose:*)"
|
|
25
|
-
],
|
|
26
|
-
"deny": [
|
|
27
|
-
"Bash(rm -rf:*)",
|
|
28
|
-
"Bash(dd:*)",
|
|
29
|
-
"Bash(mkfs:*)",
|
|
30
|
-
"Bash(git push --force*)",
|
|
31
|
-
"Bash(git push -f*)",
|
|
32
|
-
"Bash(sudo:*)",
|
|
33
|
-
"Bash(chmod 777:*)",
|
|
34
|
-
"Bash(curl | sh:*)",
|
|
35
|
-
"Bash(wget | sh:*)",
|
|
36
|
-
"Read(**/.env)",
|
|
37
|
-
"Read(**/.env.*)",
|
|
38
|
-
"Read(**/secrets/*)",
|
|
39
|
-
"Read(**/*.key)",
|
|
40
|
-
"Read(**/*.pem)",
|
|
41
|
-
"Read(**/*credentials*)"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
"model": "claude-opus-5-5",
|
|
46
|
-
|
|
47
|
-
"plansDirectory": ".claude/plans",
|
|
48
|
-
|
|
49
|
-
"hooks": {
|
|
50
|
-
"PreCompact": [
|
|
51
|
-
{
|
|
52
|
-
"matcher": "auto",
|
|
53
|
-
"hooks": [
|
|
54
|
-
{
|
|
55
|
-
"type": "command",
|
|
56
|
-
"command": "if [ -f .claude/context-essentials.md ]; then echo 'Context preserved for restoration after compaction'; else echo 'No context-essentials.md found'; fi",
|
|
57
|
-
"timeout": 5
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
"SessionStart": [
|
|
63
|
-
{
|
|
64
|
-
"matcher": "compact",
|
|
65
|
-
"hooks": [
|
|
66
|
-
{
|
|
67
|
-
"type": "command",
|
|
68
|
-
"command": "if [ -f .claude/context-essentials.md ]; then cat .claude/context-essentials.md; else echo 'No context-essentials.md found.'; fi"
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"PreToolUse": [
|
|
74
|
-
{
|
|
75
|
-
"matcher": "Edit",
|
|
76
|
-
"hooks": [
|
|
77
|
-
{
|
|
78
|
-
"type": "command",
|
|
79
|
-
"command": "FILEPATH=$(jq -r '.tool_input.file_path // empty'); if printf '%s' \"$FILEPATH\" | grep -qE '(\\.env(\\.|$)|\\.envrc|credentials|secrets?|private.*key|id_(rsa|dsa|ecdsa|ed25519)|\\.pem$|\\.p(fx|12)$|\\.key$|\\.npmrc$|\\.netrc$|kubeconfig)'; then echo \"BLOCKED: Cannot edit sensitive file: $FILEPATH\" >&2 && exit 2; fi; exit 0"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"matcher": "Write",
|
|
85
|
-
"hooks": [
|
|
86
|
-
{
|
|
87
|
-
"type": "command",
|
|
88
|
-
"command": "FILEPATH=$(jq -r '.tool_input.file_path // empty'); if printf '%s' \"$FILEPATH\" | grep -qE '(\\.env(\\.|$)|\\.envrc|credentials|secrets?|private.*key|id_(rsa|dsa|ecdsa|ed25519)|\\.pem$|\\.p(fx|12)$|\\.key$|\\.npmrc$|\\.netrc$|kubeconfig)'; then echo \"BLOCKED: Cannot write sensitive file: $FILEPATH\" >&2 && exit 2; fi; exit 0"
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"PostToolUse": [
|
|
94
|
-
{
|
|
95
|
-
"matcher": "Bash",
|
|
96
|
-
"hooks": [
|
|
97
|
-
{
|
|
98
|
-
"type": "command",
|
|
99
|
-
"command": "OUTPUT_SIZE=$(jq -r '.tool_response.stdout? // .tool_response? // .tool_result? // empty' | wc -c); if [ \"$OUTPUT_SIZE\" -gt 50000 ]; then echo 'NOTICE: Large output (>50KB). Extract only the relevant information and summarize in under 20 lines.'; elif [ \"$OUTPUT_SIZE\" -gt 10000 ]; then echo 'NOTICE: Moderate output (>10KB). Focus on errors, warnings, and key results.'; fi; exit 0",
|
|
100
|
-
"timeout": 3
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"matcher": "Grep",
|
|
106
|
-
"hooks": [
|
|
107
|
-
{
|
|
108
|
-
"type": "command",
|
|
109
|
-
"command": "OUTPUT_SIZE=$(jq -r '.tool_response.stdout? // .tool_response? // .tool_result? // empty' | wc -c); if [ \"$OUTPUT_SIZE\" -gt 50000 ]; then echo 'NOTICE: Large output (>50KB). Summarize key findings in under 20 lines.'; fi; exit 0",
|
|
110
|
-
"timeout": 3
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
"PostCompact": [
|
|
116
|
-
{
|
|
117
|
-
"matcher": "auto",
|
|
118
|
-
"hooks": [
|
|
119
|
-
{
|
|
120
|
-
"type": "command",
|
|
121
|
-
"command": "if [ -f .claude/context-essentials.md ]; then jq -n --rawfile c .claude/context-essentials.md '{\"systemMessage\": (\"CONTEXT RESTORED AFTER COMPACTION:\\n\" + $c)}'; else echo '{}'; fi",
|
|
122
|
-
"timeout": 5
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Post Tool Use Failure Hook: Recovery after tool failure
|
|
3
|
-
# Runs on PostToolUseFailure event
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# Read JSON input from stdin
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name // "unknown"')
|
|
9
|
-
ERROR=$(echo "$INPUT" | jq -r '.error // "unknown"')
|
|
10
|
-
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "unknown"')
|
|
11
|
-
TIMESTAMP=$(date -Iseconds)
|
|
12
|
-
|
|
13
|
-
# Ensure logs directory exists
|
|
14
|
-
mkdir -p .claude/logs
|
|
15
|
-
|
|
16
|
-
# Log the failure for analysis
|
|
17
|
-
log_failure() {
|
|
18
|
-
local severity="$1"
|
|
19
|
-
local message="$2"
|
|
20
|
-
echo "[${TIMESTAMP}] [${severity}] [${TOOL_NAME}] ${message}" >> .claude/logs/tool-failures.log
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
# Provide recovery context based on tool type
|
|
24
|
-
case "$TOOL_NAME" in
|
|
25
|
-
"Bash")
|
|
26
|
-
log_failure "ERROR" "Bash command failed: $ERROR"
|
|
27
|
-
|
|
28
|
-
# Check for common recoverable errors
|
|
29
|
-
if echo "$ERROR" | grep -q "command not found"; then
|
|
30
|
-
echo '{"additionalContext": "Command not found. Check if the command is installed or use Docker container."}'
|
|
31
|
-
elif echo "$ERROR" | grep -q "permission denied"; then
|
|
32
|
-
echo '{"additionalContext": "Permission denied. Check file permissions or use appropriate privileges."}'
|
|
33
|
-
elif echo "$ERROR" | grep -q "No such file or directory"; then
|
|
34
|
-
echo '{"additionalContext": "File or directory not found. Verify the path exists."}'
|
|
35
|
-
elif echo "$ERROR" | grep -q "timeout"; then
|
|
36
|
-
echo '{"additionalContext": "Command timed out. Consider increasing timeout or optimizing the command."}'
|
|
37
|
-
else
|
|
38
|
-
echo '{"continue": true}'
|
|
39
|
-
fi
|
|
40
|
-
;;
|
|
41
|
-
|
|
42
|
-
"Edit"|"Write")
|
|
43
|
-
log_failure "ERROR" "File operation failed: $ERROR"
|
|
44
|
-
|
|
45
|
-
if echo "$ERROR" | grep -q "Permission denied"; then
|
|
46
|
-
echo '{"additionalContext": "File permission denied. Check write permissions on the file."}'
|
|
47
|
-
elif echo "$ERROR" | grep -q "No such file"; then
|
|
48
|
-
echo '{"additionalContext": "Target directory may not exist. Create parent directories first."}'
|
|
49
|
-
elif echo "$ERROR" | grep -q "not unique"; then
|
|
50
|
-
echo '{"additionalContext": "Edit old_string not unique. Provide more context to make it unique."}'
|
|
51
|
-
else
|
|
52
|
-
echo '{"continue": true}'
|
|
53
|
-
fi
|
|
54
|
-
;;
|
|
55
|
-
|
|
56
|
-
"Read")
|
|
57
|
-
log_failure "WARN" "Read failed: $ERROR"
|
|
58
|
-
|
|
59
|
-
if echo "$ERROR" | grep -q "No such file"; then
|
|
60
|
-
echo '{"additionalContext": "File not found. Use Glob to search for the correct file path."}'
|
|
61
|
-
elif echo "$ERROR" | grep -q "Is a directory"; then
|
|
62
|
-
echo '{"additionalContext": "Target is a directory, not a file. Use ls or Glob to list contents."}'
|
|
63
|
-
else
|
|
64
|
-
echo '{"continue": true}'
|
|
65
|
-
fi
|
|
66
|
-
;;
|
|
67
|
-
|
|
68
|
-
"Glob"|"Grep")
|
|
69
|
-
log_failure "WARN" "Search failed: $ERROR"
|
|
70
|
-
echo '{"additionalContext": "Search operation failed. Check pattern syntax and path."}'
|
|
71
|
-
;;
|
|
72
|
-
|
|
73
|
-
"Task")
|
|
74
|
-
log_failure "ERROR" "Sub-agent failed: $ERROR"
|
|
75
|
-
|
|
76
|
-
if echo "$ERROR" | grep -q "timeout"; then
|
|
77
|
-
echo '{"additionalContext": "Sub-agent timed out. Consider breaking the task into smaller parts."}'
|
|
78
|
-
else
|
|
79
|
-
echo '{"continue": true}'
|
|
80
|
-
fi
|
|
81
|
-
;;
|
|
82
|
-
|
|
83
|
-
*)
|
|
84
|
-
log_failure "INFO" "Tool failed: $ERROR"
|
|
85
|
-
echo '{"continue": true}'
|
|
86
|
-
;;
|
|
87
|
-
esac
|
|
88
|
-
|
|
89
|
-
exit 0
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Pre Compact Hook: Save state before memory compaction
|
|
3
|
-
# Runs on PreCompact event
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# Read JSON input from stdin
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
CWD=$(echo "$INPUT" | jq -r '.cwd // "."')
|
|
9
|
-
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "unknown"')
|
|
10
|
-
TIMESTAMP=$(date +%Y%m%d%H%M%S)
|
|
11
|
-
|
|
12
|
-
cd "$CWD" 2>/dev/null || true
|
|
13
|
-
|
|
14
|
-
# Ensure directories exist
|
|
15
|
-
mkdir -p .claude/logs
|
|
16
|
-
mkdir -p .bmad/backups 2>/dev/null || true
|
|
17
|
-
mkdir -p .recette/backups 2>/dev/null || true
|
|
18
|
-
|
|
19
|
-
# Log compaction event
|
|
20
|
-
echo "[$(date -Iseconds)] [COMPACT] Context compaction triggered - session: $SESSION_ID" >> .claude/logs/session.log
|
|
21
|
-
|
|
22
|
-
# Backup BMAD sprint status if exists
|
|
23
|
-
if [[ -f ".bmad/sprint-status.yaml" ]]; then
|
|
24
|
-
cp .bmad/sprint-status.yaml ".bmad/backups/sprint-status-${TIMESTAMP}.yaml"
|
|
25
|
-
echo "[$(date -Iseconds)] [COMPACT] Backed up sprint-status.yaml" >> .claude/logs/session.log
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
# Backup current story context if exists
|
|
29
|
-
if [[ -f ".bmad/current-story.yaml" ]]; then
|
|
30
|
-
cp .bmad/current-story.yaml ".bmad/backups/current-story-${TIMESTAMP}.yaml"
|
|
31
|
-
echo "[$(date -Iseconds)] [COMPACT] Backed up current-story.yaml" >> .claude/logs/session.log
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# Backup recette session if exists
|
|
35
|
-
if [[ -d ".recette/sessions" ]]; then
|
|
36
|
-
ACTIVE_SESSION=$(find .recette/sessions -name "*.yaml" -mmin -60 2>/dev/null | head -1)
|
|
37
|
-
if [[ -n "$ACTIVE_SESSION" ]]; then
|
|
38
|
-
cp "$ACTIVE_SESSION" ".recette/backups/$(basename "$ACTIVE_SESSION" .yaml)-${TIMESTAMP}.yaml"
|
|
39
|
-
echo "[$(date -Iseconds)] [COMPACT] Backed up recette session" >> .claude/logs/session.log
|
|
40
|
-
fi
|
|
41
|
-
fi
|
|
42
|
-
|
|
43
|
-
# Cleanup old backups (keep last 10)
|
|
44
|
-
for backup_dir in .bmad/backups .recette/backups; do
|
|
45
|
-
if [[ -d "$backup_dir" ]]; then
|
|
46
|
-
ls -t "$backup_dir"/*.yaml 2>/dev/null | tail -n +11 | xargs -r rm -f 2>/dev/null || true
|
|
47
|
-
fi
|
|
48
|
-
done
|
|
49
|
-
|
|
50
|
-
# Output message to preserve in context
|
|
51
|
-
echo '{"additionalContext": "State backed up before compaction. Sprint and story context preserved."}'
|
|
52
|
-
|
|
53
|
-
exit 0
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Session End Hook: Collect metrics and logs at session end
|
|
3
|
-
# Runs on SessionEnd event (called Stop in some versions)
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# Read JSON input from stdin
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
CWD=$(echo "$INPUT" | jq -r '.cwd // "."')
|
|
9
|
-
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "unknown"')
|
|
10
|
-
STOP_REASON=$(echo "$INPUT" | jq -r '.stop_reason // "unknown"')
|
|
11
|
-
TIMESTAMP=$(date -Iseconds)
|
|
12
|
-
DATE_SHORT=$(date +%Y%m%d)
|
|
13
|
-
|
|
14
|
-
cd "$CWD" 2>/dev/null || true
|
|
15
|
-
|
|
16
|
-
# Ensure directories exist
|
|
17
|
-
mkdir -p .claude/logs
|
|
18
|
-
mkdir -p .claude/metrics
|
|
19
|
-
|
|
20
|
-
# Log session end
|
|
21
|
-
{
|
|
22
|
-
echo "[${TIMESTAMP}] [SESSION_END] Session: $SESSION_ID"
|
|
23
|
-
echo "[${TIMESTAMP}] [SESSION_END] Stop reason: $STOP_REASON"
|
|
24
|
-
} >> .claude/logs/session.log
|
|
25
|
-
|
|
26
|
-
# Collect session metrics
|
|
27
|
-
collect_metrics() {
|
|
28
|
-
local metrics_file=".claude/metrics/session-${DATE_SHORT}.jsonl"
|
|
29
|
-
|
|
30
|
-
# Count files modified in this session (last hour)
|
|
31
|
-
local files_modified=$(find . -type f -mmin -60 \
|
|
32
|
-
-not -path "./.git/*" \
|
|
33
|
-
-not -path "./node_modules/*" \
|
|
34
|
-
-not -path "./vendor/*" \
|
|
35
|
-
-not -path "./.claude/*" \
|
|
36
|
-
2>/dev/null | wc -l | tr -d ' ')
|
|
37
|
-
|
|
38
|
-
# Count tool failures if log exists
|
|
39
|
-
local tool_failures=0
|
|
40
|
-
if [[ -f ".claude/logs/tool-failures.log" ]]; then
|
|
41
|
-
tool_failures=$(grep -c "$(date +%Y-%m-%d)" .claude/logs/tool-failures.log 2>/dev/null || echo 0)
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
# Check BMAD status
|
|
45
|
-
local current_story="none"
|
|
46
|
-
local story_status="unknown"
|
|
47
|
-
if [[ -f ".bmad/current-story.yaml" ]]; then
|
|
48
|
-
current_story=$(grep "^id:" .bmad/current-story.yaml 2>/dev/null | cut -d' ' -f2 || echo "none")
|
|
49
|
-
story_status=$(grep "^status:" .bmad/current-story.yaml 2>/dev/null | cut -d' ' -f2 || echo "unknown")
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
# Build metrics JSON
|
|
53
|
-
local metric_entry=$(cat <<EOF
|
|
54
|
-
{"timestamp":"${TIMESTAMP}","session_id":"${SESSION_ID}","stop_reason":"${STOP_REASON}","files_modified":${files_modified},"tool_failures":${tool_failures},"current_story":"${current_story}","story_status":"${story_status}"}
|
|
55
|
-
EOF
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
echo "$metric_entry" >> "$metrics_file"
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
# Generate daily summary if this is the last session of the day
|
|
62
|
-
generate_daily_summary() {
|
|
63
|
-
local metrics_file=".claude/metrics/session-${DATE_SHORT}.jsonl"
|
|
64
|
-
local summary_file=".claude/metrics/daily-summary-${DATE_SHORT}.json"
|
|
65
|
-
|
|
66
|
-
if [[ -f "$metrics_file" ]]; then
|
|
67
|
-
local session_count=$(wc -l < "$metrics_file" | tr -d ' ')
|
|
68
|
-
local total_files=$(jq -s '[.[].files_modified] | add' "$metrics_file" 2>/dev/null || echo 0)
|
|
69
|
-
local total_failures=$(jq -s '[.[].tool_failures] | add' "$metrics_file" 2>/dev/null || echo 0)
|
|
70
|
-
|
|
71
|
-
cat > "$summary_file" <<EOF
|
|
72
|
-
{
|
|
73
|
-
"date": "${DATE_SHORT}",
|
|
74
|
-
"total_sessions": ${session_count},
|
|
75
|
-
"total_files_modified": ${total_files},
|
|
76
|
-
"total_tool_failures": ${total_failures},
|
|
77
|
-
"generated_at": "${TIMESTAMP}"
|
|
78
|
-
}
|
|
79
|
-
EOF
|
|
80
|
-
fi
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
# Run metrics collection
|
|
84
|
-
collect_metrics
|
|
85
|
-
|
|
86
|
-
# Generate summary (runs every time, overwrites previous)
|
|
87
|
-
generate_daily_summary
|
|
88
|
-
|
|
89
|
-
# Cleanup old metrics (keep last 30 days)
|
|
90
|
-
find .claude/metrics -name "*.jsonl" -mtime +30 -delete 2>/dev/null || true
|
|
91
|
-
find .claude/metrics -name "daily-summary-*.json" -mtime +30 -delete 2>/dev/null || true
|
|
92
|
-
|
|
93
|
-
# Cleanup old logs (keep last 7 days)
|
|
94
|
-
find .claude/logs -name "*.log" -mtime +7 -delete 2>/dev/null || true
|
|
95
|
-
|
|
96
|
-
echo '{"continue": true}'
|
|
97
|
-
|
|
98
|
-
exit 0
|