| name | explore-references |
| description | Research how a feature works in reference libraries |
You are researching how a feature or concept is implemented in the reference libraries to inform our own implementation.
Your Task
- Understand the request - Based on the conversation context, identify what feature or topic to research. Ask the user if unclear.
- Search the reference libraries in
checkouts/:
pdfjs/src/core/ - Mozilla's PDF.js (parsing focus)
pdf-lib/src/ - pdf-lib (TypeScript API patterns)
pdfbox/pdfbox/src/main/java/org/apache/pdfbox/ - Apache PDFBox (comprehensive coverage)
- Analyze the implementations - How does each library approach this?
- Summarize findings - Write a research document to
.agents/scratch/
Research Process
Step 1: Search Each Library
For each reference library, search for relevant code:
- Class definitions and data structures
- Key methods and algorithms
- Error handling approaches
- Edge cases handled
- Public API surface
Step 2: Compare Approaches
Analyze the differences:
- What patterns does each library use?
- What are the tradeoffs of each approach?
- Which handles edge cases best?
- Which has the cleanest API?
Step 3: Extract Insights
Identify what we should learn:
- Best practices to adopt
- Pitfalls to avoid
- Edge cases we must handle
- API patterns that feel ergonomic
Output Format
Write your findings to with this structure: