Q6Engineering

Q6. How do you let teams vibe code without wrecking code quality?

How I roll out AI coding assistants to an engineering team: shared repo rules, tests first, security scanning in CI with tools like Vibefort, and the rule that the engineer owns every line they merge.

Rajendra Kumar · · 2 min read

Q6. How do you let teams vibe code without wrecking code quality?

AI coding tools are great for speed. But if everyone blindly accepts AI code, the codebase fills up with duplicate logic, invented dependencies and quiet security holes. My rule: AI writes the first draft, the engineer owns the PR.

Repo rules feed an AI coding assistant's draft. The engineer reviews and writes tests first, CI gates including a Vibefort security scan must pass, then a human code review where the author must explain the code, then merge.
Architecture · AI speeds up the draft. Rules, tests and gates decide what merges.

What I put in place

  • Shared rule files in the repo (CLAUDE.md, .cursorrules and similar), so the assistant follows our folder structure, naming, approved libraries and patterns instead of inventing new ones.
  • Tests first. Engineers write or at least review the tests (Vitest, Pytest) before accepting generated code. Edge cases are where AI code breaks.
  • Automated gates in CI. Static analysis, dependency audit, secret scanning. Nothing gets to human review until these pass.
  • Small PRs. A 2,000-line AI-generated PR can't be reviewed properly, so it isn't accepted.
  • Explain it or it doesn't merge. In review, if the author can't explain how a block works, it goes back.

Why I built Vibefort

I kept seeing the same problems in AI-built apps: API keys in browser code, database tables without row-level security, committed .env files, no tests and no CI. So I built Vibefort, a CLI that scans a repo for exactly these (npx vibefort scan ./my-app). It's the kind of check I want running on every AI-assisted PR.

Key takeaways

  1. 01Give the AI your rules, in the repo.
  2. 02CI gates before human review, every time.
  3. 03The person who merges it owns it.
Vibe codingAI coding assistantsCode reviewCI/CDVibefortInterview prep