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 work order for an AI agent (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. Paste it into an agent chat. The mode follows
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 | Apply or preview the auto-fixable patterns |
| Show Gate Decision (SNP) | The quality gate result |
| Run Cross-File Analysis | Import cycles, duplicates, hotspots |
| Show File History / Show History Trends / Export History to JSONL | Scores over time |
| Bootstrap .slopconfig.yaml | Write a config for the project |
| Run Self-Calibration | Suggest weights from your history |
| Install Git Pre-Commit Hook | Run the gate before each commit |
| 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. - 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 in flat-module projects
Sibling .py files that import each other without a pyproject.toml or an
__init__.py are discovered automatically. If one is still reported, use
the Quick Fix in Problems, or add it to .slopconfig.yaml:
phantom_import_allowlist:
- my_local_module
Pattern reference
The maintained catalog is docs/PATTERNS.md; this list
is an overview. Use the pattern_id as the Problems filter.
Placeholder / stub: pass_placeholder, ellipsis_placeholder,
not_implemented, return_none_placeholder, return_constant_stub,
todo_comment, fixme_comment, hack_comment, xxx_comment
Structural: god_function (over 50 logic lines or cyclomatic complexity
over 10), dead_code, deep_nesting, empty_except, interface_only_class,
nested_complexity, placeholder_variable_naming
Quality: phantom_import (an import that cannot be resolved),
function_clone_cluster (structurally identical function bodies)
Cross-language: js_var_usage, js_console_log, ruby_array_each,
go_print_format
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
Lint escape: noqa_overuse, type_ignore_overuse
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