🛠️ Developer Tools

How One Developer Built a Lint-Proof AI Code Guard for 10 Production Repos

Your Claude.md file telling AI to 'never interpolate SQL' is just a suggestion. Here's how one developer turned good intentions into mechanical guarantees that actually catch mistakes.

Terminal window showing ast-grep rules catching N+1 database queries in AI-generated code

⚡ Key Takeaways

  • Documentation-based AI guidance ('always use safeParse') is non-deterministic—custom lint rules and ast-grep patterns enforce it mechanically. 𝕏
  • Most AI-generated production bugs pass TypeScript and compile cleanly; they're structural antipatterns (N+1 queries, SQL injection) that require domain-specific linting. 𝕏
  • This developer's three-layer approach (oxlint + ESLint + ast-grep) caught dozens of production-breaking issues that standard tooling missed entirely. 𝕏
Published by

Open Source Beat

Community-driven. Code-first.

Worth sharing?

Get the best Open Source stories of the week in your inbox — no noise, no spam.

Originally reported by Dev.to

Stay in the loop

The week's most important stories from Open Source Beat, delivered once a week.