TDD framework for AI workflows - define agent/skill/command standards in .drift.yaml and validate project structure programmatically
Project description
Drift
Test-driven development for AI workflows - define your standards, validate your project, iterate to compliance.
What It Does
Drift validates your AI agent projects against custom rules you define. No built-in opinions - you write the rules in .drift.yaml, Drift validates against them.
Quick Example
1. Create .drift.yaml with your rules:
rule_definitions:
claude_md_exists:
description: "Project must have CLAUDE.md"
scope: project_level
phases:
- name: check_file
type: file_exists
file_path: CLAUDE.md
failure_message: "CLAUDE.md is missing"
2. Run validation:
drift
3. Fix issues, re-run until green.
That's it. Define standards → validate → fix → iterate.
Installation
uv pip install ai-drift
Common Workflow
# 1. Define your standards in .drift.yaml
# 2. Run validation
drift
# 3. Generate AI prompts to create missing files
drift draft --target-rule skill_validation > prompt.md
# 4. Fix issues manually or with AI
# 5. Re-validate until green
drift
What You Can Validate
Define rules to check:
- Required files exist (CLAUDE.md, README.md, etc.)
- Link integrity (no broken file references)
- YAML frontmatter structure
- Dependency health (no redundant transitive dependencies)
- File format compliance (regex patterns)
- Content quality (with optional LLM-based rules)
Examples: See .drift.yaml in this repo.
Documentation
- Writing Rules - Define custom validation rules
- Validators Reference - Available validation types
- Draft Command - Generate AI prompts from rules
- CLI Options - Command-line reference
Development
./test.sh # Run tests (90%+ coverage required)
./lint.sh # Run linters
./lint.sh --fix # Auto-fix formatting
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_drift-0.6.1.tar.gz.
File metadata
- Download URL: ai_drift-0.6.1.tar.gz
- Upload date:
- Size: 97.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
debdb69c26daea638aa9d1f6af5315011e2a234786e1d9049177613a7cf055dc
|
|
| MD5 |
5dede179e1b8e058863d68e0de1fcaea
|
|
| BLAKE2b-256 |
9f38d03af33267d05888bb52babe17de13927e9ae27d62f787984a292127a4ba
|
File details
Details for the file ai_drift-0.6.1-py3-none-any.whl.
File metadata
- Download URL: ai_drift-0.6.1-py3-none-any.whl
- Upload date:
- Size: 124.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5888a5383196c3aedbfed4579a0a15e760b1eef716613816b86083eb8bcfc94e
|
|
| MD5 |
10ab5f297763735ed027c81ebaeb013d
|
|
| BLAKE2b-256 |
cbfde75c301e005ba4dafe6327474609ab66215934955148c1336080c5747636
|