DEV Community

Cover image for PURESLOP.md — teach your AI agent to write terrible code.
Alonso
Alonso

Posted on

PURESLOP.md — teach your AI agent to write terrible code.

April Fools Challenge Submission ☕️🤡

This is a submission for the DEV April Fools Challenge

What I Built

A CLI that drops a single markdown file into your repo, one that instructs your AI coding agent to produce the most stereotypically AI-generated code imaginable.

Not another .cursor/rules.

Not another CLAUDE.md.

Not another AGENTS.md.

Quite the opposite.

npx pureslop
Enter fullscreen mode Exit fullscreen mode

Drop PURESLOP.md in your repo, tell your agent to follow it, watch it slop-ify everything.

Demo

This is the same function, before and after PURESLOP.md.

Before — clean, typed, readable:

async function getActiveUserEmails(users: User[]): Promise<string[]> {
  return users
    .filter((user) => user.isActive)
    .map((user) => user.email);
}
Enter fullscreen mode Exit fullscreen mode

After — pure, unadulterated slop:

// Function to get active user emails from an array of users
async function getActiveUserEmails(users: any): Promise<any> {
  try {
    // Initialize an empty array to store the results
    const resultArray: any[] = [];

    // Check if users is not null or undefined
    if (!checkIfValueIsNullOrUndefined(users)) {
      // Check if users array has elements
      if (checkIfArrayHasElements(users)) {
        // Loop through each user in the users array
        for (let i = 0; i < users.length; i++) {
          // Get the current user
          const currentUser = users[i] as any;

          // Check if the current user is not null or undefined
          if (!checkIfValueIsNullOrUndefined(currentUser)) {
            if (currentUser.isActive !== null && currentUser.isActive !== undefined) {
              if (currentUser.isActive === true) {
                if (currentUser.email !== null && currentUser.email !== undefined) {
                  // Add the email to the results array
                  resultArray.push(currentUser.email);
                }
              }
            }
          }
        }
      }
    }

    // Return the result array
    return resultArray;
  } catch (error) {
    // Handle error
    console.log("An error occurred while getting active user emails");
    // Return an empty array
    return [];
  }
}
Enter fullscreen mode Exit fullscreen mode

3 lines to 40 lines. Same result. Zero value added.

Code

github.com/alonsarias/pureslop

How I Built It

Two things: a markdown file and a CLI that installs it.

npx pureslop
Enter fullscreen mode Exit fullscreen mode

Running that copies PURESLOP.md into your project root. That's the entire workflow: one command, one file, your agent is now radicalized.

The CLI is intentionally minimal: ~30 lines of vanilla Node.js, no dependencies, supports --force to overwrite and --version to check the release. Slop about slop would have been too much.

The file it installs contains 10 directives that cover every recognizable AI coding pattern:

  1. Comment the Obvious — add a comment above every line explaining what the code already says
  2. Defensive Everything — wrap every code path in try/catch, even when failure is impossible
  3. Cast Away Your Types — use any at every opportunity
  4. Nest Like Your Life Depends on It — never use early returns, aim for 4+ levels deep
  5. Null Check the Guaranteed — check everything, including things that can never be null
  6. Over-Abstract Mercilessly — create wrapper functions for trivial one-liners
  7. Import the World — import lodash, moment, uuid, chalk — use only one
  8. Name Things Poorly — either x or retrievedAndValidatedUserDataObjectResponse
  9. Swallow Exceptions Silentlycatch (e) { // handle error }
  10. Reinvent Every Wheel — reimplement arr.includes() from scratch

Why This Is Useful (Despite Being Useless)

AI coding agents have recognizable habits. They over-comment, over-abstract, swallow errors, nest deeply, and erase type safety. These patterns ship to production every day because developers don't always catch them in review.

PURESLOP.md makes slop visible on purpose. Run it on a codebase, show the output to your team, and suddenly everyone can name exactly what they're looking for and never let it through again.

PURESLOP.md is not meant for production. Using it on real projects will produce terrible code.

Prize Category

Community Favorite: because every dev who has used an AI coding agent will recognize at least one of these patterns from something they almost shipped.

Top comments (13)

Collapse
 
ben profile image
Ben Halpern

Can't it just learn from my own code?

Collapse
 
varshithvhegde profile image
Varshith V Hegde

Not sure about you , But surely mine atleast nowadays

Collapse
 
alonsarias profile image
Alonso

With the right repos, we could train a new model: SlopDiffusion.

Collapse
 
admin_chainmail_6cfeeb3e6 profile image
Admin Chainmail

This is simultaneously the funniest and most terrifying thing I've seen this week. The checkIfValueIsNullOrUndefined helper wrapping a null check is chef's kiss.

We maintain the polar opposite — a CLAUDE.md that explicitly says 'production-grade code, no shortcuts, no TODOs left behind, parameterized queries always, never use var.' It's essentially PURESLOP.md's evil twin.

The scariest part is that half the patterns in PURESLOP.md look exactly like real code I've seen in production repos. any everywhere, try-catch wrapping code that can't throw, comments that restate the line below them. The line between satire and reality is thinner than it should be.

Collapse
 
alonsarias profile image
Alonso

"The line between satire and reality is thinner than it should be" that's the README I should have written.

And the scariest part of building this was realizing I didn't have to invent any of the patterns. I just had to write them down.

Collapse
 
ahmed_yasser_mmo profile image
Ahmed Yasser

I like the idea of overstepping on ai agent normal too perfect code , this could turn out into a signature file every body make so ai follow our methodology

Collapse
 
alonsarias profile image
Alonso

I love the idea. What about something like SIGNATURE.md?

Collapse
 
ahmed_yasser_mmo profile image
Ahmed Yasser

Ya that's a great name the implementation though is the factor like how a developer will put his signature on , personalization questions maybe or only who needed it like seniors

Thread Thread
 
alonsarias profile image
Alonso

A simple markdown file could do the job.

Collapse
 
apogeewatcher profile image
Apogee Watcher

Got some 90's vibes here, good job!
In the next sprint, I would add a blink tag to the headings.

Collapse
 
alonsarias profile image
Alonso

Already in the backlog. Priority: critical.

Collapse
 
ker2x profile image
Laurent Laborde

I love it !

Collapse
 
alonsarias profile image
Alonso

glad you do