Drift flags local copies, look-alikes and hardcoded tokens, in pull requests and while your agent writes code.
The detection engine is a Babel AST plus token fingerprints. It is deterministic, needs no network and no model, and gives the same answer for the same code.
A design system component imported from a local path instead of the package.
A component defined in the file under the same name as a design system export.
A component that hardcodes a design system hex token or class name.
A local component whose props overlap a design system component's API.
A local component that uses a design system's sub-components without the real parent.
Ask an agent for a button and it often hand-rolls one instead of importing yours. Drift's Claude Code hook scans every file the agent writes or edits and sends the findings back, so the agent fixes the drift in the same turn.
npx @usepolder/drift init --claudeWrites .polder.yml if it is missing, a PostToolUse hook in .claude/settings.json, and a managed section in CLAUDE.md.
One comment per pull request. It shows adoption, only the drift that PR introduced, and the commit that introduced it. Set fetch-depth: 0 on checkout so Drift can tell new drift from old.
The same comment on Azure DevOps pull requests. Run polder-drift ci as a pipeline step. There is no extension to install.
Scan your working tree, a diff against a branch, or the whole repo. Add --json for scripts and agents. Exit code 1 on drift when fail_on_drift is on.
Drift reads a .polder.yml at the repo root. Design system exports are resolved from node_modules, so run your install step first. Detection profiles for Carbon and MUI ship with Drift. For any other design system, npx @usepolder/drift profile can generate a profile from its source.
component_library: "@your-org/design-system"
allowlist: []
fail_on_drift: false
Suppress a finding by ID, a whole rule, or a path glob. Suppressed findings do not fire the Claude Code hook either.
# .polderignore
a1b2c3d4e5f6 # one finding, by ID
rule:token-fingerprint # a whole rule
path:src/legacy/** # a path glob
npx @usepolder/drift scan --allScan the whole repo. Without --all it scans your working-tree changes. Run your install step first so design system exports resolve.npx @usepolder/drift scan --diff origin/mainScan only what changed since a base branch.- uses: usepolder/drift@v1In a GitHub workflow: one pull request comment with the drift that PR introduces.Components that bypass your design system: local copies of design system components, same-name shadows, look-alikes with matching props, and hardcoded design tokens.
No. Drift runs on your machine or in your CI, with no server and no account. The engine needs no network and no LLM.
Drift reads TypeScript and JavaScript, ships with profiles for Carbon and MUI, and works with any other design system, including in-house ones, through config.
npx @usepolder/drift init --claude installs a PostToolUse hook. Every file the agent writes or edits is scanned, and the findings go back to the agent, which fixes them in the same turn.
Yes. Run polder-drift ci as a pipeline step with fetchDepth: 0. There is no extension to install.
Add its ID, a rule or a path glob to .polderignore.
Nothing. Drift is open source under Apache-2.0.
Part of Polder. See also Polder Reach. Latest release: v1.1.2, 2026-07-07.
npx @usepolder/reach --library "@acme/ds"npx @usepolder/drift scan --all