Thanks for your interest in contributing to Draft! This guide will help you get started.
- Fork the repository
- Clone your fork
- Install dependencies:
make setup - Run migrations:
make db-migrate - Start the dev servers:
make run - Verify everything works: open http://localhost:5173
make setup # Install Python + Node dependencies
make db-migrate # Run database migrations
make run # Start backend (8000) + frontend (5173)See README.md for full setup details.
- Linter/Formatter: Ruff (configured in
backend/pyproject.toml) - 88-character line limit, double quotes, sorted imports, type hints required
- Run:
make lint/make format - FastAPI's
Depends()in default arguments is intentional (Ruff B008 is ignored)
- Linter: ESLint
- Formatter: Prettier
- Components in
PascalCase.tsx, hooks start withuse, utilities incamelCase.ts - Run:
make lint/make format
cd backend && source venv/bin/activate
pytest tests -v # All tests
pytest tests/test_file.py -v # Specific filecd frontend
npx playwright test # All e2e tests
npx playwright test --ui # Interactive mode- Create a feature branch from
master - Make your changes with clear, descriptive commits
- Ensure all tests pass (
pytest+playwright test) - Ensure linting passes (
make lint) - Open a PR with a clear description of what changed and why
See CLAUDE.md for a detailed architecture guide covering:
- State machine and ticket lifecycle
- Git worktree isolation
- Background job system
- AI executor system
- Planner (autopilot) logic
- Async vs Sync DB: FastAPI routes use async SQLAlchemy; background worker uses sync SQLAlchemy
- State machine: Always validate transitions via
validate_transition()before applying - Worktree safety: Never run operations on main/master branches; use
WorktreeValidator - Board scoping:
board.repo_rootis authoritative for all file paths; never trust client-provided paths
- Use GitHub Issues
- Include steps to reproduce, expected vs actual behavior
- Attach logs if relevant (
backend/logs/or browser console)
By contributing, you agree that your contributions will be licensed under the same BSL 1.1 license that covers the project.