Detect drift in AI agent configuration files
Project description
drift
Detect when your AI agent's configuration has drifted from reality.
The Problem
You write a CLAUDE.md with rules and constraints. Sessions pass. Things change. But the config stays the same.
- "jq is not available" — but you installed it last week
- 5 tasks are "in progress" with no commits in 10 days
- 30 memory files exist that nobody indexes
- The latest handover is a week old
Your AI agent makes decisions based on stale instructions. Nobody notices.
Install
pip install drift-ai
Quick Start
# Auto-detect CLAUDE.md, ACTIVE_PLAN.md, memory dir
drift check
# Specify files explicitly
drift check --config CLAUDE.md --plan ACTIVE_PLAN.md
# Only warnings and errors
drift check --severity warning
# Machine-readable output
drift check --json
What It Checks
| Check | What It Detects | Example |
|---|---|---|
dead-ref |
File paths in config that don't exist | IMPROVEMENT_PROTOCOL.md was moved |
stale-env |
Environment claims that are wrong | "jq is not available" but jq is installed |
stale-task |
In-progress tasks with no git activity | Task marked 🟠 for 2 weeks, zero commits |
orphan-memory |
Memory files not in any index | research.md exists but isn't in MEMORY.md |
stale-handover |
Handovers that are too old | Latest handover is 5 days ago |
config-size |
Config files that are too large | CLAUDE.md is 300 lines (costs tokens every session) |
Example Output
WARNING CLAUDE.md:49 Claims 'Homebrew' is not available but found at /usr/local/bin/brew
INFO ACTIVE_PLAN.md:31 Task 'タイトル改善' is in progress but no related git activity in 7 days
INFO soul/memory/intelligence/metrics_tracker.md File not referenced in any index
3 issues: 1 warning, 2 info
Options
drift check
--config PATH Config file (default: auto-detect CLAUDE.md)
--plan PATH Plan file (default: auto-detect ACTIVE_PLAN.md)
--memory-dir PATH Memory directory
--severity LEVEL Minimum: error, warning, info (default: info)
--json Machine-readable output
--no-color Disable colors
-q, --quiet Minimal output
Exit Codes
0— No errors1— Errors found
Born from Real Pain
This tool exists because:
- A product philosophy discussed in conversation was never recorded — discovered months later
- CLAUDE.md claimed "Homebrew is not available" for weeks after it was installed
- 30 intelligence files accumulated without being indexed, invisible to future sessions
- Tasks sat "in progress" for weeks with no one noticing
We built drift for ourselves first. Now it's yours.
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 drift_ai-0.1.0.tar.gz.
File metadata
- Download URL: drift_ai-0.1.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b227b2feb1984e6ab6181b221ad682c8a19a26efcf18c007164278cfad459fdb
|
|
| MD5 |
2af1b591fb503cb247e193c6398bf209
|
|
| BLAKE2b-256 |
3c5253098cba20ffd0a9fad676e3da7180721fbd0c49990aa8a9445172ae6a30
|
File details
Details for the file drift_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: drift_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8ea03bd36f0fd68d8142c3809988a984036939b4d1c3b57e37688cf0951d3b1
|
|
| MD5 |
4531a57c1600cd634b7e9d4e3b701024
|
|
| BLAKE2b-256 |
7401ad76cf6de41d6b823095ff3a9a8bebfe6d01d05f6f66e465e862e5609236
|