← Back to Skills
Development

Source-Driven Development

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.

When to Use

  • The user wants code that follows current best practices for a given framework
  • Building boilerplate, starter code, or patterns that will be copied
  • Implementing features where the framework's recommended approach matters
  • Any time you are about to write framework-specific code from memory

The Process

DETECT ──→ FETCH ──→ IMPLEMENT ──→ CITE
  │          │           │            │
  ▼          ▼           ▼            ▼
 What       Get the    Follow the   Show your
 stack?     relevant   documented   sources
            docs       patterns

Step 1: Detect Stack and Versions

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.

Step 2: Fetch Official Documentation

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:

  • Stack Overflow answers
  • Blog posts or tutorials
  • AI-generated documentation
  • Your own training data

Step 3: Implement Following Documented Patterns

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?

Step 4: Cite Your Sources

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:

  • Full URLs, not shortened
  • Quote relevant passages for non-obvious decisions
  • If you cannot find documentation, say so explicitly:
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.

Verification

After implementing with source-driven development:

  • Framework and library versions were identified from the dependency file
  • Official documentation was fetched for framework-specific patterns
  • All sources are official documentation
  • Code follows the patterns shown in the current version's documentation
  • Non-trivial decisions include source citations with full URLs
  • No deprecated APIs are used
  • Conflicts between docs and existing code were surfaced
  • Anything unverified is explicitly flagged