~ / rigs / joedeleeuw / antidrift

joedeleeuw/antidrift

Deterministic lint + policy guardrails against code and AI-agent drift: custom ESLint plugin, shareable eslint/oxlint configs, and an agent-instruction policy generator.

↗ GitHub ★ 1 no license updated 1d ago project Claude CodeCodexCursorCopilot
share on X
ARCHETYPE
Minimalist
Lean instructions, few tools, tiny context tax. Lets the model think.
CONTEXT TAX · EVERY TURN
~1.2k tokens
Featherweight · median rig: 2.3k · breakdown
GUARDRAILS
2/5
Pre-tool screening hook · No YOLO mode · details

Copy this rig

# review before running: this installs third-party code
$ npx degit joedeleeuw/antidrift/.claude ./rig-antidrift  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "node node_modules/@joedeleeuw/antidrift/src/policy/hooks/block-generated-policy-edits.mjs"
          }
        ]
      }
    ]
  }
}

Hooks (3)

eventmatcherruns
PreToolUseEdit|Write|MultiEditnode node_modules/@joedeleeuw/antidrift/src/policy/hooks/block-generated-policy-edits.mjs
PostToolUseEdit|Write|MultiEditpnpm policy:check:changed
Stop*node node_modules/@joedeleeuw/antidrift/src/policy/hooks/verify-session-stop.mjs

Cursor rules (4)

architecture · alwayspolicy-files · alwaysreact-state · alwaystype-contracts · always

Similar rigs

copied ✓