Christoffer Johansen
CJ.OS / projects / drift

$ open drift

drift.

Semantic lint for the conventions AST linters cannot see. Rules are prose, a model scores them, and calibration against fixtures is what makes that allowed in CI.

Role
solo
Years
2026–
Status
live
Stack
typescript · vitest · openrouter · system one

Linters read syntax; conventions live one level up. A repository contains queries only. A use-case returns an error union, never throws. That sentence — the one already sitting in your AGENTS.md — is the rule. drift lints it: the rule’s prose plus a directory of fixtures, and a model answers one yes/no question per applicable file, returning the probability the file violates it. Past the rule’s floor, that is an error or a warning.

Floors are measured, never guessed

A model score is an opinion until it is calibrated. drift eval runs each rule against its own fixtures — real compliant files, real or corrupted violating ones — and sweeps candidate floors, reporting precision and recall. A rule whose error floor cannot hold 0.8 precision fails the eval, so it cannot ship. The question text is the whole prompt, so editing the question means re-running the eval: calibration is part of the edit, not a follow-up.

The two failure modes of model lint

Flakiness and silence, answered in turn. A score within ±0.1 of a floor is re-asked once and the lower sample kept, so a borderline error demotes instead of flapping CI red and green day to day. A file the judge cannot score is a reported skip — never a crash, never an exit-code hit — and a judge that answers fewer questions than asked is a loud BAD_RESPONSE. Nothing fails silently.

Cheap by design

The default judge is a System One model: typed questions, calibrated probabilities, no prose, at roughly two hundredths of a cent per file. A chat judge (any OpenAI-compatible endpoint) sits behind the same Judge seam, and because judges score differently, floors are per-judge — switching means re-running the eval, not rewriting rules. The package exports the seam, so the CLI is one consumer; semantic-lint, the rule set I run every day, is built on it.