Source-driven development
When to use
- Framework-specific code (React, Next, FastAPI, sklearn, etc.)
- User wants documented, version-correct patterns
- Unsure if training-data API is current
When to relax
- Pure logic with no external API
- User explicitly wants speed over doc verification
Process
DETECT versions -> FETCH official docs -> IMPLEMENT -> CITE or FLAG unverified
- Read dependency files (
package.json,pyproject.toml, etc.) - Fetch the specific doc page for the feature (not homepages)
- Match signatures and patterns from docs
- Cite URL for non-obvious choices; flag gaps as UNVERIFIED
Source priority
- Official documentation
- Official changelog / migration guide
- Web standards (MDN, etc.)
- Not primary: blogs, Stack Overflow, training memory alone
Conflicts
If docs conflict with existing codebase, surface options—do not silently pick one.
Output
Brief citation in comments or PR for framework decisions; UNVERIFIED callouts when docs missing.