Z Zachary Lewis
Open source · Free

An AI-updated documentation framework

A documentation framework that keeps docs in sync with code during LLM-assisted development — by treating documentation as enforceable contracts, not good intentions.

npx spec-driven-docs init

LLMs write code fast — and docs rot faster.

AI is brilliant at generating code and terrible at maintaining documentation. Docs drift within hours. By the end of a build phase, your README describes a system that no longer exists. This framework makes the system know which docs went stale when code changed — and blocks progress until they're current.

How it works

01

Install templates

One command drops all doc templates, hooks, and skills into your project.

02

Let the LLM fill them

Point Claude at your codebase; it fills the templates and deletes what doesn't apply.

03

Work in phases

Build normally. Hooks warn when code outpaces docs as you go.

04

Gates enforce sync

Phase audits and commit hooks block progress until docs are current.

The teeth

Three layers that LLMs can't ignore

Suggestions get skipped. These don't — each layer enforces sync at a different point in the loop.

Automatic

Claude Code Hook

A SessionStart hook loads the glossary routing table into Claude's context so it always knows which docs map to which code. Shipped with init — no setup.

LLM-enforced

Claude Code Skills

A phase-audit skill hard-gates marking any phase complete until docs, ADRs, and validations are current. A codebase-health skill writes structured assessments on demand.

Local

Git Hooks

pre-commit and commit-msg hooks block commits when documentation contracts aren't satisfied — the last line of defense before code lands.

What you get

A complete, opt-in documentation system. Delete what you don't need — the glossary and hooks adapt to what's present.

CLAUDE.md Persistent LLM context and rules
vision.md System intent and principles
architecture.md Structural overview
invariants.md Non-negotiable constraints
models.md Data model definitions
contracts.md Interface completeness tracking
stubs.md Stub registry
artifacts.md Artifact type registry
plan-template.md Phase tracking
glossary.md Term definitions
markdown-glossary.md The central routing table
adr-template.md Decision record template
health-log.md Codebase health log

Quick start

  1. 1

    Install the templates

    npx spec-driven-docs init

    Copies templates, hooks, and skills into your project. Use --force to overwrite.

  2. 2

    Tell the LLM about your project

    Open Claude Code in the project and prompt it to read the templates and fill out CLAUDE.md, vision.md, and the plan from what your project actually does.

  3. 3

    Work in phases

    Build normally. The hooks and skills keep docs in sync — warning on edits, auditing at phase end, and blocking commits when docs are incomplete.

Stop shipping docs that lie.

It's free and open source. Drop it into any project in one command.

← Back to all free tools