omgkit 2.2.0 → 2.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.
Files changed (55) hide show
  1. package/package.json +1 -1
  2. package/plugin/skills/databases/mongodb/SKILL.md +60 -776
  3. package/plugin/skills/databases/prisma/SKILL.md +53 -744
  4. package/plugin/skills/databases/redis/SKILL.md +53 -860
  5. package/plugin/skills/devops/aws/SKILL.md +68 -672
  6. package/plugin/skills/devops/github-actions/SKILL.md +54 -657
  7. package/plugin/skills/devops/kubernetes/SKILL.md +67 -602
  8. package/plugin/skills/devops/performance-profiling/SKILL.md +59 -863
  9. package/plugin/skills/frameworks/django/SKILL.md +87 -853
  10. package/plugin/skills/frameworks/express/SKILL.md +95 -1301
  11. package/plugin/skills/frameworks/fastapi/SKILL.md +90 -1198
  12. package/plugin/skills/frameworks/laravel/SKILL.md +87 -1187
  13. package/plugin/skills/frameworks/nestjs/SKILL.md +106 -973
  14. package/plugin/skills/frameworks/react/SKILL.md +94 -962
  15. package/plugin/skills/frameworks/vue/SKILL.md +95 -1242
  16. package/plugin/skills/frontend/accessibility/SKILL.md +91 -1056
  17. package/plugin/skills/frontend/frontend-design/SKILL.md +69 -1262
  18. package/plugin/skills/frontend/responsive/SKILL.md +76 -799
  19. package/plugin/skills/frontend/shadcn-ui/SKILL.md +73 -921
  20. package/plugin/skills/frontend/tailwindcss/SKILL.md +60 -788
  21. package/plugin/skills/frontend/threejs/SKILL.md +72 -1266
  22. package/plugin/skills/languages/javascript/SKILL.md +106 -849
  23. package/plugin/skills/methodology/brainstorming/SKILL.md +70 -576
  24. package/plugin/skills/methodology/defense-in-depth/SKILL.md +79 -831
  25. package/plugin/skills/methodology/dispatching-parallel-agents/SKILL.md +81 -654
  26. package/plugin/skills/methodology/executing-plans/SKILL.md +86 -529
  27. package/plugin/skills/methodology/finishing-development-branch/SKILL.md +95 -586
  28. package/plugin/skills/methodology/problem-solving/SKILL.md +67 -681
  29. package/plugin/skills/methodology/receiving-code-review/SKILL.md +70 -533
  30. package/plugin/skills/methodology/requesting-code-review/SKILL.md +70 -610
  31. package/plugin/skills/methodology/root-cause-tracing/SKILL.md +70 -646
  32. package/plugin/skills/methodology/sequential-thinking/SKILL.md +70 -478
  33. package/plugin/skills/methodology/systematic-debugging/SKILL.md +66 -559
  34. package/plugin/skills/methodology/test-driven-development/SKILL.md +91 -752
  35. package/plugin/skills/methodology/testing-anti-patterns/SKILL.md +78 -687
  36. package/plugin/skills/methodology/token-optimization/SKILL.md +72 -602
  37. package/plugin/skills/methodology/verification-before-completion/SKILL.md +108 -529
  38. package/plugin/skills/methodology/writing-plans/SKILL.md +79 -566
  39. package/plugin/skills/omega/omega-architecture/SKILL.md +91 -752
  40. package/plugin/skills/omega/omega-coding/SKILL.md +161 -552
  41. package/plugin/skills/omega/omega-sprint/SKILL.md +132 -777
  42. package/plugin/skills/omega/omega-testing/SKILL.md +157 -845
  43. package/plugin/skills/omega/omega-thinking/SKILL.md +165 -606
  44. package/plugin/skills/security/better-auth/SKILL.md +46 -1034
  45. package/plugin/skills/security/oauth/SKILL.md +80 -934
  46. package/plugin/skills/security/owasp/SKILL.md +78 -862
  47. package/plugin/skills/testing/playwright/SKILL.md +77 -700
  48. package/plugin/skills/testing/pytest/SKILL.md +73 -811
  49. package/plugin/skills/testing/vitest/SKILL.md +60 -920
  50. package/plugin/skills/tools/document-processing/SKILL.md +111 -838
  51. package/plugin/skills/tools/image-processing/SKILL.md +126 -659
  52. package/plugin/skills/tools/mcp-development/SKILL.md +85 -758
  53. package/plugin/skills/tools/media-processing/SKILL.md +118 -735
  54. package/plugin/stdrules/SKILL_STANDARDS.md +490 -0
  55. package/plugin/skills/SKILL_STANDARDS.md +0 -743
@@ -1,723 +1,109 @@
1
1
  ---
2
- name: problem-solving
3
- description: Systematic 5-phase approaches when stuck on complex problems
2
+ name: solving-problems
3
+ description: AI agent applies a 5-phase systematic framework for tackling complex problems when conventional approaches fail. Use when stuck, blocked, or troubleshooting issues.
4
4
  category: methodology
5
5
  triggers:
6
6
  - stuck
7
7
  - blocked
8
- - can't figure out
9
8
  - problem solving
10
- - not working
11
- - help me solve
12
9
  - troubleshooting
10
+ - can't figure out
13
11
  ---
14
12
 
15
- # Problem Solving
16
-
17
- A **systematic 5-phase framework** for tackling complex problems when conventional approaches fail. This skill provides structured methods to break through blockers and find solutions efficiently.
13
+ # Solving Problems
18
14
 
19
15
  ## Purpose
20
16
 
21
- When you're stuck, random attempts waste time and energy. This skill provides:
17
+ Apply a systematic 5-phase framework for complex problems:
22
18
 
23
- - Structured approach to unknown problems
24
- - Multiple hypothesis generation
25
- - Systematic elimination process
26
- - Time-boxed investigation phases
27
- - Clear escalation criteria
28
- - Evidence-based decision making
29
- - Team collaboration patterns
19
+ - Define problem boundaries clearly before investigating
20
+ - Generate multiple hypotheses before testing any
21
+ - Test hypotheses efficiently with time-boxing
22
+ - Fix root causes, not just symptoms
23
+ - Prevent recurrence with process improvements
30
24
 
31
- ## The 5-Phase Framework
25
+ ## Quick Start
32
26
 
33
- ```
34
- ┌─────────────────────────────────────────────────────────────────────┐
35
- │ PROBLEM-SOLVING FRAMEWORK │
36
- ├─────────────────────────────────────────────────────────────────────┤
37
- │ │
38
- │ ┌──────────┐ ┌──────────────┐ ┌──────────┐ │
39
- │ │ DEFINE │───▶│ HYPOTHESIZE │───▶│ TEST │ │
40
- │ │ (5-10m) │ │ (10-15m) │ │ (boxed) │ │
41
- │ └──────────┘ └──────────────┘ └─────┬────┘ │
42
- │ │ │
43
- │ ┌──────────────────┘ │
44
- │ ▼ │
45
- │ ┌──────────┐ ┌──────────┐ │
46
- │ │ SOLVE │───▶│ PREVENT │ │
47
- │ │ (impl) │ │(post-fix)│ │
48
- │ └──────────┘ └──────────┘ │
49
- │ │
50
- └─────────────────────────────────────────────────────────────────────┘
51
- ```
27
+ 1. **Define** (5-10 min) - Clarify what IS and IS NOT the problem, set success criteria
28
+ 2. **Hypothesize** (10-15 min) - Generate 3+ hypotheses BEFORE testing any
29
+ 3. **Test** (time-boxed) - Test cheapest hypothesis first, mark confirmed/eliminated
30
+ 4. **Solve** - Fix root cause, verify fix, add regression test
31
+ 5. **Prevent** - Analyze why it happened, implement preventive measures
52
32
 
53
- ### Phase 1: Define (5-10 minutes)
33
+ ## Features
34
+
35
+ | Feature | Description | Guide |
36
+ |---------|-------------|-------|
37
+ | Problem Boundary | Define what IS vs IS NOT the problem | List symptoms, affected scope, working parts |
38
+ | Hypothesis Generation | Create 3+ theories before testing | Include evidence for/against, test cost |
39
+ | Prioritized Testing | Test highest-value hypotheses first | Score = evidence x (1/cost) |
40
+ | Root Cause Fix | Address underlying cause, not symptoms | Verify fix prevents recurrence |
41
+ | Prevention Plan | Stop future occurrences | Code, process, monitoring changes |
42
+ | Escalation Criteria | Know when to ask for help | Time-boxed out, all hypotheses eliminated |
43
+
44
+ ## Common Patterns
54
45
 
55
46
  ```
47
+ # Define Phase
56
48
  BOUNDARY DEFINITION
57
- ==================
58
49
  What IS the problem:
59
- - [ ] Specific error/behavior observed
60
- - [ ] Exact steps to reproduce
61
- - [ ] When it started occurring
62
- - [ ] Affected scope (users, features, environments)
50
+ - Specific error: [error message]
51
+ - Steps to reproduce: [steps]
52
+ - When started: [date/commit]
63
53
 
64
54
  What is NOT the problem:
65
- - [ ] What still works correctly
66
- - [ ] Unrelated symptoms
67
- - [ ] Red herrings already eliminated
55
+ - What still works: [list]
56
+ - Red herrings eliminated: [list]
68
57
 
69
58
  Success criteria:
70
- - [ ] What does "solved" look like?
71
- - [ ] How will we verify the fix?
72
- ```
59
+ - What does "solved" look like?
73
60
 
74
- ### Phase 2: Hypothesize (10-15 minutes)
61
+ # Hypothesize Phase
62
+ H1: [Most likely] - Evidence: ___ - Test cost: Low
63
+ H2: [Second likely] - Evidence: ___ - Test cost: Medium
64
+ H3: [Less likely] - Evidence: ___ - Test cost: High
75
65
 
76
- ```
77
- HYPOTHESIS GENERATION (minimum 3)
78
- ================================
79
- H1: [Most likely] ________________________
80
- Evidence for: ________________________
81
- Evidence against: ____________________
82
- Test cost: Low / Medium / High
83
-
84
- H2: [Second likely] ______________________
85
- Evidence for: ________________________
86
- Evidence against: ____________________
87
- Test cost: Low / Medium / High
88
-
89
- H3: [Unlikely but possible] ______________
90
- Evidence for: ________________________
91
- Evidence against: ____________________
92
- Test cost: Low / Medium / High
93
-
94
- RULE: Generate hypotheses BEFORE testing any of them.
95
- ```
96
-
97
- ### Phase 3: Test (Time-boxed per hypothesis)
98
-
99
- ```
100
- HYPOTHESIS TESTING ORDER
101
- ========================
102
- Sort by: (Evidence strength) × (1 / Test cost)
66
+ RULE: Generate hypotheses BEFORE testing any.
103
67
 
68
+ # Test Phase
104
69
  Test H1: [15 min box]
105
- Action: ________________________________
70
+ Action: ___
106
71
  Result: CONFIRMED / ELIMINATED / INCONCLUSIVE
107
- If inconclusive: Need more data on __________
108
-
109
- Test H2: [15 min box]
110
- Action: ________________________________
111
- Result: CONFIRMED / ELIMINATED / INCONCLUSIVE
112
-
113
- STOP when: Hypothesis confirmed OR all eliminated
114
- ```
115
-
116
- ### Phase 4: Solve (Implementation)
117
-
118
- ```
119
- SOLUTION IMPLEMENTATION
120
- =======================
121
- Root cause: ______________________________
122
- Solution approach: _______________________
123
-
124
- Implementation checklist:
125
- - [ ] Write the fix
126
- - [ ] Verify fix addresses root cause (not symptom)
127
- - [ ] Check for side effects
128
- - [ ] Add test to prevent regression
129
- - [ ] Document the issue and solution
130
- ```
131
-
132
- ### Phase 5: Prevent (Post-mortem)
133
-
134
- ```
135
- PREVENTION ANALYSIS
136
- ===================
137
- Why did this happen?
138
- - Immediate cause: _______________________
139
- - Contributing factors: __________________
140
- - Systemic issues: _______________________
141
-
142
- How do we prevent recurrence?
143
- - [ ] Code changes
144
- - [ ] Process changes
145
- - [ ] Monitoring/alerting
146
- - [ ] Documentation updates
147
- ```
148
-
149
- ## Features
150
-
151
- ### 1. Root Cause Hypothesis Generator
152
-
153
- ```typescript
154
- interface Hypothesis {
155
- id: string;
156
- description: string;
157
- category: HypothesisCategory;
158
- evidenceFor: string[];
159
- evidenceAgainst: string[];
160
- testCost: 'low' | 'medium' | 'high';
161
- probability: number;
162
- status: 'pending' | 'confirmed' | 'eliminated' | 'inconclusive';
163
- }
164
-
165
- type HypothesisCategory =
166
- | 'data'
167
- | 'configuration'
168
- | 'timing'
169
- | 'resources'
170
- | 'external'
171
- | 'code_logic'
172
- | 'integration';
173
-
174
- const hypothesisCategories: Record<HypothesisCategory, string[]> = {
175
- data: [
176
- 'Invalid input data',
177
- 'Data corruption',
178
- 'Missing required data',
179
- 'Encoding/format mismatch',
180
- 'Stale/cached data'
181
- ],
182
- configuration: [
183
- 'Environment variable missing',
184
- 'Config file incorrect',
185
- 'Feature flag state',
186
- 'Permission misconfiguration',
187
- 'Version mismatch'
188
- ],
189
- timing: [
190
- 'Race condition',
191
- 'Timeout too short',
192
- 'Order of operations',
193
- 'Async/await issue',
194
- 'Deadlock'
195
- ],
196
- resources: [
197
- 'Memory exhaustion',
198
- 'Disk space',
199
- 'Connection pool depleted',
200
- 'Rate limiting',
201
- 'CPU throttling'
202
- ],
203
- external: [
204
- 'Third-party service down',
205
- 'Network connectivity',
206
- 'DNS resolution',
207
- 'Certificate expiry',
208
- 'API contract change'
209
- ],
210
- code_logic: [
211
- 'Off-by-one error',
212
- 'Null pointer exception',
213
- 'Type coercion issue',
214
- 'Boundary condition',
215
- 'Logic inversion'
216
- ],
217
- integration: [
218
- 'Version incompatibility',
219
- 'Protocol mismatch',
220
- 'Authentication failure',
221
- 'Serialization error',
222
- 'Schema drift'
223
- ]
224
- };
225
-
226
- class HypothesisEngine {
227
- private hypotheses: Map<string, Hypothesis> = new Map();
228
-
229
- generateFromSymptoms(symptoms: string[]): Hypothesis[] {
230
- const generated: Hypothesis[] = [];
231
-
232
- for (const category of Object.keys(hypothesisCategories) as HypothesisCategory[]) {
233
- const templates = hypothesisCategories[category];
234
- for (const template of templates) {
235
- if (this.matchesSymptoms(template, symptoms)) {
236
- generated.push({
237
- id: `${category}-${generated.length}`,
238
- description: template,
239
- category,
240
- evidenceFor: this.findSupportingEvidence(template, symptoms),
241
- evidenceAgainst: [],
242
- testCost: this.estimateTestCost(category),
243
- probability: 0,
244
- status: 'pending'
245
- });
246
- }
247
- }
248
- }
249
-
250
- return this.rankByPriority(generated);
251
- }
252
-
253
- private matchesSymptoms(template: string, symptoms: string[]): boolean {
254
- const keywords = template.toLowerCase().split(/\s+/);
255
- return symptoms.some(s =>
256
- keywords.some(k => s.toLowerCase().includes(k))
257
- );
258
- }
259
-
260
- private findSupportingEvidence(template: string, symptoms: string[]): string[] {
261
- return symptoms.filter(s =>
262
- template.toLowerCase().split(/\s+/).some(k =>
263
- s.toLowerCase().includes(k)
264
- )
265
- );
266
- }
267
-
268
- private estimateTestCost(category: HypothesisCategory): 'low' | 'medium' | 'high' {
269
- const costs: Record<HypothesisCategory, 'low' | 'medium' | 'high'> = {
270
- configuration: 'low',
271
- data: 'low',
272
- code_logic: 'medium',
273
- timing: 'high',
274
- resources: 'medium',
275
- external: 'low',
276
- integration: 'medium'
277
- };
278
- return costs[category];
279
- }
280
-
281
- private rankByPriority(hypotheses: Hypothesis[]): Hypothesis[] {
282
- return hypotheses.sort((a, b) => {
283
- // Priority = Evidence × (1 / Cost)
284
- const costMultiplier = { low: 3, medium: 2, high: 1 };
285
- const aScore = a.evidenceFor.length * costMultiplier[a.testCost];
286
- const bScore = b.evidenceFor.length * costMultiplier[b.testCost];
287
- return bScore - aScore;
288
- });
289
- }
290
- }
291
- ```
292
-
293
- ### 2. Decision Tree Construction
294
-
295
72
  ```
296
- START: Error occurs
297
-
298
- ├── Is it reproducible?
299
- │ │
300
- │ ├── YES: Proceed to isolation
301
- │ │
302
- │ └── NO: Focus on logging/monitoring
303
- │ │
304
- │ ├── Add debug logging
305
- │ ├── Wait for recurrence
306
- │ └── Analyze patterns
307
-
308
- └── Can you isolate the component?
309
-
310
- ├── YES: Deep dive that component
311
-
312
- └── NO: Binary search approach
313
-
314
- ├── Disable half the system
315
- ├── Does error persist?
316
- └── Narrow down iteratively
317
- ```
318
-
319
- ### 3. Risk Assessment Matrix
320
73
 
321
74
  ```
322
- ┌────────────┬─────────────┬────────┬─────────────┬──────────┐
323
- Hypothesis Probability Impact Test Effort Priority
324
- ├────────────┼─────────────┼────────┼─────────────┼──────────┤
325
- H1 High High Low 1st
326
- H2 Medium High Medium 2nd
327
- │ H3 │ Low │ High │ Low │ 3rd │
328
- │ H4 │ High │ Low │ High │ 4th │
329
- └────────────┴─────────────┴────────┴─────────────┴──────────┘
330
- ```
331
-
332
- ### 4. Time-Boxing Templates
333
-
334
- ```
335
- INVESTIGATION TIME BOX: 2 hours total
336
-
337
- Phase 1 (Define): 15 min [■■■□□□□□□□□□]
338
- Phase 2 (Hypothesize): 15 min [■■■□□□□□□□□□]
339
- Phase 3 (Test): 60 min [■■■■■■■■■■■■]
340
- Phase 4 (Solve): 20 min [■■■■□□□□□□□□]
341
- Phase 5 (Prevent): 10 min [■■□□□□□□□□□□]
342
-
343
- ESCALATION TRIGGER: If no progress after Phase 3, escalate.
344
- ```
345
-
346
- ### 5. Problem Solving State Machine
347
-
348
- ```typescript
349
- interface ProblemState {
350
- phase: Phase;
351
- problem: ProblemDefinition;
352
- hypotheses: Hypothesis[];
353
- testResults: TestResult[];
354
- solution?: Solution;
355
- prevention?: PreventionPlan;
356
- }
357
-
358
- type Phase = 'define' | 'hypothesize' | 'test' | 'solve' | 'prevent';
359
-
360
- interface ProblemDefinition {
361
- description: string;
362
- symptoms: string[];
363
- stepsToReproduce: string[];
364
- startedWhen: Date;
365
- affectedScope: string[];
366
- workingComponents: string[];
367
- successCriteria: string[];
368
- }
369
-
370
- interface TestResult {
371
- hypothesisId: string;
372
- action: string;
373
- result: 'confirmed' | 'eliminated' | 'inconclusive';
374
- evidence: string;
375
- duration: number;
376
- }
377
-
378
- interface Solution {
379
- rootCause: string;
380
- approach: string;
381
- implementation: string[];
382
- sideEffects: string[];
383
- regressionTest: string;
384
- }
385
-
386
- interface PreventionPlan {
387
- immediateCause: string;
388
- contributingFactors: string[];
389
- systemicIssues: string[];
390
- codeChanges: string[];
391
- processChanges: string[];
392
- monitoring: string[];
393
- documentation: string[];
394
- }
395
-
396
- class ProblemSolver {
397
- private state: ProblemState;
398
- private timeBox: Map<Phase, number>;
399
-
400
- constructor(problem: ProblemDefinition) {
401
- this.state = {
402
- phase: 'define',
403
- problem,
404
- hypotheses: [],
405
- testResults: []
406
- };
407
-
408
- this.timeBox = new Map([
409
- ['define', 10 * 60 * 1000], // 10 minutes
410
- ['hypothesize', 15 * 60 * 1000], // 15 minutes
411
- ['test', 60 * 60 * 1000], // 60 minutes
412
- ['solve', 20 * 60 * 1000], // 20 minutes
413
- ['prevent', 10 * 60 * 1000] // 10 minutes
414
- ]);
415
- }
416
-
417
- transitionTo(phase: Phase): void {
418
- const validTransitions: Record<Phase, Phase[]> = {
419
- define: ['hypothesize'],
420
- hypothesize: ['test', 'define'],
421
- test: ['solve', 'hypothesize'],
422
- solve: ['prevent', 'test'],
423
- prevent: []
424
- };
425
-
426
- if (!validTransitions[this.state.phase].includes(phase)) {
427
- throw new Error(
428
- `Invalid transition: ${this.state.phase} → ${phase}`
429
- );
430
- }
431
-
432
- this.state.phase = phase;
433
- }
434
-
435
- addHypothesis(h: Hypothesis): void {
436
- if (this.state.phase !== 'hypothesize') {
437
- throw new Error('Can only add hypotheses in hypothesize phase');
438
- }
439
- this.state.hypotheses.push(h);
440
- }
441
-
442
- recordTestResult(result: TestResult): void {
443
- if (this.state.phase !== 'test') {
444
- throw new Error('Can only record tests in test phase');
445
- }
446
-
447
- const hypothesis = this.state.hypotheses.find(
448
- h => h.id === result.hypothesisId
449
- );
450
- if (hypothesis) {
451
- hypothesis.status = result.result;
452
- }
453
-
454
- this.state.testResults.push(result);
455
-
456
- // Auto-transition if confirmed
457
- if (result.result === 'confirmed') {
458
- this.transitionTo('solve');
459
- }
460
- }
461
-
462
- shouldEscalate(): boolean {
463
- const allEliminated = this.state.hypotheses.every(
464
- h => h.status === 'eliminated'
465
- );
466
- const hasConfirmed = this.state.hypotheses.some(
467
- h => h.status === 'confirmed'
468
- );
469
-
470
- return allEliminated && !hasConfirmed;
471
- }
472
- }
75
+ # Risk Assessment Matrix
76
+ | Hypothesis | Probability | Impact | Test Effort | Priority |
77
+ |------------|-------------|--------|-------------|----------|
78
+ | H1 | High | High | Low | 1st |
79
+ | H2 | Medium | High | Medium | 2nd |
473
80
  ```
474
81
 
475
82
  ## Use Cases
476
83
 
477
- ### Stuck on Implementation
478
-
479
- ```
480
- PROBLEM: Feature works locally but fails in staging
481
-
482
- Phase 1 - Define:
483
- - Works: Local dev environment
484
- - Fails: Staging environment
485
- - Error: "Connection refused to service X"
486
- - Started: After last deployment
487
-
488
- Phase 2 - Hypothesize:
489
- H1: Environment variable not set in staging
490
- H2: Network policy blocking connection
491
- H3: Service X not deployed to staging
492
- H4: Different service discovery mechanism
493
-
494
- Phase 3 - Test:
495
- H1 Test: Check env vars → MISSING API_URL! ✓ CONFIRMED
496
-
497
- Phase 4 - Solve:
498
- - Add API_URL to staging config
499
- - Verify connection works
500
- - Add config validation on startup
501
-
502
- Phase 5 - Prevent:
503
- - Add env var validation script to CI
504
- - Document all required env vars
505
- ```
506
-
507
- ### Performance Bottleneck
508
-
509
- ```
510
- PROBLEM: API response time degraded from 100ms to 2s
511
-
512
- Phase 1 - Define:
513
- - Specific: GET /api/users endpoint
514
- - Started: Monday after deployment
515
- - Scope: All users, all requests
516
-
517
- Phase 2 - Hypothesize:
518
- H1: N+1 query introduced
519
- H2: Missing database index
520
- H3: External API slowdown
521
- H4: Resource contention
522
-
523
- Phase 3 - Test:
524
- H1: Query count check → 1 query, not N+1
525
- H2: EXPLAIN ANALYZE → Full table scan! ✓ CONFIRMED
526
-
527
- Phase 4 - Solve:
528
- - Add index on users.organization_id
529
- - Response time: 2s → 50ms
530
-
531
- Phase 5 - Prevent:
532
- - Add query performance tests
533
- - Require EXPLAIN for new queries in PR review
534
- ```
535
-
536
- ### Integration Failures
537
-
538
- ```
539
- PROBLEM: Webhook deliveries failing intermittently
540
-
541
- Phase 1 - Define:
542
- - Failure rate: ~5% of webhooks
543
- - No pattern in time/endpoint
544
- - Error: Timeout after 30s
545
- - Started: Gradual increase over 2 weeks
546
-
547
- Phase 2 - Hypothesize:
548
- H1: Receiving servers slow
549
- H2: Our server resource exhaustion
550
- H3: Network issues
551
- H4: Payload size growth
552
-
553
- Phase 3 - Test:
554
- H1: Check receiving server logs → Mixed results
555
- H2: Monitor our CPU/memory → Normal
556
- H3: Network packet loss test → Normal
557
- H4: Analyze payload sizes → 10x increase! ✓ CONFIRMED
558
-
559
- Phase 4 - Solve:
560
- - Compress payloads
561
- - Increase timeout for large payloads
562
- - Add pagination for large datasets
563
-
564
- Phase 5 - Prevent:
565
- - Add payload size monitoring
566
- - Set alerts for size thresholds
567
- ```
568
-
569
- ### Memory Leak Investigation
570
-
571
- ```
572
- PROBLEM: Node.js service memory grows until crash
573
-
574
- Phase 1 - Define:
575
- - Symptoms: Memory increases linearly, crashes at 4GB
576
- - Frequency: Every 6-8 hours under load
577
- - Started: After v2.1.0 release
578
- - Scope: All production instances
579
-
580
- Phase 2 - Hypothesize:
581
- H1: Event listener not removed
582
- H2: Large object retained in closure
583
- H3: Cache without size limit
584
- H4: Stream not properly closed
585
-
586
- Phase 3 - Test:
587
- H1: Heap snapshot shows listener growth → No
588
- H2: Check closures in new code → No obvious issues
589
- H3: Inspect cache sizes → Found it! 10M+ entries
590
- H4: Check stream handling → OK
591
-
592
- Phase 4 - Solve:
593
- - Add LRU eviction to cache (max 100K entries)
594
- - Add cache stats endpoint for monitoring
595
- - Implement cache TTL
596
-
597
- Phase 5 - Prevent:
598
- - Add memory usage tests
599
- - Alert when cache exceeds thresholds
600
- - Document cache sizing guidelines
601
- ```
84
+ - Debugging complex bugs when conventional approaches fail
85
+ - Troubleshooting production incidents with unknown root causes
86
+ - Analyzing intermittent failures or race conditions
87
+ - Investigating performance regressions
88
+ - Resolving integration issues between systems
602
89
 
603
90
  ## Best Practices
604
91
 
605
- ### Do's
606
- - **Generate multiple hypotheses** before testing any
607
- - **Test cheapest hypothesis first** when evidence is equal
608
- - **Time-box each phase** to prevent rabbit holes
609
- - **Document failed approaches** - they're valuable data
610
- - **Escalate when time-boxed out** - don't hero-code
611
- - **Verify root cause** not just symptoms
612
- - **Add regression tests** for every fix
613
-
614
- ### Don'ts
615
- - Don't test the first idea that comes to mind
616
- - Don't spend 4 hours on 1 hypothesis
617
- - Don't discard hypotheses without testing
618
- - Don't fix symptoms without understanding root cause
619
- - Don't skip the prevention phase
620
- - Don't assume a fix works without verification
621
- - Don't forget to document the solution
622
-
623
- ### Escalation Criteria
624
-
625
- ```
626
- ESCALATE WHEN:
627
- - [ ] Time box exceeded with no progress
628
- - [ ] All hypotheses eliminated but problem persists
629
- - [ ] Problem scope larger than initially understood
630
- - [ ] Required access/knowledge not available
631
- - [ ] Business impact exceeds threshold
632
-
633
- ESCALATION FORMAT:
634
- "I've investigated [problem] for [time].
635
- Tested hypotheses: [H1, H2, H3]
636
- Current status: [findings]
637
- Blocker: [what's needed]
638
- Ask: [specific help needed]"
639
- ```
640
-
641
- ### Collaboration Patterns
642
-
643
- ```typescript
644
- interface EscalationRequest {
645
- problem: string;
646
- timeInvested: string;
647
- testedHypotheses: {
648
- hypothesis: string;
649
- result: string;
650
- }[];
651
- currentStatus: string;
652
- blocker: string;
653
- specificAsk: string;
654
- }
655
-
656
- function formatEscalation(req: EscalationRequest): string {
657
- return `
658
- ## Escalation: ${req.problem}
659
-
660
- ### Time Invested
661
- ${req.timeInvested}
662
-
663
- ### Hypotheses Tested
664
- ${req.testedHypotheses.map(h =>
665
- `- **${h.hypothesis}**: ${h.result}`
666
- ).join('\n')}
92
+ | Do | Avoid |
93
+ |----|-------|
94
+ | Generate multiple hypotheses before testing | Testing first idea that comes to mind |
95
+ | Test cheapest hypothesis first when evidence equal | Spending 4 hours on 1 hypothesis |
96
+ | Time-box each phase | Rabbit holes without progress |
97
+ | Document failed approaches (valuable data) | Discarding hypotheses without testing |
98
+ | Verify root cause, not just symptoms | Fixing symptoms without understanding cause |
99
+ | Escalate when time-boxed out | Hero-coding beyond time limits |
100
+ | Add regression tests for every fix | Skipping prevention phase |
667
101
 
668
- ### Current Status
669
- ${req.currentStatus}
102
+ ## Related Skills
670
103
 
671
- ### Blocker
672
- ${req.blocker}
104
+ See also these related skill documents for complementary techniques:
673
105
 
674
- ### Specific Ask
675
- ${req.specificAsk}
676
- `.trim();
677
- }
678
- ```
679
-
680
- ## References
681
-
682
- - **systematic-debugging** - Four-phase debugging with 95% fix rate
683
- - **root-cause-tracing** - Deep investigation techniques
684
- - **sequential-thinking** - Structure reasoning as numbered thoughts
685
- - **brainstorming** - Generate more hypotheses
686
- - **verification-before-completion** - Ensure fix is complete
687
- - **testing-anti-patterns** - Avoid common testing mistakes
688
-
689
- ## Integration
690
-
691
- Works seamlessly with debugging workflows:
692
-
693
- ```
694
- ┌─────────────────────────────────────────────────────────────┐
695
- │ INTEGRATION FLOW │
696
- ├─────────────────────────────────────────────────────────────┤
697
- │ │
698
- │ 1. Bug reported │
699
- │ ↓ │
700
- │ problem-solving Phase 1 (Define) │
701
- │ ↓ │
702
- │ 2. Reproduce │
703
- │ ↓ │
704
- │ systematic-debugging Phase 1 (Reproduce) │
705
- │ ↓ │
706
- │ 3. Investigate │
707
- │ ↓ │
708
- │ problem-solving Phases 2-3 (Hypothesize, Test) │
709
- │ ↓ │
710
- │ 4. Fix │
711
- │ ↓ │
712
- │ systematic-debugging Phase 3 (Fix) │
713
- │ ↓ │
714
- │ 5. Verify │
715
- │ ↓ │
716
- │ verification-before-completion │
717
- │ ↓ │
718
- │ 6. Prevent │
719
- │ ↓ │
720
- │ problem-solving Phase 5 (Prevent) │
721
- │ │
722
- └─────────────────────────────────────────────────────────────┘
723
- ```
106
+ - `debugging-systematically` - Four-phase debugging framework
107
+ - `tracing-root-causes` - Deep investigation techniques
108
+ - `thinking-sequentially` - Structure reasoning as numbered thoughts
109
+ - `verifying-before-completion` - Ensure fix is complete