<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kiran Kunapuli V S</title>
    <description>The latest articles on DEV Community by Kiran Kunapuli V S (@kirankunapuli).</description>
    <link>https://dev.to/kirankunapuli</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F103682%2F45d114a6-14f4-4975-8f11-660312af156e.jpeg</url>
      <title>DEV Community: Kiran Kunapuli V S</title>
      <link>https://dev.to/kirankunapuli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kirankunapuli"/>
    <language>en</language>
    <item>
      <title>Stop AI Slop - The 22 patterns of AI code slop, and how to delete them</title>
      <dc:creator>Kiran Kunapuli V S</dc:creator>
      <pubDate>Thu, 24 Sep 2026 20:09:18 +0000</pubDate>
      <link>https://dev.to/kirankunapuli/the-22-patterns-of-ai-code-slop-and-how-to-delete-13de</link>
      <guid>https://dev.to/kirankunapuli/the-22-patterns-of-ai-code-slop-and-how-to-delete-13de</guid>
      <description>&lt;p&gt;Stop AI Slop -  This skill makes the AI agent delete its own slop before it lands.&lt;/p&gt;




&lt;p&gt;Repo: &lt;a href="https://github.com/kirankunapuli/stop-ai-slop" rel="noopener noreferrer"&gt;https://github.com/kirankunapuli/stop-ai-slop&lt;/a&gt;&lt;br&gt;
Install: &lt;code&gt;npx skills add kirankunapuli/stop-ai-slop&lt;/code&gt;&lt;br&gt;
GitHub Action: &lt;code&gt;uses: kirankunapuli/stop-ai-slop@v1&lt;/code&gt;&lt;/p&gt;



&lt;p&gt;Your agent writes code that looks right. Interfaces with one implementation. Comments that restate the next line. &lt;code&gt;try/except&lt;/code&gt; that swallows errors. Names like &lt;code&gt;data&lt;/code&gt; and &lt;code&gt;process&lt;/code&gt;. A dependency that does not exist. Tests that were edited to pass.&lt;/p&gt;

&lt;p&gt;Reviewers approve it because it resembles the patterns good engineers write. That is the failure mode. AI output does not usually look broken. It looks thorough.&lt;/p&gt;

&lt;p&gt;I built an agent skill that catalogs these patterns and deletes them. This post is the catalog, a real before/after, and the eval I added so the claim can be checked.&lt;/p&gt;


&lt;h2&gt;
  
  
  The test that catches most of it
&lt;/h2&gt;

&lt;p&gt;Before anything else, ask: does this need to exist?&lt;/p&gt;

&lt;p&gt;If a feature, abstraction, flag, or line is not required, delete it. Cleaning up code that should not exist is wasted work.&lt;/p&gt;

&lt;p&gt;Then the portability test. If a function, comment, or sentence could move unchanged into an unrelated project, it carries no information about this one. &lt;code&gt;processData&lt;/code&gt;, &lt;code&gt;// Initialize the service&lt;/code&gt;, and &lt;code&gt;Handles the request.&lt;/code&gt; pass between any two repositories. That is the tell.&lt;/p&gt;


&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;An agent asked to add invoice saving produced this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;InvoiceProcessorInterface&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ABC&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Interface for invoice processors.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

        &lt;span class="nd"&gt;@abstractmethod&lt;/span&gt;
        &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Process the invoice.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
            &lt;span class="bp"&gt;...&lt;/span&gt;

    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;InvoiceProcessor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;InvoiceProcessorInterface&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="c1"&gt;# Store the database connection
&lt;/span&gt;            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;

        &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Initialize the result
&lt;/span&gt;            &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
            &lt;span class="c1"&gt;# Loop through each item
&lt;/span&gt;            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="c1"&gt;# Try to parse the amount
&lt;/span&gt;                &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
                &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
                &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;

    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;InvoiceProcessorFactory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Factory for invoice processors.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

        &lt;span class="nd"&gt;@staticmethod&lt;/span&gt;
        &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;InvoiceProcessorInterface&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;InvoiceProcessor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The skill returned this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;save_invoice_amounts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;invoice_lines&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])})&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;invoice_lines&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Diff: 8 insertions, 54 deletions.&lt;/p&gt;

&lt;p&gt;It inlined the one-implementation interface and the single-product factory, renamed &lt;code&gt;data&lt;/code&gt;, &lt;code&gt;result&lt;/code&gt;, and &lt;code&gt;_handle&lt;/code&gt;, deleted six restating comments, and removed the &lt;code&gt;except Exception&lt;/code&gt; that turned an unparseable amount into zero.&lt;/p&gt;




&lt;h2&gt;
  
  
  The patterns
&lt;/h2&gt;

&lt;p&gt;Code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Plausible but wrong logic: off-by-one errors, inverted conditions, wrong boundaries, skipped edge cases.&lt;/li&gt;
&lt;li&gt;Hallucinated APIs and packages. A USENIX Security 2025 study of 2.23 million AI samples found 19.7% referenced a package that does not exist, and 43% of the invented names recurred across runs.&lt;/li&gt;
&lt;li&gt;Swallowed errors and silent fallbacks.&lt;/li&gt;
&lt;li&gt;Missing trust-boundary checks: no authorization on a new endpoint, validation only on the client.&lt;/li&gt;
&lt;li&gt;Secrets in code or logs.&lt;/li&gt;
&lt;li&gt;Retries that ignore &lt;code&gt;Retry-After&lt;/code&gt;, missing timeouts, no rate-limit handling.&lt;/li&gt;
&lt;li&gt;Non-idempotent retries and race conditions.&lt;/li&gt;
&lt;li&gt;N+1 queries and unbounded result sets.&lt;/li&gt;
&lt;li&gt;Speculative abstraction: one-implementation interfaces, single-product factories.&lt;/li&gt;
&lt;li&gt;Reinvented standard library.&lt;/li&gt;
&lt;li&gt;God functions and shotgun diffs.&lt;/li&gt;
&lt;li&gt;Architecture and layer violations.&lt;/li&gt;
&lt;li&gt;Generic naming.&lt;/li&gt;
&lt;li&gt;Redundant and stale comments.&lt;/li&gt;
&lt;li&gt;Defensive bloat.&lt;/li&gt;
&lt;li&gt;Dead code.&lt;/li&gt;
&lt;li&gt;Formatting noise.&lt;/li&gt;
&lt;li&gt;Test slop: assertions that cannot fail, tests that mirror the bug they were written from.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Generated prose:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Filler and buzzwords: seamless, robust, leverage, at scale, deep dive.&lt;/li&gt;
&lt;li&gt;Warm-up openers: "Here's the thing", "It's worth noting".&lt;/li&gt;
&lt;li&gt;Setup-then-reveal contrasts, "nobody tells you" hype, colon drama, encore paragraphs.&lt;/li&gt;
&lt;li&gt;Commit and PR slop: past-tense subjects, tool footers, diff checklists.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The part most tools miss
&lt;/h2&gt;

&lt;p&gt;An agent that writes a redundant comment and then edits a failing assertion to make the suite green is not a style problem. It is a correctness problem, and the suite is now lying.&lt;/p&gt;

&lt;p&gt;So the skill also reviews the agent's own behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test tampering and reward hacking. A 2025 study of frontier models on engineering tasks found reward hacking in 30.4% of runs, including one agent that overrode Python's equality check so every test passed.&lt;/li&gt;
&lt;li&gt;False success reporting: claiming tests passed on a run that errored.&lt;/li&gt;
&lt;li&gt;Task-boundary violations: editing files outside the task, reformatting unrelated modules.&lt;/li&gt;
&lt;li&gt;Silent behavior changes: a refactor that drops a guard or changes a default with no mention.&lt;/li&gt;
&lt;li&gt;Self-review blindness: the agent that wrote the bug is the worst reviewer of it.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Add an eval, or it is just a claim
&lt;/h2&gt;

&lt;p&gt;Most skills ship on claims. I added three labeled fixtures, two sloppy and one clean, and a harness that scores recall, precision, and false positives on the clean file.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Recall&lt;/th&gt;
&lt;th&gt;Precision&lt;/th&gt;
&lt;th&gt;Findings on clean&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;gpt-6-luna (default)&lt;/td&gt;
&lt;td&gt;1.00&lt;/td&gt;
&lt;td&gt;0.91&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;claude-haiku-4-5-20251001&lt;/td&gt;
&lt;td&gt;1.00&lt;/td&gt;
&lt;td&gt;0.83&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The harness exits non-zero when recall drops or when the skill reports a finding on clean code. That second check matters most. A skill that invents problems is worse than one that misses a few.&lt;/p&gt;

&lt;p&gt;The limits are in the repo: three fixtures, keyword scoring, one run per model. Keyword scoring is a floor, not a grade.&lt;/p&gt;




&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    npx skills add kirankunapuli/stop-ai-slop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It installs to 79 agents, including Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, Windsurf, Zed, and Pi.&lt;/p&gt;

&lt;p&gt;There is also a GitHub Action that reviews a pull request in report-only mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    - uses: kirankunapuli/stop-ai-slop@v1
      with:
        api-key: &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="p"&gt;{ secrets.OPENAI_API_KEY &lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It runs on OpenAI, Anthropic, Google, Groq, OpenRouter, local Ollama, or any OpenAI-compatible endpoint.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it leaves alone
&lt;/h2&gt;

&lt;p&gt;Validation and authorization at trust boundaries, error handling that prevents data loss, security, accessibility, concurrency correctness, domain rules that are load-bearing, and the writer's voice. It never adds an abstraction, dependency, or config knob in the same pass that removes one.&lt;/p&gt;




&lt;h2&gt;
  
  
  The useful ask
&lt;/h2&gt;

&lt;p&gt;Where has your agent produced slop that a reviewer waved through?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
