{% extends "main.html" %} {% block tabs %} {{ super() }}
Agent-Native · Built for Vibe-Coding
The coherence layer for AI-assisted Python development

# AI generates code fast.
Drift catches what it breaks.

AI code generation creates structural drift — identical helpers across files, broken layer boundaries, inconsistent error handling. Drift detects it deterministically. No LLM — AST analysis and git history.

Human dev
$ pip install drift-analyzer
Agent setup (MCP)
$ pip install drift-analyzer[mcp]
Zero-install
$ uvx drift-analyzer analyze --repo .
Quick Start → Agent Integration → Evidence & Benchmarks →
97.3% precision 23 signals 15 repos benchmarked 3,200+ installs/mo
// example output

    $ drift analyze --repo .

    ───────────────────────────────────────────────────
     DRIFT SCORE  0.52  ▼ -0.031 improving
    ───────────────────────────────────────────────────

     Top Signals
      ■ PFS  0.85  Pattern Fragmentation — error handling split across 4 styles
      ■ AVS  0.72  Architecture Violation — DB imports in API layer
      ■ MDS  0.61  Mutant Duplicates — 3 near-identical parsers

     Modules
      src/api/routes      0.71  │ 12 findings
      src/services/auth   0.54  │  6 findings
      src/db/models       0.23  │  2 findings

prove it yourself

## Don't trust our benchmarks.
Run it on your code.

Enter a public GitHub repo. Analysis runs in your browser — nothing leaves this page.

Preparing…

🔒 Code is fetched via GitHub’s public API and analyzed in your browser. Nothing is sent to any server.

The finding you already knew about Every codebase has that one file everyone avoids. Check if drift found it.
The duplicate you didn't notice AI agents generate per-file solutions. Look for MDS findings — are those functions really different?
The import that shouldn't be there Layer violations feel harmless until they cascade. Check AVS findings against your intended architecture.

If drift found something you can confirm — that's the proof.
Full walkthrough →

Paste into your agent Works with Copilot, Cursor, Claude, Windsurf

    Install drift-analyzer and run `drift analyze --repo .` on this project.
    Show me the top 3 findings and explain what each one means.

Your editor, 30 seconds

### VS Code / Copilot

`drift init --mcp`
Generates `.vscode/mcp.json`. Copilot Chat discovers drift tools automatically.

### Cursor

`drift init --mcp`
Same MCP config. Cursor detects drift tools after reload.

### Claude Code

`drift init --claude`
Generates Claude Desktop config snippet. Merge into your existing config.

### Windsurf

`drift init --mcp`
Windsurf reads `.vscode/mcp.json` natively. No extra setup.

Agent-native by design

### MCP Server

`drift mcp --serve`

First-class Model Context Protocol integration. Configure once, use from any MCP-capable editor or agent.

### Session Baseline

`drift scan --max-findings 5`

Top 5 critical findings as agent context. Focused, not overwhelming — fits any context window.

### Structured Fix Plan

`drift fix-plan --repo .`

Prioritized repair tasks as structured output. Your agent can parse and execute them directly.

### Pre-Commit Gate

`drift diff --staged-only`

Checks only staged changes. Blocks structural regression before the commit lands.

GitHub Copilot Cursor Claude Code Windsurf
Deterministic — no LLM in the pipeline llms.txt supported

## AI tools ship code fast. Architecture erodes faster.

Every Copilot session, every Cursor tab-complete, every Claude fix: code gets added. But nobody checks whether the codebase still makes structural sense across files. Patterns fragment. Layers leak. Helpers multiply. Linters check style. Type checkers check types.

Drift fills that gap — deterministically, on every commit.

Why drift in an AI workflow?
MDS detects

### Your agent generates 6 identical `_run_async()` helpers in 6 files

Mutant Duplicates finds AST-level near-clones instantly. Fix-plan prioritizes consolidation into one shared utility.

AVS blocks

### Your agent bypasses layer boundaries with a direct DB import in the API

Architecture Violation Signal catches forbidden imports. `drift diff --staged-only` blocks the commit before it lands.

Duplicate utility code from AI-generated scaffolding — the #1 pattern in AI-assisted codebases. Agents generate per-file solutions instead of refactoring. Drift surfaces them across module boundaries, with location, cause, and a concrete fix path.

What it detects
PFS
Pattern Fragmentation
Same concern solved 4 different ways — common when agents generate per-file solutions.
AVS
Architecture Violations
Layer boundaries eroded through forbidden imports.
MDS
Mutant Duplicates
AST-level near-clones that diverged across files — the #1 artifact of AI-assisted development.
EDS
Explainability Deficit
Complex logic without adequate documentation.
TVS
Temporal Volatility
Files that change together too often — coupling signal.
+18
more signals
God classes, naming drift, circular imports, boundary erosion, and more. Full signal reference →
01

### Install

`pip install drift-analyzer`
Python 3.11+. No config needed to start.

02

### Analyze

`drift analyze --repo .`
Scans AST structure + git history. Findings in seconds.

03

### Act

Each finding has a location, cause, severity, and a concrete next step. Add to CI, track over time.

Why not just a linter

### Cross-file, not single-file

Linters check files in isolation. Drift detects patterns that only emerge across module boundaries.

### Deterministic, not probabilistic

No LLM, no cloud, no randomness. Same repo, same commit — same results. Every time.

### Structural, not syntactic

AST-level analysis finds semantic near-duplicates that text-based clone detectors miss.

### Scored, not binary

Every finding has a severity score and trend. Track architecture health across commits, not just pass/fail.

### Agent-compatible output

JSON, SARIF, and MCP — structured output that coding agents can consume and act on directly.

## Run it. Judge for yourself.

One command, your repo, instant findings. No signup, no cloud, no config.

Human dev
$ pip install drift-analyzer && drift analyze --repo .
Agent setup
$ pip install drift-analyzer[mcp] && drift init --mcp
Quick Start → Agent Integration → Prove It Yourself → Example Findings → Benchmark Evidence → Case Studies →
{% endblock %} {% block content %}{% endblock %}