AI SLOP Detector — VS Code Extension v3.5.0Real-time AI-generated code quality analysis inside VS Code. Surfaces deficit scores, structural anti-patterns, ML signals, clone detection, and actionable diagnostics without leaving your editor. What's New in v3.5.0Go Language Support (Phase 3c)The extension now activates on Go files (
JS/TS Full Analysis (Phase 3b)JavaScript and TypeScript files now receive full structural analysis via the dedicated JS/TS Analyzer — not just cross-language pattern matching. Domain-Aware
|
| Source label | Diagnostic type | Severity |
|---|---|---|
| SLOP Detector | Summary: score, status, LDR/ICR/DDC/Purity, ML score, Clone | Error / Warning / Info |
| SLOP Detector - Inflation | Unjustified jargon term at exact line | Warning |
| SLOP Detector - Docstring | Over-documented function (doc/impl ratio) | Error / Warning |
| SLOP Detector - Evidence | Unjustified quality claim lacking evidence | Warning |
| SLOP Detector - DDC | Unused imports summary | Info |
| SLOP Detector - Patterns | Structural anti-patterns (god_function, dead_code, phantom_import, function_clone_cluster, etc.) | Error / Warning / Info |
Pattern diagnostics use pattern_id as the diagnostic code — VS Code's
Problems panel filter works natively (e.g., filter for god_function only).
Status Bar
Right side of the status bar shows live quality at a glance:
$(check) Good (12.4) <- score below warn threshold
$(warning) Warning (34.1) <- score >= warnThreshold
$(error) Error (67.8) <- score >= failThreshold
$(sync~spin) Analyzing... <- analysis in progress
Tooltip includes:
- Deficit Score and Status
- LDR / Inflation / DDC / Purity metric values
- ML slop probability (when model is present)
- Clone Detection: PASS or CRITICAL
Workspace Analysis (QuickPick)
"Analyze Workspace" scans all supported files (Python, JS/TS, Go) and opens an interactive QuickPick:
$(error) src/slop_detector/cli.py [67.8] INFLATED_SIGNAL
$(warning) src/slop_detector/core.py [34.1] SUSPICIOUS
$(check) src/slop_detector/models.py [11.2] CLEAN
Click any entry to open the file directly in the editor.
Lint on Save / Lint on Type
- Lint on save (default: on) — triggers on every
Ctrl+S - Lint on type (default: off) — triggers with 1500ms debounce
Commands (Ctrl+Shift+P → "SLOP")
| Command | Description |
|---|---|
| SLOP Detector: Analyze Current File | Run analysis on active file |
| SLOP Detector: Analyze Workspace | Scan workspace, open QuickPick of deficit files |
| SLOP Detector: Auto-Fix Issues | Apply or preview (dry-run) auto-fixable patterns |
| SLOP Detector: Show Gate Decision (SNP) | Display SNP gate result |
| SLOP Detector: Run Cross-File Analysis | Detect cycles, duplicates, hotspots |
| SLOP Detector: Show File History | View historical score for current file |
| SLOP Detector: Show History Trends | Formatted table: Runs / Latest / Best / Worst / Trend |
| SLOP Detector: Export History to JSONL | Export full history DB to .jsonl |
| SLOP Detector: Bootstrap .slopconfig.yaml | [v3.2.1] Generate config + inject .gitignore entry |
| SLOP Detector: Run Self-Calibration | [v3.2.1] 4D LEDA calibration → optional Apply to config |
| SLOP Detector: Install Git Pre-Commit Hook | Set up pre-commit quality gate |
Installation
From Marketplace
Search "AI SLOP Detector" in the VS Code Extensions panel, or:
ext install Flamehaven.vscode-slop-detector
From VSIX (Local)
code --install-extension vscode-slop-detector-3.5.0.vsix
Requirements
- Python 3.9+
ai-slop-detectorinstalled in the Python environment VS Code uses:
pip install ai-slop-detector # core only
pip install "ai-slop-detector[ml]" # + ML secondary signal
pip install "ai-slop-detector[js]" # + JS/TS tree-sitter patterns
pip install "ai-slop-detector[go]" # + Go analysis (v3.5.0)
pip install "ai-slop-detector[full]" # everything
The extension invokes python -m slop_detector.cli <file> --json internally.
Set slopDetector.pythonPath if your Python interpreter is not on PATH.
Configuration
Open Settings (Ctrl+,) and search "SLOP Detector", or edit settings.json:
{
"slopDetector.enable": true,
"slopDetector.lintOnSave": true,
"slopDetector.lintOnType": false,
"slopDetector.showInlineWarnings": true,
"slopDetector.failThreshold": 50.0, // deficit_score >= 50 -> Error
"slopDetector.warnThreshold": 30.0, // deficit_score >= 30 -> Warning
"slopDetector.pythonPath": "python",
"slopDetector.configPath": "", // path to .slopconfig.yaml (optional)
"slopDetector.recordHistory": true, // write results to ~/.slop-detector/history.db
"slopDetector.showCalibrationHints": true // notify when LEDA calibration milestone is reached
}
Deficit Score Thresholds
| Status | deficit_score |
|---|---|
| CLEAN | < 30 |
| SUSPICIOUS | 30 – 49 |
| INFLATED_SIGNAL | 50 – 69 |
| CRITICAL_DEFICIT | >= 70 |
Recommended: warnThreshold: 30, failThreshold: 50 (defaults).
Pattern Reference (v3.5.0 — 33 patterns)
Use the pattern_id as a Problems panel filter code.
Placeholder / Stub
pass_placeholder— function body is onlypassellipsis_placeholder— function body is only...not_implemented—raise NotImplementedError(non-abstract)return_none_placeholder— function body is onlyreturn Nonereturn_constant_stub— function body isreturn <literal>todo_comment— inline# TODOfixme_comment— inline# FIXMEhack_comment— inline# HACKxxx_comment— inline# XXX
Structural
god_function— >50 logic lines or cyclomatic complexity >10dead_code— statements afterreturn/raise/break/continuedeep_nesting— control-flow depth >4empty_except— bare or typedexcept: passinterface_only_class— class with ≥50% placeholder methodsnested_complexity— deep nesting AND high cyclomatic complexity combinedplaceholder_variable_naming— numbered variable sequences (data1, data2…)
Quality
phantom_import— import that cannot be resolved (hallucinated dependency)function_clone_cluster— structurally identical function bodies (AST JSD)
Cross-Language
js_var_usage— JavaScriptvarin Python filejs_console_log—console.login Python fileruby_array_each— Ruby-style.eachblockgo_print_format— Gofmt.Printfstyle
Go (pip install "ai-slop-detector[go]")
go_empty_func— empty function body{}go_panic—panic()crash-on-error anti-patterngo_fmt_print—fmt.Print*debug output left in codego_ignored_error—_ = fn()silently discarded errorgo_todo_comment—// TODOinline markergo_god_function— function exceeding 50 lines
Lint Escape
noqa_overuse— excessive# noqasuppressiontype_ignore_overuse— excessive# type: ignore
Development
cd vscode-extension
npm install
npm run compile # one-time build
npm run watch # auto-recompile on changes
Press F5 to open Extension Development Host. The Output panel channel "SLOP Detector" logs all CLI invocations and their stdout/stderr.
Changelog
See the full CHANGELOG.
v3.5.0: Go analysis (GoAnalyzer v1.0.0 — 6 patterns), JS/TS full structural
analysis, domain-aware --init, CI jq fix (calibration hints → stderr).
v3.2.1: LEDA self-calibration UI (initConfig, selfCalibrate), Purity
dimension in diagnostics + tooltip, min_events bugfix, black/ruff CI green.
v3.1.1: Clone Detection in Core Metrics, table style unification, Workspace QuickPick, JSON parse fix, History Trends formatting, pattern refactoring.
v3.1.0: Function clone detection (AST JSD), return_constant_stub, placeholder_variable_naming, SPAR adversarial regression, GQG scoring.
v3.0.x: Self-calibration, CI gate (--ci-mode), cross-file analysis,
configurable god_function thresholds with domain overrides.
v2.9.x: Phantom import detection, history database, History Trends command.
License
MIT License — see LICENSE