Skip to main content

AI agent conversation drift analyzer - identifies gaps between what AI agents did and what users wanted

Project description

Drift

PyPI version Python 3.10+

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

Development

./test.sh          # Run tests (90%+ coverage required)
./lint.sh          # Run linters
./lint.sh --fix    # Auto-fix formatting

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

ai_drift-0.6.0.tar.gz (97.8 kB view details)

Uploaded Source

Built Distribution

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

ai_drift-0.6.0-py3-none-any.whl (124.6 kB view details)

Uploaded Python 3

File details

Details for the file ai_drift-0.6.0.tar.gz.

File metadata

  • Download URL: ai_drift-0.6.0.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

Hashes for ai_drift-0.6.0.tar.gz
Algorithm Hash digest
SHA256 7f1433c9da952d1b315b16bcee0097595592d0b8cb30fa1eee3ee260b9b28d1e
MD5 b7839e2afc696ed62f4025f45d5db267
BLAKE2b-256 aed45d957b3a566b8d60fdc4ac0ca7f62caea1b358c6ee2ca8b27fbdc3777f3c

See more details on using hashes here.

File details

Details for the file ai_drift-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: ai_drift-0.6.0-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

Hashes for ai_drift-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc467b530c0700e75bb2d09a9273a5e1d30b52a5a7956d4ee6ad0cd72102ddca
MD5 37482cdd6196c65304effbf11c5ada94
BLAKE2b-256 6693661ef6da1372502111c620437a06c9b15f2c98b7b0d012799dbb208c1410

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