Source-Driven Development
Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns.
Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns.
Every framework-specific code decision must be backed by official documentation. Don't implement from memory.
DETECT ──→ FETCH ──→ IMPLEMENT ──→ CITE
│ │ │ │
▼ ▼ ▼ ▼
What Get the Follow the Show your
stack? relevant documented sources
docs patterns
STACK DETECTED:
- React 19.1.0 (from package.json)
- Vite 6.2.0
- Tailwind CSS 4.0.3
→ Fetching official docs for the relevant patterns.
Source hierarchy:
| Priority | Source | Example | |----------|--------|---------| | 1 | Official documentation | react.dev, docs.djangoproject.com | | 2 | Official blog / changelog | react.dev/blog | | 3 | Web standards references | MDN, web.dev | | 4 | Browser/runtime compatibility | caniuse.com |
Not authoritative — never cite:
Write code that matches what the documentation shows.
When docs conflict with existing code:
CONFLICT DETECTED:
The existing codebase uses useState for form loading state,
but React 19 docs recommend useActionState for this pattern.
(Source: react.dev/reference/react/useActionState)
Options:
A) Use the modern pattern (useActionState)
B) Match existing code (useState)
→ Which approach do you prefer?
Every framework-specific pattern gets a citation:
// React 19 form handling with useActionState
// Source: https://react.dev/reference/react/useActionState#usage
const [state, formAction, isPending] = useActionState(submitOrder, initialState);
Citation rules:
UNVERIFIED: I could not find official documentation for this
pattern. This is based on training data and may be outdated.
Verify before using in production.
After implementing with source-driven development: