Skip to main content

Specification-driven development toolkit with multi-language spec sync and documentation generation

Project description

spec-driver

Specification-driven development toolkit with multi-language spec sync and documentation generation.

Why?

  • Maintain verifiably accurate, evergreen specs covering your entire system
  • Use cheap, fast, deterministically generated docs to complement and audit the work of messy, stochastic agents
  • The combination of markdown and YAML is a surprisingly powerful platform for structured, legible data
  • Tooling joins related entities through a registry for fast lookup, validation, and relational data propagation
  • Stop banging rocks together

workflow diagram

Status

Alpha - Under active development. API and CLI may change.

Features

  • Multi-language spec sync: Automatically sync specifications with Go and Python codebases
  • Architecture Decision Records (ADRs): Manage and track architectural decisions
  • Delta/Change tracking: Relate specification changes, requirements, deltas, implementation plans and revisions
  • Documentation generation: Generate compact, legible markdown documentation from code (Go, Python, JavaScript/TypeScript/TSX)
  • Workspace validation: Ensure consistency across specification artifacts
  • Orphan detection: Safely remove specs for deleted source files

Installation

PyPi package

# try before you buy (no install)
uvx spec-driver --help

# Or settle in with it 
uv init
uv add speec-driver
uv run spec-driver --help

From GitHub (Development)

# Install from latest commit
uv init 
uv add git+https://github.com/davidlee/spec-driver
uv run spec-driver --help

# Or use it right off the tubes
uvx --from git+https://github.com/davidlee/spec-driver spec-driver --help

Quick Start

# Initialize workspace in your project
spec-driver install

# Sync specs with your codebase
spec-driver sync

# List all specs
spec-driver list specs

# Create a new spec
spec-driver create spec --kind tech

# Create a new delta
spec-driver create delta 

Usage

All commands are accessed through the unified spec-driver CLI.

Installation & Setup

# Initialize spec-driver workspace structure
spec-driver install

# This creates:
# - specify/ directory (for specs, ADRs)
# - change/ directory (for deltas, revisions)
# - .spec-driver/registry/ (for YAML registries)
# - Templates and configuration files

Synchronization

# Sync all specs with source code (auto-discovery)
spec-driver sync

# Sync only existing registered specs
spec-driver sync --existing

# Sync specific language
spec-driver sync --language python

# Sync specific targets
spec-driver sync go:internal/foo python:module.py

# Dry run to preview changes
spec-driver sync --dry-run

# Check if docs are up-to-date (CI-friendly)
spec-driver sync --check

# Remove specs for deleted source files
spec-driver sync --existing --prune

# Sync ADR registry
spec-driver sync --adr

Creating Artifacts

# Create a new technical spec
spec-driver create spec --kind tech

# Create a new product spec
spec-driver create spec --kind product

# Create a new delta (change proposal)
spec-driver create delta

# Create a requirement breakout
spec-driver create requirement

# Create a spec revision
spec-driver create revision

# Create an ADR
spec-driver create adr

Listing Artifacts

# List all specs
spec-driver list specs

# List specs for specific package
spec-driver list specs --package internal/foo

# List specs with package details
spec-driver list specs --packages

# List deltas
spec-driver list deltas

# List deltas by status
spec-driver list deltas --status active

# List all changes (deltas, revisions, audits)
spec-driver list changes

# List changes by kind
spec-driver list changes --kind delta

Architecture Decision Records

# Create new ADR
spec-driver create adr

# List ADRs
spec-driver adr list

# List ADRs by status
spec-driver adr list --status accepted

# Show ADR details
spec-driver adr show ADR-001

# Sync ADR registry
spec-driver sync --adr

Validation

# Validate workspace consistency
spec-driver validate

Completing Work

# Mark delta as completed
spec-driver complete delta DE-001

Project Integration

spec-driver integrates into your project using:

  1. Directory structure: specify/ and change/ directories
  2. Registry files: .spec-driver/registry/*.yaml for cross-references
  3. Templates: .spec-driver/templates/ for consistent artifact creation
  4. Agent instructions: .claude/commands for AI-assisted development

Common Workflows

Daily Development

# 1. Create a delta for your change
spec-driver create delta

# 2. Write code, update specs as needed

# 3. Sync specs with code
spec-driver sync

# 4. Validate consistency
spec-driver validate

# 5. Mark delta complete
spec-driver complete delta DE-XXX

Onboarding New Code

# Auto-discover and create specs for existing code
spec-driver sync --language python

# Review what would be created first
spec-driver sync --dry-run

Cleaning Up

# Find orphaned specs (source files deleted)
spec-driver sync --existing --prune --dry-run

# Remove them
spec-driver sync --existing --prune

Continuous Integration

# Verify specs are up-to-date
spec-driver sync --check

# Validate workspace
spec-driver validate

Development

This package is under active development and cli API stability is not even hinted at.

I'll aim not to make breaking changes to data formats, though.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spec_driver-0.2.1.tar.gz (238.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spec_driver-0.2.1-py3-none-any.whl (258.2 kB view details)

Uploaded Python 3

File details

Details for the file spec_driver-0.2.1.tar.gz.

File metadata

  • Download URL: spec_driver-0.2.1.tar.gz
  • Upload date:
  • Size: 238.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.23

File hashes

Hashes for spec_driver-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ea6a5d99fbd726b4d436bf42ab4a85c4f0979dc93ceee689ab09dad883fa3a4d
MD5 0b4a3b06d172ce5ec8da4a97d7663200
BLAKE2b-256 68c742566a0696cee702024ad45198032b92d5ed8d4239fd61afc9106682e6de

See more details on using hashes here.

File details

Details for the file spec_driver-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spec_driver-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c84983048862000ff24d14788d1e56c71ccc0ab7f017b0793f98223ba8c2263
MD5 1f5a4782f63f51741714d635e79a17c0
BLAKE2b-256 2d23211bd5b7d3e5feb8a27d1bba7ce1dfa6093d6cced33ff8541fd0cc9ba5d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page