The deep dive

How antidrift gives every AI session full company context.

The mechanism, the failed alternatives, and the architecture behind auto-context.


The problem

Every AI coding tool has a context problem. Claude Code reads CLAUDE.md. Codex reads AGENTS.md. Gemini reads GEMINI.md. But none of them share context, and none of them scale past a single file in a single repo.

The result: your engineer's Claude knows the codebase but not the product. Your CEO's Claude knows the product but not the stack. New hires get no context at all. Everyone re-explains the same things, every session, every day.


What we tried first

ETH Zurich researchers found that auto-generated context files reduce task success by 2-3% and increase cost by 20%. Generic context makes AI worse, not better. We tried everything else too:

Without antidrift

  • Re-explain your company every session
  • Copy-paste from Google Docs into Claude
  • One person's Claude is smart, everyone else's is dumb
  • New hires spend a week asking "how does this work?"
  • Tribal knowledge walks out the door when someone leaves

With antidrift

  • Every session starts with full context automatically
  • Context lives in git, not docs nobody reads
  • Every teammate's AI knows the same things
  • New hires run /onboard and get walked through everything
  • Knowledge survives in the brain, not in heads

The only thing that worked: plain markdown files in a git repo, organized by department, maintained by the people who own that knowledge.


How it works

When you run antidrift init, it creates a brain - a git repo with directories for each part of your company. Each directory has a CLAUDE.md, AGENTS.md, and GEMINI.md that the corresponding AI tool reads automatically.

your-company/
product/
  CLAUDE.md · AGENTS.md · GEMINI.md
engineering/
  CLAUDE.md · AGENTS.md · GEMINI.md
marketing/
  CLAUDE.md · AGENTS.md · GEMINI.md
sales/
  CLAUDE.md · AGENTS.md · GEMINI.md

Here's what a real context file looks like:

engineering/CLAUDE.md
# Engineering

## Stack
Next.js 14, PostgreSQL, Redis, deployed on Vercel.

## Conventions
- Functions under 30 lines
- Tests required for all API routes
- Feature branches, squash merge to main

## Current sprint
Migrating auth from NextAuth to Clerk.
Don't touch /lib/auth until March 15.

This is what your AI reads on every session. Not a 2,000-line dump - structured, scoped, maintained by the people who own it.

Why directories: Different people own different context. Engineering owns the stack. Marketing owns the messaging. Nobody merges conflicts on a single file. Each directory is a natural git boundary.

Why three files: Claude Code reads CLAUDE.md. Codex reads AGENTS.md. Gemini reads GEMINI.md. Antidrift's cross-compiler keeps all three in sync - edit one, run /push, and the other two update automatically.


How it stays current

The brain updates when people use it - not when someone remembers to update docs.

Already have a CLAUDE.md? Antidrift wraps around it. Already have 40 repos? The brain is a separate repo - it doesn't live inside your code. Works for teams of 2 or 60.

The brain lives in git, so you get version history, diffs, and blame for free. When someone changes the product roadmap, you can see who changed it, when, and why.


Try it

$ npx @antidrift/cli init

One command creates a brain. Your next AI session starts with full company context.