@p.e.c/boaz-skills 1.3.0

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.
@@ -0,0 +1,332 @@
1
+ # Domain-Specific Debugging Checklists
2
+
3
+ ## A. Streaming/Buffer Issues
4
+
5
+ ### Symptoms
6
+ - [ ] Video/audio stuttering or freezing
7
+ - [ ] Increasing latency over time
8
+ - [ ] Frame drops or artifacts
9
+ - [ ] "Buffer underrun" or "overflow" errors
10
+
11
+ ### Investigation Checklist
12
+
13
+ **1. Buffer Configuration**
14
+ - [ ] Buffer size appropriate for data rate?
15
+ - [ ] Ring buffer vs linear buffer — correct choice?
16
+ - [ ] Buffer count sufficient for pipeline depth?
17
+
18
+ **2. Flow Control**
19
+ - [ ] Producer faster than consumer? (overflow)
20
+ - [ ] Consumer faster than producer? (underrun)
21
+ - [ ] Backpressure mechanism in place?
22
+ - [ ] Flow control signals being respected?
23
+
24
+ **3. Timing & Synchronization**
25
+ - [ ] Clock drift between producer/consumer?
26
+ - [ ] Timestamps monotonically increasing?
27
+ - [ ] Frame timing consistent?
28
+ - [ ] PTS/DTS handling correct?
29
+
30
+ **4. Codec & Format**
31
+ - [ ] Codec parameters match between encoder/decoder?
32
+ - [ ] Resolution/framerate changes handled?
33
+ - [ ] Keyframe interval appropriate?
34
+
35
+ **5. Resource Contention**
36
+ - [ ] CPU saturation during encoding/decoding?
37
+ - [ ] Memory pressure causing GC pauses?
38
+ - [ ] I/O blocking the pipeline?
39
+
40
+ ---
41
+
42
+ ## B. BLE/UART Communication
43
+
44
+ ### Symptoms
45
+ - [ ] Connection drops
46
+ - [ ] Data corruption
47
+ - [ ] Timeout errors
48
+ - [ ] Pairing failures
49
+
50
+ ### Investigation Checklist
51
+
52
+ **1. Physical Layer (UART)**
53
+ - [ ] Baud rate matching on both ends?
54
+ - [ ] Correct parity, stop bits, flow control?
55
+ - [ ] Cable/connection quality verified?
56
+ - [ ] TX/RX not swapped?
57
+
58
+ **2. Connection State (BLE)**
59
+ - [ ] Device in discoverable/connectable mode?
60
+ - [ ] Correct service UUID being used?
61
+ - [ ] Connection interval appropriate?
62
+ - [ ] MTU negotiated successfully?
63
+
64
+ **3. Protocol Layer**
65
+ - [ ] Message framing correct?
66
+ - [ ] Checksums/CRCs matching?
67
+ - [ ] Sequence numbers handled?
68
+ - [ ] ACK/NAK protocol working?
69
+
70
+ **4. Timing**
71
+ - [ ] Timeouts set appropriately?
72
+ - [ ] Retry logic in place?
73
+ - [ ] Debouncing for connection state?
74
+
75
+ **5. Power Management**
76
+ - [ ] Device entering sleep during communication?
77
+ - [ ] Wake-up latency accounted for?
78
+ - [ ] Battery level affecting transmission power?
79
+
80
+ ---
81
+
82
+ ## C. AI Inference Bottlenecks
83
+
84
+ ### Symptoms
85
+ - [ ] Slow inference time
86
+ - [ ] High latency
87
+ - [ ] Memory exhaustion
88
+ - [ ] GPU underutilization
89
+
90
+ ### Investigation Checklist
91
+
92
+ **1. Input Pipeline**
93
+ - [ ] Preprocessing on CPU vs GPU?
94
+ - [ ] Data loading blocking inference?
95
+ - [ ] Input normalization correct?
96
+ - [ ] Batch size optimal?
97
+
98
+ **2. Model Loading**
99
+ - [ ] Model loaded to correct device (CPU/GPU)?
100
+ - [ ] Warmup run completed?
101
+ - [ ] Model quantized if needed?
102
+ - [ ] ONNX/TensorRT optimization applied?
103
+
104
+ **3. Memory Management**
105
+ - [ ] GPU memory sufficient?
106
+ - [ ] Memory fragmentation?
107
+ - [ ] Tensor allocation overhead?
108
+ - [ ] Gradient tensors disabled for inference?
109
+
110
+ **4. Batching**
111
+ - [ ] Batch size vs latency tradeoff understood?
112
+ - [ ] Dynamic batching configured?
113
+ - [ ] Padding overhead minimized?
114
+
115
+ **5. Output Processing**
116
+ - [ ] Post-processing bottleneck?
117
+ - [ ] NMS (Non-Max Suppression) optimized?
118
+ - [ ] Output copying back to CPU?
119
+
120
+ ---
121
+
122
+ ## D. System Observability
123
+
124
+ ### Symptoms
125
+ - [ ] "Unknown" failures
126
+ - [ ] Intermittent issues hard to diagnose
127
+ - [ ] Production differs from dev
128
+ - [ ] No visibility into system state
129
+
130
+ ### Investigation Checklist
131
+
132
+ **1. Metrics (USE Method)**
133
+ - [ ] CPU utilization tracked?
134
+ - [ ] Memory utilization tracked?
135
+ - [ ] Disk I/O utilization tracked?
136
+ - [ ] Network utilization tracked?
137
+ - [ ] Saturation (queues) visible?
138
+ - [ ] Error rates captured?
139
+
140
+ **2. Logging**
141
+ - [ ] Structured logging in place?
142
+ - [ ] Log levels appropriate?
143
+ - [ ] Request IDs/correlation IDs?
144
+ - [ ] Sensitive data redacted?
145
+
146
+ **3. Tracing**
147
+ - [ ] Distributed tracing enabled?
148
+ - [ ] Span context propagated?
149
+ - [ ] Critical paths traced?
150
+ - [ ] Trace sampling rate appropriate?
151
+
152
+ **4. Alerting**
153
+ - [ ] SLOs defined?
154
+ - [ ] Alert thresholds tuned?
155
+ - [ ] Alert fatigue addressed?
156
+ - [ ] Runbooks linked to alerts?
157
+
158
+ ---
159
+
160
+ ## E. Network/API Issues
161
+
162
+ ### Symptoms
163
+ - [ ] Connection refused/timeout
164
+ - [ ] Slow responses
165
+ - [ ] Intermittent failures
166
+ - [ ] SSL/TLS errors
167
+
168
+ ### Investigation Checklist
169
+
170
+ **1. Connectivity**
171
+ - [ ] DNS resolution working?
172
+ - [ ] Port accessible (firewall)?
173
+ - [ ] Route to host exists?
174
+ - [ ] VPN/proxy configured?
175
+
176
+ **2. TLS/SSL**
177
+ - [ ] Certificate valid and not expired?
178
+ - [ ] Certificate chain complete?
179
+ - [ ] TLS version compatible?
180
+ - [ ] Cipher suites matching?
181
+
182
+ **3. Request/Response**
183
+ - [ ] Request format correct?
184
+ - [ ] Headers set properly (auth, content-type)?
185
+ - [ ] Response parsed correctly?
186
+ - [ ] Error responses handled?
187
+
188
+ **4. Timeouts**
189
+ - [ ] Connection timeout set?
190
+ - [ ] Read timeout set?
191
+ - [ ] Total request timeout set?
192
+ - [ ] Retry with backoff implemented?
193
+
194
+ **5. Rate Limiting**
195
+ - [ ] Rate limits known?
196
+ - [ ] 429 responses handled?
197
+ - [ ] Retry-After header respected?
198
+ - [ ] Client-side throttling in place?
199
+
200
+ ---
201
+
202
+ ## F. Memory/Crash Issues
203
+
204
+ ### Symptoms
205
+ - [ ] Segmentation fault
206
+ - [ ] Out of memory (OOM)
207
+ - [ ] Memory growing over time
208
+ - [ ] Crash dumps
209
+
210
+ ### Investigation Checklist
211
+
212
+ **1. Crash Analysis**
213
+ - [ ] Stack trace available?
214
+ - [ ] Core dump captured?
215
+ - [ ] Signal type (SIGSEGV, SIGABRT)?
216
+ - [ ] Faulting address meaningful?
217
+
218
+ **2. Memory Leaks**
219
+ - [ ] Memory profile taken over time?
220
+ - [ ] Allocations tracked to source?
221
+ - [ ] Circular references possible?
222
+ - [ ] Cache eviction working?
223
+
224
+ **3. Use-After-Free**
225
+ - [ ] Object lifetime clear?
226
+ - [ ] Dangling pointers possible?
227
+ - [ ] Double-free possible?
228
+
229
+ **4. Buffer Overflow**
230
+ - [ ] Array bounds checked?
231
+ - [ ] String operations safe?
232
+ - [ ] Stack canaries enabled?
233
+
234
+ **5. OOM**
235
+ - [ ] Memory limits configured?
236
+ - [ ] Swap enabled/disabled?
237
+ - [ ] Large allocations identified?
238
+ - [ ] Memory fragmentation?
239
+
240
+ ---
241
+
242
+ ## G. App Debugging
243
+
244
+ ### Symptoms
245
+ - [ ] App crash
246
+ - [ ] UI freeze
247
+ - [ ] State inconsistency
248
+ - [ ] Battery drain
249
+
250
+ ### Investigation Checklist
251
+
252
+ **1. Lifecycle**
253
+ - [ ] Correct lifecycle callbacks?
254
+ - [ ] State saved on background?
255
+ - [ ] Resources released on pause?
256
+ - [ ] Orientation change handled?
257
+
258
+ **2. Threading**
259
+ - [ ] UI work on main thread only?
260
+ - [ ] Long operations on background?
261
+ - [ ] Thread safety for shared state?
262
+ - [ ] Deadlock possible?
263
+
264
+ **3. State Management**
265
+ - [ ] State mutation predictable?
266
+ - [ ] State persistence working?
267
+ - [ ] State restoration working?
268
+ - [ ] Race conditions in state updates?
269
+
270
+ **4. Resource Leaks**
271
+ - [ ] Listeners unregistered?
272
+ - [ ] Subscriptions cancelled?
273
+ - [ ] Bitmaps/buffers recycled?
274
+ - [ ] Database connections closed?
275
+
276
+ **5. Performance**
277
+ - [ ] Layout passes optimized?
278
+ - [ ] Overdraw minimized?
279
+ - [ ] List recycling working?
280
+ - [ ] Animation frame drops?
281
+
282
+ ---
283
+
284
+ ## H. Web Debugging (Playwright MCP)
285
+
286
+ ### Symptoms
287
+ - [ ] Test flakiness
288
+ - [ ] Element not found
289
+ - [ ] Timeout errors
290
+ - [ ] Visual differences
291
+
292
+ ### Investigation Checklist
293
+
294
+ **1. Element Selection**
295
+ - [ ] Selector stable (not index-based)?
296
+ - [ ] Element in viewport?
297
+ - [ ] Element not covered by overlay?
298
+ - [ ] iFrame context correct?
299
+
300
+ **2. Timing**
301
+ - [ ] Wait for network idle?
302
+ - [ ] Wait for animation complete?
303
+ - [ ] Explicit wait for condition?
304
+ - [ ] Timeout values appropriate?
305
+
306
+ **3. State**
307
+ - [ ] Cookies/storage set correctly?
308
+ - [ ] Auth state valid?
309
+ - [ ] Application state reset between tests?
310
+ - [ ] Mock data consistent?
311
+
312
+ **4. Network**
313
+ - [ ] API mocking configured?
314
+ - [ ] Network conditions simulated?
315
+ - [ ] Request interception working?
316
+ - [ ] Response validation?
317
+
318
+ **5. Visual Regression**
319
+ - [ ] Baseline images current?
320
+ - [ ] Viewport size consistent?
321
+ - [ ] Fonts loaded?
322
+ - [ ] Animation disabled for screenshots?
323
+
324
+ **6. Reproduction with Playwright MCP**
325
+ ```
326
+ Steps to capture reproduction:
327
+ 1. Record failing scenario
328
+ 2. Capture DOM snapshot
329
+ 3. Capture network waterfall
330
+ 4. Capture console logs
331
+ 5. Generate reproduction script
332
+ ```
@@ -0,0 +1,355 @@
1
+ # Debugging Tool Reference
2
+
3
+ Quick reference for common debugging tools and commands.
4
+
5
+ ---
6
+
7
+ ## System Observation
8
+
9
+ ### Process Information
10
+ ```bash
11
+ # List processes
12
+ ps aux | grep <name>
13
+ pgrep -a <pattern>
14
+
15
+ # Process tree
16
+ pstree -p <pid>
17
+
18
+ # Real-time process monitoring
19
+ top -p <pid>
20
+ htop
21
+
22
+ # Process file descriptors
23
+ lsof -p <pid>
24
+
25
+ # Process memory map
26
+ pmap <pid>
27
+ cat /proc/<pid>/maps
28
+ ```
29
+
30
+ ### System Calls
31
+ ```bash
32
+ # Trace system calls
33
+ strace -f -p <pid>
34
+ strace -e trace=network <command>
35
+ strace -e trace=file <command>
36
+
37
+ # macOS
38
+ dtruss -p <pid>
39
+
40
+ # Count system calls
41
+ strace -c <command>
42
+ ```
43
+
44
+ ### Library Calls
45
+ ```bash
46
+ # Trace library calls
47
+ ltrace -p <pid>
48
+ ltrace -e malloc+free <command>
49
+ ```
50
+
51
+ ### Kernel Messages
52
+ ```bash
53
+ # Kernel ring buffer
54
+ dmesg -T
55
+ dmesg -T | tail -50
56
+ dmesg -w # follow mode
57
+
58
+ # Journal (systemd)
59
+ journalctl -f
60
+ journalctl -u <service>
61
+ journalctl --since "5 minutes ago"
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Network Debugging
67
+
68
+ ### Connectivity
69
+ ```bash
70
+ # DNS resolution
71
+ dig <domain>
72
+ nslookup <domain>
73
+ host <domain>
74
+
75
+ # Port check
76
+ nc -zv <host> <port>
77
+ telnet <host> <port>
78
+
79
+ # Route tracing
80
+ traceroute <host>
81
+ mtr <host>
82
+
83
+ # Active connections
84
+ ss -tuln
85
+ netstat -tuln
86
+ lsof -i :<port>
87
+ ```
88
+
89
+ ### Packet Capture
90
+ ```bash
91
+ # tcpdump basics
92
+ tcpdump -i <interface>
93
+ tcpdump -i any port <port>
94
+ tcpdump -i any host <ip>
95
+ tcpdump -w capture.pcap
96
+
97
+ # HTTP traffic
98
+ tcpdump -A -s0 port 80
99
+
100
+ # With Wireshark
101
+ wireshark -k -i <interface>
102
+ tshark -i <interface> -Y "http"
103
+ ```
104
+
105
+ ### HTTP/API Testing
106
+ ```bash
107
+ # curl basics
108
+ curl -v <url>
109
+ curl -X POST -H "Content-Type: application/json" -d '{}' <url>
110
+ curl -w "@curl-format.txt" -o /dev/null -s <url>
111
+
112
+ # curl timing template (curl-format.txt)
113
+ # time_namelookup: %{time_namelookup}
114
+ # time_connect: %{time_connect}
115
+ # time_appconnect: %{time_appconnect}
116
+ # time_pretransfer: %{time_pretransfer}
117
+ # time_starttransfer: %{time_starttransfer}
118
+ # time_total: %{time_total}
119
+
120
+ # HTTPie (human-friendly)
121
+ http GET <url>
122
+ http POST <url> key=value
123
+ ```
124
+
125
+ ### SSL/TLS
126
+ ```bash
127
+ # Certificate info
128
+ openssl s_client -connect <host>:443
129
+ openssl s_client -connect <host>:443 -servername <sni>
130
+
131
+ # Certificate expiry
132
+ echo | openssl s_client -connect <host>:443 2>/dev/null | openssl x509 -noout -dates
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Performance Profiling
138
+
139
+ ### CPU Profiling
140
+ ```bash
141
+ # perf (Linux)
142
+ perf record -g <command>
143
+ perf report
144
+ perf top
145
+
146
+ # CPU flame graph
147
+ perf record -F 99 -g <command>
148
+ perf script | stackcollapse-perf.pl | flamegraph.pl > flame.svg
149
+
150
+ # time command
151
+ time <command>
152
+ /usr/bin/time -v <command>
153
+ ```
154
+
155
+ ### Memory Profiling
156
+ ```bash
157
+ # Process memory
158
+ free -h
159
+ vmstat 1
160
+ cat /proc/<pid>/status | grep -i mem
161
+
162
+ # Heap analysis (Linux)
163
+ valgrind --tool=massif <command>
164
+ ms_print massif.out.*
165
+
166
+ # Address sanitizer
167
+ CFLAGS="-fsanitize=address" make
168
+ ASAN_OPTIONS=detect_leaks=1 ./<program>
169
+ ```
170
+
171
+ ### I/O Profiling
172
+ ```bash
173
+ # Disk I/O
174
+ iostat -x 1
175
+ iotop
176
+
177
+ # File I/O per process
178
+ strace -e trace=read,write -c <command>
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Language-Specific
184
+
185
+ ### Python
186
+ ```bash
187
+ # Profiling
188
+ python -m cProfile -s cumtime script.py
189
+ python -m py_spy top --pid <pid>
190
+ python -m py_spy record -o profile.svg --pid <pid>
191
+
192
+ # Memory
193
+ python -m memory_profiler script.py
194
+ tracemalloc # in code
195
+
196
+ # Debugging
197
+ python -m pdb script.py
198
+ python -c "import pdb; pdb.pm()" # post-mortem
199
+ ```
200
+
201
+ ### Node.js
202
+ ```bash
203
+ # Profiling
204
+ node --prof app.js
205
+ node --prof-process isolate*.log > processed.txt
206
+
207
+ # Memory
208
+ node --expose-gc --inspect app.js
209
+ # Use Chrome DevTools Memory tab
210
+
211
+ # Debugging
212
+ node --inspect app.js
213
+ node --inspect-brk app.js # break on start
214
+ ```
215
+
216
+ ### Go
217
+ ```bash
218
+ # Profiling
219
+ go tool pprof http://localhost:6060/debug/pprof/profile
220
+ go tool pprof http://localhost:6060/debug/pprof/heap
221
+
222
+ # Race detection
223
+ go run -race main.go
224
+ go test -race ./...
225
+
226
+ # Debugging
227
+ dlv debug main.go
228
+ dlv attach <pid>
229
+ ```
230
+
231
+ ### Rust
232
+ ```bash
233
+ # Profiling
234
+ cargo flamegraph
235
+ perf record --call-graph dwarf cargo run
236
+
237
+ # Memory
238
+ cargo +nightly miri test # undefined behavior
239
+
240
+ # Debugging
241
+ rust-gdb target/debug/<binary>
242
+ rust-lldb target/debug/<binary>
243
+ ```
244
+
245
+ ---
246
+
247
+ ## Container/Docker
248
+
249
+ ```bash
250
+ # Container logs
251
+ docker logs -f <container>
252
+ docker logs --tail 100 <container>
253
+
254
+ # Container inspection
255
+ docker inspect <container>
256
+ docker stats <container>
257
+ docker top <container>
258
+
259
+ # Execute in container
260
+ docker exec -it <container> sh
261
+ docker exec -it <container> bash
262
+
263
+ # Container health
264
+ docker inspect --format='{{.State.Health}}' <container>
265
+ ```
266
+
267
+ ---
268
+
269
+ ## Kubernetes
270
+
271
+ ```bash
272
+ # Pod logs
273
+ kubectl logs -f <pod>
274
+ kubectl logs -f <pod> -c <container>
275
+ kubectl logs --previous <pod>
276
+
277
+ # Pod inspection
278
+ kubectl describe pod <pod>
279
+ kubectl get pod <pod> -o yaml
280
+
281
+ # Execute in pod
282
+ kubectl exec -it <pod> -- sh
283
+ kubectl exec -it <pod> -c <container> -- bash
284
+
285
+ # Port forwarding
286
+ kubectl port-forward <pod> <local>:<remote>
287
+
288
+ # Events
289
+ kubectl get events --sort-by='.lastTimestamp'
290
+ ```
291
+
292
+ ---
293
+
294
+ ## Git Debugging
295
+
296
+ ```bash
297
+ # Find introducing commit
298
+ git bisect start
299
+ git bisect bad
300
+ git bisect good <commit>
301
+ # ... test each commit
302
+ git bisect reset
303
+
304
+ # Blame
305
+ git blame <file>
306
+ git log -p -S'<search string>' # pickaxe
307
+
308
+ # Diff analysis
309
+ git diff HEAD~5..HEAD
310
+ git diff --stat
311
+ ```
312
+
313
+ ---
314
+
315
+ ## Quick Recipes
316
+
317
+ ### Find What's Using Port
318
+ ```bash
319
+ lsof -i :<port>
320
+ ss -tulpn | grep :<port>
321
+ netstat -tulpn | grep :<port>
322
+ ```
323
+
324
+ ### Find Large Files
325
+ ```bash
326
+ du -sh * | sort -rh | head -20
327
+ find . -type f -size +100M
328
+ ```
329
+
330
+ ### Watch File Changes
331
+ ```bash
332
+ watch -n 1 'ls -la <file>'
333
+ tail -f <file>
334
+ ```
335
+
336
+ ### Compare Outputs
337
+ ```bash
338
+ diff <(command1) <(command2)
339
+ vimdiff <(command1) <(command2)
340
+ ```
341
+
342
+ ### Measure Command Performance
343
+ ```bash
344
+ hyperfine '<command1>' '<command2>'
345
+ time bash -c 'for i in {1..100}; do <command>; done'
346
+ ```
347
+
348
+ ### Capture and Replay Traffic
349
+ ```bash
350
+ # Record
351
+ tcpdump -i any -w traffic.pcap
352
+
353
+ # Replay
354
+ tcpreplay -i <interface> traffic.pcap
355
+ ```