@the-bearded-bear/claude-craft 5.1.0 → 5.2.0-next.451defc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/Dev/i18n/de/Angular/agents/angular-reviewer.md +10 -0
  2. package/Dev/i18n/de/CSharp/agents/csharp-reviewer.md +10 -0
  3. package/Dev/i18n/de/Common/agents/accessibility-expert.md +4 -0
  4. package/Dev/i18n/de/Common/agents/api-designer.md +4 -0
  5. package/Dev/i18n/de/Common/agents/database-architect.md +4 -0
  6. package/Dev/i18n/de/Common/agents/devops-engineer.md +4 -0
  7. package/Dev/i18n/de/Common/agents/performance-auditor.md +4 -0
  8. package/Dev/i18n/de/Common/agents/ralph-conductor.md +3 -0
  9. package/Dev/i18n/de/Common/agents/refactoring-specialist.md +4 -0
  10. package/Dev/i18n/de/Common/agents/research-assistant.md +4 -0
  11. package/Dev/i18n/de/Common/agents/tdd-coach.md +4 -0
  12. package/Dev/i18n/de/Common/agents/ui-designer.md +4 -0
  13. package/Dev/i18n/de/Common/agents/uiux-orchestrator.md +3 -0
  14. package/Dev/i18n/de/Common/agents/ux-ergonome.md +4 -0
  15. package/Dev/i18n/de/Common/agents/workflow-orchestrator.md +4 -0
  16. package/Dev/i18n/de/Common/hooks/scripts/post-tool-failure.sh +89 -0
  17. package/Dev/i18n/de/Common/hooks/scripts/pre-compact.sh +53 -0
  18. package/Dev/i18n/de/Common/hooks/scripts/session-end.sh +98 -0
  19. package/Dev/i18n/de/Common/skills/documentation/SKILL.md +27 -1
  20. package/Dev/i18n/de/Common/skills/git-workflow/SKILL.md +24 -1
  21. package/Dev/i18n/de/Common/skills/kiss-dry-yagni/SKILL.md +17 -1
  22. package/Dev/i18n/de/Common/skills/security/SKILL.md +27 -1
  23. package/Dev/i18n/de/Common/skills/solid-principles/SKILL.md +24 -1
  24. package/Dev/i18n/de/Common/skills/testing/SKILL.md +32 -1
  25. package/Dev/i18n/de/Common/skills/workflow-analysis/SKILL.md +17 -1
  26. package/Dev/i18n/de/Common/templates/settings.json.template +77 -2
  27. package/Dev/i18n/de/Flutter/agents/flutter-reviewer.md +5 -0
  28. package/Dev/i18n/de/Laravel/agents/laravel-reviewer.md +10 -0
  29. package/Dev/i18n/de/PHP/agents/php-reviewer.md +5 -0
  30. package/Dev/i18n/de/Python/agents/python-reviewer.md +5 -0
  31. package/Dev/i18n/de/React/agents/react-reviewer.md +5 -0
  32. package/Dev/i18n/de/ReactNative/agents/reactnative-reviewer.md +5 -0
  33. package/Dev/i18n/de/Symfony/agents/symfony-reviewer.md +5 -0
  34. package/Dev/i18n/de/VueJS/agents/vuejs-reviewer.md +10 -0
  35. package/Dev/i18n/en/Angular/agents/angular-reviewer.md +22 -0
  36. package/Dev/i18n/en/CSharp/agents/csharp-reviewer.md +22 -0
  37. package/Dev/i18n/en/Common/agents/accessibility-expert.md +13 -0
  38. package/Dev/i18n/en/Common/agents/api-designer.md +14 -0
  39. package/Dev/i18n/en/Common/agents/database-architect.md +13 -0
  40. package/Dev/i18n/en/Common/agents/devops-engineer.md +15 -1
  41. package/Dev/i18n/en/Common/agents/performance-auditor.md +13 -0
  42. package/Dev/i18n/en/Common/agents/refactoring-specialist.md +14 -0
  43. package/Dev/i18n/en/Common/agents/research-assistant.md +13 -0
  44. package/Dev/i18n/en/Common/agents/tdd-coach.md +15 -1
  45. package/Dev/i18n/en/Common/agents/ui-designer.md +10 -0
  46. package/Dev/i18n/en/Common/agents/uiux-orchestrator.md +12 -1
  47. package/Dev/i18n/en/Common/agents/ux-ergonome.md +10 -0
  48. package/Dev/i18n/en/Common/agents/workflow-orchestrator.md +14 -0
  49. package/Dev/i18n/en/Common/hooks/scripts/post-tool-failure.sh +89 -0
  50. package/Dev/i18n/en/Common/hooks/scripts/pre-compact.sh +53 -0
  51. package/Dev/i18n/en/Common/hooks/scripts/session-end.sh +98 -0
  52. package/Dev/i18n/en/Common/skills/documentation/SKILL.md +27 -1
  53. package/Dev/i18n/en/Common/skills/git-workflow/SKILL.md +24 -1
  54. package/Dev/i18n/en/Common/skills/kiss-dry-yagni/SKILL.md +17 -1
  55. package/Dev/i18n/en/Common/skills/security/SKILL.md +27 -1
  56. package/Dev/i18n/en/Common/skills/solid-principles/SKILL.md +24 -1
  57. package/Dev/i18n/en/Common/skills/testing/SKILL.md +32 -1
  58. package/Dev/i18n/en/Common/skills/workflow-analysis/SKILL.md +17 -1
  59. package/Dev/i18n/en/Common/templates/settings.json.template +50 -0
  60. package/Dev/i18n/en/Flutter/agents/flutter-reviewer.md +17 -0
  61. package/Dev/i18n/en/Laravel/agents/laravel-reviewer.md +22 -0
  62. package/Dev/i18n/en/Python/agents/python-reviewer.md +17 -0
  63. package/Dev/i18n/en/React/agents/react-reviewer.md +17 -0
  64. package/Dev/i18n/en/ReactNative/agents/reactnative-reviewer.md +17 -0
  65. package/Dev/i18n/en/Symfony/agents/symfony-reviewer.md +17 -0
  66. package/Dev/i18n/es/Angular/agents/angular-reviewer.md +10 -0
  67. package/Dev/i18n/es/CSharp/agents/csharp-reviewer.md +10 -0
  68. package/Dev/i18n/es/Common/agents/accessibility-expert.md +4 -0
  69. package/Dev/i18n/es/Common/agents/api-designer.md +4 -0
  70. package/Dev/i18n/es/Common/agents/database-architect.md +4 -0
  71. package/Dev/i18n/es/Common/agents/devops-engineer.md +4 -0
  72. package/Dev/i18n/es/Common/agents/performance-auditor.md +4 -0
  73. package/Dev/i18n/es/Common/agents/refactoring-specialist.md +4 -0
  74. package/Dev/i18n/es/Common/agents/research-assistant.md +4 -0
  75. package/Dev/i18n/es/Common/agents/tdd-coach.md +4 -0
  76. package/Dev/i18n/es/Common/agents/ui-designer.md +3 -0
  77. package/Dev/i18n/es/Common/agents/uiux-orchestrator.md +3 -0
  78. package/Dev/i18n/es/Common/agents/ux-ergonome.md +3 -0
  79. package/Dev/i18n/es/Common/agents/workflow-orchestrator.md +4 -0
  80. package/Dev/i18n/es/Common/hooks/scripts/post-tool-failure.sh +89 -0
  81. package/Dev/i18n/es/Common/hooks/scripts/pre-compact.sh +53 -0
  82. package/Dev/i18n/es/Common/hooks/scripts/session-end.sh +98 -0
  83. package/Dev/i18n/es/Common/skills/documentation/SKILL.md +27 -1
  84. package/Dev/i18n/es/Common/skills/git-workflow/SKILL.md +24 -1
  85. package/Dev/i18n/es/Common/skills/kiss-dry-yagni/SKILL.md +17 -1
  86. package/Dev/i18n/es/Common/skills/security/SKILL.md +27 -1
  87. package/Dev/i18n/es/Common/skills/solid-principles/SKILL.md +24 -1
  88. package/Dev/i18n/es/Common/skills/testing/SKILL.md +32 -1
  89. package/Dev/i18n/es/Common/skills/workflow-analysis/SKILL.md +17 -1
  90. package/Dev/i18n/es/Common/templates/settings.json.template +77 -2
  91. package/Dev/i18n/es/Flutter/agents/flutter-reviewer.md +5 -0
  92. package/Dev/i18n/es/Laravel/agents/laravel-reviewer.md +10 -0
  93. package/Dev/i18n/es/PHP/agents/php-reviewer.md +5 -0
  94. package/Dev/i18n/es/Python/agents/python-reviewer.md +5 -0
  95. package/Dev/i18n/es/React/agents/react-reviewer.md +5 -0
  96. package/Dev/i18n/es/ReactNative/agents/reactnative-reviewer.md +5 -0
  97. package/Dev/i18n/es/Symfony/agents/symfony-reviewer.md +5 -0
  98. package/Dev/i18n/es/VueJS/agents/vuejs-reviewer.md +10 -0
  99. package/Dev/i18n/fr/Angular/agents/angular-reviewer.md +10 -0
  100. package/Dev/i18n/fr/CSharp/agents/csharp-reviewer.md +10 -0
  101. package/Dev/i18n/fr/Common/agents/accessibility-expert.md +4 -0
  102. package/Dev/i18n/fr/Common/agents/api-designer.md +4 -0
  103. package/Dev/i18n/fr/Common/agents/database-architect.md +4 -0
  104. package/Dev/i18n/fr/Common/agents/devops-engineer.md +4 -0
  105. package/Dev/i18n/fr/Common/agents/performance-auditor.md +4 -0
  106. package/Dev/i18n/fr/Common/agents/ralph-conductor.md +3 -0
  107. package/Dev/i18n/fr/Common/agents/refactoring-specialist.md +4 -0
  108. package/Dev/i18n/fr/Common/agents/research-assistant.md +4 -0
  109. package/Dev/i18n/fr/Common/agents/tdd-coach.md +4 -0
  110. package/Dev/i18n/fr/Common/agents/ui-designer.md +3 -0
  111. package/Dev/i18n/fr/Common/agents/uiux-orchestrator.md +3 -0
  112. package/Dev/i18n/fr/Common/agents/ux-ergonome.md +3 -0
  113. package/Dev/i18n/fr/Common/agents/workflow-orchestrator.md +4 -0
  114. package/Dev/i18n/fr/Common/hooks/scripts/post-tool-failure.sh +88 -0
  115. package/Dev/i18n/fr/Common/hooks/scripts/pre-compact.sh +53 -0
  116. package/Dev/i18n/fr/Common/hooks/scripts/session-end.sh +98 -0
  117. package/Dev/i18n/fr/Common/skills/documentation/SKILL.md +27 -1
  118. package/Dev/i18n/fr/Common/skills/git-workflow/SKILL.md +24 -1
  119. package/Dev/i18n/fr/Common/skills/kiss-dry-yagni/SKILL.md +17 -1
  120. package/Dev/i18n/fr/Common/skills/security/SKILL.md +27 -1
  121. package/Dev/i18n/fr/Common/skills/solid-principles/SKILL.md +24 -1
  122. package/Dev/i18n/fr/Common/skills/testing/SKILL.md +32 -1
  123. package/Dev/i18n/fr/Common/skills/workflow-analysis/SKILL.md +17 -1
  124. package/Dev/i18n/fr/Common/templates/settings.json.template +77 -2
  125. package/Dev/i18n/fr/Flutter/agents/flutter-reviewer.md +5 -0
  126. package/Dev/i18n/fr/Laravel/agents/laravel-reviewer.md +10 -0
  127. package/Dev/i18n/fr/PHP/agents/php-reviewer.md +5 -0
  128. package/Dev/i18n/fr/Python/agents/python-reviewer.md +5 -0
  129. package/Dev/i18n/fr/React/agents/react-reviewer.md +5 -0
  130. package/Dev/i18n/fr/ReactNative/agents/reactnative-reviewer.md +5 -0
  131. package/Dev/i18n/fr/Symfony/agents/symfony-reviewer.md +5 -0
  132. package/Dev/i18n/fr/VueJS/agents/vuejs-reviewer.md +10 -0
  133. package/Dev/i18n/pt/Angular/agents/angular-reviewer.md +10 -0
  134. package/Dev/i18n/pt/CSharp/agents/csharp-reviewer.md +10 -0
  135. package/Dev/i18n/pt/Common/agents/accessibility-expert.md +4 -0
  136. package/Dev/i18n/pt/Common/agents/api-designer.md +4 -0
  137. package/Dev/i18n/pt/Common/agents/database-architect.md +4 -0
  138. package/Dev/i18n/pt/Common/agents/devops-engineer.md +4 -0
  139. package/Dev/i18n/pt/Common/agents/performance-auditor.md +4 -0
  140. package/Dev/i18n/pt/Common/agents/ralph-conductor.md +3 -0
  141. package/Dev/i18n/pt/Common/agents/refactoring-specialist.md +4 -0
  142. package/Dev/i18n/pt/Common/agents/research-assistant.md +4 -0
  143. package/Dev/i18n/pt/Common/agents/tdd-coach.md +4 -0
  144. package/Dev/i18n/pt/Common/agents/ui-designer.md +4 -0
  145. package/Dev/i18n/pt/Common/agents/uiux-orchestrator.md +3 -0
  146. package/Dev/i18n/pt/Common/agents/ux-ergonome.md +4 -0
  147. package/Dev/i18n/pt/Common/agents/workflow-orchestrator.md +4 -0
  148. package/Dev/i18n/pt/Common/hooks/scripts/post-tool-failure.sh +89 -0
  149. package/Dev/i18n/pt/Common/hooks/scripts/pre-compact.sh +53 -0
  150. package/Dev/i18n/pt/Common/hooks/scripts/session-end.sh +98 -0
  151. package/Dev/i18n/pt/Common/skills/documentation/SKILL.md +27 -1
  152. package/Dev/i18n/pt/Common/skills/git-workflow/SKILL.md +24 -1
  153. package/Dev/i18n/pt/Common/skills/kiss-dry-yagni/SKILL.md +17 -1
  154. package/Dev/i18n/pt/Common/skills/security/SKILL.md +27 -1
  155. package/Dev/i18n/pt/Common/skills/solid-principles/SKILL.md +24 -1
  156. package/Dev/i18n/pt/Common/skills/testing/SKILL.md +32 -1
  157. package/Dev/i18n/pt/Common/skills/workflow-analysis/SKILL.md +17 -1
  158. package/Dev/i18n/pt/Common/templates/settings.json.template +77 -2
  159. package/Dev/i18n/pt/Flutter/agents/flutter-reviewer.md +5 -0
  160. package/Dev/i18n/pt/Laravel/agents/laravel-reviewer.md +10 -0
  161. package/Dev/i18n/pt/PHP/agents/php-reviewer.md +5 -0
  162. package/Dev/i18n/pt/Python/agents/python-reviewer.md +5 -0
  163. package/Dev/i18n/pt/React/agents/react-reviewer.md +5 -0
  164. package/Dev/i18n/pt/ReactNative/agents/reactnative-reviewer.md +5 -0
  165. package/Dev/i18n/pt/Symfony/agents/symfony-reviewer.md +5 -0
  166. package/Dev/i18n/pt/VueJS/agents/vuejs-reviewer.md +10 -0
  167. package/Dev/scripts/install-angular-rules.sh +1 -1
  168. package/Dev/scripts/install-common-rules.sh +1 -1
  169. package/Dev/scripts/install-csharp-rules.sh +1 -1
  170. package/Dev/scripts/install-flutter-rules.sh +1 -1
  171. package/Dev/scripts/install-laravel-rules.sh +1 -1
  172. package/Dev/scripts/install-php-rules.sh +1 -1
  173. package/Dev/scripts/install-python-rules.sh +1 -1
  174. package/Dev/scripts/install-react-rules.sh +1 -1
  175. package/Dev/scripts/install-reactnative-rules.sh +1 -1
  176. package/Dev/scripts/install-symfony-rules.sh +1 -1
  177. package/Dev/scripts/install-vuejs-rules.sh +1 -1
  178. package/package.json +1 -1
@@ -1,3 +1,13 @@
1
+ ---
2
+ name: angular-reviewer
3
+ description: Angular and TypeScript code review specialist
4
+ model: haiku
5
+ tools: [Read, Glob, Grep, WebFetch, WebSearch]
6
+ disallowedTools: [Write, Edit, Bash, NotebookEdit]
7
+ permissionMode: default
8
+ skills: [solid-principles, testing, security]
9
+ ---
10
+
1
11
  # Angular Code Reviewer Agent
2
12
 
3
13
  You are an expert Angular code reviewer with deep knowledge of Angular best practices, TypeScript, RxJS, and modern web development patterns.
@@ -1,3 +1,13 @@
1
+ ---
2
+ name: csharp-reviewer
3
+ description: C# and .NET code review specialist
4
+ model: haiku
5
+ tools: [Read, Glob, Grep, WebFetch, WebSearch]
6
+ disallowedTools: [Write, Edit, Bash, NotebookEdit]
7
+ permissionMode: default
8
+ skills: [solid-principles, testing, security]
9
+ ---
10
+
1
11
  # C#/.NET Code Reviewer Agent
2
12
 
3
13
  You are an expert C#/.NET code reviewer with deep knowledge of Clean Architecture, CQRS, Domain-Driven Design, and modern .NET best practices.
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: accessibility-expert
3
3
  description: WCAG 2.2 AAA accessibility specialist
4
+ model: haiku
5
+ tools: [Read, Glob, Grep, WebFetch, WebSearch]
6
+ disallowedTools: [Write, Edit, NotebookEdit]
7
+ permissionMode: default
4
8
  ---
5
9
 
6
10
  # Barrierefreiheit-Experten Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: api-designer
3
3
  description: Senior API Designer for REST and GraphQL APIs
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [solid-principles, documentation]
4
8
  ---
5
9
 
6
10
  # API Designer Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: database-architect
3
3
  description: Database design and optimization expert
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [solid-principles, security]
4
8
  ---
5
9
 
6
10
  # Database Architect Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: devops-engineer
3
3
  description: CI-CD, Docker, and deployment specialist
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, Bash, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [security, git-workflow]
4
8
  ---
5
9
 
6
10
  # DevOps Engineer Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: performance-auditor
3
3
  description: Performance analysis and optimization expert
4
+ model: haiku
5
+ tools: [Read, Glob, Grep, Bash, WebFetch, WebSearch]
6
+ disallowedTools: [Write, Edit, NotebookEdit]
7
+ permissionMode: default
4
8
  ---
5
9
 
6
10
  # Performance Auditor Agent
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: ralph-conductor
3
3
  description: Orchestriert Ralph Wiggum v2.0 Sessions mit adaptiver DoD-Validierung
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, Bash, Task, WebFetch, WebSearch]
6
+ permissionMode: default
4
7
  ---
5
8
 
6
9
  # Ralph Conductor Agent v2.0
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: refactoring-specialist
3
3
  description: Safe code refactoring expert
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, Bash, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [solid-principles, testing, kiss-dry-yagni]
4
8
  ---
5
9
 
6
10
  # Refactoring Specialist Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: research-assistant
3
3
  description: Technical research and documentation specialist
4
+ model: haiku
5
+ tools: [Read, Glob, Grep, WebFetch, WebSearch]
6
+ disallowedTools: [Write, Edit, NotebookEdit]
7
+ permissionMode: default
4
8
  ---
5
9
 
6
10
  # Research Assistant Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: tdd-coach
3
3
  description: Test-Driven Development coach
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, Bash, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [testing, solid-principles]
4
8
  ---
5
9
 
6
10
  # TDD/BDD Coach Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: ui-designer
3
3
  description: Design systems and visual design expert
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [documentation]
4
8
  ---
5
9
 
6
10
  # UI Designer Agent
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: uiux-orchestrator
3
3
  description: UI-UX coordination and orchestration
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, Bash, Task, WebFetch, WebSearch]
6
+ permissionMode: default
4
7
  ---
5
8
 
6
9
  # UI/UX Orchestrator Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: ux-ergonome
3
3
  description: User experience and cognitive ergonomics specialist
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [documentation]
4
8
  ---
5
9
 
6
10
  # UX Ergonome Agent
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: workflow-orchestrator
3
3
  description: Intelligently routes to appropriate agents and workflows based on project context
4
+ model: sonnet
5
+ tools: [Read, Glob, Grep, Edit, Write, Bash, Task, WebFetch, WebSearch]
6
+ permissionMode: default
7
+ skills: [workflow-analysis]
4
8
  ---
5
9
 
6
10
  # Workflow Orchestrator
@@ -0,0 +1,89 @@
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
@@ -0,0 +1,53 @@
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
@@ -0,0 +1,98 @@
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,6 +1,32 @@
1
1
  ---
2
2
  name: documentation
3
- description: Documentation. Use when writing docs or reviewing documentation.
3
+ description: Documentation standards, API docs, and technical writing guidelines
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - Edit
9
+ - Write
10
+ model: haiku
11
+ triggers:
12
+ files:
13
+ - "*.md"
14
+ - "README*"
15
+ - "CHANGELOG*"
16
+ - "CONTRIBUTING*"
17
+ - "**/docs/**"
18
+ - "**/*.yaml"
19
+ - "**/*.yml"
20
+ keywords:
21
+ - documentation
22
+ - readme
23
+ - changelog
24
+ - api docs
25
+ - swagger
26
+ - openapi
27
+ - jsdoc
28
+ - phpdoc
29
+ - docstring
4
30
  ---
5
31
 
6
32
  # Documentation
@@ -1,6 +1,29 @@
1
1
  ---
2
2
  name: git-workflow
3
- description: Git Workflow. Use when working with git, branches, or commits.
3
+ description: Git workflow best practices, branching strategies, and commit conventions
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - Bash
9
+ model: haiku
10
+ triggers:
11
+ files:
12
+ - ".git/**"
13
+ - ".gitignore"
14
+ - ".gitattributes"
15
+ - "CHANGELOG.md"
16
+ keywords:
17
+ - git
18
+ - commit
19
+ - branch
20
+ - merge
21
+ - rebase
22
+ - pull request
23
+ - PR
24
+ - gitflow
25
+ - trunk-based
26
+ - conventional commits
4
27
  ---
5
28
 
6
29
  # Git Workflow
@@ -1,6 +1,22 @@
1
1
  ---
2
2
  name: kiss-dry-yagni
3
- description: Principes KISS, DRY, YAGNI. Use when reviewing code quality or refactoring.
3
+ description: KISS, DRY, YAGNI principles for simple, maintainable code
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ model: haiku
9
+ triggers:
10
+ keywords:
11
+ - KISS
12
+ - DRY
13
+ - YAGNI
14
+ - simplify
15
+ - duplication
16
+ - over-engineering
17
+ - premature optimization
18
+ - code smell
19
+ - complexity
4
20
  ---
5
21
 
6
22
  # Principes KISS, DRY, YAGNI
@@ -1,6 +1,32 @@
1
1
  ---
2
2
  name: security
3
- description: Sécurité. Use when reviewing security, implementing auth, or hardening code.
3
+ description: Security best practices, OWASP Top 10, and secure coding guidelines
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - WebSearch
9
+ model: sonnet
10
+ triggers:
11
+ files:
12
+ - "**/auth/**"
13
+ - "**/security/**"
14
+ - "**/*Auth*"
15
+ - "**/*Security*"
16
+ - "**/.env*"
17
+ keywords:
18
+ - security
19
+ - authentication
20
+ - authorization
21
+ - OWASP
22
+ - injection
23
+ - XSS
24
+ - CSRF
25
+ - encryption
26
+ - password
27
+ - token
28
+ - JWT
29
+ - OAuth
4
30
  ---
5
31
 
6
32
  # Sécurité
@@ -1,6 +1,29 @@
1
1
  ---
2
2
  name: solid-principles
3
- description: Principes SOLID. Use when reviewing code quality or refactoring.
3
+ description: SOLID principles for clean code design and architecture
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ model: haiku
9
+ triggers:
10
+ files:
11
+ - "*.php"
12
+ - "*.ts"
13
+ - "*.tsx"
14
+ - "*.cs"
15
+ - "*.py"
16
+ - "*.dart"
17
+ - "*.java"
18
+ keywords:
19
+ - SOLID
20
+ - Single Responsibility
21
+ - Open Closed
22
+ - Liskov
23
+ - Interface Segregation
24
+ - Dependency Inversion
25
+ - refactor
26
+ - clean code
4
27
  ---
5
28
 
6
29
  # Principes SOLID
@@ -1,6 +1,37 @@
1
1
  ---
2
2
  name: testing
3
- description: Testing - Principes TDD/BDD. Use when writing tests, reviewing test coverage, or setting up testing.
3
+ description: TDD/BDD testing principles, test patterns, and coverage strategies
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - Bash
9
+ model: sonnet
10
+ triggers:
11
+ files:
12
+ - "*Test.php"
13
+ - "*_test.py"
14
+ - "*.spec.ts"
15
+ - "*.spec.tsx"
16
+ - "*.test.ts"
17
+ - "*.test.tsx"
18
+ - "*_test.dart"
19
+ - "*_test.go"
20
+ - "**/__tests__/**"
21
+ - "**/tests/**"
22
+ keywords:
23
+ - test
24
+ - TDD
25
+ - BDD
26
+ - coverage
27
+ - mock
28
+ - stub
29
+ - fixture
30
+ - assertion
31
+ - PHPUnit
32
+ - Jest
33
+ - pytest
34
+ - xUnit
4
35
  ---
5
36
 
6
37
  # Testing - Principes TDD/BDD
@@ -1,6 +1,22 @@
1
1
  ---
2
2
  name: workflow-analysis
3
- description: Workflow d'Analyse Obligatoire. Use when working with workflow analysis.
3
+ description: Mandatory analysis workflow for understanding codebase before changes
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - Task
9
+ model: sonnet
10
+ triggers:
11
+ keywords:
12
+ - analyze
13
+ - understand
14
+ - explore
15
+ - architecture
16
+ - codebase
17
+ - structure
18
+ - workflow
19
+ - investigation
4
20
  ---
5
21
 
6
22
  # Workflow d'Analyse Obligatoire