Skip to content
Back to skills

Source Driven Development

ASecurity

Ground implementation decisions in official documentation, with citations. Use when building with a framework or library where correctness matters or common patterns may be outdated.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 4, 2026
documentationgoreactnextjsnodedjangodebuggingapidocumentation

Works with

  • api

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add ziazon/zizi-skills --skill source-driven-development --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Source Driven Development?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Source Driven Development
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ziazon-source-driven-development/badge)](https://www.skillsdirectory.com/skills/ziazon-source-driven-development)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: source-driven-development
category: Engineering
description: >
  Ground implementation decisions in official documentation, with citations. Use when building
  with a framework or library where correctness matters or common patterns may be outdated.
---

# Source-Driven Development

## Overview

Every framework-specific code decision must be backed by official documentation. Don't implement from memory — verify, cite, and let the user see your sources.

## 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 across a project
- The user explicitly asks for documented, verified, or "correct" implementation
- Implementing features where the framework's recommended approach matters (forms, routing, data fetching, state management, auth)
- Reviewing or improving code that uses framework-specific patterns
- Any time you are about to write framework-specific code from memory

**When NOT to use:**

- Correctness does not depend on a specific version (renaming variables, fixing typos, moving files)
- Pure logic that works the same across all versions (loops, conditionals, data structures)
- The user explicitly wants speed over verification ("just do it quickly")

## 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

Read the project's dependency file to identify exact versions. State what you found explicitly:

```
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.
```

If versions are missing or ambiguous, **ask the user**. Don't guess — the version determines which patterns are correct.

### Step 2: Fetch Official Documentation

Fetch the specific documentation page for the feature you're implementing. Not the homepage, not the full docs — the relevant page.

**Source hierarchy (in order of authority):**

| Priority | Source | Example |
|----------|--------|---------|
| 0 | The installed package itself, at the pinned version | `node_modules/three/src/…`, its `.d.ts` files, its `CHANGELOG.md`; `vendor/`, `site-packages/` |
| 1 | Official documentation | react.dev, docs.djangoproject.com, symfony.com/doc |
| 2 | Official blog / changelog | react.dev/blog, nextjs.org/blog |
| 3 | Web standards references | MDN, web.dev, html.spec.whatwg.org |
| 4 | Browser/runtime compatibility | caniuse.com, node.green |

**Be precise with what you fetch:**

```
BAD:  Fetch the React homepage
GOOD: Fetch react.dev/reference/react/useActionState

BAD:  Search "django authentication best practices"
GOOD: Fetch docs.djangoproject.com/en/6.0/topics/auth/
```

The installed package is the final word on names and signatures for the version you will ship:
docs track the latest release, and a version newer than your training is exactly where memory
fails. Read its types or source first, then the docs for how to use it.

**Keep what you verified.** When a project pins a library newer than most model training (a
game engine, a fast-moving framework), keep a short note per library in the repo's
`docs/engine-reference/<library>.md`: the pinned version, the APIs the project actually calls
with their verified signatures, a "don't use X, use Y" list for anything renamed or removed
since an older version, the sources, and a "last verified" date. Read it before the docs; update
it in the same change that bumps the pin. It is a cache of checked facts, so anything in it that
disagrees with the installed package loses.

After fetching, extract the key patterns and note any deprecation warnings or migration guidance.

When official sources conflict with each other (e.g. a migration guide contradicts the API reference), surface the discrepancy to the user and verify which pattern actually works against the detected version.

### Step 3: Implement Following Documented Patterns

Write code that matches what the documentation shows:

- Use the API signatures from the docs, not from memory
- If the docs show a new way to do something, use the new way
- If the docs deprecate a pattern, don't use the deprecated version
- If the docs don't cover something, flag it as unverified

**When docs conflict with existing project 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) — consistent with current docs
B) Match existing code (useState) — consistent with codebase
→ Which approach do you prefer?
```

Surface the conflict. Don't silently pick one — and raise it at **plan time**, in the single batched question round, not mid-implementation. A docs-vs-codebase conflict is a decision that needs the user's input, so it belongs upfront with every other open question, before execution starts (front-load-all-questions).

### Step 4: Cite Your Sources

Every framework-specific pattern gets a citation. The user must be able to verify every decision — but citations go in the **PR body / conversation, never in committed code comments.** Citations-as-comments are noise in most code, and are outright disallowed in codebases that ban code comments. Record the source where the user reviews the change, not in the source tree.

**In the PR body / conversation:**

```
I'm using useActionState instead of manual useState for the
form submission state. React 19 replaced the manual
isPending/setIsPending pattern with this hook.

Source: https://react.dev/blog/2024/12/05/react-19#actions
"useTransition now supports async functions [...] to handle
pending states automatically"
```

**Citation rules:**

- Full URLs, not shortened
- Prefer deep links with anchors where possible (e.g. `/useActionState#usage` over `/useActionState`) — anchors survive doc restructuring better than top-level pages
- Quote the relevant passage when it supports a non-obvious decision
- Include browser/runtime support data when recommending platform features
- If you cannot find documentation for a pattern, 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.
```

Honesty about what you couldn't verify is more valuable than false confidence.

## 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, not blog posts or training data
- [ ] Code follows the patterns shown in the current version's documentation
- [ ] Non-trivial decisions include source citations with full URLs (in the PR body / conversation, not committed code comments)
- [ ] No deprecated APIs are used (checked against migration guides)
- [ ] Conflicts between docs and existing code were surfaced to the user at plan time (one batched question round), not mid-implementation
- [ ] Anything that could not be verified is explicitly flagged as unverified

## Related skills

- [planning](../planning/SKILL.md): a conflict between the docs and the existing code is raised in the plan's question round.
- [debugging-and-error-recovery](../debugging-and-error-recovery/SKILL.md): the same verify-against-source rule, applied to a failure.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.