source-unifier
Merge multiple documentation sources (docs, GitHub, PDF) with conflict detection. Use when combining docs + code for complete skill coverage.
What this skill does
# Source Unifier Skill
## Purpose
Single responsibility: Intelligently merge documentation from multiple sources (websites, GitHub repos, PDFs) while detecting and transparently reporting conflicts between documented and implemented behavior. (BP-4)
## Grounding Checkpoint (Archetype 1 Mitigation)
Before executing, VERIFY:
- [ ] All source URLs/paths are accessible
- [ ] Each source type is correctly identified (docs, github, pdf)
- [ ] Output directory is writable
- [ ] Merge mode is specified (rule-based or AI-enhanced)
- [ ] Conflict resolution strategy is defined
**DO NOT merge without inspecting each source first.**
## Uncertainty Escalation (Archetype 2 Mitigation)
ASK USER instead of guessing when:
- Conflict severity unclear (is doc or code authoritative?)
- Multiple valid interpretations of API signature
- Source versions don't match (v2 docs vs v3 code)
- Merge strategy produces ambiguous results
**NEVER silently resolve conflicts. Always report discrepancies.**
## Context Scope (Archetype 3 Mitigation)
| Context Type | Included | Excluded |
|--------------|----------|----------|
| RELEVANT | All specified sources, merge config | Unrelated documentation |
| PERIPHERAL | Version history for context | Other projects |
| DISTRACTOR | Previous merge attempts | Unrelated codebases |
## Conflict Types
| Type | Severity | Description | Example |
|------|----------|-------------|---------|
| Missing in code | HIGH | Documented but not implemented | API endpoint in docs, not in code |
| Missing in docs | MEDIUM | Implemented but not documented | Hidden feature in code |
| Signature mismatch | MEDIUM | Different parameters/types | `func(a, b)` vs `func(a, b, c=None)` |
| Description mismatch | LOW | Different explanations | Wording differences |
## Workflow Steps
### Step 1: Verify Sources (Grounding)
```bash
# Test documentation URL
curl -I https://docs.example.com/
# Test GitHub repo
gh repo view owner/repo --json name,description
# Test PDF file
file manual.pdf && pdfinfo manual.pdf
```
### Step 2: Create Unified Configuration
```json
{
"name": "myframework",
"description": "Complete framework knowledge from docs + code",
"merge_mode": "rule-based",
"conflict_resolution": {
"missing_in_code": "warn",
"missing_in_docs": "include",
"signature_mismatch": "show_both",
"description_mismatch": "prefer_docs"
},
"sources": [
{
"type": "documentation",
"base_url": "https://docs.example.com/",
"extract_api": true,
"max_pages": 200
},
{
"type": "github",
"repo": "owner/myframework",
"include_code": true,
"code_analysis_depth": "surface",
"max_issues": 100
},
{
"type": "pdf",
"path": "docs/manual.pdf",
"extract_tables": true
}
]
}
```
### Step 3: Execute Unified Scraping
**Option A: With skill-seekers**
```bash
skill-seekers unified --config unified-config.json
```
**Option B: Manual merge workflow**
1. Scrape each source independently
2. Extract API signatures from each
3. Compare and detect conflicts
4. Generate merged output with conflict annotations
### Step 4: Review Conflict Report
The unifier generates a conflict report:
```markdown
# Conflict Report: myframework
## Summary
- Total APIs analyzed: 245
- Conflicts detected: 18
- Missing in code: 3 (HIGH)
- Missing in docs: 8 (MEDIUM)
- Signature mismatches: 5 (MEDIUM)
- Description mismatches: 2 (LOW)
## HIGH Severity Conflicts
### `deprecated_function()`
- **Status**: Documented but not found in code
- **Documentation**: "Use this function to..."
- **Code**: NOT FOUND
- **Recommendation**: Remove from docs or implement
## MEDIUM Severity Conflicts
### `process_data(input: str)`
- **Status**: Signature mismatch
- **Documentation**: `process_data(input: str)`
- **Code**: `process_data(input: str, validate: bool = True)`
- **Recommendation**: Update documentation to include `validate` parameter
```
### Step 5: Validate Merged Output
```bash
# Check merged skill structure
ls -la output/myframework/
# Verify conflict annotations
grep -r "⚠️\|Conflict\|WARNING" output/myframework/references/
# Count conflict markers
grep -c "Conflict" output/myframework/references/*.md
```
## Recovery Protocol (Archetype 4 Mitigation)
On error:
1. **PAUSE** - Preserve partial merge state
2. **DIAGNOSE** - Check error type:
- `Source unavailable` → Skip source, note in report
- `Parse error` → Check source format, retry with different parser
- `Memory error` → Process sources sequentially
- `Conflict overflow` → Increase conflict threshold or filter by severity
3. **ADAPT** - Adjust merge strategy
4. **RETRY** - Resume merge (max 3 attempts)
5. **ESCALATE** - Present partial results, ask user for conflict resolution
## Checkpoint Support
State saved to: `.aiwg/working/checkpoints/source-unifier/`
```
checkpoints/source-unifier/
├── source_1_docs.json # Processed docs
├── source_2_github.json # Processed GitHub
├── source_3_pdf.json # Processed PDF
├── conflicts.json # Detected conflicts
└── merge_progress.json # Current merge state
```
Resume: `skill-seekers unified --config config.json --resume`
## Output Structure
```
output/myframework/
├── SKILL.md # Main skill with conflict summary
├── references/
│ ├── index.md # Unified index
│ ├── api_reference.md # Merged API docs (with conflict markers)
│ ├── guides.md # Merged guides
│ └── conflicts.md # Detailed conflict report
├── sources/
│ ├── documentation.md # Original docs content
│ ├── github.md # GitHub-extracted content
│ └── pdf.md # PDF-extracted content
└── metadata/
├── sources.json # Source metadata
└── conflict_summary.json # Machine-readable conflicts
```
## Conflict Markers in Output
Merged content includes inline conflict markers:
```markdown
#### `process_data(input: str, validate: bool = True)`
⚠️ **Conflict**: Documentation signature differs from implementation
**Documentation says:**
```python
def process_data(input: str) -> dict:
"""Process input data and return results."""
```
**Code implementation:**
```python
def process_data(input: str, validate: bool = True) -> dict:
"""Process input data with optional validation."""
```
**Resolution**: Documentation should be updated to include the `validate` parameter added in v2.3.
```
## Merge Modes
| Mode | Description | Use Case |
|------|-------------|----------|
| `rule-based` | Apply predefined rules for conflict resolution | Fast, deterministic |
| `ai-enhanced` | Use AI to intelligently merge conflicting content | Better quality, slower |
| `manual` | Generate conflicts only, user resolves | Full control |
## Troubleshooting
| Issue | Diagnosis | Solution |
|-------|-----------|----------|
| Too many conflicts | Sources very different | Filter by severity, merge incrementally |
| False positives | Parser differences | Normalize API extraction |
| Missing content | Source incomplete | Add supplementary source |
| Merge too slow | Large sources | Use parallel processing |
## References
- Skill Seekers Unified Scraping: https://github.com/jmagly/Skill_Seekers/blob/main/docs/UNIFIED_SCRAPING.md
- REF-001: Production-Grade Agentic Workflows (BP-4, BP-6 model consortium parallel)
- REF-002: LLM Failure Modes (Archetype 1-4 mitigations)
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.