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.
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
Install templates
One command drops the doc templates, hooks and skills into your project.
- 2
Let the AI fill them
Point Claude Code at your codebase. It fills in the templates and deletes what doesn't apply.
- 3
Work in phases
Build as usual. Hooks warn you when code gets ahead of the docs.
- 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
AutomaticA 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-enforcedA 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
Localpre-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.mdPersistent context and rules for the AI -
vision.mdWhat the system is for -
architecture.mdStructural overview -
invariants.mdConstraints that never change -
models.mdData model definitions -
contracts.mdInterface completeness -
stubs.mdStub registry -
artifacts.mdArtifact type registry -
plan-template.mdPhase tracking -
glossary.mdTerm definitions -
markdown-glossary.mdThe routing table -
adr-template.mdDecision records -
health-log.mdCodebase health log
Quick
start.
- 1
Install the templates
npx spec-driven-docs initCopies templates, hooks and skills into your project. Add
--forceto overwrite. - 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
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.