Skip to main content

tdd-llm

AI-Powered TDD Workflows for Claude and Gemini

Deploy structured Test-Driven Development workflows to your AI coding assistants. Guide Claude and Gemini through the RED-GREEN-REFACTOR cycle with consistent, reproducible prompts.

Features

  • Deploy .claude/ and .gemini/ configuration directories
  • Automatic conversion from Claude (.md) to Gemini (.toml) format
  • Language-specific placeholders (Python, C#, TypeScript)
  • Backend support for local files or Jira (via REST API)
  • Migrate existing projects from files to Jira
  • Global and project-level configuration (project overrides global)
  • Configurable coverage thresholds per project
  • Cross-platform (Linux, macOS, Windows)
  • Update templates from GitHub without reinstalling the package

Installation

pip install tdd-llm

Quick Start

# Initialize project config (creates .tdd-llm.yaml)
tdd-llm init --lang python --backend files

# Deploy TDD templates to current project
tdd-llm deploy

# Deploy to user-level directories
tdd-llm deploy --target user --lang csharp --backend jira

# Preview changes without writing
tdd-llm deploy --lang typescript --dry-run

# List available languages and backends
tdd-llm list

# Show configuration (merged global + project)
tdd-llm config --show

# Update templates from GitHub (without reinstalling)
tdd-llm update

Configuration

tdd-llm supports two configuration levels:

  • Global (user-level): Applies to all projects
  • Project (local): Overrides global settings for a specific project

Global Configuration

Location:

  • Linux/macOS: ~/.config/tdd-llm/config.yaml
  • Windows: %APPDATA%\tdd-llm\config.yaml
default_target: "project"  # or "user"
default_language: "python"
default_backend: "files"   # or "jira"
platforms:
  - claude
  - gemini
coverage:
  line: 80      # Line coverage threshold (%)
  branch: 70    # Branch coverage threshold (%)

Project Configuration

Create a .tdd-llm.yaml file in your project root to override global settings:

# Initialize project config with custom settings
tdd-llm init --lang typescript --coverage-line 90

# Or modify existing project config
tdd-llm config --project --set-lang csharp

Project config file: .tdd-llm.yaml

default_language: "typescript"
coverage:
  line: 90      # Override only what you need

Configuration Commands

# Show effective configuration (merged global + project)
tdd-llm config --show

# Modify global config
tdd-llm config --set-coverage-line 80

# Modify project config
tdd-llm config --project --set-lang typescript

Coverage thresholds are applied to the generated TDD templates and enforced during the review phase.

Updating Templates

Templates can be updated from GitHub without reinstalling the package:

# Update to latest templates
tdd-llm update

# Force re-download all templates
tdd-llm update --force

# Update and deploy in one command
tdd-llm deploy --update

# Force re-download and overwrite existing files
tdd-llm deploy --update --force

# Deploy using package templates (ignore cached updates)
tdd-llm deploy --no-cache

Updated templates are cached in:

  • Linux/macOS: ~/.config/tdd-llm/templates/
  • Windows: %APPDATA%\tdd-llm\templates\

Supported Languages

Language Placeholders
Python pytest, coverage, architecture/integration/perf tests
C# dotnet test, xUnit, architecture/integration/perf tests
TypeScript Jest, Vitest, architecture/integration/perf tests

Backends

Files (default)

Uses local markdown files for epic/story management:

  • docs/epics/*.md - Epic definitions with tasks
  • docs/state.json - Progress tracking
  • .tdd-state.local.json - Session state (gitignored)

Jira

Uses Jira REST API for epic/story management. Supports OAuth 2.0 (recommended) or API token authentication.

OAuth provides secure, token-based authentication with automatic refresh. Credentials are stored encrypted locally.

# Login with OAuth (interactive setup on first run)
tdd-llm jira login

# Check authentication status
tdd-llm jira status

# Logout (remove stored tokens and credentials)
tdd-llm jira logout

First-time setup:

  1. Create an OAuth app at https://developer.atlassian.com/console/myapps/
  2. Configure your app:
    • Callback URL: http://localhost:8089/callback
    • Permissions: Jira API > read:jira-work, write:jira-work, read:jira-user
  3. Run tdd-llm jira login and enter your Client ID and Client Secret when prompted
  4. Complete authorization in your browser

Credentials and tokens are encrypted and stored in:

  • Linux/macOS: ~/.config/tdd-llm/
  • Windows: %APPDATA%\tdd-llm\

API Token Authentication (Alternative)

For simpler setups or environments where OAuth isn't available:

# Set API token
export JIRA_API_TOKEN=your-api-token

Generate an API token at: https://id.atlassian.com/manage-profile/security/api-tokens

Configuration

# In config.yaml
default_backend: "jira"
jira:
  base_url: "https://company.atlassian.net"
  email: "user@company.com"
  project_key: "PROJ"

  # Optional: custom field mappings
  fields:
    acceptance_criteria: "customfield_10001"

  # Optional: status mapping (adapt to your Jira language/workflow)
  status_map:
    "To Do": "not_started"
    "In Progress": "in_progress"
    "Done": "completed"
  # French example:
  # status_map:
  #   "À faire": "not_started"
  #   "En cours": "in_progress"
  #   "Terminé": "completed"

Environment variables (override config):

  • JIRA_API_TOKEN - API token for basic auth
  • JIRA_BASE_URL - Jira instance URL
  • JIRA_EMAIL - User email
  • JIRA_PROJECT_KEY - Default project key

Backend Commands

Commands for AI assistants to interact with Jira:

# Get current workflow state
tdd-llm backend status

# Get epic with all tasks
tdd-llm backend get-epic PROJ-100

# Get task details
tdd-llm backend get-task PROJ-1234

# Get next incomplete task
tdd-llm backend next-task PROJ-100

# Update task status
tdd-llm backend update-status PROJ-1234 Done

# Set TDD phase (adds label tdd:test, tdd:dev, etc.)
tdd-llm backend set-phase PROJ-1234 test

# Set current task
tdd-llm backend set-current PROJ-100 PROJ-1234

# Add comment to task
tdd-llm backend add-comment PROJ-1234 "Task completed"

Migration: Files to Jira

Migrate existing epics and tasks from files backend to Jira:

# Preview what will be created (dry run)
tdd-llm migrate --dry-run

# Run migration
tdd-llm migrate

# Custom output path for mapping file
tdd-llm migrate --output my-mapping.json

The migration:

  1. Reads epics from docs/epics/*.md
  2. Creates epics in Jira with format E1: Epic Name
  3. Creates tasks linked to epics with format T1: Task Title
  4. Marks completed tasks as "Done" in Jira
  5. Generates docs/jira-mapping.json:
{
  "E1": "PROJ-100",
  "E1/T1": "PROJ-101",
  "E1/T2": "PROJ-102",
  "E2": "PROJ-200"
}

TDD Workflow Commands

After deployment, use these commands with Claude or Gemini:

Flow Commands

Command Phase Description
/tdd:flow:1-analyze Plan Analyze task, write specs
/tdd:flow:2-test RED Write failing tests
/tdd:flow:3-dev GREEN+REFACTOR Implement, then refactor
/tdd:flow:4-docs Document Update docs, CHANGELOG
/tdd:flow:5-review Review Code review, create PR
/tdd:flow:6-done Done Commit, update state
/tdd:flow:status - Show current progress

Init Commands

Command Description
/tdd:init:1-project Initialize project structure
/tdd:init:2-architecture Define architecture
/tdd:init:3-standards Define code standards
/tdd:init:4-readme Generate README

Development

# Clone and install in dev mode
git clone https://github.com/mxdumas/tdd-llm-workflow
cd tdd-llm-workflow
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# .venv\Scripts\activate   # Windows
pip install -e ".[dev]"
pre-commit install

# Run tests
pytest

# Run linter
ruff check src/

# Format code
ruff format src/

License

MIT

Metadata

Release files for tdd-llm 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tdd-llm 0.8.1
File Size Uploaded Provenance
tdd_llm-0.8.1.tar.gz 98.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tdd-llm 0.8.1
File Interpreter ABI Platform
tdd_llm-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 209.0 kB

Release files / tdd_llm-0.8.1.tar.gz

Download URL tdd_llm-0.8.1.tar.gz
Size 98.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f13230c7382349a6be8cd80f4e3d5aaf6e07aa72e07db7534388447f93215427
BLAKE2b-256 checksum
How to use checksums
5d69644ff8c07fc397b5ed20c03d73e39563dbd7cb83e5267a12eab907a6d802
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 24, 2026.

Transparency log

Release files / tdd_llm-0.8.1-py3-none-any.whl

Download URL tdd_llm-0.8.1-py3-none-any.whl
Size 111.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d69dca449cb7480d313f5421e2b0bcd8b546fab9aa40d86de16aa7481b08283
BLAKE2b-256 checksum
How to use checksums
1e80e3aa4f13a1d575b508a6cbcc9954eab49958a0c0c0f9bcb328b5411aa804
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 24, 2026.

Transparency log

Security for tdd-llm 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tdd_llm-0.8.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page