Shape how AI codes
A lightweight framework for spec-driven development with Claude Code and other AI coding assistants.
AI assistants need better workflows. We're building them together.
Draft is a community-driven framework that teaches AI assistants to ask questions, create specs, and verify implementations before jumping to code.
Help us define best practices for agentic coding.
Spec-driven development workflow encoded as reusable skills:
/spec- Clarify requirements, check scope, create spec/implement- Assess blast radius, build as vertical slice/verify-spec- Verify implementation matches spec/refine- Refine existing spec at any point in time
curl -fsSL https://raw.githubusercontent.com/heiko-braun/draft/main/install.sh | bashInstalls to ~/.local/bin and configures PATH for bash and zsh.
Using Go:
go install github.com/heiko-braun/draft/cmd/draft@latestManual Download:
Download pre-built binaries from releases:
- macOS (Intel):
draft-darwin-amd64 - macOS (ARM):
draft-darwin-arm64 - Linux:
draft-linux-amd64 - Windows:
draft-windows-amd64.exe
See install.sh for the installation script source.
draft init # Claude Code & Cursor
draft init --agent claude # Claude Code only
draft init --agent cursor # Cursor only/spec Add user authentication
/implement authentication
/verify-spec authentication
/refine authentication
Review specs collaboratively with inline comments, threaded discussions, and approvals:
draft reviewOpens a browser UI with rendered documents, inline text annotation, comment threads, and publish/sync workflow — all stored on a virtual git branch (draft/reviews) with no external dependencies.
The workflows are defined in markdown files at .claude/commands/ and .cursor/skills/. Test them, shape the details, share learnings.
Specs are stored in /specs/ with this structure:
---
title: {Feature name}
description: {One-line summary}
status: proposed
author: {Name <email>}
---
# Feature: {name}
## Goal
{What this accomplishes and why}
## Acceptance Criteria
- [ ] {Testable criterion 1}
- [ ] {Testable criterion 2}
(3-5 criteria max — more suggests the scope is too large)
## Approach
{2-3 sentences on implementation strategy}
## Affected Modules
{List which modules/files change and where the boundary is}
## Test Strategy
{How criteria will be verified}
## Out of Scope
- {Explicit exclusion 1}
- {Explicit exclusion 2}After spec approval, implementation proceeds as one integrated piece — types, logic, wiring, and tests together. Each spec represents a small, complete vertical slice delivered in one pass.
Blast radius assessment: Before coding, the assistant evaluates which modules will be touched and whether the change can be contained. If the blast radius is wider than expected, you'll be asked whether to proceed or restructure.
Continuous testing: Tests are written alongside implementation, not after. The full test suite runs before marking complete.
Smart checkpoints: The assistant pauses only when needed (unexpected blast radius, design trade-offs, test failures) rather than after arbitrary phases.
.claude/ # Claude Code workflow commands (SOURCE OF TRUTH)
├── commands/
│ ├── spec.md # Specification creation
│ ├── implement.md # Implementation with checkpoints
│ └── refine.md # Refine existing specs
.cursor/ # Cursor workflow skills (SOURCE OF TRUTH)
├── skills/
│ ├── spec/SKILL.md # Specification creation
│ ├── implement/SKILL.md # Implementation with checkpoints
│ └── refine/SKILL.md # Refine existing specs
specs/ # Project specifications (SOURCE OF TRUTH)
├── TEMPLATE.md # Spec template reference
└── {feature}.md # Generated specs
cmd/draft/templates/ # Build artifacts (git-ignored, auto-synced)
├── .claude/
├── .cursor/
└── specs/
Note: The .claude/, .cursor/, and specs/ directories at the project root are the source of truth. Files in cmd/draft/templates/ are automatically synced during builds and should never be edited directly.
Creates a specification through a question-driven process.
Process:
- Asks 3-5 clarifying questions (one at a time), including modularity considerations
- Checks scope — if too large (>5 criteria, wide blast radius), suggests splitting into multiple specs
- Creates spec in
/specs/{feature}.mdwith YAML front-matter (title, description, status, author) - Presents spec for your review and confirmation
Use when:
- Features involving multiple files or architectural decisions
- User-facing changes or external integrations
- Non-trivial features that benefit from planning
Skip when:
- Simple bug fixes with obvious solutions
- Single-line changes or documentation updates
Implements a feature from an existing specification as a single vertical slice.
Process:
- Loads spec from
/specs/{feature}.md - Assesses blast radius — which modules will be touched, can the change be contained?
- Implements as one integrated piece (types, logic, wiring, tests together)
- Tests continuously during implementation
- Pauses only when needed (unexpected scope, design decisions, test failures)
- Verifies against acceptance criteria when complete
- Updates spec status from
proposedtoimplementedand marks completed criteria
Use when:
- A spec has been created and confirmed with
/spec - Resuming interrupted implementation
- User explicitly says "implement {feature}"
Updates an existing specification while preserving progress.
Process:
- Loads existing spec from
/specs/ - Asks 2-3 focused refinement questions
- Checks scope and modularity — flags if refinement expands blast radius
- Updates spec in place (preserves front-matter and completed checkboxes)
- Updates "Affected Modules" and "Test Strategy" if changes alter them
- Shows diff summary and asks for confirmation
- Documents changes with timestamp in Notes section
Use when:
- Spec needs updates based on feedback
- Requirements have changed slightly
- Implementation revealed new edge cases
Create new spec instead when:
- Scope is expanding significantly
- Core goals have completely changed
# Clone the repository
git clone https://github.com/heiko-braun/draft.git
cd draft
# Build (automatically syncs templates from .claude/)
make build
# Or build and install
make installThe build process automatically syncs templates from .claude/ and .cursor/ (source of truth) to cmd/draft/templates/ (embed location) before building the binary.
- Edit templates in:
.claude/commands/*.md,.cursor/skills/*/SKILL.md, andspecs/TEMPLATE.md - Never edit:
cmd/draft/templates/(auto-generated build artifacts) - Manual sync:
make sync-templates(automatic when runningmake buildormake install)
The draft review command sends review data (repository name, document paths, comments, and your GitHub identity) to a remote reviewd service for collaborative review storage.
Default endpoint: https://reviewd-dev.up.railway.app
On first use, draft review will prompt for your consent before transmitting any data. Your decision is stored in ~/.config/draft/consent and applies to all projects.
To change your decision later, edit the consent file directly:
# Grant consent
echo "review_data = true" > ~/.config/draft/consent
# Revoke consent
echo "review_data = false" > ~/.config/draft/consentNo consent is required when using a self-hosted reviewd instance via --server or the REVIEWD_URL environment variable.
No telemetry, analytics, or usage tracking is collected by any other draft command.
Apache 2.0