documentation-driven-development

Enforce documentation-first development with tests that fail on behavior divergence.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/mpsuesser/workspace --skill documentation-driven-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: documentation-driven-development
Source: https://github.com/mpsuesser/workspace/tree/main/dotconfig/pi/agent/skills/documentation-driven-development
Command: npx skills add https://github.com/mpsuesser/workspace --skill documentation-driven-development

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents undocumented or incorrectly documented features from quietly drifting into your product by enforcing documentation-first development, then verifying the docs via tests.

Core Features & Use Cases

  • Documentation-first feature definition: Decide and write how the feature should work from the user’s perspective before implementing it.
  • Test the documentation’s truth: Create unit tests that reflect the documented behavior so mismatches fail loudly.
  • Documentation-led changes: When modifying an existing feature, update the documentation first and then update the corresponding tests to stay aligned.
  • Use a documentation framework for clarity: Apply reference materials (e.g., Divio’s tutorial/how-to/reference/explanation structure) and writing/Markdown style guidance to keep docs consistent and discoverable.

Quick Start

Use this skill when you are about to build or change a feature and want to ensure the behavior you ship is exactly what your documentation claims.

Frequently Asked Questions about documentation-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep unit tests aligned with documentation when features change?

To keep unit tests aligned with documentation, update the documentation first to reflect the new behavior, then modify the corresponding tests. This documentation-led change process ensures tests verify the documented behavior and fail loudly when implementation diverges.

What is documentation-driven development and when should I use it?

Documentation-driven development is a practice where features are documented from the user's perspective before any code is written. Use it when building new features or modifying existing behavior to prevent undocumented or incorrectly documented capabilities from drifting into your product.

How do I write unit tests that verify documentation accuracy?

Write unit tests that directly reflect the documented behavior so mismatches fail loudly. By creating tests that guarantee documentation accuracy over time, you ensure that any divergence between the implementation and the written descriptions triggers a test failure.

Does documentation-driven development work with existing feature updates?

Yes, documentation-driven development fits workflows modifying existing behavior. When changing an existing feature, you update the documentation first and then adjust the corresponding tests, ensuring the implementation stays aligned with the updated written descriptions.

What's the best way to structure documentation for feature development?

Structure documentation using a framework like Divio's tutorial, how-to, reference, and explanation categories. Applying these reference materials alongside Markdown style guidance keeps docs consistent, clear, and discoverable for users before you start implementing the feature.

Why does undocumented behavior drift into production code?

Undocumented behavior drifts into production when features are implemented without prior written descriptions. Enforcing documentation-first development prevents this by requiring updates to documentation before code, ensuring features are only considered real when users can find and trust written descriptions.