Case Study: Documentation Skill Synthesis
Scenario
Goal: create a skill that helps an agent answer and author code for a library without repeatedly re-reading upstream docs.
Input collection approach
This case used breadth-first source collection and only stopped when new retrieval yielded mostly duplicates:
- Official docs landing pages and navigation trees.
- All API/class/module reference pages.
- Configuration and environment reference pages.
- Official examples/tutorials.
- Troubleshooting/error catalog pages.
- Migration/deprecation/changelog pages.
- Upstream repo README plus canonical examples.
- In-repo usage of the library (
rgon imports and key APIs).
Coverage matrix used
Required dimensions tracked during synthesis:
- Setup and installation.
- Core primitives and API surface.
- Configuration and runtime options.
- Normal usage patterns.
- Edge cases and failure handling.
- Version-specific differences.
- Migration and deprecation guidance.
- Instructional templates/examples for direct reuse.
Synthesized artifacts produced
The resulting skill references included:
- Happy-path implementation template.
- Production-safe variant with defensive defaults.
- Anti-pattern and corrected implementation.
- Intent-to-reference routing guide (which section to load for which user request).
- Gap log with explicit next retrieval steps.
Source-to-decision trace (sample)
- Source class: migration/changelog docs. Decision: add a version-compatibility checklist section to the skill. Why: multiple API signatures existed across versions; without this, answers were inconsistent.
- Source class: troubleshooting/error catalog. Decision: add an error-to-fix lookup table in references. Why: user prompts often start from failures, not idealized setup.
- Source class: in-repo usage scan (
rg). Decision: prioritize examples matching local project patterns. Why: produced outputs became directly usable with fewer edits.
Concrete artifacts (sample)
- Prompt and output skeleton: Prompt: "Configure <library> client for retries and auth in production." Output: a production-safe template with retry/backoff, timeout defaults, and auth placeholders.
- Anti-pattern transformation: Before: single inline config with no timeout/error handling. After: structured config with explicit timeout, retry policy, and failure handling notes.
- Reference routing snippet: If request mentions "migration" -> load migration/changelog reference first, then API reference.
What made this high quality
- Input retrieval was exhaustive across all doc classes, not just top pages.
- The skill shipped transformed examples, not citation-only notes.
- Coverage and gaps were explicit, so iteration could continue safely.