aislop  by scanaislop

Scanner for AI coding agent anti-patterns

Created 3 months ago
363 stars

Top 77.4% on SourcePulse

GitHubView on GitHub
Project Summary

This project addresses the "slop" or suboptimal patterns introduced by AI coding agents, such as narrative comments, swallowed exceptions, and dead code. It provides a deterministic, sub-second scanner and auto-fix tool for developers seeking to maintain code quality, especially when integrating AI-generated code. The primary benefit is a quantifiable score and automated cleanup, ensuring code remains robust and maintainable.

How It Works

aislop employs a suite of deterministic engines (regex, AST, and standard formatters/linters like Biome, ruff, golangci-lint) across seven languages. This approach avoids runtime LLM calls, ensuring consistent, sub-second performance and predictable scoring. It identifies specific AI-generated code patterns alongside traditional code quality, linting, and security issues, assigning a 0-100 score. Mechanical fixes are automated, while complex issues are contextually passed back to AI agents.

Quick Start & Requirements

  • Primary install/run command: npx aislop scan (no installation required). Alternative installs: npm install --save-dev aislop, yarn add --dev aislop, pnpm add -D aislop, or global npm install -g aislop.
  • Prerequisites: Node.js environment for npx execution. No specific hardware or OS dependencies beyond Node.js.
  • Links: Official website: scanaislop.com. Documentation available via commands like aislop --help and specific docs linked within the README (e.g., CI/CD, Hooks).

Highlighted Details

  • Supports 7 languages: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, and Java.
  • Features 50+ rules covering AI-specific "slop," formatting, linting, code quality, and security vulnerabilities.
  • Provides sub-second, deterministic scanning with a 0-100 quality score.
  • Offers auto-fixing capabilities for mechanical issues (npx aislop fix) and integrates with AI agents for complex fixes.
  • Includes robust CI integration options (GitHub Actions, pre-commit hooks) and quality-gating features.
  • Supports editor validation via JSON Schema for configuration files.
  • Maintains a research program to define and refine rules based on public scans and benchmarks.

Maintenance & Community

The project lists contributors @heavykenny, @myke-awoniran, and @yashrajoria, with an automated system for updating contributor lists. Community interaction is facilitated through GitHub Discussions for questions and rule requests, and GitHub Issues for bug reporting.

Licensing & Compatibility

The CLI tool is MIT-licensed, allowing for broad use, modification, and distribution, including within commercial projects. No specific compatibility restrictions for commercial use or closed-source linking are noted beyond standard MIT license terms.

Limitations & Caveats

While comprehensive, aislop's core focus is identifying patterns specific to AI-generated code, though it also catches general code quality issues. Auto-fixing is limited to mechanical fixes; more complex problems require human or AI agent intervention. The effectiveness of AI-specific rules depends on the patterns generated by the agents being scanned.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
106
Issues (30d)
5
Star History
353 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.