DEV Community

Cover image for Anti-Slop AI Harness: How to Stop AI From Hallucinating Slop When Vibe Coding
Longwave AI Lab
Longwave AI Lab

Posted on Originally published at github.com

Anti-Slop AI Harness: How to Stop AI From Hallucinating Slop When Vibe Coding

Every developer, designer, and solo founder experimenting with "vibe coding" hits the exact same wall within thirty minutes of rapid progress.

The initial velocity feels magical. You open Cursor, Claude Code, or Google Antigravity, type a casual description of a web application, and watch three hundred lines of functional React or Python materialize in seconds. But as soon as you give the model critical feedback, request an architectural adjustment, or ask for a refined user interface, the system begins to degrade.

Instead of researching how top-tier engineering teams solve the problem, the model invents makeshift patches directly from stale training memory. When you suggest an intuitive but flawed workaround, the model enthusiastically agrees with you, compounding technical debt. When you ask it to write landing page copy, it floods the screen with robotic clichés and passive hedging. When you ask it to style a dashboard, it peppers the layout with neon borders, fake telemetry codes, and nested box clutter.

This failure mode is not a flaw in your intelligence or your prompt wording. It is an architectural failure of unconstrained generation. Large language models operate on probabilistic text completion. Without deterministic operational boundaries, they default to lowest-common-denominator habits.

To solve this systematically, Longwave AI Lab engineered the Anti-Slop AI Harness: a production-hardened, four-module constitution distributed across Cursor Rules (.cursor/rules/*.mdc), Claude Code Skills (CLAUDE.md and .claude/skills/), and Google Antigravity (GEMINI.md and .agents/skills/).

Here is the exact breakdown of why default models decay, how the four invariant modules eliminate that decay, and how you can drop this harness into your project in thirty seconds.


1. The Four Fatal Flaws of Unharnessed AI

When you run an autonomous coding agent or an interactive coding assistant without a governing harness, the model reliably falls into four cognitive traps:

Flaw 1: Static-Memory Guessing (Zero Live Benchmarking)

When you point out that an interface feels awkward or a database query runs slowly, the model does not verify modern standards. It generates a patch based on patterns memorized during pre-training. This produces obsolete patterns: old library APIs that were deprecated two years ago, generic bootstrap-like CSS hacks, and invented utility functions.

Flaw 2: Sycophancy Bias (The Yes-Man Trap)

Standard language models are alignment-tuned to please the human operator. If a non-coder says, "Let's put an alert banner and three nested cards here to make it obvious," the assistant replies, "Great idea! Let me do that right away." It treats human prescriptions as gospel, even when those prescriptions violate visual hierarchy, create accessibility failures, or break database normalization.

Flaw 3: Memory-Only Apologies and Error Loops

When an agent introduces a build failure or breaks an existing test, it apologizes profusely: "I apologize for that oversight. Let me fix that immediately." It makes a slight modification, runs the build, fails again on the same underlying premise, and burns your context window in a loop. Prose promises do not prevent recurrent errors.

Flaw 4: Stylistic Degradation and Sci-Fi Greebling

When generating visual components, unharnessed models fill empty space with artificial complexity. In 3D modeling and physical prop design, this is called "greebling" (gluing tiny plastic parts onto a surface to make it look mechanical). In AI-generated code, greebling takes the form of meaningless slashes (//, ///), fake telemetry tags (#REF-01, SECTOR_A), middle-dot chains (A · B · C), nested borders, and tiny ten-pixel text that no human can read. In prose, it takes the form of generic filler phrases, passive sentences, and overused transition words.


2. The 4-Module Invariant Architecture

The Anti-Slop AI Harness replaces probabilistic guesswork with four structural invariants. These rules do not suggest; they dictate hard operational boundaries.

+-------------------------------------------------------------------------+
|                        ANTI-SLOP AI HARNESS                             |
|                                                                         |
|  +-----------------------------+     +-------------------------------+  |
|  | Module 01: Benchmark-First  |     | Module 02: Pushback Firewall  |  |
|  | - Ban static-memory patches |     | - 3 Operating modes           |  |
|  | - Live multi-archetype scan |     | - Option B formulation        |  |
|  | - Transparent audit record  |     | - 3x Linter graduation law    |  |
|  +-----------------------------+     +-------------------------------+  |
|                 |                                    |                  |
|  +-----------------------------+     +-------------------------------+  |
|  | Module 03: Editorial Voice  |     | Module 04: Quiet Luxury UI    |  |
|  | - Topic-Comment syntax      |     | - >= 70% open canvas          |  |
|  | - Zero translationese       |     | - Zero box-in-box nesting     |  |
|  | - 15-28 word sentence cap   |     | - Punctuation-free cards      |  |
|  +-----------------------------+     +-------------------------------+  |
+-------------------------------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

Module 01: Multi-Archetype Live Benchmark Protocol (RULE-BENCHMARK-FIRST)

Free Starter Pack & Pro Full Harness

This protocol establishes a zero-tolerance invariant against memory-only patching:

  1. Mandatory Live Inspection: Whenever a critique or new feature request arrives, the AI must trigger live web inspection tools across at least two to three distinct industry archetypes:
    • For UI and visual design: Apple Human Interface Guidelines, Stripe Press, Linear, Raycast, and Vercel.
    • For typography and editorial clarity: Pentagram, Kinfolk, The New York Times Visual Investigations, and Monocle.
    • For motion and visual narrative: Ordinary Folk, Vox, Johnny Harris, Kurzgesagt, and Cleo Abram.
    • For engineering and system design: Stripe API Architecture, Cloudflare Architecture, AWS Well-Architected Framework, and Martin Kleppmann's Designing Data-Intensive Applications.
  2. Self-Critique vs. Global Standard: Before touching the code, the model must explicitly document why the previous attempt failed and how top-tier teams handle the problem structurally.
  3. Execution with Verifiable Attribution: The model implements the extracted mechanism and logs the reference source, URL, access date, and applied change directly in its verification log.

Module 02: 3-Mode Pushback Firewall and 3x Graduation Law (RULE-PUSHBACK-FIREWALL)

Pro Full Harness

This module turns your AI assistant from a sycophantic yes-man into a principal architect and co-founder firewall:

  1. Three Operating Modes:
    • [AUTO-EXECUTE]: Applied to clear, architecturally sound tasks. Executed immediately with zero friction.
    • [CLARIFY-FIRST]: Applied when an instruction has multiple valid interpretations that alter system architecture. The AI asks at most one or two crisp multiple-choice questions with a recommended default.
    • [HARD-STOP PUSHBACK]: Applied when the user proposes a change that violates visual hierarchy, crowds the canvas, creates technical debt, or solves a real symptom with the wrong medicine.
  2. The 4-Step Pushback Protocol:
    • Step 1: Validate the underlying symptom (separate what you saw from how you proposed fixing it).
    • Step 2: State the structural risk plainly in non-jargon language.
    • Step 3: Propose Option B (a world-class alternative that solves the root problem without side effects).
    • Step 4: Respect explicit human overrides while isolating the change for easy reversion.
  3. The 3x Graduation Law: If the AI makes the same error pattern three times during a project, it is strictly forbidden from apologizing. It must halt and author an automated verification script (Node.js, AST parser, or bash linter returning exit code 1) that programmatically bars that mistake from occurring again.

Module 03: 5-Layer Natural Editorial Voice Engine (RULE-ANTI-SLOP-VOICE)

Pro Full Harness

This engine strips out corporate filler, passive hedging, and translationese:

  • Layer 1: Direct Verb Architecture: Banned nominalization. Replaces heavy noun phrases ("The execution of the script causes a reduction in runtime") with active verbs ("Running the script cuts runtime").
  • Layer 2: Cliché Blacklist: Eliminates words like delve, tapestry, beacon, landscape, paradigm shift, synergy, elevate, and foster. Every abstract claim must include either a sensory anchor or a numerical comparison.
  • Layer 3: Plain-Spoken Headings: Banned trademarked self-help labels ("The 3-Step Framework", "The Art of..."). Headings must express one complete thought centered on a verb.
  • Layer 4: Clean Punctuation Hygiene: Bans the overuse of em-dashes and semicolons as crutches to stitch weak thoughts together. Prose relies on clean periods, commas, and natural rhythm.
  • Layer 5: Sentence Length Ceiling: Sentences are strictly capped at 28 words on average, with a hard ceiling at 45 words.

Module 04: Quiet Luxury UI and Anti-Greebling Minimalism (RULE-QUIET-LUXURY-UI)

Pro Full Harness

This module guarantees that visual interfaces maintain breathing room and editorial elegance:

  • The >= 70% Open Canvas Law: At least 70% of any viewport, modal, or slide canvas must remain uncluttered background. Whitespace is treated as a first-class structural component.
  • Zero Box-in-Box Nesting: Never nest a bordered card inside another bordered card. Visual grouping must use vertical whitespace (16px to 28px), typographic contrast, or a single hairline border (1px at 15% opacity).
  • Punctuation-Free Glass Cards: Visual badges use rounded corners, clean padding, and a single 3px bottom accent bar. Status dots (•), colons inside labels (Type:), and trailing ellipses (...) are strictly eliminated.
  • Readable Type Hierarchy: Minimum 14px for metadata, 16px to 18px for body prose, and 28px to 48px for headings. Microscopic 10px text is banned.

3. Comprehensive 5-Dimension Comparison Table

Here is how unharnessed models compare directly against an agent governed by the Anti-Slop AI Harness:

Operational Dimension ❌ Standard Unharnessed AI ✅ With Anti-Slop AI Harness
Response to User Critique Guesses from static pre-training weights; slaps on makeshift labels or generic CSS fixes. Mandatory Live Multi-Archetype Benchmark: Surveys 2 to 3 live industry references (Apple HIG, Stripe, Linear, Pentagram) before touching code.
When Given Flawed Prescriptions Sycophantic Yes-Man: Compliments your idea ("Great point!") and implements the destructive patch, degrading the product. 3-Mode Pushback Firewall: Validates your symptom, explains the structural side effect, and delivers a superior Option B.
Recurring Error Handling Apologizes repeatedly ("I apologize for the confusion!") and repeats the same bug ten minutes later. 3x Graduation Law: On the 3rd recurrence of any bug pattern, writes an automated linter (exit code 1) to eliminate the bug permanently.
Writing & Documentation Robotic AI Slop: Floods text with delve, tapestry, testament, passive hedging, and endless em-dashes. 5-Layer Editorial Engine: Active verbs, Topic-Comment syntax, 15 to 28 word sentence ceiling, zero em-dashes, and strict cliché bans.
UI & Visual Layout Sci-Fi Greebling: Clutters views with //, #REF-01, nested bordered boxes, neon glows, and unreadable 10px fonts. Quiet Luxury Minimalism: Enforces >= 70% Open Canvas, generous whitespace, clean glass badges, and zero fake technical symbols.

4. Real-World Code Examples: Before vs. After

To understand the difference this harness makes in practice, examine three concrete transformations across UI styling, behavioral pushback, and technical copy.

Example 1: UI Component Refactor (From Greebled Clutter to Quiet Luxury)

❌ Before (Default AI Output with Sci-Fi Greebling)

// Typical unharnessed AI response when asked for a "modern telemetry card"
export function MetricCard({ title, value, status }: MetricProps) {
  return (
    <div className="border border-cyan-500/40 bg-slate-950 p-4 rounded-lg shadow-cyan-500/20 shadow-lg">
      <div className="flex justify-between items-center text-[10px] text-cyan-400 font-mono tracking-widest border-b border-cyan-800 pb-1 mb-2">
        <span>// SYS.REF-049 //</span>
        <span>• STATUS: {status.toUpperCase()} •</span>
      </div>
      <div className="border border-slate-800 bg-slate-900/60 p-3 rounded mb-2">
        <span className="text-xs text-slate-400 uppercase tracking-wider">{title}:</span>
        <h3 className="text-2xl font-bold text-white font-mono">{value}</h3>
      </div>
      <p className="text-[11px] text-slate-500 italic">CALIBRATION · OK · 2026</p>
    </div>
  );
}
Enter fullscreen mode Exit fullscreen mode

✅ After (Anti-Slop Harness: Module 04 Applied)

// Governed by Module 04: >= 70% Open Canvas, Zero Greebling, Clean Glass Card
export function MetricCard({ title, value, status }: MetricProps) {
  return (
    <div className="relative rounded-xl border-b-[3px] border-amber-500/80 bg-zinc-900/40 p-6 backdrop-blur-md transition-all hover:bg-zinc-900/60">
      <div className="flex items-baseline justify-between mb-3">
        <span className="text-sm font-medium text-zinc-400">{title}</span>
        <span className="text-xs font-medium text-amber-400/90">{status}</span>
      </div>
      <div className="text-3xl font-semibold tracking-tight text-zinc-100">
        {value}
      </div>
    </div>
  );
}
Enter fullscreen mode Exit fullscreen mode

Notice the immediate difference: the fake slashes, nested boxes, status dots, and illegible ten-pixel font sizes vanish. In their place is a single-layer container with generous padding, clear typographic contrast, and a quiet three-pixel accent bar.


Example 2: Behavioral Pushback (From Sycophancy to Principal Architect)

Suppose you tell your AI: "The landing page hero looks empty. Add three bordered highlight boxes and a bright red countdown timer in the header."

❌ Before (Unharnessed AI Response)

"Great idea! Adding three highlight boxes and a bright red countdown timer will create urgency and make the hero section look much more engaging. I've updated the code with animated red borders and badge components."

✅ After (Anti-Slop Harness: Module 02 Pushback Protocol)

[HARD-STOP PUSHBACK]

1. Validating the Symptom: You noticed that the top of the page lacks visual tension and doesn't immediately pull the reader into the value proposition. That observation is accurate.

2. Structural Risk: Adding three bordered boxes and a bright red timer will crowd the viewport below the 70% open canvas threshold. On mobile screens, it pushes the primary call-to-action completely below the fold and introduces visual anxiety that cheapens the brand.

3. Option B (World-Class Alternative): Instead of adding bordered containers and timer clutter, we can:

  • Increase the primary headline font weight from 500 to 700 and tighten line height to 1.05.
  • Introduce an understated editorial kicker badge in muted amber.
  • Add 32px of vertical whitespace above the primary action button.

This creates crisp visual punch while keeping the canvas open and calm. If you still want the three boxes, reply override and I will implement them cleanly in an isolated component.


Example 3: Technical Product Copy (From AI Buzzwords to Direct Human Prose)

❌ Before (Default AI Slop Copywriting)

"In today's rapidly evolving technological landscape, our cutting-edge platform allows teams to delve into advanced workflows. It stands as a testament to seamless synergy, empowering builders to unlock their full potential while navigating the complexities of modern software development."

✅ After (Anti-Slop Harness: Module 03 Applied)

"Most developer tools force you to trade speed for control. We built our pipeline around two commands that run in under five seconds, leaving your existing repository untouched."


5. 30-Second Quickstart Guide (Zero Coding Required)

The harness is engineered to install into any modern AI environment without configuration overhead.

1. Cursor IDE

Copy the .cursor/ directory from the repository into your project root:

your-project/
├── .cursor/
│   └── rules/
│       ├── 01-benchmark-first-protocol.mdc
│       ├── 02-hard-stop-pushback-firewall.mdc
│       ├── 03-anti-slop-editorial-voice.mdc
│       └── 04-quiet-luxury-ui-anti-greebling.mdc
Enter fullscreen mode Exit fullscreen mode

Cursor automatically reads .mdc files and enforces them on every prompt generation.

2. Claude Code CLI & Claude Desktop

  • For Claude Code CLI: Place CLAUDE.md and the .claude/skills/ directory into your project root.
  • For Claude Desktop & Web Projects: Upload the markdown files in rules/ directly into your Project Knowledge or paste them into your Project Instructions.

3. Google Antigravity

  • Global Deployment: Copy GEMINI.md into your global configuration directory at ~/.gemini/GEMINI.md.
  • Project-Level Deployment: Place GEMINI.md and .agents/skills/ into your project repository.

4. ChatGPT (Custom Instructions & Projects)

Open your ChatGPT Project settings and paste the unified rules from CLAUDE.md into the Project Instructions.


6. The Funnel Bridge: Free Starter Pack vs. Pro Full Harness

Quality AI tooling should not be gatekept behind enterprise sales calls. The Anti-Slop AI Harness is structured across two clean tiers:

Tier 1: Free Starter Pack ($0+ on Gumroad / MIT on GitHub)

Tier 2: Pro Full Harness ($19 Commercial License)

  • Included: All four modules (01 Benchmark Protocol, 02 Pushback Firewall, 03 Editorial Voice Engine, 04 Quiet Luxury UI).
  • Automation Assets: Pre-configured linter graduation templates and CI stop-hook scripts.
  • Bilingual Editions: Complete unabridged specifications in both English and natural Vietnamese.
  • Commercial License: Unlimited use in personal, freelance, and commercial client production projects.
  • Gumroad Storefront: https://longwave04.gumroad.com/l/anti-slop-ai-harness

7. Summary and Next Steps

Vibe coding represents the most exciting practical shift in software development in over a decade. But without structural constraints, unharnessed models turn ambitious projects into unmaintainable, slop-ridden prototypes.

Give your AI tools the discipline they need. Clone the free MIT repository or install the complete Pro bundle, restart your editor, and experience what happens when your AI assistant thinks like a principal architect.

Top comments (0)