thefakezach. Work With Me →

Spec-Driven
Docs.

A documentation framework that keeps docs in sync with code while AI tools write it. When code changes, it knows which docs went stale and blocks progress until they're updated.

npx spec-driven-docs init

Open source · Free · All free tools

The
problem.

AI tools write code quickly but don't maintain the docs.

Docs drift within hours. By the end of a build phase, the README describes a system that no longer exists. This framework tracks which docs belong to which code, so stale docs get caught as they happen.

How it
works.

Four steps, in order.

  1. 1

    Install templates

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

  2. 2

    Let the AI fill them

    Point Claude Code at your codebase. It fills in the templates and deletes what doesn't apply.

  3. 3

    Work in phases

    Build as usual. Hooks warn you when code gets ahead of the docs.

  4. 4

    Gates keep them in sync

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

Three layers of
enforcement.

Each layer checks the docs at a different point in the loop.

Claude Code hook

Automatic

A SessionStart hook loads the routing table into Claude's context, so it always knows which docs map to which code. Ships with init.

Claude Code skills

AI-enforced

A phase-audit skill won't mark a phase complete until docs, ADRs and validations are current. A codebase-health skill writes assessments on demand.

Git hooks

Local

pre-commit and commit-msg hooks block a commit when documentation contracts aren't met.

What you
get.

Keep what you need and delete the rest. The routing table and hooks adapt to what's there.

  • CLAUDE.md Persistent context and rules for the AI
  • vision.md What the system is for
  • architecture.md Structural overview
  • invariants.md Constraints that never change
  • models.md Data model definitions
  • contracts.md Interface completeness
  • stubs.md Stub registry
  • artifacts.md Artifact type registry
  • plan-template.md Phase tracking
  • glossary.md Term definitions
  • markdown-glossary.md The routing table
  • adr-template.md Decision records
  • 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. Add --force to overwrite.

  2. 2

    Tell the AI about your project

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

  3. 3

    Work in phases

    Build as usual. The hooks and skills warn on edits, audit at the end of each phase, and block commits when docs are incomplete.

Got something
to build?

Work With Me → zach@takedetroit.com