specweave 1.0.28 → 1.0.30
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/CLAUDE.md +39 -0
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/commands/check-hooks.md +43 -0
- package/plugins/specweave/hooks/lib/circuit-breaker.sh +381 -0
- package/plugins/specweave/hooks/lib/logging.sh +231 -0
- package/plugins/specweave/hooks/lib/metrics.sh +347 -0
- package/plugins/specweave/hooks/lib/semaphore.sh +216 -0
- package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +156 -22
- package/plugins/specweave/scripts/hook-health.sh +441 -0
- package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-backend/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-confluent/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-docs/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-figma/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-payments/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-testing/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ui/.claude-plugin/plugin.json +1 -1
- /package/plugins/specweave/hooks/{hooks.json.bak → hooks.json} +0 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# hook-health.sh - Hook Health Dashboard
|
|
3
|
+
#
|
|
4
|
+
# Provides comprehensive visibility into hook system health:
|
|
5
|
+
# - Circuit breaker states
|
|
6
|
+
# - Semaphore utilization
|
|
7
|
+
# - Metrics and performance stats
|
|
8
|
+
# - Recent failures and errors
|
|
9
|
+
#
|
|
10
|
+
# Usage:
|
|
11
|
+
# bash hook-health.sh # Full dashboard
|
|
12
|
+
# bash hook-health.sh --status # Quick status check
|
|
13
|
+
# bash hook-health.sh --metrics # Detailed metrics
|
|
14
|
+
# bash hook-health.sh --reset # Reset all circuit breakers
|
|
15
|
+
# bash hook-health.sh --clean # Clean up stale state
|
|
16
|
+
#
|
|
17
|
+
# v1.0.0 - Initial implementation (2025-12-17)
|
|
18
|
+
|
|
19
|
+
set -uo pipefail
|
|
20
|
+
|
|
21
|
+
# === Configuration ===
|
|
22
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
23
|
+
HOOK_LIB_DIR="${SCRIPT_DIR}/../hooks/lib"
|
|
24
|
+
STATE_DIR="${SPECWEAVE_STATE_DIR:-.specweave/state}"
|
|
25
|
+
LOG_DIR="${SPECWEAVE_LOG_DIR:-.specweave/logs/hooks}"
|
|
26
|
+
|
|
27
|
+
# Colors
|
|
28
|
+
RED='\033[0;31m'
|
|
29
|
+
GREEN='\033[0;32m'
|
|
30
|
+
YELLOW='\033[1;33m'
|
|
31
|
+
BLUE='\033[0;34m'
|
|
32
|
+
CYAN='\033[0;36m'
|
|
33
|
+
NC='\033[0m'
|
|
34
|
+
BOLD='\033[1m'
|
|
35
|
+
|
|
36
|
+
# === Source libraries ===
|
|
37
|
+
source_lib() {
|
|
38
|
+
local lib="$1"
|
|
39
|
+
if [[ -f "$HOOK_LIB_DIR/$lib" ]]; then
|
|
40
|
+
source "$HOOK_LIB_DIR/$lib" 2>/dev/null
|
|
41
|
+
return 0
|
|
42
|
+
fi
|
|
43
|
+
return 1
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# === Print helpers ===
|
|
47
|
+
print_header() {
|
|
48
|
+
echo ""
|
|
49
|
+
echo -e "${BOLD}${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
50
|
+
echo -e "${BOLD}${BLUE} $1${NC}"
|
|
51
|
+
echo -e "${BOLD}${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
print_section() {
|
|
55
|
+
echo ""
|
|
56
|
+
echo -e "${CYAN}▸ $1${NC}"
|
|
57
|
+
echo -e "${CYAN}─────────────────────────────────────${NC}"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
print_status() {
|
|
61
|
+
local status="$1"
|
|
62
|
+
local label="$2"
|
|
63
|
+
case "$status" in
|
|
64
|
+
healthy|CLOSED|success)
|
|
65
|
+
echo -e " ${GREEN}●${NC} $label"
|
|
66
|
+
;;
|
|
67
|
+
degraded|HALF_OPEN|warning)
|
|
68
|
+
echo -e " ${YELLOW}●${NC} $label"
|
|
69
|
+
;;
|
|
70
|
+
unhealthy|OPEN|error)
|
|
71
|
+
echo -e " ${RED}●${NC} $label"
|
|
72
|
+
;;
|
|
73
|
+
*)
|
|
74
|
+
echo -e " ○ $label"
|
|
75
|
+
;;
|
|
76
|
+
esac
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# === Circuit Breaker Status ===
|
|
80
|
+
show_circuit_breakers() {
|
|
81
|
+
print_section "Circuit Breakers"
|
|
82
|
+
|
|
83
|
+
if ! source_lib "circuit-breaker.sh"; then
|
|
84
|
+
echo " Circuit breaker library not found"
|
|
85
|
+
return
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
local cb_dir="$STATE_DIR/circuit-breakers"
|
|
89
|
+
if [[ ! -d "$cb_dir" ]] || [[ -z "$(ls -A "$cb_dir" 2>/dev/null)" ]]; then
|
|
90
|
+
echo " No circuit breakers active (all hooks healthy)"
|
|
91
|
+
return
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
local found=false
|
|
95
|
+
for state_file in "$cb_dir"/*.state; do
|
|
96
|
+
[[ ! -f "$state_file" ]] && continue
|
|
97
|
+
found=true
|
|
98
|
+
|
|
99
|
+
local name
|
|
100
|
+
name=$(basename "$state_file" .state)
|
|
101
|
+
local status
|
|
102
|
+
status=$(cb_get_status "$name")
|
|
103
|
+
|
|
104
|
+
local state failures
|
|
105
|
+
state=$(echo "$status" | grep -o '"state":"[^"]*"' | cut -d'"' -f4)
|
|
106
|
+
failures=$(echo "$status" | grep -o '"failures":[0-9]*' | cut -d':' -f2)
|
|
107
|
+
|
|
108
|
+
print_status "$state" "$name: $state (failures: $failures)"
|
|
109
|
+
done
|
|
110
|
+
[[ "$found" == "false" ]] && echo " All circuits healthy (no breakers active)"
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
# === Semaphore Status ===
|
|
114
|
+
show_semaphore_status() {
|
|
115
|
+
print_section "Semaphore Status"
|
|
116
|
+
|
|
117
|
+
if ! source_lib "semaphore.sh"; then
|
|
118
|
+
echo " Semaphore library not found"
|
|
119
|
+
return
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
local max_concurrent="${HOOK_MAX_CONCURRENT:-15}"
|
|
123
|
+
local status
|
|
124
|
+
status=$(get_semaphore_status "hooks" "$max_concurrent")
|
|
125
|
+
|
|
126
|
+
local active available
|
|
127
|
+
active=$(echo "$status" | grep -o '"active":[0-9]*' | cut -d':' -f2)
|
|
128
|
+
available=$(echo "$status" | grep -o '"available":[0-9]*' | cut -d':' -f2)
|
|
129
|
+
|
|
130
|
+
echo " Max concurrent: $max_concurrent"
|
|
131
|
+
echo " Active slots: $active"
|
|
132
|
+
echo " Available: $available"
|
|
133
|
+
|
|
134
|
+
# Show utilization bar
|
|
135
|
+
local pct=$((active * 100 / max_concurrent))
|
|
136
|
+
local bar_width=30
|
|
137
|
+
local filled=$((pct * bar_width / 100))
|
|
138
|
+
|
|
139
|
+
printf " Utilization: ["
|
|
140
|
+
for ((i=0; i<bar_width; i++)); do
|
|
141
|
+
if [[ $i -lt $filled ]]; then
|
|
142
|
+
if [[ $pct -gt 80 ]]; then
|
|
143
|
+
printf "${RED}█${NC}"
|
|
144
|
+
elif [[ $pct -gt 60 ]]; then
|
|
145
|
+
printf "${YELLOW}█${NC}"
|
|
146
|
+
else
|
|
147
|
+
printf "${GREEN}█${NC}"
|
|
148
|
+
fi
|
|
149
|
+
else
|
|
150
|
+
printf "░"
|
|
151
|
+
fi
|
|
152
|
+
done
|
|
153
|
+
printf "] %d%%\n" "$pct"
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
# === Metrics Summary ===
|
|
157
|
+
show_metrics() {
|
|
158
|
+
print_section "Hook Metrics"
|
|
159
|
+
|
|
160
|
+
if ! source_lib "metrics.sh"; then
|
|
161
|
+
echo " Metrics library not found"
|
|
162
|
+
return
|
|
163
|
+
fi
|
|
164
|
+
|
|
165
|
+
local metrics_dir="$STATE_DIR/metrics"
|
|
166
|
+
if [[ ! -d "$metrics_dir" ]] || [[ -z "$(ls -A "$metrics_dir" 2>/dev/null)" ]]; then
|
|
167
|
+
echo " No metrics collected yet"
|
|
168
|
+
return
|
|
169
|
+
fi
|
|
170
|
+
|
|
171
|
+
# System health
|
|
172
|
+
local system_health
|
|
173
|
+
system_health=$(metrics_system_health)
|
|
174
|
+
local status total_hooks healthy degraded unhealthy
|
|
175
|
+
status=$(echo "$system_health" | grep -o '"status":"[^"]*"' | cut -d'"' -f4)
|
|
176
|
+
total_hooks=$(echo "$system_health" | grep -o '"total_hooks":[0-9]*' | cut -d':' -f2)
|
|
177
|
+
healthy=$(echo "$system_health" | grep -o '"healthy":[0-9]*' | cut -d':' -f2)
|
|
178
|
+
degraded=$(echo "$system_health" | grep -o '"degraded":[0-9]*' | cut -d':' -f2)
|
|
179
|
+
unhealthy=$(echo "$system_health" | grep -o '"unhealthy":[0-9]*' | cut -d':' -f2)
|
|
180
|
+
|
|
181
|
+
print_status "$status" "System Health: $status"
|
|
182
|
+
echo " Total hooks tracked: $total_hooks"
|
|
183
|
+
echo " Healthy: ${GREEN}$healthy${NC}"
|
|
184
|
+
echo " Degraded: ${YELLOW}$degraded${NC}"
|
|
185
|
+
echo " Unhealthy: ${RED}$unhealthy${NC}"
|
|
186
|
+
|
|
187
|
+
# Per-hook metrics
|
|
188
|
+
if [[ "${1:-}" == "--detailed" ]]; then
|
|
189
|
+
echo ""
|
|
190
|
+
echo " Per-Hook Metrics:"
|
|
191
|
+
echo " ────────────────────────────────────────────────────────────────"
|
|
192
|
+
printf " %-25s %8s %8s %8s %8s\n" "Hook" "Total" "Success%" "Avg(ms)" "P95(ms)"
|
|
193
|
+
echo " ────────────────────────────────────────────────────────────────"
|
|
194
|
+
|
|
195
|
+
for stats_file in "$metrics_dir"/*.stats; do
|
|
196
|
+
[[ ! -f "$stats_file" ]] && continue
|
|
197
|
+
|
|
198
|
+
local name
|
|
199
|
+
name=$(basename "$stats_file" .stats)
|
|
200
|
+
local metrics
|
|
201
|
+
metrics=$(metrics_get "$name")
|
|
202
|
+
|
|
203
|
+
local total success_rate avg_ms p95_ms
|
|
204
|
+
total=$(echo "$metrics" | grep -o '"total":[0-9]*' | cut -d':' -f2)
|
|
205
|
+
success_rate=$(echo "$metrics" | grep -o '"success_rate":[0-9]*' | cut -d':' -f2)
|
|
206
|
+
avg_ms=$(echo "$metrics" | grep -o '"avg_ms":[0-9]*' | cut -d':' -f2)
|
|
207
|
+
p95_ms=$(echo "$metrics" | grep -o '"p95_ms":[0-9]*' | cut -d':' -f2)
|
|
208
|
+
|
|
209
|
+
printf " %-25s %8s %7s%% %8s %8s\n" "$name" "$total" "$success_rate" "$avg_ms" "$p95_ms"
|
|
210
|
+
done
|
|
211
|
+
fi
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
# === Recent Failures ===
|
|
215
|
+
show_recent_failures() {
|
|
216
|
+
print_section "Recent Failures"
|
|
217
|
+
|
|
218
|
+
local failure_log="$HOME/.claude/hook-failures.log"
|
|
219
|
+
if [[ ! -f "$failure_log" ]]; then
|
|
220
|
+
echo " No failures recorded"
|
|
221
|
+
return
|
|
222
|
+
fi
|
|
223
|
+
|
|
224
|
+
local count
|
|
225
|
+
count=$(wc -l < "$failure_log" 2>/dev/null | tr -d ' ')
|
|
226
|
+
|
|
227
|
+
if [[ "$count" -eq 0 ]]; then
|
|
228
|
+
echo " No failures recorded"
|
|
229
|
+
return
|
|
230
|
+
fi
|
|
231
|
+
|
|
232
|
+
echo " Total failures recorded: $count"
|
|
233
|
+
echo ""
|
|
234
|
+
echo " Last 5 failures:"
|
|
235
|
+
tail -5 "$failure_log" | while read -r line; do
|
|
236
|
+
echo " $line"
|
|
237
|
+
done
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# === Hook Logs ===
|
|
241
|
+
show_recent_logs() {
|
|
242
|
+
print_section "Recent Hook Logs"
|
|
243
|
+
|
|
244
|
+
if [[ ! -d "$LOG_DIR" ]] || [[ -z "$(ls -A "$LOG_DIR" 2>/dev/null)" ]]; then
|
|
245
|
+
echo " No hook logs found"
|
|
246
|
+
return
|
|
247
|
+
fi
|
|
248
|
+
|
|
249
|
+
echo " Log files:"
|
|
250
|
+
for log_file in "$LOG_DIR"/*.log; do
|
|
251
|
+
[[ ! -f "$log_file" ]] && continue
|
|
252
|
+
local name size lines
|
|
253
|
+
name=$(basename "$log_file")
|
|
254
|
+
size=$(du -h "$log_file" 2>/dev/null | cut -f1)
|
|
255
|
+
lines=$(wc -l < "$log_file" 2>/dev/null | tr -d ' ')
|
|
256
|
+
echo " $name: $lines lines, $size"
|
|
257
|
+
done
|
|
258
|
+
|
|
259
|
+
echo ""
|
|
260
|
+
echo " Recent errors (last 5):"
|
|
261
|
+
grep '"level":"ERROR"' "$LOG_DIR"/*.log 2>/dev/null | tail -5 | while read -r line; do
|
|
262
|
+
local msg
|
|
263
|
+
msg=$(echo "$line" | grep -o '"msg":"[^"]*"' | cut -d'"' -f4)
|
|
264
|
+
echo " ERROR: $msg"
|
|
265
|
+
done || echo " No errors found"
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
# === Quick Status ===
|
|
269
|
+
show_quick_status() {
|
|
270
|
+
echo -e "${BOLD}Hook System Status${NC}"
|
|
271
|
+
echo ""
|
|
272
|
+
|
|
273
|
+
# Check libraries
|
|
274
|
+
local libs_ok=true
|
|
275
|
+
for lib in semaphore.sh circuit-breaker.sh metrics.sh logging.sh; do
|
|
276
|
+
if [[ -f "$HOOK_LIB_DIR/$lib" ]]; then
|
|
277
|
+
echo -e " ${GREEN}✓${NC} $lib"
|
|
278
|
+
else
|
|
279
|
+
echo -e " ${RED}✗${NC} $lib (missing)"
|
|
280
|
+
libs_ok=false
|
|
281
|
+
fi
|
|
282
|
+
done
|
|
283
|
+
|
|
284
|
+
echo ""
|
|
285
|
+
|
|
286
|
+
# System health
|
|
287
|
+
if source_lib "metrics.sh"; then
|
|
288
|
+
local health
|
|
289
|
+
health=$(metrics_system_health)
|
|
290
|
+
local status
|
|
291
|
+
status=$(echo "$health" | grep -o '"status":"[^"]*"' | cut -d'"' -f4)
|
|
292
|
+
print_status "$status" "System health: $status"
|
|
293
|
+
fi
|
|
294
|
+
|
|
295
|
+
# Semaphore
|
|
296
|
+
if source_lib "semaphore.sh"; then
|
|
297
|
+
local sem_status
|
|
298
|
+
sem_status=$(get_semaphore_status "hooks" 15)
|
|
299
|
+
local active
|
|
300
|
+
active=$(echo "$sem_status" | grep -o '"active":[0-9]*' | cut -d':' -f2)
|
|
301
|
+
echo " Active hooks: $active/15"
|
|
302
|
+
fi
|
|
303
|
+
|
|
304
|
+
# Recent failures
|
|
305
|
+
local failure_log="$HOME/.claude/hook-failures.log"
|
|
306
|
+
if [[ -f "$failure_log" ]]; then
|
|
307
|
+
local recent_failures
|
|
308
|
+
recent_failures=$(tail -100 "$failure_log" 2>/dev/null | grep -c "$(date +%Y-%m-%d)" 2>/dev/null) || recent_failures=0
|
|
309
|
+
if [[ "$recent_failures" -gt 0 ]]; then
|
|
310
|
+
echo -e " ${YELLOW}⚠${NC} Today's failures: $recent_failures"
|
|
311
|
+
fi
|
|
312
|
+
fi
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
# === Reset Circuit Breakers ===
|
|
316
|
+
reset_circuit_breakers() {
|
|
317
|
+
print_section "Resetting Circuit Breakers"
|
|
318
|
+
|
|
319
|
+
if ! source_lib "circuit-breaker.sh"; then
|
|
320
|
+
echo " Circuit breaker library not found"
|
|
321
|
+
return 1
|
|
322
|
+
fi
|
|
323
|
+
|
|
324
|
+
local cb_dir="$STATE_DIR/circuit-breakers"
|
|
325
|
+
if [[ ! -d "$cb_dir" ]]; then
|
|
326
|
+
echo " No circuit breakers to reset"
|
|
327
|
+
return 0
|
|
328
|
+
fi
|
|
329
|
+
|
|
330
|
+
for state_file in "$cb_dir"/*.state; do
|
|
331
|
+
[[ ! -f "$state_file" ]] && continue
|
|
332
|
+
|
|
333
|
+
local name
|
|
334
|
+
name=$(basename "$state_file" .state)
|
|
335
|
+
cb_reset "$name"
|
|
336
|
+
echo " ✓ Reset: $name"
|
|
337
|
+
done
|
|
338
|
+
|
|
339
|
+
echo ""
|
|
340
|
+
echo " All circuit breakers reset to CLOSED state"
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
# === Cleanup Stale State ===
|
|
344
|
+
cleanup_state() {
|
|
345
|
+
print_section "Cleaning Up Stale State"
|
|
346
|
+
|
|
347
|
+
# Clean semaphore locks
|
|
348
|
+
local sem_dir="$STATE_DIR/semaphores"
|
|
349
|
+
if [[ -d "$sem_dir" ]]; then
|
|
350
|
+
local stale_count=0
|
|
351
|
+
for lock_dir in "$sem_dir"/*; do
|
|
352
|
+
[[ ! -d "$lock_dir" ]] && continue
|
|
353
|
+
if source_lib "semaphore.sh"; then
|
|
354
|
+
local name
|
|
355
|
+
name=$(basename "$lock_dir")
|
|
356
|
+
cleanup_stale_locks "$name"
|
|
357
|
+
stale_count=$((stale_count + 1))
|
|
358
|
+
fi
|
|
359
|
+
done
|
|
360
|
+
echo " ✓ Cleaned semaphore locks ($stale_count pools)"
|
|
361
|
+
fi
|
|
362
|
+
|
|
363
|
+
# Clean old metrics
|
|
364
|
+
local metrics_dir="$STATE_DIR/metrics"
|
|
365
|
+
if [[ -d "$metrics_dir" ]]; then
|
|
366
|
+
# Remove hourly files older than 24 hours
|
|
367
|
+
find "$metrics_dir" -name "*.hourly.*" -mtime +1 -delete 2>/dev/null || true
|
|
368
|
+
echo " ✓ Cleaned old hourly metrics"
|
|
369
|
+
fi
|
|
370
|
+
|
|
371
|
+
# Rotate log files
|
|
372
|
+
if [[ -d "$LOG_DIR" ]]; then
|
|
373
|
+
for log_file in "$LOG_DIR"/*.log; do
|
|
374
|
+
[[ ! -f "$log_file" ]] && continue
|
|
375
|
+
local lines
|
|
376
|
+
lines=$(wc -l < "$log_file" 2>/dev/null | tr -d ' ')
|
|
377
|
+
if [[ "$lines" -gt 10000 ]]; then
|
|
378
|
+
tail -5000 "$log_file" > "${log_file}.tmp" && mv "${log_file}.tmp" "$log_file"
|
|
379
|
+
echo " ✓ Rotated $(basename "$log_file") ($lines -> 5000 lines)"
|
|
380
|
+
fi
|
|
381
|
+
done
|
|
382
|
+
fi
|
|
383
|
+
|
|
384
|
+
echo ""
|
|
385
|
+
echo " Cleanup complete"
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
# === Full Dashboard ===
|
|
389
|
+
show_dashboard() {
|
|
390
|
+
print_header "SpecWeave Hook Health Dashboard"
|
|
391
|
+
echo " $(date)"
|
|
392
|
+
|
|
393
|
+
show_circuit_breakers
|
|
394
|
+
show_semaphore_status
|
|
395
|
+
show_metrics
|
|
396
|
+
show_recent_failures
|
|
397
|
+
show_recent_logs
|
|
398
|
+
|
|
399
|
+
echo ""
|
|
400
|
+
echo -e "${CYAN}Commands:${NC}"
|
|
401
|
+
echo " bash hook-health.sh --status Quick status check"
|
|
402
|
+
echo " bash hook-health.sh --metrics Detailed metrics"
|
|
403
|
+
echo " bash hook-health.sh --reset Reset circuit breakers"
|
|
404
|
+
echo " bash hook-health.sh --clean Clean stale state"
|
|
405
|
+
echo ""
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
# === Main ===
|
|
409
|
+
main() {
|
|
410
|
+
case "${1:-}" in
|
|
411
|
+
--status|-s)
|
|
412
|
+
show_quick_status
|
|
413
|
+
;;
|
|
414
|
+
--metrics|-m)
|
|
415
|
+
source_lib "metrics.sh" && show_metrics "--detailed"
|
|
416
|
+
;;
|
|
417
|
+
--reset|-r)
|
|
418
|
+
reset_circuit_breakers
|
|
419
|
+
;;
|
|
420
|
+
--clean|-c)
|
|
421
|
+
cleanup_state
|
|
422
|
+
;;
|
|
423
|
+
--help|-h)
|
|
424
|
+
echo "Usage: hook-health.sh [option]"
|
|
425
|
+
echo ""
|
|
426
|
+
echo "Options:"
|
|
427
|
+
echo " --status, -s Quick status check"
|
|
428
|
+
echo " --metrics, -m Detailed metrics"
|
|
429
|
+
echo " --reset, -r Reset circuit breakers"
|
|
430
|
+
echo " --clean, -c Clean stale state"
|
|
431
|
+
echo " --help, -h Show this help"
|
|
432
|
+
echo ""
|
|
433
|
+
echo "No option: Full dashboard"
|
|
434
|
+
;;
|
|
435
|
+
*)
|
|
436
|
+
show_dashboard
|
|
437
|
+
;;
|
|
438
|
+
esac
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
main "$@"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-backend",
|
|
3
3
|
"description": "Backend API development for Node.js, Python, and .NET stacks. Includes Express, NestJS, FastAPI, Django, Flask, ASP.NET Core, and Entity Framework Core. Focus on REST APIs, authentication, database operations, and background services.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-confluent",
|
|
3
3
|
"description": "Confluent Cloud integration for SpecWeave - Schema Registry, ksqlDB, Kafka Connect, Flink, stream processing, and enterprise Kafka features",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-cost",
|
|
3
3
|
"description": "Cloud cost optimization and analysis for AWS, Azure, GCP, and serverless platforms. Provides cost analysis, optimization recommendations, pricing comparisons, budget alerts, and serverless cost modeling with 2024/2025 pricing.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anton Abyzov",
|
|
7
7
|
"email": "anton.abyzov@gmail.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-diagrams",
|
|
3
3
|
"description": "Architecture diagram generation with Mermaid following C4 Model conventions. Creates C4 Context/Container/Component diagrams, sequence diagrams, ER diagrams, and deployment diagrams. SpecWeave-aware for HLD/LLD documentation.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-figma",
|
|
3
3
|
"description": "Comprehensive Figma design-to-code automation. Import Figma designs via API/MCP, convert components to React/Vue/Angular, extract design tokens, generate responsive layouts, and sync design systems. Focus on accelerating frontend development from Figma designs.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anton Abyzov",
|
|
7
7
|
"email": "anton.abyzov@gmail.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-frontend",
|
|
3
3
|
"description": "Frontend development for React, Vue, and Angular projects. Includes Next.js 14+ App Router support, design system architecture (Atomic Design), and UI component best practices. Focus on modern frontend patterns and performance.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anton Abyzov",
|
|
7
7
|
"email": "anton.abyzov@gmail.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-github",
|
|
3
3
|
"description": "GitHub Issues integration for SpecWeave increments. Bidirectional sync between SpecWeave increments and GitHub Issues. Automatically creates issues from increments, tracks progress, and closes issues on completion. Uses GitHub CLI (gh) for seamless integration.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-infra",
|
|
3
3
|
"description": "Cloud infrastructure provisioning and monitoring. Includes Hetzner Cloud provisioning, Prometheus/Grafana setup, distributed tracing (Jaeger/Tempo), and SLO implementation. Focus on cost-effective, production-ready infrastructure.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-jira",
|
|
3
3
|
"description": "JIRA integration for SpecWeave increments. Bidirectional sync between SpecWeave increments and JIRA epics/stories. Automatically creates JIRA issues from increments, tracks progress, and updates status.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-kafka",
|
|
3
3
|
"description": "Apache Kafka event streaming integration with MCP servers, CLI tools (kcat), Terraform modules, and comprehensive observability stack",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-kafka-streams",
|
|
3
3
|
"description": "Kafka Streams library integration for SpecWeave - Stream processing with Java/Kotlin, topology patterns, state stores, windowing, joins, and testing frameworks",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-k8s",
|
|
3
3
|
"description": "Kubernetes deployment and management for SpecWeave projects. Generate K8s manifests, Helm charts, and GitOps workflows. Includes security policies (NetworkPolicy, RBAC) and best practices for production deployments.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-ml",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Complete ML/AI workflow integration for SpecWeave - from experiment tracking to production deployment. Includes 13 comprehensive skills covering the full ML lifecycle: pipeline orchestration, experiment tracking, model evaluation, explainability, deployment, feature engineering, AutoML, computer vision, NLP, time series forecasting, anomaly detection, data visualization, and model registry.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anton Abyzov",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-mobile",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Comprehensive React Native and Expo development support for mobile app development. Includes environment setup, debugging, performance optimization, native modules, and testing strategies.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-n8n",
|
|
3
3
|
"description": "n8n workflow automation integration with Kafka - Event-driven workflows, Kafka triggers, producers, consumers, and workflow patterns for no-code/low-code event processing",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-payments",
|
|
3
3
|
"description": "Payment processing integration for Stripe, PayPal, and billing automation. Includes checkout flows, subscription lifecycle management, PCI DSS compliance guidance, and recurring billing. Focus on production-ready payment systems.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SpecWeave Team",
|
|
7
7
|
"url": "https://spec-weave.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-plugin-dev",
|
|
3
3
|
"description": "Claude Code plugin and skill development toolkit. Plugin creation, testing, publishing. Skill creation, validation, packaging. Agent development, CLI command integration, and marketplace publishing.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anton Abyzov",
|
|
7
7
|
"email": "anton.abyzov@gmail.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-release",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Comprehensive release management for single-repo, multi-repo, and monorepo architectures. Detects existing release strategies, aligns versions across repositories, manages Release Candidates (RC), and integrates with CI/CD workflows. Supports semantic versioning, coordinated releases, and brownfield strategy detection.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anton Abyzov",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sw-testing",
|
|
3
3
|
"description": "Comprehensive testing tools for modern web applications. Includes Playwright E2E testing, Vitest unit testing, test generation, and coverage analysis. Focus on test-driven development and quality assurance.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anton Abyzov",
|
|
7
7
|
"email": "anton.abyzov@gmail.com"
|
|
File without changes
|