{"slug": "introducing-aislop-the-quality-gate-for-ai-written-code", "title": "Introducing aislop: The Quality Gate for AI-Written Code", "summary": "A developer has released aislop, an open-source CLI tool designed to scan AI-written code for patterns that degrade codebase health before it reaches production. The tool catches issues like `as any` casts, error-swallowing catch blocks, and duplicated helpers that AI coding agents often leave behind when optimizing for task completion over code quality. aislop sits alongside existing linters and tests as a specialized quality gate, scoring code and flagging the fingerprints of agent output that general-purpose tools miss.", "body_md": "I got tired of reviewing pull requests that looked fine until they were not.\n\nThe code compiled. The tests passed. The diff looked reasonable. Then, buried in the middle, there would be a catch block that swallowed every error, a `TODO`\n\nthat returned fake data, or another `as any`\n\ncast because the agent did not finish the type work.\n\nThat is the part people underestimate about AI-generated code. The first problem is not that it is obviously broken. The first problem is that it often looks acceptable.\n\nI built `[aislop](https://github.com/scanaislop/aislop)`\n\nfor that gap.\n\n`aislop`\n\nis an open-source CLI for scanning AI-written code before it reaches production. It looks for the patterns AI coding agents leave behind when they are optimizing for \"make the prompt work\" instead of \"keep this codebase healthy.\"\n\nRun it once:\n\n```\nnpx aislop@latest scan\n```\n\nOr install it and make it part of your local workflow:\n\n```\nnpm install --save-dev aislop\naislop scan --changes\n```\n\nIt scores the code, reports findings, and can auto-fix the mechanical issues. The more important part is the gate: it gives your team a way to catch AI slop before it becomes normal.\n\nClaude Code, Cursor, Codex, Copilot, and other coding agents are useful. This is not an argument against them. I use them because they make real engineering work faster.\n\nBut agents have a different failure profile than humans.\n\nThey write error handling that makes the function stop throwing, even when that hides the real failure. They add comments that explain the code instead of explaining a decision. They duplicate helpers because discovering the existing helper requires context. They cast through type errors because the compiler is in the way of finishing the task.\n\nNone of that means the agent is useless. It means the output needs a different quality gate.\n\nYour existing linter still matters. Tests still matter. Typechecking still matters. `aislop`\n\nsits next to those tools and asks a narrower question:\n\nDid an AI coding agent leave behind patterns that will make this code harder to maintain?\n\nCommon findings include:\n\n`as any`\n\ncastsThese are not always bugs on day one. That is why they survive review. The damage is cumulative: noisier files, weaker types, less trustworthy error handling, more duplicate logic, and slower future changes.\n\nGeneral-purpose linters were designed around human-written code. They catch formatting issues, unused variables, unsafe syntax, and many useful correctness problems. They do not fully understand the repeated fingerprints of agent output.\n\nFor example, a linter might catch this:\n\n```\ntry {\n  await sync();\n} catch {}\n```\n\nBut it probably will not catch this:\n\n```\ntry {\n  await sync();\n} catch {\n  return [];\n}\n```\n\nThe second version is what agents often write. It looks like error handling. In production, it means \"the sync failed\" and \"there were no records\" now look identical.\n\nThat is the kind of pattern `aislop`\n\nis built to flag.\n\nStart with changed files:\n\n```\naislop scan --changes\n```\n\nThen add CI:\n\n```\naislop ci --changes --base origin/main\n```\n\nIf your team uses agent hooks, install one:\n\n```\naislop hook install --claude\n```\n\nThe goal is simple: keep the speed of AI-assisted development, but stop the low-quality residue from merging unnoticed.\n\nThat is the bet behind `aislop`\n\n: AI coding agents are here to stay, so code quality tooling has to adapt.\n\nRepo: [github.com/scanaislop/aislop](https://github.com/scanaislop/aislop)\n\nSite: [scanaislop.com](https://scanaislop.com)", "url": "https://wpnews.pro/news/introducing-aislop-the-quality-gate-for-ai-written-code", "canonical_source": "https://dev.to/scanaislop/introducing-aislop-the-quality-gate-for-ai-written-code-326g", "published_at": "2026-06-06 19:58:48+00:00", "updated_at": "2026-06-06 20:11:46.985851+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "ai-safety", "ai-products", "generative-ai"], "entities": ["aislop", "Claude Code", "Cursor", "Codex", "Copilot"], "alternates": {"html": "https://wpnews.pro/news/introducing-aislop-the-quality-gate-for-ai-written-code", "markdown": "https://wpnews.pro/news/introducing-aislop-the-quality-gate-for-ai-written-code.md", "text": "https://wpnews.pro/news/introducing-aislop-the-quality-gate-for-ai-written-code.txt", "jsonld": "https://wpnews.pro/news/introducing-aislop-the-quality-gate-for-ai-written-code.jsonld"}}