specweave 1.0.551 → 1.0.552

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 (132) hide show
  1. package/bin/specweave.js +23 -1
  2. package/dist/src/cli/commands/hook.d.ts +15 -0
  3. package/dist/src/cli/commands/hook.d.ts.map +1 -0
  4. package/dist/src/cli/commands/hook.js +61 -0
  5. package/dist/src/cli/commands/hook.js.map +1 -0
  6. package/dist/src/config/types.d.ts +2 -2
  7. package/dist/src/core/hooks/handlers/hook-router.d.ts +19 -0
  8. package/dist/src/core/hooks/handlers/hook-router.d.ts.map +1 -0
  9. package/dist/src/core/hooks/handlers/hook-router.js +75 -0
  10. package/dist/src/core/hooks/handlers/hook-router.js.map +1 -0
  11. package/dist/src/core/hooks/handlers/index.d.ts +10 -0
  12. package/dist/src/core/hooks/handlers/index.d.ts.map +1 -0
  13. package/dist/src/core/hooks/handlers/index.js +9 -0
  14. package/dist/src/core/hooks/handlers/index.js.map +1 -0
  15. package/dist/src/core/hooks/handlers/post-tool-use-analytics.d.ts +11 -0
  16. package/dist/src/core/hooks/handlers/post-tool-use-analytics.d.ts.map +1 -0
  17. package/dist/src/core/hooks/handlers/post-tool-use-analytics.js +73 -0
  18. package/dist/src/core/hooks/handlers/post-tool-use-analytics.js.map +1 -0
  19. package/dist/src/core/hooks/handlers/post-tool-use.d.ts +11 -0
  20. package/dist/src/core/hooks/handlers/post-tool-use.d.ts.map +1 -0
  21. package/dist/src/core/hooks/handlers/post-tool-use.js +76 -0
  22. package/dist/src/core/hooks/handlers/post-tool-use.js.map +1 -0
  23. package/dist/src/core/hooks/handlers/pre-compact.d.ts +11 -0
  24. package/dist/src/core/hooks/handlers/pre-compact.d.ts.map +1 -0
  25. package/dist/src/core/hooks/handlers/pre-compact.js +77 -0
  26. package/dist/src/core/hooks/handlers/pre-compact.js.map +1 -0
  27. package/dist/src/core/hooks/handlers/pre-tool-use.d.ts +11 -0
  28. package/dist/src/core/hooks/handlers/pre-tool-use.d.ts.map +1 -0
  29. package/dist/src/core/hooks/handlers/pre-tool-use.js +318 -0
  30. package/dist/src/core/hooks/handlers/pre-tool-use.js.map +1 -0
  31. package/dist/src/core/hooks/handlers/session-start.d.ts +9 -0
  32. package/dist/src/core/hooks/handlers/session-start.d.ts.map +1 -0
  33. package/dist/src/core/hooks/handlers/session-start.js +111 -0
  34. package/dist/src/core/hooks/handlers/session-start.js.map +1 -0
  35. package/dist/src/core/hooks/handlers/stop-auto.d.ts +16 -0
  36. package/dist/src/core/hooks/handlers/stop-auto.d.ts.map +1 -0
  37. package/dist/src/core/hooks/handlers/stop-auto.js +122 -0
  38. package/dist/src/core/hooks/handlers/stop-auto.js.map +1 -0
  39. package/dist/src/core/hooks/handlers/stop-reflect.d.ts +14 -0
  40. package/dist/src/core/hooks/handlers/stop-reflect.d.ts.map +1 -0
  41. package/dist/src/core/hooks/handlers/stop-reflect.js +43 -0
  42. package/dist/src/core/hooks/handlers/stop-reflect.js.map +1 -0
  43. package/dist/src/core/hooks/handlers/stop-sync.d.ts +15 -0
  44. package/dist/src/core/hooks/handlers/stop-sync.d.ts.map +1 -0
  45. package/dist/src/core/hooks/handlers/stop-sync.js +68 -0
  46. package/dist/src/core/hooks/handlers/stop-sync.js.map +1 -0
  47. package/dist/src/core/hooks/handlers/types.d.ts +63 -0
  48. package/dist/src/core/hooks/handlers/types.d.ts.map +1 -0
  49. package/dist/src/core/hooks/handlers/types.js +27 -0
  50. package/dist/src/core/hooks/handlers/types.js.map +1 -0
  51. package/dist/src/core/hooks/handlers/user-prompt-submit.d.ts +14 -0
  52. package/dist/src/core/hooks/handlers/user-prompt-submit.d.ts.map +1 -0
  53. package/dist/src/core/hooks/handlers/user-prompt-submit.js +173 -0
  54. package/dist/src/core/hooks/handlers/user-prompt-submit.js.map +1 -0
  55. package/dist/src/core/hooks/handlers/utils.d.ts +25 -0
  56. package/dist/src/core/hooks/handlers/utils.d.ts.map +1 -0
  57. package/dist/src/core/hooks/handlers/utils.js +64 -0
  58. package/dist/src/core/hooks/handlers/utils.js.map +1 -0
  59. package/dist/src/init/research/types.d.ts +1 -1
  60. package/dist/src/sync/sync-target-resolver.js.map +1 -1
  61. package/dist/src/utils/lock-manager.d.ts.map +1 -1
  62. package/dist/src/utils/lock-manager.js +5 -0
  63. package/dist/src/utils/lock-manager.js.map +1 -1
  64. package/dist/src/utils/plugin-copier.d.ts.map +1 -1
  65. package/dist/src/utils/plugin-copier.js +3 -30
  66. package/dist/src/utils/plugin-copier.js.map +1 -1
  67. package/package.json +1 -1
  68. package/plugins/specweave/hooks/hooks.json +10 -10
  69. package/plugins/specweave/hooks/README.md +0 -493
  70. package/plugins/specweave/hooks/_archive/stop-auto-v4-legacy.sh +0 -1319
  71. package/plugins/specweave/hooks/lib/common-setup.sh +0 -144
  72. package/plugins/specweave/hooks/lib/hook-errors.sh +0 -414
  73. package/plugins/specweave/hooks/lib/migrate-increment-work.sh +0 -245
  74. package/plugins/specweave/hooks/lib/resolve-package.sh +0 -146
  75. package/plugins/specweave/hooks/lib/scheduler-startup.sh +0 -135
  76. package/plugins/specweave/hooks/lib/score-increment.sh +0 -87
  77. package/plugins/specweave/hooks/lib/sync-spec-content.sh +0 -193
  78. package/plugins/specweave/hooks/lib/update-active-increment.sh +0 -95
  79. package/plugins/specweave/hooks/lib/update-status-line.sh +0 -233
  80. package/plugins/specweave/hooks/lib/validate-spec-status.sh +0 -171
  81. package/plugins/specweave/hooks/llm-judge-validator.sh +0 -219
  82. package/plugins/specweave/hooks/log-decision.sh +0 -168
  83. package/plugins/specweave/hooks/pre-compact.sh +0 -64
  84. package/plugins/specweave/hooks/startup-health-check.sh +0 -64
  85. package/plugins/specweave/hooks/stop-auto-v5.sh +0 -276
  86. package/plugins/specweave/hooks/stop-reflect.sh +0 -336
  87. package/plugins/specweave/hooks/stop-sync.sh +0 -283
  88. package/plugins/specweave/hooks/tests/test-auto-context-integration.sh +0 -126
  89. package/plugins/specweave/hooks/tests/test-stop-auto-enriched.sh +0 -128
  90. package/plugins/specweave/hooks/universal/dispatcher.mjs +0 -336
  91. package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +0 -325
  92. package/plugins/specweave/hooks/universal/hook-wrapper.cmd +0 -26
  93. package/plugins/specweave/hooks/universal/hook-wrapper.sh +0 -69
  94. package/plugins/specweave/hooks/universal/run-hook.sh +0 -20
  95. package/plugins/specweave/hooks/universal/session-start.cmd +0 -16
  96. package/plugins/specweave/hooks/universal/session-start.ps1 +0 -16
  97. package/plugins/specweave/hooks/user-prompt-submit.sh +0 -2550
  98. package/plugins/specweave/hooks/v2/detectors/lifecycle-detector.sh +0 -87
  99. package/plugins/specweave/hooks/v2/detectors/us-completion-detector.sh +0 -186
  100. package/plugins/specweave/hooks/v2/dispatchers/post-tool-use-analytics.sh +0 -83
  101. package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +0 -447
  102. package/plugins/specweave/hooks/v2/dispatchers/pre-tool-use.sh +0 -104
  103. package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +0 -270
  104. package/plugins/specweave/hooks/v2/guards/completion-guard.sh +0 -14
  105. package/plugins/specweave/hooks/v2/guards/increment-duplicate-guard.sh +0 -14
  106. package/plugins/specweave/hooks/v2/guards/increment-existence-guard.sh +0 -240
  107. package/plugins/specweave/hooks/v2/guards/interview-enforcement-guard.sh +0 -171
  108. package/plugins/specweave/hooks/v2/guards/metadata-json-guard.sh +0 -14
  109. package/plugins/specweave/hooks/v2/guards/skill-chain-enforcement-guard.sh +0 -222
  110. package/plugins/specweave/hooks/v2/guards/spec-template-enforcement-guard.sh +0 -21
  111. package/plugins/specweave/hooks/v2/guards/spec-validation-guard.sh +0 -14
  112. package/plugins/specweave/hooks/v2/guards/status-completion-guard.sh +0 -84
  113. package/plugins/specweave/hooks/v2/guards/task-ac-sync-guard.sh +0 -475
  114. package/plugins/specweave/hooks/v2/guards/tdd-enforcement-guard.sh +0 -268
  115. package/plugins/specweave/hooks/v2/handlers/ac-sync-dispatcher.sh +0 -332
  116. package/plugins/specweave/hooks/v2/handlers/ac-validation-handler.sh +0 -50
  117. package/plugins/specweave/hooks/v2/handlers/github-sync-handler.sh +0 -347
  118. package/plugins/specweave/hooks/v2/handlers/living-docs-handler.sh +0 -83
  119. package/plugins/specweave/hooks/v2/handlers/living-specs-handler.sh +0 -268
  120. package/plugins/specweave/hooks/v2/handlers/project-bridge-handler.sh +0 -104
  121. package/plugins/specweave/hooks/v2/handlers/status-line-handler.sh +0 -165
  122. package/plugins/specweave/hooks/v2/handlers/status-update.sh +0 -61
  123. package/plugins/specweave/hooks/v2/handlers/universal-auto-create-dispatcher.sh +0 -270
  124. package/plugins/specweave/hooks/v2/integrations/ado-post-living-docs-update.sh +0 -367
  125. package/plugins/specweave/hooks/v2/integrations/ado-post-task.sh +0 -179
  126. package/plugins/specweave/hooks/v2/integrations/github-auto-create-handler.sh +0 -553
  127. package/plugins/specweave/hooks/v2/integrations/github-post-task.sh +0 -345
  128. package/plugins/specweave/hooks/v2/integrations/jira-post-task.sh +0 -180
  129. package/plugins/specweave/hooks/v2/lib/check-provider-enabled.sh +0 -52
  130. package/plugins/specweave/hooks/v2/queue/enqueue.sh +0 -81
  131. package/plugins/specweave/hooks/v2/session-end.sh +0 -139
  132. package/plugins/specweave/hooks/validate-skill-activations.sh +0 -227
@@ -1,139 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # SessionEnd Hook - Cleanup session and kill child processes
4
- #
5
- # Triggered: When Claude Code session ends normally
6
- # Purpose: Clean up session registry and child processes
7
- #
8
- # v0.35.3 - Fixed: use set +e for hook safety
9
- # v0.35.x - Fixed: Don't create .specweave in non-project directories
10
- # v1.0.71 - Fixed: Use specweave package location, not PROJECT_ROOT/dist
11
-
12
- set +e # CRITICAL: Never use set -e in hooks (causes cascading failures)
13
-
14
- # =============================================================================
15
- # CRITICAL FIX: Resolve specweave package location for CLI scripts
16
- # =============================================================================
17
- HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
18
-
19
- resolve_specweave_package() {
20
- local hook_dir="$1"
21
-
22
- # From hooks/v2/ go up 4 levels to package root
23
- local package_root="$(cd "$hook_dir/../../../.." 2>/dev/null && pwd)"
24
-
25
- if [[ -d "$package_root/dist/src/cli" ]]; then
26
- echo "$package_root"
27
- return 0
28
- fi
29
-
30
- # Fallback: Try global npm installation
31
- local npm_root
32
- npm_root="$(npm root -g 2>/dev/null)"
33
- if [[ -d "$npm_root/specweave/dist/src/cli" ]]; then
34
- echo "$npm_root/specweave"
35
- return 0
36
- fi
37
-
38
- # Fallback: Try which specweave
39
- local npx_path
40
- npx_path="$(which specweave 2>/dev/null)"
41
- if [[ -n "$npx_path" ]]; then
42
- local bin_dir="$(dirname "$npx_path")"
43
- local pkg_dir="$(cd "$bin_dir/.." 2>/dev/null && pwd)"
44
- if [[ -d "$pkg_dir/dist/src/cli" ]]; then
45
- echo "$pkg_dir"
46
- return 0
47
- fi
48
- fi
49
-
50
- return 1
51
- }
52
-
53
- SPECWEAVE_PKG="$(resolve_specweave_package "$HOOK_DIR")"
54
-
55
- # Find project root by searching upward for .specweave/ directory
56
- find_specweave_root() {
57
- local dir="$1"
58
- while [[ "$dir" != "/" ]]; do
59
- if [[ -f "$dir/.specweave/config.json" ]]; then
60
- echo "$dir"
61
- return 0
62
- fi
63
- dir="$(dirname "$dir")"
64
- done
65
- return 1 # NOT FOUND - do NOT fallback to pwd
66
- }
67
-
68
- PROJECT_ROOT="$(find_specweave_root "$PWD")"
69
- if [[ -z "$PROJECT_ROOT" ]]; then
70
- # NOT a SpecWeave project - exit silently
71
- echo '{"continue": true}'
72
- exit 0
73
- fi
74
-
75
- # If specweave package not found, exit gracefully
76
- if [[ -z "$SPECWEAVE_PKG" ]]; then
77
- echo '{"continue": true}'
78
- exit 0
79
- fi
80
-
81
- LOG_DIR="${PROJECT_ROOT}/.specweave/logs/sessions"
82
-
83
- # Find session by current PID
84
- SESSION_INFO=$(node "${SPECWEAVE_PKG}/dist/src/cli/find-session-by-pid.js" $$ 2>/dev/null || echo "")
85
-
86
- if [ -z "$SESSION_INFO" ]; then
87
- # No session found, exit gracefully
88
- echo '{"continue": true}'
89
- exit 0
90
- fi
91
-
92
- # Extract session_id and child_pids from JSON
93
- SESSION_ID=$(echo "$SESSION_INFO" | grep -o '"session_id":"[^"]*"' | cut -d'"' -f4)
94
- CHILD_PIDS=$(echo "$SESSION_INFO" | grep -o '"child_pids":\[[^]]*\]' | grep -o '[0-9]\+' || echo "")
95
-
96
- LOG_FILE="${LOG_DIR}/${SESSION_ID}.log"
97
-
98
- log() {
99
- echo "[$(date -u +"%Y-%m-%dT%H:%M:%SZ")] $*" >> "$LOG_FILE" 2>&1 || true
100
- }
101
-
102
- # Main execution
103
- {
104
- log "SessionEnd hook triggered (PID: $$)"
105
-
106
- # Kill all child processes
107
- if [ -n "$CHILD_PIDS" ]; then
108
- for pid in $CHILD_PIDS; do
109
- if kill -0 "$pid" 2>/dev/null; then
110
- log "Killing child PID: $pid (SIGTERM)"
111
- kill "$pid" 2>/dev/null || true
112
-
113
- # Wait 2 seconds, then SIGKILL if still alive
114
- sleep 2
115
- if kill -0 "$pid" 2>/dev/null; then
116
- log "Killing child PID: $pid (SIGKILL)"
117
- kill -9 "$pid" 2>/dev/null || true
118
- fi
119
- fi
120
- done
121
- fi
122
-
123
- # Remove session from registry
124
- if node "${SPECWEAVE_PKG}/dist/src/cli/remove-session.js" "$SESSION_ID" >> "$LOG_FILE" 2>&1; then
125
- log "Session removed from registry: $SESSION_ID"
126
- else
127
- log "WARNING: Failed to remove session from registry"
128
- fi
129
-
130
- # Clean up old session logs (>7 days)
131
- find "$LOG_DIR" -name "session-*.log" -mtime +7 -delete 2>/dev/null || true
132
-
133
- log "SessionEnd hook completed successfully"
134
-
135
- echo '{"continue": true}'
136
- } || {
137
- # Hook failure should not block Claude Code shutdown
138
- echo '{"continue": true}'
139
- }
@@ -1,227 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Skill Activation Validation Runner
4
- #
5
- # Runs domain-specific validation based on which skills/agents were activated
6
- # during the session. Called by stop-auto.sh when skill activations exist.
7
- #
8
- # Exit codes:
9
- # 0 - Validation passed (or no activations to validate)
10
- # 1 - Validation failed
11
- #
12
- # @since v1.0.130
13
- #
14
-
15
- set -euo pipefail
16
-
17
- # Get project root
18
- PROJECT_ROOT="${SPECWEAVE_PROJECT_ROOT:-$(pwd)}"
19
- ACTIVATIONS_FILE="$PROJECT_ROOT/.specweave/state/skill-activations.json"
20
- LOG_DIR="$PROJECT_ROOT/.specweave/logs"
21
- LOG_FILE="$LOG_DIR/skill-validation.log"
22
-
23
- # Ensure log directory exists
24
- mkdir -p "$LOG_DIR"
25
-
26
- log() {
27
- local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $1"
28
- echo "$msg" | tee -a "$LOG_FILE"
29
- }
30
-
31
- # Check if activations file exists
32
- if [ ! -f "$ACTIVATIONS_FILE" ]; then
33
- log "No skill activations tracked - skipping validation"
34
- exit 0
35
- fi
36
-
37
- # Parse activated domains
38
- DOMAINS=$(jq -r '.domains[]' "$ACTIVATIONS_FILE" 2>/dev/null || echo "")
39
-
40
- if [ -z "$DOMAINS" ]; then
41
- log "No domains activated - skipping validation"
42
- exit 0
43
- fi
44
-
45
- log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
46
- log "🔍 SKILL ACTIVATION VALIDATION"
47
- log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
48
- log "Activated domains: $DOMAINS"
49
-
50
- FAILED=0
51
- PASSED=0
52
- SKIPPED=0
53
-
54
- # Run validation for each activated domain
55
- for DOMAIN in $DOMAINS; do
56
- log ""
57
- log "▶ Validating domain: $DOMAIN"
58
-
59
- case "$DOMAIN" in
60
- backend)
61
- # Backend: Unit tests + lint
62
- if [ -f "$PROJECT_ROOT/package.json" ]; then
63
- # Run tests
64
- if jq -e '.scripts.test' "$PROJECT_ROOT/package.json" > /dev/null 2>&1; then
65
- log " Running: npm test"
66
- if npm test 2>&1 | tee -a "$LOG_FILE"; then
67
- log " ✅ Tests passed"
68
- ((PASSED++)) || true
69
- else
70
- log " ❌ Tests failed"
71
- ((FAILED++)) || true
72
- fi
73
- fi
74
- elif [ -f "$PROJECT_ROOT/requirements.txt" ] || [ -f "$PROJECT_ROOT/pyproject.toml" ]; then
75
- # Python backend
76
- if command -v pytest &> /dev/null; then
77
- log " Running: pytest"
78
- if pytest 2>&1 | tee -a "$LOG_FILE"; then
79
- log " ✅ Pytest passed"
80
- ((PASSED++)) || true
81
- else
82
- log " ❌ Pytest failed"
83
- ((FAILED++)) || true
84
- fi
85
- fi
86
- else
87
- log " ⏭ No package.json or Python project - skipping backend validation"
88
- ((SKIPPED++)) || true
89
- fi
90
- ;;
91
-
92
- mobile)
93
- # Mobile: Expo doctor or RN check
94
- if [ -f "$PROJECT_ROOT/package.json" ]; then
95
- # Check for Expo
96
- if jq -e '.dependencies.expo' "$PROJECT_ROOT/package.json" > /dev/null 2>&1; then
97
- log " Running: npx expo doctor"
98
- if npx expo doctor 2>&1 | tee -a "$LOG_FILE"; then
99
- log " ✅ Expo doctor passed"
100
- ((PASSED++)) || true
101
- else
102
- log " ⚠️ Expo doctor had warnings (non-blocking)"
103
- ((PASSED++)) || true # Warnings don't fail
104
- fi
105
- # Check for React Native
106
- elif jq -e '.dependencies["react-native"]' "$PROJECT_ROOT/package.json" > /dev/null 2>&1; then
107
- log " Running: TypeScript check for React Native"
108
- if [ -f "$PROJECT_ROOT/tsconfig.json" ]; then
109
- if npx tsc --noEmit 2>&1 | tee -a "$LOG_FILE"; then
110
- log " ✅ TypeScript check passed"
111
- ((PASSED++)) || true
112
- else
113
- log " ❌ TypeScript check failed"
114
- ((FAILED++)) || true
115
- fi
116
- else
117
- log " ⏭ No tsconfig.json - skipping"
118
- ((SKIPPED++)) || true
119
- fi
120
- fi
121
- else
122
- log " ⏭ No package.json - skipping mobile validation"
123
- ((SKIPPED++)) || true
124
- fi
125
- ;;
126
-
127
- infrastructure|infra)
128
- # Infrastructure: Terraform validate
129
- if [ -f "$PROJECT_ROOT/main.tf" ] || [ -d "$PROJECT_ROOT/terraform" ]; then
130
- TF_DIR="${PROJECT_ROOT}/terraform"
131
- [ -f "$PROJECT_ROOT/main.tf" ] && TF_DIR="$PROJECT_ROOT"
132
-
133
- log " Running: terraform validate"
134
- if (cd "$TF_DIR" && terraform validate) 2>&1 | tee -a "$LOG_FILE"; then
135
- log " ✅ Terraform validate passed"
136
- ((PASSED++)) || true
137
- else
138
- log " ❌ Terraform validate failed"
139
- ((FAILED++)) || true
140
- fi
141
- else
142
- log " ⏭ No Terraform files - skipping infrastructure validation"
143
- ((SKIPPED++)) || true
144
- fi
145
- ;;
146
-
147
- ml)
148
- # ML: Pytest
149
- if [ -f "$PROJECT_ROOT/requirements.txt" ] || [ -f "$PROJECT_ROOT/pyproject.toml" ]; then
150
- if command -v pytest &> /dev/null; then
151
- log " Running: pytest"
152
- if pytest 2>&1 | tee -a "$LOG_FILE"; then
153
- log " ✅ Pytest passed"
154
- ((PASSED++)) || true
155
- else
156
- log " ❌ Pytest failed"
157
- ((FAILED++)) || true
158
- fi
159
- else
160
- log " ⏭ pytest not installed - skipping"
161
- ((SKIPPED++)) || true
162
- fi
163
- else
164
- log " ⏭ No Python project - skipping ML validation"
165
- ((SKIPPED++)) || true
166
- fi
167
- ;;
168
-
169
- testing)
170
- # Testing domain: Run all available test suites
171
- if [ -f "$PROJECT_ROOT/package.json" ]; then
172
- # Unit tests
173
- if jq -e '.scripts.test' "$PROJECT_ROOT/package.json" > /dev/null 2>&1; then
174
- log " Running: npm test"
175
- if npm test 2>&1 | tee -a "$LOG_FILE"; then
176
- log " ✅ Unit tests passed"
177
- ((PASSED++)) || true
178
- else
179
- log " ❌ Unit tests failed"
180
- ((FAILED++)) || true
181
- fi
182
- fi
183
-
184
- # E2E tests (Playwright)
185
- if [ -f "$PROJECT_ROOT/playwright.config.ts" ] || [ -f "$PROJECT_ROOT/playwright.config.js" ]; then
186
- log " Running: npx playwright test"
187
- if npx playwright test 2>&1 | tee -a "$LOG_FILE"; then
188
- log " ✅ E2E tests passed"
189
- ((PASSED++)) || true
190
- else
191
- log " ❌ E2E tests failed"
192
- ((FAILED++)) || true
193
- fi
194
- fi
195
- else
196
- log " ⏭ No package.json - skipping testing validation"
197
- ((SKIPPED++)) || true
198
- fi
199
- ;;
200
-
201
- *)
202
- log " ⏭ Unknown domain: $DOMAIN - skipping"
203
- ((SKIPPED++)) || true
204
- ;;
205
- esac
206
- done
207
-
208
- log ""
209
- log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
210
- log "📊 VALIDATION SUMMARY"
211
- log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
212
- log " ✅ Passed: $PASSED"
213
- log " ❌ Failed: $FAILED"
214
- log " ⏭ Skipped: $SKIPPED"
215
- log ""
216
-
217
- if [ "$FAILED" -gt 0 ]; then
218
- log "❌ SKILL VALIDATION FAILED"
219
- log " Fix the issues above before completing auto mode."
220
- exit 1
221
- else
222
- log "✅ SKILL VALIDATION PASSED"
223
-
224
- # Clean up activations file after successful validation
225
- rm -f "$ACTIVATIONS_FILE"
226
- exit 0
227
- fi