anti-slop-py: Python Linter Blocking AI Agent Type Escapes

RepositoryTinyFrontier/anti-slop-pyTool

anti-slop-py is a zero-dependency Python linter targeting low-evidence escape hatches generated by AI coding agents. It prevents patterns like excessive Any types, cast cascades, and unexplained type: ignore comments that agents use to satisfy type checkers without defining proper contracts.

Key points

  1. Flags common AI shortcuts: Any or object parameters, cast cascades, unexplained '# type: ignore', and ad-hoc isinstance narrowings.
  2. Purely syntactic analysis using Python standard library ast and tokenize with a local scope table, requiring no external type checker.
  3. Actionable diagnostics: Every rule instructs the agent on what to write instead of just reporting an error.
  4. Python port of the Oxlint-based TypeScript plugin anti-slop by dmmulroy.
  5. Designed primarily for vendoring into project repositories, while also providing pre-commit hooks, baselines, and diff-scoped reviews.

Why it matters

AI coding agents frequently silence type checkers by exploiting type system escape hatches rather than establishing robust domain models. anti-slop-py enforces code evidence by banning these low-signal workarounds.

Analysis

The project includes 15 implemented core rules, an opt-in FastAPI ruleset, and diff-based review tooling. It requires Python 3.12+ and maintains zero external runtime dependencies. While feature-complete in its initial scope and self-linting clean, the repository is nascent (5 stars) and serves as an emerging niche tool for engineering teams managing agent-generated Python code.

Found in

Summary generated by AI (Gemini 3.8 Flash, 27 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Repository:shadcn-ui/lint

    shadcn/lint: Agent-First Linter for Tailwind Design Systems

    shadcn/lint is a linter designed for Tailwind CSS (v4) that enforces design system boundaries with error messages tailored for AI coding agents. Instead of generic type errors, it provides actionable suggestions based on components, variants, and themes.

    2.2kstarsTypeScript

    AI & LLMs· Tool

  • Repository:petergyang/no-ai-slop

    no-ai-slop: Agent Skill to Strip Formulaic AI Phrasing

    The open-source project no-ai-slop detects and removes over 20 stereotypical patterns of AI writing without flattening the author's individual voice.

    7kstarsPython

    AI & LLMs· Tool

  • Repository:github/spec-kit

    Spec Kit: Open-Source Toolkit for Spec-Driven Development with AI Agents

    GitHub's Spec Kit is an open-source framework designed for Spec-Driven Development (SDD). It helps software teams define requirements clearly before implementation, guiding AI coding agents through structured workflows.

    133.6kstarsPython

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.