<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema" -->

---
title: AI Slop in Code: How Invariant Registries Stop Bad AI Code %
description: AI-generated code often passes linting and tests while still violating team engineering standards — a phenomenon called &#x27;slop&#x27;. The solution proposed is an...
canonical: https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: AI Slop in Code: How Invariant Registries Stop Bad AI Code % | daily.dev
og:description: AI-generated code often passes linting and tests while still violating team engineering standards — a phenomenon called &#x27;slop&#x27;. The solution proposed is an...
og:url: https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema
og:image: https://api.daily.dev/og/posts/2bUE9sEMA.png
og:image:alt: AI Slop in Code: How Invariant Registries Stop Bad AI Code %
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Slop in Code: How Invariant Registries Stop Bad AI Code %

**[Aviator Blog](https://daily.dev/sources/aviator-blog)** · 9 min read · 0 upvotes · 0 comments

## Summary

AI-generated code often passes linting and tests while still violating team engineering standards — a phenomenon called 'slop'. The solution proposed is an invariant registry: a catalog of team-defined rules that automatically apply to every code change before it merges. Using Aviator Verify, teams can populate this registry by mining PR history, parsing contribution docs, or writing rules manually. A selector LLM matches relevant invariants to each change, flags violations with evidence, and prevents slop from shipping without adding review headcount. Invariants differ from acceptance criteria in that they are written once and apply universally, covering things like mandatory auth middleware, structured logging, and data access patterns.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.aviator.co/blog/how-an-anti-slop-registry-stops-ai-generated-code-from-violating-your-engineering-standards>

## Questions this post answers

### How can I stop AI coding agents from generating code that technically works but violates my team's conventions?

Check every change against a set of team-defined rules automatically before it merges, rather than relying only on linters and human review. These rules, called invariants, catch things linters miss, such as which module is allowed to write to the database, and flag them with evidence before a human even opens the diff.

_Teams standardizing AI-assisted workflows can find related engineering practices on daily.dev._

### What is the difference between acceptance criteria and invariants in code review?

Acceptance criteria describe what one specific change is supposed to do, such as an endpoint returning the right fields, and are written per change. Invariants describe what every change must abide by, such as no direct writes to the users table, and are written once and applied automatically across the whole codebase until revised.

_Developers refining review standards for AI-generated code can track these distinctions on daily.dev._

### How do you write an invariant rule that stays durable as code changes over time?

Be specific about the assertion but vague about the implementation, such as requiring all HTTP handlers to call authentication middleware rather than naming a specific file path, since the former survives renames. Make the rule verifiable in isolation, such as requiring migrations to declare a down block, and avoid writing the fix so the reviewer decides how to resolve violations.

_Anyone designing automated rules for AI-assisted codebases can follow related guidance via daily.dev._

## Similar posts on daily.dev

- [AI Code Review Best Practices](https://daily.dev/posts/ai-code-review-best-practices-ii7hbaa3j) · Aviator Blog · 15 upvotes · 1 comments
- [10 anti-AI slop moves for frontend projects going faster than humans can review—Martian Chronicles, Evil Martians’ team blog](https://daily.dev/posts/10-anti-ai-slop-moves-for-frontend-projects-going-faster-than-humans-can-review-martian-chronicles--70jbo6jvx) · Martian Chronicles · 24 upvotes · 5 comments
- [Stop AI code sprawl before it destroys your software design](https://daily.dev/posts/stop-ai-code-sprawl-before-it-destroys-your-software-design-xeau9woow) · The New Stack · 1 upvotes · 1 comments
- [The Cost of AI Slop in Lines of Code](https://daily.dev/posts/the-cost-of-ai-slop-in-lines-of-code-gvdbyaynu) · SD Times · 0 upvotes · 0 comments

---

Tags: [#ai-coding](https://daily.dev/tags/ai-coding)

[View this post on daily.dev](https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"AI Slop in Code: How Invariant Registries Stop Bad AI Code %","url":"https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema"},"datePublished":"2026-07-13T07:09:54.191Z","dateModified":"2026-09-14T07:25:39.067Z","description":"AI-generated code often passes linting and tests while still violating team engineering standards — a phenomenon called 'slop'. The solution proposed is an...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/50c06d4ce70b1a57f665f842ac19b67b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/50c06d4ce70b1a57f665f842ac19b67b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Aviator Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Aviator Blog","logo":"https://media.daily.dev/image/upload/s--PW_g-vhQ--/f_auto,q_auto/v1774960853/logos/aviator-blog?_a=BAMAMiWQ0","url":"https://daily.dev/sources/aviator-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-coding","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Aviator Blog","item":"https://daily.dev/sources/aviator-blog"},{"@type":"ListItem","position":3,"name":"AI Slop in Code: How Invariant Registries Stop Bad AI Code %"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/ai-slop-in-code-how-invariant-registries-stop-bad-ai-code--2bue9sema#faq","mainEntity":[{"@type":"Question","name":"How can I stop AI coding agents from generating code that technically works but violates my team's conventions?","acceptedAnswer":{"@type":"Answer","text":"Check every change against a set of team-defined rules automatically before it merges, rather than relying only on linters and human review. These rules, called invariants, catch things linters miss, such as which module is allowed to write to the database, and flag them with evidence before a human even opens the diff. Teams standardizing AI-assisted workflows can find related engineering practices on daily.dev."}},{"@type":"Question","name":"What is the difference between acceptance criteria and invariants in code review?","acceptedAnswer":{"@type":"Answer","text":"Acceptance criteria describe what one specific change is supposed to do, such as an endpoint returning the right fields, and are written per change. Invariants describe what every change must abide by, such as no direct writes to the users table, and are written once and applied automatically across the whole codebase until revised. Developers refining review standards for AI-generated code can track these distinctions on daily.dev."}},{"@type":"Question","name":"How do you write an invariant rule that stays durable as code changes over time?","acceptedAnswer":{"@type":"Answer","text":"Be specific about the assertion but vague about the implementation, such as requiring all HTTP handlers to call authentication middleware rather than naming a specific file path, since the former survives renames. Make the rule verifiable in isolation, such as requiring migrations to declare a down block, and avoid writing the fix so the reviewer decides how to resolve violations. Anyone designing automated rules for AI-assisted codebases can follow related guidance via daily.dev."}}]}
```

