📦 deps(thirdparty): update snapshots
This commit is contained in:
@@ -0,0 +1,375 @@
|
||||
# Discovery Patterns
|
||||
|
||||
Detailed workflows for common research scenarios.
|
||||
|
||||
## Library Installation
|
||||
|
||||
Getting started with a new library.
|
||||
|
||||
### Workflow
|
||||
|
||||
```
|
||||
1. Package discovery
|
||||
2. Documentation retrieval
|
||||
3. Installation guide
|
||||
4. Synthesis
|
||||
```
|
||||
|
||||
### Steps
|
||||
|
||||
**1. Package Discovery**
|
||||
|
||||
```
|
||||
octocode.packageSearch(name)
|
||||
→ Repository URL
|
||||
→ Latest version
|
||||
→ Dependencies
|
||||
→ Popularity metrics
|
||||
```
|
||||
|
||||
**2. Documentation Retrieval**
|
||||
|
||||
```
|
||||
context7.resolve-library-id(name)
|
||||
→ Documentation identifier
|
||||
|
||||
context7.get-library-docs(id, topic="installation")
|
||||
→ Official installation guide
|
||||
```
|
||||
|
||||
**3. Installation Synthesis**
|
||||
|
||||
Compress findings into:
|
||||
- Prerequisites (runtime, dependencies)
|
||||
- Installation commands
|
||||
- Framework-specific integration
|
||||
- Common pitfalls during setup
|
||||
|
||||
### Output Structure
|
||||
|
||||
```markdown
|
||||
## Installation: {Library}
|
||||
|
||||
**Prerequisites**:
|
||||
- {runtime requirement}
|
||||
- {peer dependencies}
|
||||
|
||||
**Install**:
|
||||
\`\`\`bash
|
||||
{package manager command}
|
||||
\`\`\`
|
||||
|
||||
**Configuration**:
|
||||
{minimal config to get started}
|
||||
|
||||
**Verify**:
|
||||
{how to confirm successful installation}
|
||||
|
||||
**Common Issues**:
|
||||
- {issue} → {solution}
|
||||
```
|
||||
|
||||
## Error Resolution
|
||||
|
||||
Diagnosing and fixing errors.
|
||||
|
||||
### Workflow
|
||||
|
||||
```
|
||||
1. Parse error
|
||||
2. Search issues
|
||||
3. Check official docs
|
||||
4. Find community solutions
|
||||
5. Synthesize
|
||||
```
|
||||
|
||||
### Steps
|
||||
|
||||
**1. Parse Error**
|
||||
|
||||
```
|
||||
Extract from error message:
|
||||
- Error code/type
|
||||
- Key terms
|
||||
- Stack trace patterns
|
||||
- Library/framework context
|
||||
```
|
||||
|
||||
**2. Search Issues**
|
||||
|
||||
```
|
||||
octocode.githubSearchIssues(pattern)
|
||||
→ Related GitHub issues
|
||||
→ Resolution status
|
||||
→ Workarounds
|
||||
```
|
||||
|
||||
**3. Official Troubleshooting**
|
||||
|
||||
```
|
||||
context7.get-library-docs(id, topic="troubleshooting")
|
||||
→ Known issues
|
||||
→ Official fixes
|
||||
→ Migration notes
|
||||
```
|
||||
|
||||
**4. Community Solutions**
|
||||
|
||||
```
|
||||
firecrawl.search(error_message)
|
||||
→ Stack Overflow answers
|
||||
→ Blog solutions
|
||||
→ Forum discussions
|
||||
```
|
||||
|
||||
**5. Synthesis**
|
||||
|
||||
Rank solutions by:
|
||||
- Source authority (official > community)
|
||||
- Recency (newer often better)
|
||||
- Vote count/acceptance
|
||||
- Relevance to specific context
|
||||
|
||||
### Output Structure
|
||||
|
||||
```markdown
|
||||
## Error: {Error Message/Code}
|
||||
|
||||
**Cause**: {root cause explanation}
|
||||
|
||||
**Solution** (Recommended):
|
||||
{step-by-step fix}
|
||||
|
||||
**Alternative Solutions**:
|
||||
1. {alternative approach}
|
||||
2. {alternative approach}
|
||||
|
||||
**Prevention**:
|
||||
{how to avoid this in future}
|
||||
|
||||
**Sources**:
|
||||
- [GitHub Issue](url)
|
||||
- [Stack Overflow](url)
|
||||
```
|
||||
|
||||
## API Exploration
|
||||
|
||||
Understanding library APIs.
|
||||
|
||||
### Workflow
|
||||
|
||||
```
|
||||
1. Get documentation ID
|
||||
2. Retrieve API reference
|
||||
3. Find real usage examples
|
||||
4. Structure findings
|
||||
```
|
||||
|
||||
### Steps
|
||||
|
||||
**1. Documentation ID**
|
||||
|
||||
```
|
||||
context7.resolve-library-id(name)
|
||||
→ Documentation identifier
|
||||
```
|
||||
|
||||
**2. API Reference**
|
||||
|
||||
```
|
||||
context7.get-library-docs(id, topic="api")
|
||||
→ Function signatures
|
||||
→ Parameters
|
||||
→ Return types
|
||||
→ Examples
|
||||
```
|
||||
|
||||
**3. Real Usage**
|
||||
|
||||
```
|
||||
octocode.githubSearchCode("import { functionName } from 'library'")
|
||||
→ Production usage patterns
|
||||
→ Common configurations
|
||||
→ Edge case handling
|
||||
```
|
||||
|
||||
### Output Structure
|
||||
|
||||
```markdown
|
||||
## API: {Function/Component}
|
||||
|
||||
**Signature**:
|
||||
\`\`\`typescript
|
||||
{type signature}
|
||||
\`\`\`
|
||||
|
||||
**Parameters**:
|
||||
| Name | Type | Required | Description |
|
||||
|------|------|----------|-------------|
|
||||
| {param} | {type} | {yes/no} | {description} |
|
||||
|
||||
**Returns**: {return type and description}
|
||||
|
||||
**Example**:
|
||||
\`\`\`typescript
|
||||
{usage example}
|
||||
\`\`\`
|
||||
|
||||
**Common Patterns**:
|
||||
- {pattern}: {when to use}
|
||||
|
||||
**Gotchas**:
|
||||
- {common mistake}
|
||||
```
|
||||
|
||||
## Technology Comparison
|
||||
|
||||
Evaluating options for a decision.
|
||||
|
||||
### Workflow
|
||||
|
||||
```
|
||||
1. Parallel discovery for each option
|
||||
2. Cross-reference findings
|
||||
3. Build comparison matrix
|
||||
4. Generate recommendation
|
||||
```
|
||||
|
||||
### Steps
|
||||
|
||||
**1. Parallel Discovery**
|
||||
|
||||
For each option, simultaneously:
|
||||
|
||||
```
|
||||
context7: Official documentation, features
|
||||
octocode: GitHub activity, issues, community
|
||||
firecrawl: Benchmarks, case studies, reviews
|
||||
```
|
||||
|
||||
**2. Cross-Reference**
|
||||
|
||||
Compare across sources:
|
||||
- Feature claims vs reality
|
||||
- Performance benchmarks
|
||||
- Community health indicators
|
||||
- Known limitations
|
||||
|
||||
**3. Build Matrix**
|
||||
|
||||
| Criterion | Option A | Option B | Option C |
|
||||
|-----------|----------|----------|----------|
|
||||
| Performance | {metric} | {metric} | {metric} |
|
||||
| Learning curve | {level} | {level} | {level} |
|
||||
| Ecosystem | {size} | {size} | {size} |
|
||||
| Maintenance | {status} | {status} | {status} |
|
||||
|
||||
**4. Recommend**
|
||||
|
||||
Based on:
|
||||
- User's stated priorities
|
||||
- Evidence from research
|
||||
- Trade-off analysis
|
||||
|
||||
### Output Structure
|
||||
|
||||
```markdown
|
||||
## Comparison: {Category}
|
||||
|
||||
**Options Evaluated**:
|
||||
1. {Option A} — {brief description}
|
||||
2. {Option B} — {brief description}
|
||||
|
||||
**Matrix**:
|
||||
| Criterion | Option A | Option B |
|
||||
|-----------|----------|----------|
|
||||
| {criterion} | {value} | {value} |
|
||||
|
||||
**Recommendation**: {Option}
|
||||
|
||||
**Rationale**: {why this option wins for this context}
|
||||
|
||||
**When to Choose Alternative**:
|
||||
- Choose {Option B} when {condition}
|
||||
|
||||
**Sources**:
|
||||
- {source list}
|
||||
```
|
||||
|
||||
## Best Practices Research
|
||||
|
||||
Finding recommended approaches.
|
||||
|
||||
### Workflow
|
||||
|
||||
```
|
||||
1. Official guidance
|
||||
2. Expert opinions
|
||||
3. Community patterns
|
||||
4. Synthesize with context
|
||||
```
|
||||
|
||||
### Steps
|
||||
|
||||
**1. Official Guidance**
|
||||
|
||||
```
|
||||
context7.get-library-docs(id, topic="best-practices")
|
||||
→ Recommended patterns
|
||||
→ Anti-patterns to avoid
|
||||
→ Performance tips
|
||||
```
|
||||
|
||||
**2. Expert Opinions**
|
||||
|
||||
```
|
||||
firecrawl.search("{topic} best practices {year}")
|
||||
→ Expert blog posts
|
||||
→ Conference talks
|
||||
→ Industry guides
|
||||
```
|
||||
|
||||
**3. Community Patterns**
|
||||
|
||||
```
|
||||
octocode.githubSearchCode("{pattern}")
|
||||
→ How production code implements
|
||||
→ Common approaches
|
||||
→ Variations
|
||||
```
|
||||
|
||||
**4. Contextualize**
|
||||
|
||||
Filter recommendations by:
|
||||
- User's stack/constraints
|
||||
- Scale requirements
|
||||
- Team expertise
|
||||
- Project stage
|
||||
|
||||
### Output Structure
|
||||
|
||||
```markdown
|
||||
## Best Practices: {Topic}
|
||||
|
||||
**Recommended Approach**:
|
||||
{primary recommendation}
|
||||
|
||||
**Why**:
|
||||
{rationale with evidence}
|
||||
|
||||
**Implementation**:
|
||||
\`\`\`typescript
|
||||
{example code}
|
||||
\`\`\`
|
||||
|
||||
**Avoid**:
|
||||
- {anti-pattern} — {why}
|
||||
|
||||
**Context Matters**:
|
||||
- For {context A}: {variation}
|
||||
- For {context B}: {variation}
|
||||
|
||||
**Sources**:
|
||||
- [Official Guide](url)
|
||||
- [Expert Article](url)
|
||||
```
|
||||
@@ -0,0 +1,168 @@
|
||||
# Source Hierarchy
|
||||
|
||||
Authority evaluation and cross-referencing guidelines for technical research.
|
||||
|
||||
## Authority Hierarchy
|
||||
|
||||
Sources ranked by authority for technical research:
|
||||
|
||||
| Rank | Source Type | Use For | Confidence |
|
||||
|------|-------------|---------|------------|
|
||||
| 1 | **Official Documentation** | API refs, canonical behavior, setup | 90-100% |
|
||||
| 2 | **Standards Bodies** | RFCs, W3C, IEEE, ISO specs | 90-100% |
|
||||
| 3 | **Benchmark Studies** | Performance comparisons, metrics | 70-90% |
|
||||
| 4 | **Case Studies** | Real-world implementations, lessons | 60-80% |
|
||||
| 5 | **Community Consensus** | Adoption patterns, common practices | 50-70% |
|
||||
|
||||
## Source Types Explained
|
||||
|
||||
### Official Documentation
|
||||
|
||||
Created and maintained by project authors.
|
||||
|
||||
**Examples**:
|
||||
- React docs at reactjs.org
|
||||
- TypeScript Handbook
|
||||
- AWS service documentation
|
||||
- Framework migration guides
|
||||
|
||||
**Trust for**:
|
||||
- API signatures and parameters
|
||||
- Configuration options
|
||||
- Breaking changes
|
||||
- Official recommendations
|
||||
|
||||
**Verify**:
|
||||
- Documentation version matches user's version
|
||||
- Content is current (check update dates)
|
||||
|
||||
### Standards Bodies
|
||||
|
||||
Formal specifications from standards organizations.
|
||||
|
||||
**Examples**:
|
||||
- IETF RFCs (HTTP, TLS, etc.)
|
||||
- W3C specifications (HTML, CSS, WebAPI)
|
||||
- ECMA standards (JavaScript/ECMAScript)
|
||||
- ISO standards
|
||||
|
||||
**Trust for**:
|
||||
- Protocol specifications
|
||||
- Language semantics
|
||||
- Compliance requirements
|
||||
- Interoperability guarantees
|
||||
|
||||
**Note**: Standards may describe ideal behavior; implementations may vary.
|
||||
|
||||
### Benchmark Studies
|
||||
|
||||
Comparative performance analysis.
|
||||
|
||||
**Examples**:
|
||||
- TechEmpower web framework benchmarks
|
||||
- Browser performance comparisons
|
||||
- Database benchmarking suites
|
||||
- Independent performance tests
|
||||
|
||||
**Trust for**:
|
||||
- Relative performance comparisons
|
||||
- Throughput/latency metrics
|
||||
- Memory usage patterns
|
||||
- Scalability characteristics
|
||||
|
||||
**Verify**:
|
||||
- Benchmark methodology is sound
|
||||
- Test conditions match user's scenario
|
||||
- Results are recent (performance changes with versions)
|
||||
|
||||
### Case Studies
|
||||
|
||||
Real-world implementation experiences.
|
||||
|
||||
**Examples**:
|
||||
- Engineering blog posts from known companies
|
||||
- Conference talks with implementation details
|
||||
- Published post-mortems
|
||||
- Migration stories
|
||||
|
||||
**Trust for**:
|
||||
- Practical challenges and solutions
|
||||
- Scale considerations
|
||||
- Team/organizational factors
|
||||
- Production gotchas
|
||||
|
||||
**Note**: Context matters - their constraints may differ from yours.
|
||||
|
||||
### Community Consensus
|
||||
|
||||
Aggregated community experience.
|
||||
|
||||
**Examples**:
|
||||
- Stack Overflow voting patterns
|
||||
- GitHub stars/usage statistics
|
||||
- Survey results (State of JS, etc.)
|
||||
- Reddit/HN discussion trends
|
||||
|
||||
**Trust for**:
|
||||
- Popularity indicators
|
||||
- Common pain points
|
||||
- Ecosystem health signals
|
||||
- Developer experience trends
|
||||
|
||||
**Verify**: Community consensus can be wrong; cross-reference with higher-authority sources.
|
||||
|
||||
## Cross-Referencing Requirements
|
||||
|
||||
### Critical Claims
|
||||
|
||||
Require 2+ independent sources for:
|
||||
- Security recommendations
|
||||
- Breaking changes
|
||||
- Performance claims
|
||||
- Migration paths
|
||||
- Best practices
|
||||
|
||||
### Verification Strategy
|
||||
|
||||
```
|
||||
Primary source → Secondary verification → Empirical test (if feasible)
|
||||
```
|
||||
|
||||
1. Start with highest-authority source
|
||||
2. Find independent confirmation
|
||||
3. Test directly when possible
|
||||
|
||||
### Conflict Resolution
|
||||
|
||||
When sources disagree:
|
||||
|
||||
| Factor | Resolution |
|
||||
|--------|------------|
|
||||
| **Recency** | Newer usually supersedes |
|
||||
| **Authority** | Higher-ranked source wins |
|
||||
| **Context** | Both may be right for different scenarios |
|
||||
| **Verification** | Empirical test is authoritative |
|
||||
|
||||
Document unresolved conflicts with uncertainty flag.
|
||||
|
||||
## Query-Type Authority Mapping
|
||||
|
||||
| Query Type | Primary Source | Secondary | Tertiary |
|
||||
|------------|----------------|-----------|----------|
|
||||
| API Reference | Official docs | GitHub issues | Community Q&A |
|
||||
| Best Practices | Expert guides | Case studies | Community consensus |
|
||||
| Troubleshooting | GitHub issues | Stack Overflow | Official troubleshooting |
|
||||
| Performance | Benchmarks | Case studies | Community reports |
|
||||
| Security | Official advisories | Security researchers | Community discussion |
|
||||
|
||||
## Freshness Requirements
|
||||
|
||||
| Content Type | Acceptable Age |
|
||||
|--------------|----------------|
|
||||
| API reference | Current version |
|
||||
| Security advisories | Last 30 days |
|
||||
| Best practices | Last 1-2 years |
|
||||
| Tutorials | Last 1 year |
|
||||
| Benchmarks | Last 6 months |
|
||||
|
||||
Older content may still be valid but requires verification against current state.
|
||||
@@ -0,0 +1,189 @@
|
||||
# Tool Selection Guide
|
||||
|
||||
MCP server selection matrix and usage patterns for research tasks.
|
||||
|
||||
## Available Tools
|
||||
|
||||
### context7 - Library Documentation
|
||||
|
||||
Official documentation retrieval.
|
||||
|
||||
**Functions**:
|
||||
- `resolve-library-id(name)` — Get documentation identifier
|
||||
- `get-library-docs(id, topic)` — Retrieve focused documentation
|
||||
|
||||
**Best for**:
|
||||
- API references
|
||||
- Official guides
|
||||
- Configuration options
|
||||
- Migration documentation
|
||||
|
||||
**Optimization tips**:
|
||||
- Use specific topics (e.g., "authentication", "installation")
|
||||
- Avoid overly broad queries
|
||||
- Check version alignment
|
||||
|
||||
### octocode - GitHub Intelligence
|
||||
|
||||
Repository and code search.
|
||||
|
||||
**Functions**:
|
||||
- `packageSearch(name)` — Find repository metadata
|
||||
- `githubSearchCode(query)` — Search for code patterns
|
||||
- `githubSearchIssues(query)` — Find issues and discussions
|
||||
- `githubViewRepoStructure(owner/repo)` — Explore repository layout
|
||||
|
||||
**Best for**:
|
||||
- Real code examples
|
||||
- Community solutions
|
||||
- Package discovery
|
||||
- Troubleshooting via issues
|
||||
|
||||
**Optimization tips**:
|
||||
- Use specific search queries with language qualifiers
|
||||
- Check issue status (open vs closed)
|
||||
- Look at recent activity for relevance
|
||||
|
||||
### firecrawl - Web Documentation
|
||||
|
||||
Web content extraction.
|
||||
|
||||
**Functions**:
|
||||
- `search(query)` — Web search for documentation
|
||||
- `scrape(url, formats=['markdown'])` — Extract page content
|
||||
- `map(url)` — Discover site structure
|
||||
|
||||
**Best for**:
|
||||
- Tutorials and guides
|
||||
- Stack Overflow answers
|
||||
- Blog posts and articles
|
||||
- Benchmark reports
|
||||
|
||||
**Optimization tips**:
|
||||
- Use `onlyMainContent=true` to reduce noise
|
||||
- Set `maxAge` for cache efficiency
|
||||
- Use `map` before deep crawling
|
||||
|
||||
## Selection Matrix by Use Case
|
||||
|
||||
| Use Case | Primary | Secondary | Tertiary |
|
||||
|----------|---------|-----------|----------|
|
||||
| Official docs | context7 | octocode | firecrawl |
|
||||
| Troubleshooting | octocode issues | firecrawl community | context7 guides |
|
||||
| Code examples | octocode repos | firecrawl tutorials | context7 examples |
|
||||
| Technology evaluation | All parallel | Cross-reference | Validate |
|
||||
| Package discovery | octocode | context7 | firecrawl |
|
||||
| Performance research | firecrawl | octocode | context7 |
|
||||
|
||||
## Execution Patterns
|
||||
|
||||
### Parallel Execution
|
||||
|
||||
Run independent queries simultaneously:
|
||||
|
||||
```javascript
|
||||
await Promise.all([
|
||||
context7.resolve(name),
|
||||
octocode.packageSearch(name),
|
||||
firecrawl.search(query)
|
||||
]).then(consolidateResults)
|
||||
```
|
||||
|
||||
Use when:
|
||||
- Sources are independent
|
||||
- Comprehensive coverage needed
|
||||
- Time is limited
|
||||
|
||||
### Sequential with Fallback
|
||||
|
||||
Try sources in order, fall back on failure:
|
||||
|
||||
```
|
||||
context7 fails → octocode issues → firecrawl alternatives
|
||||
Empty docs → broader topic → web search
|
||||
Rate limit → alternate MCP → manual search guidance
|
||||
```
|
||||
|
||||
Use when:
|
||||
- Primary source usually sufficient
|
||||
- Need to conserve API calls
|
||||
- Specific answer expected
|
||||
|
||||
### Progressive Refinement
|
||||
|
||||
Start broad, narrow based on results:
|
||||
|
||||
```
|
||||
1. Package discovery (octocode.packageSearch)
|
||||
2. Official docs (context7.resolve + get-library-docs)
|
||||
3. Code examples if needed (octocode.githubSearchCode)
|
||||
4. Community solutions if stuck (firecrawl.search)
|
||||
```
|
||||
|
||||
Use when:
|
||||
- Exploring unfamiliar territory
|
||||
- Building comprehensive understanding
|
||||
- Research question is evolving
|
||||
|
||||
## Query Formulation
|
||||
|
||||
### For context7
|
||||
|
||||
```
|
||||
Topic: "authentication" ✓ Focused
|
||||
Topic: "everything" ✗ Too broad
|
||||
Topic: "jwt token refresh" ✓ Specific
|
||||
```
|
||||
|
||||
### For octocode
|
||||
|
||||
```
|
||||
Code: "useAuth hook react" ✓ Specific pattern
|
||||
Code: "authentication" ✗ Too broad
|
||||
Issues: "error NEXT_PUBLIC_ env" ✓ Specific error
|
||||
```
|
||||
|
||||
### For firecrawl
|
||||
|
||||
```
|
||||
Search: "hono vs express benchmark 2024" ✓ Specific, dated
|
||||
Search: "best web framework" ✗ Too generic
|
||||
Search: "nextjs 14 server actions guide" ✓ Version-specific
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Error | Recovery |
|
||||
|-------|----------|
|
||||
| Rate limit | Wait, try alternate tool |
|
||||
| Not found | Broaden query, try different tool |
|
||||
| Timeout | Retry with simpler query |
|
||||
| Empty results | Check query formulation, try synonyms |
|
||||
|
||||
## Tool Combination Patterns
|
||||
|
||||
### Library Installation Research
|
||||
|
||||
```
|
||||
1. octocode.packageSearch(name) → repo info, version
|
||||
2. context7.resolve-library-id(name) → doc ID
|
||||
3. context7.get-library-docs(id, "installation") → official guide
|
||||
```
|
||||
|
||||
### Error Resolution Research
|
||||
|
||||
```
|
||||
1. octocode.githubSearchIssues(error_pattern) → related issues
|
||||
2. context7.get-library-docs(id, "troubleshooting") → official fixes
|
||||
3. firecrawl.search(error_message) → community solutions
|
||||
```
|
||||
|
||||
### Technology Comparison Research
|
||||
|
||||
```
|
||||
Parallel for each option:
|
||||
- context7 (official docs)
|
||||
- octocode (GitHub activity, issues)
|
||||
- firecrawl (benchmarks, case studies)
|
||||
Then: Cross-reference, create matrix
|
||||
```
|
||||
Reference in New Issue
Block a user