Slop Pattern Reference

February 2, 2026 ยท View on GitHub

Complete reference for patterns detected by /deslop.

TL;DR: 60+ patterns across 5 languages. HIGH certainty = safe to auto-fix. Uses regex (fast) not LLM calls.


Quick Navigation

SectionJump to
Pattern CategoriesOverview of all categories
Language-Specific PatternsJS, Python, Rust, Go, Java
Universal PatternsTODOs, placeholders, magic numbers
Secret DetectionAPI keys, tokens, credentials
Multi-Pass AnalyzersPhase 2 context-aware detection
CLI Tool IntegrationPhase 3 optional tools
Auto-Fix StrategiesWhat happens when you apply

Design principle: Detection uses pre-indexed regex for O(1) lookup. LLM context is spent on judgment calls, not pattern matching that code can do better.

Related docs:


Pattern Categories

CategoryCertaintyDescription
Console DebuggingHIGHDebug statements left in code
TODOs and FIXMEsHIGHUnfinished work markers
Empty HandlersHIGHEmpty catch blocks, callbacks
Hardcoded SecretsCRITICALAPI keys, tokens, credentials
Placeholder CodeHIGHStub implementations
Excessive DocumentationMEDIUMDoc-to-code ratio issues
VerbosityMEDIUMAI preambles, hedging
Over-EngineeringMEDIUMUnnecessary complexity
Code SmellsMEDIUM-LOWStructural issues

Language-Specific Patterns

JavaScript / TypeScript

PatternCertaintyExample
console.logHIGHconsole.log("debug")
console.debugHIGHconsole.debug(data)
console.warnMEDIUMconsole.warn("check this")
debuggerHIGHdebugger;
Empty catchHIGHcatch (e) {}
process.exitMEDIUMprocess.exit(1)
Disabled eslintHIGH// eslint-disable-next-line

Python

PatternCertaintyExample
print()HIGHprint("debug")
pprintHIGHpprint(data)
breakpoint()HIGHbreakpoint()
pdb.set_traceHIGHimport pdb; pdb.set_trace()
Empty exceptHIGHexcept: pass
Bare exceptMEDIUMexcept Exception:

Rust

PatternCertaintyExample
println!HIGHprintln!("debug: {:?}", x)
dbg!HIGHdbg!(value)
todo!()HIGHtodo!()
unimplemented!()HIGHunimplemented!()
panic!MEDIUMpanic!("not implemented")

Go

PatternCertaintyExample
fmt.PrintlnHIGHfmt.Println("debug")
log.PrintlnMEDIUMlog.Println("check")
panicMEDIUMpanic("todo")

Java

PatternCertaintyExample
System.out.printlnHIGHSystem.out.println("debug")
e.printStackTraceHIGHe.printStackTrace()
UnsupportedOperationExceptionMEDIUMthrow new UnsupportedOperationException()

Universal Patterns

These apply to all languages.

TODOs and Comments

PatternCertaintyExample
TODOHIGH// TODO: fix this
FIXMEHIGH# FIXME: broken
HACKHIGH/* HACK: workaround */
XXXHIGH// XXX: dangerous
Old TODO (>30 days)HIGH// TODO: from 6 months ago
Commented code blocksMEDIUMLarge sections of commented code

Placeholder Text

PatternCertaintyExample
Lorem ipsumHIGH"Lorem ipsum dolor sit amet"
foo/bar/bazMEDIUMconst foo = bar()
test@example.comLOWemail = "test@example.com"
123-456-7890LOWphone = "123-456-7890"

Magic Numbers

PatternCertaintyExample
Hardcoded timeoutsMEDIUMsetTimeout(fn, 3000)
Hardcoded limitsMEDIUMif (count > 100)
Hardcoded portsLOWlisten(8080)

Secret Detection Patterns

Certainty: CRITICAL

All secret patterns trigger immediate flagging.

PatternExample
JWT tokenseyJhbGciOiJIUzI1NiIs...
API keyssk-proj-abc123...
AWS credentialsAKIA...
GitHub tokensghp_..., gho_..., ghu_...
Slack tokensxoxb-..., xoxp-...
Private keys-----BEGIN RSA PRIVATE KEY-----
Generic secretspassword = "...", secret = "..."

Multi-Pass Analyzers

These run in Phase 2 (MEDIUM certainty).

Doc-to-Code Ratio

What it checks: Ratio of JSDoc/docstring lines to actual code lines.

Flags when:

  • Documentation exceeds 50% of function body
  • Comments explain obvious code
  • Comments repeat what code says

Example flagged:

/**
 * Adds two numbers together.
 * @param {number} a - The first number to add
 * @param {number} b - The second number to add
 * @returns {number} The sum of a and b
 */
function add(a, b) {
  return a + b;  // 10 lines of docs for 1 line of code
}

Verbosity Ratio

What it checks: AI-style preambles and hedging language.

Flags when:

  • Sentences start with "I'll", "Let me", "Here's"
  • Hedging: "might", "could potentially", "may or may not"
  • Buzzwords without substance

Example flagged:

// Here's a robust, scalable, enterprise-grade solution
// that leverages modern best practices to efficiently
// handle the complexities of adding two numbers.
function add(a, b) {
  return a + b;
}

Over-Engineering

What it checks: Unnecessary abstraction and complexity.

Metrics:

  • File count vs function count
  • Average exports per file
  • Directory nesting depth
  • Interface/implementation ratio

Flags when:

  • Single-function files
  • 5+ levels of directory nesting
  • More interfaces than implementations
  • Factory-of-factory patterns

Buzzword Inflation

What it checks: Quality claims without evidence.

Buzzwords tracked:

  • "enterprise-grade"
  • "production-ready"
  • "best practices"
  • "scalable"
  • "robust"
  • "efficient"
  • "optimized"
  • "state-of-the-art"

Flags when:

  • Claims appear in comments without tests to back them up
  • Marketing language in technical code

Dead Code

What it checks: Unreachable or unused code.

Detection methods:

  • Functions never called (requires full analysis)
  • Code after unconditional return
  • Else branches after return
  • Unreachable switch cases

Stub Functions

What it checks: Placeholder implementations.

Patterns:

  • return null
  • return undefined
  • return {}
  • return []
  • throw new Error("TODO")
  • throw new Error("Not implemented")
  • pass (Python)

CLI Tool Integration (Phase 3)

Optional tools that run when available.

JavaScript/TypeScript

ToolChecks
jscpdCopy-paste detection
madgeCircular dependencies
escomplexCyclomatic complexity

Python

ToolChecks
pylintStyle and error detection
radonCyclomatic complexity

Go

ToolChecks
golangci-lintMultiple linters aggregated

Rust

ToolChecks
clippyLints and suggestions

Auto-Fix Strategies

StrategyWhen AppliedWhat Happens
removeConsole logs, debug statementsLine deleted
replaceHardcoded values, magic numbersSubstituted with config
add_loggingEmpty catch blocksAdds console.error(e) or equivalent
flagNeeds human reviewMarked in report, not auto-fixed
noneInformational onlyReported, no action

Severity Levels

LevelMeaningAuto-Fix?
CRITICALSecurity issue, immediate fix requiredYes, with warning
HIGHDefinite problem, safe to fixYes
MEDIUMProbable problem, needs contextNo (flagged)
LOWPossible problem, needs judgmentNo (reported)

Configuration

Thoroughness levels control which phases run:

LevelPhase 1Phase 2Phase 3
quickYesNoNo
normalYesYesNo
deepYesYesIf tools available

Usage:

/deslop --thoroughness=deep

Pattern Lookup Performance

Patterns are pre-indexed for O(1) lookup:

// By language
getPatternsForLanguage('javascript')  // Returns JS-specific patterns

// By severity
getPatternsBySeverity('critical')  // Returns CRITICAL patterns

// By auto-fix strategy
getPatternsByAutoFix('remove')  // Returns removable patterns

// Combined criteria
getPatternsByCriteria({
  language: 'python',
  severity: 'high',
  autoFix: 'remove'
})

This avoids scanning all 60+ patterns on every check.


โ† Back to Documentation Index | Main README

Related: