AI SLOP Detector for VS CodeFinds code that looks finished but is not: stubs, swallowed failures, inputs a function never uses, success reported without an effect. The results show up where you write code: on the line, in a hover, in Problems and in a sidebar, and you can export them as an HTML, PDF, Markdown or AI report without leaving the editor. Everything runs locally through the What you see in the editor
A file is analyzed when you open it or bring it to the front (once, until you save it again), on every save, and optionally while you type. After you edit a file (backend 3.14+): the analysis is bound to the
SHA-256 of the bytes it read. Once the file differs from them (unsaved
edits, or a change on disk), its highlights turn faint and dotted, the end
of the line says Review candidatesWith the backend 3.14 or newer, the detector also reports two kinds of review candidate:
They are review candidates, not findings: they never change the score,
they appear at the Information level and in purple, and the hover says so.
Decide whether the effect or the mechanism is expected there; if it is,
implement it or change the docstring. When a call goes to another module or
a value chosen at run time, the detector cannot decide and says nothing.
Turn them off with Reports from the extensionSLOP Detector: Export Report (also the export icon in the Issues view) writes a report of the workspace, or of the open file when no folder is open:
When it is written, an Open button opens it: HTML in a VS Code tab or your browser, Markdown with its preview, PDF in your PDF viewer.
SLOP Detector: Open Report in VS Code (the preview icon in the Issues view, or the hover link) builds the HTML report and shows it beside the editor. Copy for review (in the hover) copies that one item as the backend
writes it in the work order: the contract (hard stops, the fixes that are not
allowed, invariants), the VERIFY question of its rule, its block (location,
SHA-256 of the file, evidence, the code) and the response form. The mode
follows Fixing with an AI agent (backend 3.19)The extension does not fix code and does not run an agent. It hands a finding to the agent you use and offers the backend's fix loop to it; the backend measures before and after; you decide.
The reports need the backend 3.14 or newer; an older backend gets a message saying so. Commands (
|
| Command | What it does |
|---|---|
| Analyze Current File | Analyze the active file |
| Analyze Workspace | Analyze every supported file; pick a file to open |
| Export Report (HTML / PDF / Markdown / AI work order / AI JSON Lines) | Write a report (see above) |
| Open Report in VS Code | Show the HTML report in a tab |
| Show 4D Breakdown (why not 0.0) | Penalty attribution: why the score is not 0 |
| Show Cleanup Plan | Confidence-ranked cleanup families (dead code, duplicates, unused dependencies, ...) |
| Show Pulse Dashboard (health + hotspots) | Project health and priority hotspots |
| Show Changed-Code Review (diff-aware) | Findings in changed code only |
| Auto-Fix Detected Issues (deprecated, unverified edits) | Line edits nothing verifies (or a dry-run preview); use Fix with Agent for a checked fix |
| Show Gate Decision (SNP) | The quality gate result of the active file (PASS or HALT, with the reason) |
| Run Cross-File Analysis | Import cycles, duplicates, hotspots |
| Show File History / Show History Trends | Scores over time, as a table in the Output panel |
| Export History to JSONL | Every recorded run, one line each |
| Bootstrap .slopconfig.yaml | Write a config for the project |
| Run Self-Calibration | Suggest weights from your history |
| Install Git Pre-Commit Hook | Scan the staged .py files with --ci-mode hard before each commit; a hook another tool installed is left as is, and a hooks directory outside the workspace folder (core.hooksPath, a worktree) is used only after you confirm |
| Add Module to phantom_import_allowlist | The Quick Fix of a phantom_import finding: hides it, not a fix |
| Add File to .slopconfig.yaml Ignore | The Quick Fix that leaves a file out of every scan: hides its findings, not a fix |
| Copy Work Order Item for an AI Agent | The hover links Fix with Agent and Copy for review (see above) |
| Set Up MCP for Claude Code (.mcp.json) | Add the backend's MCP server to a folder's .mcp.json (see above) |
| Show SLOP Output Panel | The log of every backend call |
| Refresh Issues | Analyze the workspace again |
Installation
Search AI SLOP Detector in the Extensions view, or:
ext install Flamehaven.vscode-slop-detector
From a .vsix file:
code --install-extension vscode-slop-detector-<version>.vsix
Requirements
- Python 3.8+ with
ai-slop-detectorinstalled in the interpreter VS Code uses:
pip install ai-slop-detector # core
pip install "ai-slop-detector[js]" # + JS/TS tree-sitter patterns (Python 3.10+)
pip install "ai-slop-detector[go]" # tree-sitter-go (Python 3.10+); Go is read by regex either way
pip install "ai-slop-detector[rust]" # + Rust tree-sitter parsing (Python 3.10+)
pip install "ai-slop-detector[full]" # JS/TS extra + REST API dependencies (Python 3.10+)
- Set
slopDetector.pythonPathwhen that interpreter is notpythononPATH. - The MCP server for agents needs
pip install "ai-slop-detector[mcp]"(Python 3.10+) and VS Code 1.101+ (Claude Code: any version, through.mcp.json). - Review candidates, the reports, the work order and the changed-file marking need the backend 3.14 or newer; with an older backend the extension shows the pattern findings only.
- PDF reports need Chrome, Edge or Chromium installed.
The extension talks to the backend through the bundled ai-slop-detector
npm package; it does not reimplement the analysis.
Settings
Open Settings (Ctrl+,) and search SLOP Detector, or edit settings.json:
{
"slopDetector.enable": true,
"slopDetector.analyzeOnOpen": true, // analyze a file when it is opened
"slopDetector.lintOnSave": true,
"slopDetector.lintOnType": false, // 1.5 s after you stop typing
"slopDetector.highlightLines": true, // tint flagged lines, frame the cursor line
"slopDetector.showInlineWarnings": true, // the finding at the end of its line
"slopDetector.showHollowCandidates": true, // review candidates: hollow code, docstring promises (backend 3.14+)
"slopDetector.workOrderMode": "auditor", // the copied work order: "auditor" or "agent"
"slopDetector.enableCodeLens": true,
"slopDetector.failThreshold": 50.0, // score >= 50: the file summary is an Error
"slopDetector.warnThreshold": 30.0, // score >= 30: a Warning
"slopDetector.pythonPath": "python",
"slopDetector.configPath": "", // a .slopconfig.yaml (optional)
"slopDetector.recordHistory": true, // keep scores in ~/.slop-detector/history.db
"slopDetector.domain": "", // domain profile for --init
"slopDetector.phantomImportAllowlist": [] // module names phantom_import skips
}
Score bands
| Status | Score |
|---|---|
| CLEAN | < 30 |
| SUSPICIOUS | 30 - 49 |
| INFLATED_SIGNAL | 50 - 69 |
| CRITICAL_DEFICIT | >= 70 |
A band measures the score. A file can be CLEAN and still have findings; the editor shows them either way.
phantom_import and your own modules
Sibling .py files of a script outside a package, which import each other
without a pyproject.toml or an __init__.py, are found automatically.
Inside a regular package (a directory with __init__.py), import name is
an absolute import: a sibling name.py does not answer it (backend 3.18),
so write from . import name for the sibling. If a module of yours is still
reported, use the Quick Fix Allowlist '' in Problems, or add it to
.slopconfig.yaml:
phantom_import_allowlist:
- my_local_module
Pattern reference
The maintained catalog, with each rule's severity, is
docs/PATTERNS.md (57 rules). Use the pattern_id
as the Problems filter.
Placeholder / stub (Python): pass_placeholder, ellipsis_placeholder,
not_implemented, return_none_placeholder, return_constant_stub,
return_input_stub, interface_only_class, empty_except, todo_comment,
fixme_comment, hack_comment, xxx_comment
Structural and complexity (Python): bare_except, mutable_default_arg,
star_import, global_statement, ignored_parameter, failure_as_success,
god_function (over 50 logical lines or cyclomatic complexity over 10),
dead_code, deep_nesting, nested_complexity, placeholder_variable_naming,
lint_escape (# noqa, # type: ignore, # pylint: disable)
Imports (Python; backend 3.18 judges an import by the distribution that
provides it): phantom_import (no installed distribution, declaration or known
provider supplies the name; HIGH at most), undeclared_dependency,
undeclared_optional_dependency, runtime_unavailable_dependency,
declared_outside_primary_metadata, provider_conflict, phantom_member
Clones (Python): exact_duplicate_pair, function_clone_cluster
Other languages' idioms in Python: js_push, java_equals, ruby_each,
csharp_length, go_println, php_strlen
JS/TS: js_var_usage, js_console_log, js_any_type, js_empty_arrow,
js_double_equals, js_god_function, js_dead_code, js_callback_hell
Go (.go, any install): go_empty_func, go_panic, go_fmt_print,
go_ignored_error, go_todo_comment, go_god_function
Rust (.rs, any install; ai-slop-detector[rust] adds tree-sitter): rust_todo_macro,
rust_unimplemented_macro, rust_dbg_macro, rust_todo_comment
Hollow review candidates (backend 3.14+, not scored):
success_without_effect, input_never_used, effect_never_runs,
failure_reported_as_success, success_ignores_outcome,
finally_return_hides_failure, and claim_without_mechanism (a docstring
promise the body cannot keep)
Development
cd vscode-extension
npm ci
npm run check # type check
npm run bundle # out/extension.js
Package the vsix with the links of this README resolved against this folder (vsce's default base is the repository root):
BASE="$(node -p "require('./package.json').repository.url")/blob/main/$(basename "$PWD")"
npx vsce package --baseContentUrl "$BASE" --baseImagesUrl "$BASE"
Press F5 for an Extension Development Host. A development build says so
in the status bar (SLOP: Ready (dev build)) and in the SLOP Detector
output channel, which logs every backend call.
Changes
See the CHANGELOG.
License
MIT, see LICENSE

