This document provides a systematic plan for ingesting all core technology documentation via Context7 to prevent iterative debugging issues like we experienced with Cloudflare Stream.
Why Critical: Core functionality for video composition and rendering
Context7 Commands:
// Step 1: Resolve library ID
mcp__context7__resolve-library-id({
libraryName: "remotion"
})
// Step 2: Ingest Player documentation
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "Player API controls configuration",
tokens: 15000
})
// Step 3: Ingest Lambda rendering
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "Lambda rendering costs deployment",
tokens: 15000
})
// Step 4: Ingest dynamic compositions
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "dynamic compositions props data-driven",
tokens: 15000
})
// Step 5: Ingest audio/video sync
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "audio synchronization video timing",
tokens: 10000
})Expected Learnings:
- Player API and event handling
- Lambda function setup and costs
- Dynamic composition patterns
- Audio/video synchronization techniques
- Bundle optimization strategies
Create After Ingestion:
REMOTION_IMPLEMENTATION.md
Why Critical: Entire backend infrastructure
Context7 Commands:
// Step 1: Resolve library ID
mcp__context7__resolve-library-id({
libraryName: "convex real-time database"
})
// Step 2: Ingest query patterns
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "queries mutations actions patterns",
tokens: 15000
})
// Step 3: Ingest real-time subscriptions
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "real-time subscriptions reactivity",
tokens: 10000
})
// Step 4: Ingest schema design
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "schema design indexes validation",
tokens: 10000
})
// Step 5: Ingest authentication
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "authentication authorization users",
tokens: 10000
})Expected Learnings:
- When to use query vs mutation vs action
- Real-time subscription patterns
- Index design for performance
- Schema validation strategies
- Authentication integration
Create After Ingestion:
CONVEX_PATTERNS.md
Why Critical: Cloudflare Stream video playback
Context7 Commands:
// Step 1: Resolve library ID
mcp__context7__resolve-library-id({
libraryName: "hls.js"
})
// Step 2: Ingest player configuration
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "player configuration initialization",
tokens: 10000
})
// Step 3: Ingest error handling
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID from step 1]",
topic: "error handling recovery retry",
tokens: 10000
})Expected Learnings:
- Player initialization and configuration
- Error recovery strategies
- Quality level switching
- Live streaming support
Create After Ingestion:
- Add to
CLOUDFLARE_STREAM_IMPLEMENTATION.md
Context7 Commands:
mcp__context7__resolve-library-id({
libraryName: "anthropic claude"
})
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID]",
topic: "streaming messages function calling",
tokens: 15000
})Expected Learnings:
- Streaming API patterns
- Function/tool calling
- Token counting
- Error handling
Context7 Commands:
mcp__context7__resolve-library-id({
libraryName: "google generative ai gemini"
})
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID]",
topic: "gemini flash API streaming",
tokens: 10000
})Expected Learnings:
- Gemini Flash configuration
- Cost optimization
- Streaming responses
- Function calling
Context7 Commands:
mcp__context7__resolve-library-id({
libraryName: "openai"
})
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID]",
topic: "chat completions streaming function calling",
tokens: 15000
})Expected Learnings:
- Chat completions API
- Streaming responses
- Function calling patterns
- Cost optimization
Create After Ingestion:
DEDALUS_INTEGRATION.md(multi-model routing)
Context7 Commands:
mcp__context7__resolve-library-id({
libraryName: "react-dropzone"
})
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID]",
topic: "drag drop file validation",
tokens: 8000
})Expected Learnings:
- Accept configuration
- File validation
- Multiple file handling
- Custom styling
Context7 Commands:
mcp__context7__resolve-library-id({
libraryName: "playwright"
})
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID]",
topic: "page object model async testing",
tokens: 10000
})Create After Ingestion:
TESTING_STRATEGY.md
Context7 Commands:
mcp__context7__resolve-library-id({
libraryName: "tailwind css"
})
mcp__context7__get-library-docs({
context7CompatibleLibraryID: "[ID]",
topic: "custom configuration dark mode",
tokens: 8000
})- Cloudflare Stream (TUS uploads, HLS streaming)
- Cloudflare R2 (object storage)
- Next.js (App Router, environment variables)
- TUS Protocol (resumable uploads)
- None currently
- Remotion (video rendering)
- Convex (backend patterns)
- HLS.js (video playback)
- Anthropic Claude SDK
- Google Generative AI
- OpenAI SDK
- React Dropzone
- Playwright
- Tailwind CSS
For each technology:
## Technology: [Name]
### Why We Need This
- [Use case 1]
- [Use case 2]
- [Use case 3]
### Current Knowledge Gaps
- [ ] Gap 1
- [ ] Gap 2
- [ ] Gap 3
### Features We'll Implement
- [ ] Feature 1
- [ ] Feature 2
- [ ] Feature 3// Resolve library ID
const result = await mcp__context7__resolve-library-id({
libraryName: "technology name"
});
// Ingest documentation with specific topics
const docs = await mcp__context7__get-library-docs({
context7CompatibleLibraryID: result.id,
topic: "specific feature or API",
tokens: 10000-15000
});## Key Learnings
### API Patterns
- [Pattern 1 with code example]
- [Pattern 2 with code example]
### Configuration Requirements
- [Requirement 1]
- [Requirement 2]
### Common Pitfalls
- [Pitfall 1 and how to avoid]
- [Pitfall 2 and how to avoid]
### Best Practices
- [Practice 1]
- [Practice 2]## Implementation Checklist
### Prerequisites
- [ ] Environment variables needed
- [ ] Dependencies installed
- [ ] Configuration files updated
### Implementation Steps
- [ ] Step 1 based on docs
- [ ] Step 2 based on docs
- [ ] Step 3 based on docs
### Testing Plan
- [ ] Happy path test
- [ ] Error case tests
- [ ] Edge case tests## [TECHNOLOGY]_IMPLEMENTATION.md
Created with:
- Architecture explanation
- Configuration guide
- Code examples from official docs
- Troubleshooting section
- Testing checklist
- References to Context7 docsBEFORE implementing ANY feature that uses one of these technologies:
- Check if we've ingested docs (see tracking above)
- If not ingested, DO IT FIRST
- Read the ingested docs completely
- Base implementation on official examples
- Document the implementation
Example: Before implementing Remotion Player:
// β DON'T start coding immediately
// β
DO ingest Remotion docs first
// Step 1: Resolve library ID
const remotionLibs = await mcp__context7__resolve-library-id({
libraryName: "remotion"
});
// Step 2: Get Player documentation
const playerDocs = await mcp__context7__get-library-docs({
context7CompatibleLibraryID: remotionLibs.id,
topic: "Player API controls events",
tokens: 15000
});
// Step 3: Read and understand
// Step 4: Implement based on examples
// Step 5: Document in REMOTION_IMPLEMENTATION.md- Library ID resolved successfully
- Documentation fetched (10k-15k tokens)
- Key patterns identified
- Configuration requirements documented
- Code examples extracted
- Implementation markdown created
- Added to DOCUMENTATION_LIBRARY.md
- Target: 15 technologies documented
- Completed: 4 (Cloudflare Stream, R2, Next.js, TUS)
- Remaining: 11
- Completion: 27%
Based on Cloudflare Stream experience:
- Don't assume - Official docs show exact patterns
- Don't guess - Configuration structure is documented
- Don't iterate - Complete understanding prevents bugs
- Don't skip - Every technology deserves Context7 ingestion
- Day 1: Remotion (Player)
- Day 2: Remotion (Lambda + Dynamic)
- Day 3: HLS.js
- Day 4: Convex (Queries/Mutations/Actions)
- Day 5: Convex (Real-time + Auth)
- Day 1: Anthropic Claude SDK
- Day 2: Google Generative AI
- Day 3: OpenAI SDK
- Day 4: Create DEDALUS_INTEGRATION.md
- Day 5: Buffer/catch-up
- Day 1: React Dropzone
- Day 2: Playwright
- Day 3: Tailwind CSS
- Day 4: Create TESTING_STRATEGY.md
- Day 5: Final documentation review
DOCUMENTATION_LIBRARY.md- List of all available documentationDEVELOPMENT_WORKFLOW.md- How to use documentation in developmentCLAUDE.md- Standing orders including documentation-first approachCLOUDFLARE_STREAM_IMPLEMENTATION.md- Example of post-ingestion documentation
Remember: Every hour spent reading documentation saves 10 hours of debugging.