omgkit 2.0.7 → 2.1.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,668 @@
1
+ ---
2
+ name: research-validation
3
+ description: Multi-source validation framework for technology decisions, best practices verification, and evidence-based implementation
4
+ category: methodology
5
+ triggers:
6
+ - research validation
7
+ - source verification
8
+ - technology selection
9
+ - best practices
10
+ - evidence based
11
+ - multi-source
12
+ - fact checking
13
+ ---
14
+
15
+ # Research Validation
16
+
17
+ Systematic **multi-source validation** for technology decisions and implementation approaches. This skill provides frameworks for verifying information, assessing source credibility, and making evidence-based decisions.
18
+
19
+ ## Purpose
20
+
21
+ Avoid costly mistakes from outdated or incorrect information:
22
+
23
+ - Validate technology recommendations before implementation
24
+ - Cross-reference best practices across multiple sources
25
+ - Assess source credibility and recency
26
+ - Identify consensus and contradictions
27
+ - Document confidence levels and uncertainties
28
+ - Make informed decisions with proper evidence
29
+
30
+ ## Features
31
+
32
+ ### 1. Source Credibility Framework
33
+
34
+ ```markdown
35
+ ## Source Credibility Tiers
36
+
37
+ ### Tier 1: Official Sources (Highest Authority)
38
+ - Official documentation
39
+ - RFC/specification documents
40
+ - Vendor technical blogs
41
+ - Official GitHub repositories
42
+ - Academic papers (peer-reviewed)
43
+
44
+ **Credibility Score: 9-10/10**
45
+ **Typical Recency: Updated with releases**
46
+
47
+ ### Tier 2: Trusted Community Sources
48
+ - Stack Overflow (high-vote answers)
49
+ - Popular technical blogs (known authors)
50
+ - Conference talks (major conferences)
51
+ - Well-maintained GitHub projects
52
+ - Technical books (recent editions)
53
+
54
+ **Credibility Score: 7-8/10**
55
+ **Typical Recency: Varies, check dates**
56
+
57
+ ### Tier 3: Community Sources
58
+ - Medium/Dev.to articles
59
+ - Reddit discussions
60
+ - YouTube tutorials
61
+ - Personal blogs
62
+ - Forum posts
63
+
64
+ **Credibility Score: 4-6/10**
65
+ **Typical Recency: Often outdated**
66
+
67
+ ### Tier 4: Unverified Sources
68
+ - AI-generated content (uncited)
69
+ - Outdated documentation
70
+ - Anonymous posts
71
+ - Marketing content
72
+ - SEO-optimized articles
73
+
74
+ **Credibility Score: 1-3/10**
75
+ **Typical Recency: Unknown**
76
+ ```
77
+
78
+ ### 2. Validation Process
79
+
80
+ ```typescript
81
+ interface ResearchValidation {
82
+ topic: string;
83
+ sources: ValidatedSource[];
84
+ consensus: ConsensusAnalysis;
85
+ contradictions: Contradiction[];
86
+ confidence: ConfidenceAssessment;
87
+ recommendation: string;
88
+ }
89
+
90
+ interface ValidatedSource {
91
+ url: string;
92
+ title: string;
93
+ author?: string;
94
+ date: Date;
95
+ tier: 1 | 2 | 3 | 4;
96
+ keyFindings: string[];
97
+ relevance: number; // 0-1
98
+ bias?: string;
99
+ }
100
+
101
+ // Validation workflow
102
+ async function validateTechnologyDecision(
103
+ topic: string,
104
+ question: string
105
+ ): Promise<ResearchValidation> {
106
+ // Step 1: Gather sources from multiple tiers
107
+ const sources = await gatherSources(topic, {
108
+ minTier1: 1, // At least 1 official source
109
+ minTier2: 2, // At least 2 trusted sources
110
+ maxSources: 10,
111
+ });
112
+
113
+ // Step 2: Extract and categorize findings
114
+ const findings = sources.flatMap(s =>
115
+ s.keyFindings.map(f => ({
116
+ finding: f,
117
+ source: s,
118
+ confidence: calculateFindingConfidence(s, f),
119
+ }))
120
+ );
121
+
122
+ // Step 3: Analyze consensus
123
+ const consensus = analyzeConsensus(findings);
124
+
125
+ // Step 4: Identify contradictions
126
+ const contradictions = findContradictions(findings);
127
+
128
+ // Step 5: Calculate overall confidence
129
+ const confidence = assessConfidence({
130
+ sources,
131
+ consensus,
132
+ contradictions,
133
+ recency: assessRecency(sources),
134
+ });
135
+
136
+ // Step 6: Generate recommendation
137
+ const recommendation = generateRecommendation({
138
+ question,
139
+ consensus,
140
+ confidence,
141
+ contradictions,
142
+ });
143
+
144
+ return {
145
+ topic,
146
+ sources,
147
+ consensus,
148
+ contradictions,
149
+ confidence,
150
+ recommendation,
151
+ };
152
+ }
153
+
154
+ // Consensus analysis
155
+ function analyzeConsensus(findings: Finding[]): ConsensusAnalysis {
156
+ // Group similar findings
157
+ const clusters = clusterFindings(findings);
158
+
159
+ // Find majority opinion
160
+ const majorityCluster = clusters.reduce((max, c) =>
161
+ c.findings.length > max.findings.length ? c : max
162
+ );
163
+
164
+ // Calculate agreement percentage
165
+ const agreementRatio = majorityCluster.findings.length / findings.length;
166
+
167
+ return {
168
+ level: agreementRatio > 0.8 ? 'strong' :
169
+ agreementRatio > 0.6 ? 'moderate' : 'weak',
170
+ majorityPosition: majorityCluster.summary,
171
+ agreementPercentage: agreementRatio * 100,
172
+ minorityPositions: clusters
173
+ .filter(c => c !== majorityCluster)
174
+ .map(c => c.summary),
175
+ evidenceStrength: calculateEvidenceStrength(majorityCluster),
176
+ };
177
+ }
178
+ ```
179
+
180
+ ### 3. Technology Selection Matrix
181
+
182
+ ```markdown
183
+ ## Technology Selection Validation Framework
184
+
185
+ ### Step 1: Define Requirements
186
+ | Category | Requirement | Priority | Weight |
187
+ |----------|-------------|----------|--------|
188
+ | Performance | < 100ms response time | Must | 10 |
189
+ | Scalability | 10k concurrent users | Must | 10 |
190
+ | Learning curve | Team familiar in 2 weeks | Should | 7 |
191
+ | Community | Active community support | Should | 6 |
192
+ | Maintenance | Regular updates | Should | 5 |
193
+
194
+ ### Step 2: Gather Evidence for Each Option
195
+
196
+ ```typescript
197
+ interface TechnologyEvaluation {
198
+ technology: string;
199
+ criteria: CriteriaScore[];
200
+ sources: ValidatedSource[];
201
+ risks: Risk[];
202
+ totalScore: number;
203
+ }
204
+
205
+ function evaluateTechnology(
206
+ tech: string,
207
+ requirements: Requirement[]
208
+ ): TechnologyEvaluation {
209
+ const scores: CriteriaScore[] = [];
210
+
211
+ for (const req of requirements) {
212
+ // Research this specific criteria
213
+ const evidence = researchCriteria(tech, req.category);
214
+
215
+ scores.push({
216
+ criteria: req.category,
217
+ score: calculateScore(evidence),
218
+ evidence: evidence.sources,
219
+ confidence: evidence.confidence,
220
+ notes: evidence.notes,
221
+ });
222
+ }
223
+
224
+ return {
225
+ technology: tech,
226
+ criteria: scores,
227
+ sources: aggregateSources(scores),
228
+ risks: identifyRisks(scores),
229
+ totalScore: calculateWeightedScore(scores, requirements),
230
+ };
231
+ }
232
+ ```
233
+
234
+ ### Step 3: Comparison Template
235
+
236
+ | Criteria | Option A | Option B | Option C |
237
+ |----------|----------|----------|----------|
238
+ | Performance | 9/10 (✓ Verified) | 7/10 (⚠ Limited data) | 8/10 (✓ Verified) |
239
+ | Scalability | 8/10 (✓ Verified) | 9/10 (✓ Verified) | 6/10 (⚠ Concerns) |
240
+ | Learning curve | 7/10 (△ Mixed) | 5/10 (✓ Verified) | 8/10 (✓ Verified) |
241
+ | **Total** | **24/30** | **21/30** | **22/30** |
242
+
243
+ ### Step 4: Risk Assessment
244
+ - Option A: Low risk, well-established
245
+ - Option B: Medium risk, steeper learning curve
246
+ - Option C: Medium risk, scalability concerns need mitigation
247
+ ```
248
+
249
+ ### 4. Best Practice Verification
250
+
251
+ ```typescript
252
+ interface BestPracticeValidation {
253
+ practice: string;
254
+ status: 'verified' | 'outdated' | 'contested' | 'context-dependent';
255
+ context: string[];
256
+ sources: ValidatedSource[];
257
+ alternatives?: string[];
258
+ updatedPractice?: string;
259
+ }
260
+
261
+ // Verify if a best practice is still valid
262
+ async function verifyBestPractice(
263
+ practice: string,
264
+ context: {
265
+ technology: string;
266
+ version?: string;
267
+ useCase?: string;
268
+ }
269
+ ): Promise<BestPracticeValidation> {
270
+ // Search for current recommendations
271
+ const currentSources = await searchOfficialDocs(
272
+ context.technology,
273
+ practice,
274
+ { recency: '2years' }
275
+ );
276
+
277
+ // Check for deprecation notices
278
+ const deprecationInfo = await checkDeprecations(
279
+ context.technology,
280
+ practice
281
+ );
282
+
283
+ // Search for community discussion
284
+ const communityDiscussion = await searchCommunity(
285
+ practice,
286
+ context.technology
287
+ );
288
+
289
+ // Analyze findings
290
+ const isDeprecated = deprecationInfo.deprecated;
291
+ const hasAlternative = deprecationInfo.replacement !== null;
292
+ const communityConsensus = analyzeSentiment(communityDiscussion);
293
+
294
+ // Determine status
295
+ let status: BestPracticeValidation['status'];
296
+
297
+ if (isDeprecated) {
298
+ status = 'outdated';
299
+ } else if (communityConsensus.mixed) {
300
+ status = 'contested';
301
+ } else if (communityConsensus.contextual) {
302
+ status = 'context-dependent';
303
+ } else {
304
+ status = 'verified';
305
+ }
306
+
307
+ return {
308
+ practice,
309
+ status,
310
+ context: identifyValidContexts(currentSources, communityDiscussion),
311
+ sources: [...currentSources, ...communityDiscussion],
312
+ alternatives: hasAlternative ? [deprecationInfo.replacement] : undefined,
313
+ updatedPractice: status === 'outdated'
314
+ ? generateUpdatedPractice(practice, deprecationInfo)
315
+ : undefined,
316
+ };
317
+ }
318
+
319
+ // Example usage
320
+ const validation = await verifyBestPractice(
321
+ 'Use componentWillMount for data fetching',
322
+ { technology: 'React', version: '18' }
323
+ );
324
+
325
+ // Result:
326
+ // {
327
+ // practice: 'Use componentWillMount for data fetching',
328
+ // status: 'outdated',
329
+ // context: ['Legacy React class components only'],
330
+ // alternatives: ['useEffect hook', 'React Query', 'SWR'],
331
+ // updatedPractice: 'Use useEffect hook or data fetching libraries...'
332
+ // }
333
+ ```
334
+
335
+ ### 5. Evidence Documentation
336
+
337
+ ```markdown
338
+ ## Evidence Documentation Template
339
+
340
+ ### Research Topic
341
+ [Clear statement of what is being researched]
342
+
343
+ ### Research Question
344
+ [Specific question to be answered]
345
+
346
+ ---
347
+
348
+ ### Source 1: [Title]
349
+ **URL:** [link]
350
+ **Author:** [name or organization]
351
+ **Date:** [publication date]
352
+ **Tier:** [1-4]
353
+ **Relevance:** [High/Medium/Low]
354
+
355
+ **Key Findings:**
356
+ 1. [Finding 1]
357
+ 2. [Finding 2]
358
+
359
+ **Limitations:**
360
+ - [Any biases or limitations]
361
+
362
+ **Quote:** "[Relevant quote if applicable]"
363
+
364
+ ---
365
+
366
+ ### Source 2: [Title]
367
+ [Same structure...]
368
+
369
+ ---
370
+
371
+ ### Consensus Analysis
372
+
373
+ **Agreement Level:** [Strong/Moderate/Weak/None]
374
+
375
+ **Majority Position:**
376
+ [Summary of what most sources agree on]
377
+
378
+ **Minority Positions:**
379
+ 1. [Alternative view 1]
380
+ 2. [Alternative view 2]
381
+
382
+ **Contradictions Found:**
383
+ | Topic | Source A Says | Source B Says | Resolution |
384
+ |-------|---------------|---------------|------------|
385
+ | [topic] | [position] | [position] | [how resolved] |
386
+
387
+ ---
388
+
389
+ ### Confidence Assessment
390
+
391
+ **Overall Confidence:** [High/Medium/Low]
392
+
393
+ **Factors:**
394
+ - Source quality: [assessment]
395
+ - Recency: [assessment]
396
+ - Consensus level: [assessment]
397
+ - Evidence completeness: [assessment]
398
+
399
+ **Uncertainties:**
400
+ 1. [Uncertainty 1]
401
+ 2. [Uncertainty 2]
402
+
403
+ ---
404
+
405
+ ### Recommendation
406
+
407
+ **Decision:** [Clear recommendation]
408
+
409
+ **Rationale:**
410
+ [Why this recommendation based on evidence]
411
+
412
+ **Caveats:**
413
+ - [Caveat 1]
414
+ - [Caveat 2]
415
+
416
+ **Action Items:**
417
+ 1. [Next step 1]
418
+ 2. [Next step 2]
419
+ ```
420
+
421
+ ### 6. Recency Validation
422
+
423
+ ```typescript
424
+ interface RecencyAssessment {
425
+ sourceAge: 'current' | 'recent' | 'dated' | 'outdated';
426
+ technologyVersion: {
427
+ sourceVersion?: string;
428
+ currentVersion: string;
429
+ versionsBehind: number;
430
+ };
431
+ significantChanges: string[];
432
+ recommendation: string;
433
+ }
434
+
435
+ // Assess if source information is still current
436
+ async function assessRecency(
437
+ source: ValidatedSource,
438
+ technology: string
439
+ ): Promise<RecencyAssessment> {
440
+ const currentVersion = await getCurrentVersion(technology);
441
+ const sourceVersion = extractVersionFromSource(source);
442
+
443
+ // Get changelog between versions
444
+ const changes = sourceVersion
445
+ ? await getChangesBetweenVersions(technology, sourceVersion, currentVersion)
446
+ : [];
447
+
448
+ // Identify breaking changes
449
+ const breakingChanges = changes.filter(c => c.breaking);
450
+ const relevantChanges = changes.filter(c =>
451
+ c.affects.some(a => source.keyFindings.some(f => f.includes(a)))
452
+ );
453
+
454
+ // Calculate age
455
+ const ageInMonths = monthsSince(source.date);
456
+
457
+ let sourceAge: RecencyAssessment['sourceAge'];
458
+ if (ageInMonths < 6 && breakingChanges.length === 0) {
459
+ sourceAge = 'current';
460
+ } else if (ageInMonths < 12 && relevantChanges.length < 3) {
461
+ sourceAge = 'recent';
462
+ } else if (ageInMonths < 24) {
463
+ sourceAge = 'dated';
464
+ } else {
465
+ sourceAge = 'outdated';
466
+ }
467
+
468
+ return {
469
+ sourceAge,
470
+ technologyVersion: {
471
+ sourceVersion,
472
+ currentVersion,
473
+ versionsBehind: calculateVersionsBehind(sourceVersion, currentVersion),
474
+ },
475
+ significantChanges: relevantChanges.map(c => c.description),
476
+ recommendation: generateRecencyRecommendation(sourceAge, relevantChanges),
477
+ };
478
+ }
479
+
480
+ // Version change impact analysis
481
+ function analyzeVersionImpact(
482
+ findings: string[],
483
+ changes: VersionChange[]
484
+ ): VersionImpactAnalysis {
485
+ const impactedFindings: ImpactedFinding[] = [];
486
+
487
+ for (const finding of findings) {
488
+ const relatedChanges = changes.filter(c =>
489
+ c.keywords.some(k => finding.toLowerCase().includes(k.toLowerCase()))
490
+ );
491
+
492
+ if (relatedChanges.length > 0) {
493
+ impactedFindings.push({
494
+ finding,
495
+ changes: relatedChanges,
496
+ severity: relatedChanges.some(c => c.breaking) ? 'breaking' : 'minor',
497
+ updatedGuidance: generateUpdatedGuidance(finding, relatedChanges),
498
+ });
499
+ }
500
+ }
501
+
502
+ return {
503
+ impactedFindings,
504
+ unaffectedFindings: findings.filter(f =>
505
+ !impactedFindings.some(i => i.finding === f)
506
+ ),
507
+ overallImpact: impactedFindings.some(f => f.severity === 'breaking')
508
+ ? 'significant'
509
+ : impactedFindings.length > 0
510
+ ? 'moderate'
511
+ : 'none',
512
+ };
513
+ }
514
+ ```
515
+
516
+ ## Use Cases
517
+
518
+ ### 1. Framework Selection
519
+
520
+ ```markdown
521
+ ## Research: React vs Vue vs Svelte for New Project
522
+
523
+ ### Question
524
+ Which frontend framework best fits our team's needs for a dashboard application?
525
+
526
+ ### Requirements
527
+ - Performance: High (real-time data updates)
528
+ - Learning curve: Moderate (team knows React basics)
529
+ - Ecosystem: Rich (need charting, data tables)
530
+ - Long-term support: Essential
531
+
532
+ ### Source Summary
533
+
534
+ | Source | Type | Finding | Confidence |
535
+ |--------|------|---------|------------|
536
+ | React Docs | Official | Mature ecosystem, concurrent features | High |
537
+ | Vue Docs | Official | Easier learning curve, good performance | High |
538
+ | Svelte Docs | Official | Best performance, smaller bundle | High |
539
+ | State of JS 2023 | Survey | React most used, Svelte highest satisfaction | Medium |
540
+ | Tech Radar | Analysis | All recommended, React for large teams | Medium |
541
+
542
+ ### Consensus
543
+ - All frameworks capable for the use case
544
+ - React has largest ecosystem
545
+ - Vue has gentler learning curve
546
+ - Svelte has best performance but smaller ecosystem
547
+
548
+ ### Recommendation
549
+ **React** - Team familiarity + ecosystem maturity outweighs marginal performance gains from alternatives.
550
+
551
+ ### Confidence: High
552
+ - Multiple official sources consulted
553
+ - Aligned with industry trends
554
+ - Team context factored in
555
+ ```
556
+
557
+ ### 2. Security Best Practice Verification
558
+
559
+ ```typescript
560
+ // Verify security recommendation
561
+ const validation = await verifyBestPractice(
562
+ 'Use bcrypt for password hashing',
563
+ { technology: 'Node.js', useCase: 'authentication' }
564
+ );
565
+
566
+ // Result includes:
567
+ // - Current status: verified (still best practice)
568
+ // - Context: Web applications, when not using managed auth
569
+ // - Alternatives: Argon2 (newer, may be better for some cases)
570
+ // - Sources: OWASP, Node.js security best practices, etc.
571
+ ```
572
+
573
+ ### 3. API Design Decision
574
+
575
+ ```markdown
576
+ ## Research: REST vs GraphQL for Mobile API
577
+
578
+ ### Evidence Summary
579
+
580
+ **For REST:**
581
+ - Official: HTTP caching well-supported
582
+ - Community: Simpler for CRUD operations
583
+ - Benchmarks: Lower overhead per request
584
+
585
+ **For GraphQL:**
586
+ - Official: Reduces over/under-fetching
587
+ - Community: Better for complex, nested data
588
+ - Benchmarks: Fewer round trips for complex queries
589
+
590
+ ### Context Analysis
591
+ Our mobile app needs:
592
+ - Multiple related entities per screen ✓ GraphQL advantage
593
+ - Real-time updates ✓ Both support (subscriptions/SSE)
594
+ - Caching required ✓ REST advantage with standard caching
595
+
596
+ ### Recommendation
597
+ **REST with BFF pattern** - Simpler caching meets our CDN strategy. Create Backend-for-Frontend to aggregate data.
598
+
599
+ ### Confidence: Medium
600
+ - Trade-offs are context-dependent
601
+ - Team experience with REST
602
+ - Could revisit if complexity increases
603
+ ```
604
+
605
+ ## Best Practices
606
+
607
+ ### Do's
608
+
609
+ - **Use minimum 3 sources** - Never rely on single source
610
+ - **Prefer official docs** - Start with Tier 1 sources
611
+ - **Check publication dates** - Technology moves fast
612
+ - **Document uncertainties** - Be explicit about unknowns
613
+ - **Consider context** - Best practices vary by situation
614
+ - **Verify version compatibility** - Check against your version
615
+
616
+ ### Don'ts
617
+
618
+ - Don't trust outdated sources without verification
619
+ - Don't ignore minority opinions without investigation
620
+ - Don't skip official documentation
621
+ - Don't assume consensus means correctness
622
+ - Don't let recency bias override quality
623
+ - Don't ignore context in recommendations
624
+
625
+ ### Validation Checklist
626
+
627
+ ```markdown
628
+ ## Pre-Implementation Validation Checklist
629
+
630
+ ### Source Quality
631
+ - [ ] At least 1 official/Tier 1 source consulted
632
+ - [ ] At least 2 additional credible sources
633
+ - [ ] Publication dates within 2 years
634
+ - [ ] Authors/organizations verified
635
+
636
+ ### Analysis
637
+ - [ ] Consensus level assessed
638
+ - [ ] Contradictions identified and resolved
639
+ - [ ] Context applicability verified
640
+ - [ ] Version compatibility confirmed
641
+
642
+ ### Documentation
643
+ - [ ] Sources documented with links
644
+ - [ ] Key findings summarized
645
+ - [ ] Confidence level stated
646
+ - [ ] Uncertainties noted
647
+
648
+ ### Decision
649
+ - [ ] Recommendation clearly stated
650
+ - [ ] Rationale documented
651
+ - [ ] Alternatives considered
652
+ - [ ] Risks identified
653
+ ```
654
+
655
+ ## Related Skills
656
+
657
+ - **brainstorming** - Generating options to research
658
+ - **writing-plans** - Documenting research findings
659
+ - **sequential-thinking** - Structured research process
660
+ - **problem-solving** - Applying research to solutions
661
+
662
+ ## Reference Resources
663
+
664
+ - [How to Read a Paper](https://web.stanford.edu/class/ee384m/Handouts/HowtoReadPaper.pdf)
665
+ - [ThoughtWorks Technology Radar](https://www.thoughtworks.com/radar)
666
+ - [State of JS Survey](https://stateofjs.com/)
667
+ - [DORA Research](https://dora.dev/research/)
668
+ - [Google Scholar](https://scholar.google.com/) - For academic sources