deep-slop 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,1170 @@
1
+ <div align="center">
2
+
3
+ # deep-slop
4
+
5
+ **Deep AI Slop Detection — 18 AST-Powered Engines, 181+ Rules**
6
+
7
+ Detect AI-generated slop, dead code, security vulnerabilities, import problems,
8
+ and architectural decay in your codebase. Tree-sitter AST analysis for 8 languages,
9
+ density-aware scoring, SARIF 2.1.0 output, MCP server, VS Code extension,
10
+ 16 AI agent providers, and multi-language linting across 14 languages.
11
+
12
+ [![CI](https://github.com/DemumuMind/deep-slopDM/actions/workflows/ci.yml/badge.svg)](https://github.com/DemumuMind/deep-slopDM/actions/workflows/ci.yml)
13
+ [![npm version](https://img.shields.io/npm/v/deep-slop.svg)](https://www.npmjs.com/package/deep-slop)
14
+ [![license](https://img.shields.io/npm/l/deep-slop.svg)](https://github.com/DemumuMind/deep-slopDM/blob/main/LICENSE)
15
+ [![node](https://img.shields.io/node/v/deep-slop.svg)](https://www.npmjs.com/package/deep-slop)
16
+ [![tests](https://img.shields.io/badge/tests-197%20passed-brightgreen.svg)](https://github.com/DemumuMind/deep-slopDM)
17
+
18
+ </div>
19
+
20
+ ---
21
+
22
+ ## Why deep-slop?
23
+
24
+ AI coding assistants are fast — but they leave fingerprints: narrative comments,
25
+ empty catch blocks, hallucinated imports, `as any` casts, copy-paste patterns,
26
+ and silently swallowed errors. Traditional linters miss these because they
27
+ weren't designed to detect *AI-authored code quality decay*.
28
+
29
+ **deep-slop** is purpose-built to find and fix AI slop with real AST analysis
30
+ (tree-sitter), not regex hacks. It goes beyond AI-slop detection to cover
31
+ security, dead code, type safety, architecture, performance, i18n, formatting,
32
+ framework anti-patterns, and markup quality — 18 specialized engines, 181+ rules,
33
+ one unified quality gate.
34
+
35
+ ---
36
+
37
+ ## Quick Start
38
+
39
+ ```bash
40
+ # Scan your project immediately — no install needed
41
+ npx deep-slop scan .
42
+
43
+ # SARIF output for GitHub Code Scanning
44
+ npx deep-slop scan . --sarif
45
+
46
+ # Scan only specific paths
47
+ npx deep-slop scan . --include "src/**/*.ts"
48
+
49
+ # Or install globally
50
+ npm install -g deep-slop
51
+ deep-slop scan .
52
+ ```
53
+
54
+ Output includes a density-aware quality score (0–100), per-engine diagnostics,
55
+ top findings, and actionable suggestions:
56
+
57
+ ```
58
+ deep-slop scanning: /home/user/my-project
59
+
60
+ ⏳ ast-slop.............. ✅ 14 issues (120ms)
61
+ ⏳ import-intelligence... ✅ 6 issues (85ms)
62
+ ⏳ dead-flow............. ✅ 3 issues (45ms)
63
+ ⏳ type-safety........... ✅ 2 issues (30ms)
64
+ ⏳ syntax-deep........... ✅ 0 issues (20ms)
65
+ ⏳ security-deep......... ✅ 1 issues (60ms)
66
+ ⏳ arch-constraints...... ✅ 2 issues (35ms)
67
+ ⏳ dup-detect............ ⏭️ skipped
68
+ ⏳ perf-hints............ ✅ 1 issues (25ms)
69
+ ⏳ i18n-lint............. ⏭️ skipped
70
+ ⏳ config-lint........... ✅ 0 issues (10ms)
71
+ ⏳ meta-quality.......... ✅ 1 issues (5ms)
72
+ ⏳ knip................... ✅ 4 issues (150ms)
73
+ ⏳ arch-rules............ ⏭️ no rules.yml
74
+ ⏳ lint-external......... ⏭️ skipped
75
+ ⏳ format-lint........... ✅ 3 issues (15ms)
76
+ ⏳ framework-lint........ ✅ 5 issues (40ms)
77
+ ⏳ markup-lint........... ✅ 2 issues (30ms)
78
+
79
+ ▸ Top findings:
80
+ 1. ast-slop/narrative-comment — src/utils.ts:42
81
+ 2. security-deep/hardcoded-secret — src/config.ts:12
82
+ 3. dead-flow/unreachable-after-terminator — src/handler.ts:88
83
+
84
+ Score: 72/100 (Needs Work) | Errors: 3 | Warnings: 11 | Info: 16 | Suggestions: 0
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Install
90
+
91
+ ```bash
92
+ # npm
93
+ npm install -g deep-slop
94
+
95
+ # pnpm
96
+ pnpm add -g deep-slop
97
+
98
+ # yarn
99
+ yarn global add deep-slop
100
+
101
+ # One-off (no install)
102
+ npx deep-slop scan .
103
+ ```
104
+
105
+ **Requirements:** Node.js >= 20
106
+
107
+ ---
108
+
109
+ ## CLI Commands
110
+
111
+ | Command | Description |
112
+ |---------|-------------|
113
+ | `scan [path]` | Scan project for AI slop and quality issues |
114
+ | `fix [path]` | Auto-fix detected issues with AST-based safe transforms |
115
+ | `ci [path]` | CI mode — structured output with quality gate |
116
+ | `rules` | List, search, or show details for all 181+ rules |
117
+ | `init [path]` | Scaffold configuration and CI workflow |
118
+ | `doctor [path]` | Check environment for deep-slop compatibility |
119
+ | `trend [path]` | Show score trend across recent scans |
120
+ | `watch [path]` | Watch for file changes and auto-scan |
121
+ | `hook` | Manage hooks for AI coding tools (install/uninstall/status/baseline/audit/sentinel) |
122
+ | `agent` | AI agent-powered repair commands (repair/plan/use/sessions) |
123
+ | `badge [path]` | Generate a shields.io quality score badge |
124
+ | `update` | Check for and install deep-slop updates |
125
+
126
+ ### `deep-slop scan [path]`
127
+
128
+ Scan a project directory for issues.
129
+
130
+ ```bash
131
+ deep-slop scan . # Full scan
132
+ deep-slop scan ./src # Scan specific directory
133
+ deep-slop scan . --json # JSON output
134
+ deep-slop scan . --sarif # SARIF 2.1.0 output (GitHub Code Scanning)
135
+ deep-slop scan . --include "src/**/*.ts" # Include only matching files
136
+ deep-slop scan . --engine ast-slop type-safety # Run specific engines
137
+ deep-slop scan . --exclude "**/*.test.ts" # Exclude patterns
138
+ deep-slop scan . --severity warning # Only warnings and above
139
+ deep-slop scan . --changes # Only git-changed files
140
+ deep-slop scan . --staged # Only git-staged files
141
+ deep-slop scan . --base main # Compare against branch
142
+ deep-slop scan . --verbose # Verbose output with rule details
143
+ ```
144
+
145
+ ### `deep-slop fix [path]`
146
+
147
+ Auto-fix detected issues with AST-based safe transforms.
148
+
149
+ ```bash
150
+ deep-slop fix . # Fix all fixable issues
151
+ deep-slop fix . --engine ast-slop # Fix only one engine's issues
152
+ deep-slop fix . --safe # Only safe fixes (confidence >= 0.8)
153
+ deep-slop fix . --force # Apply all fixes, including low-confidence
154
+ deep-slop fix . --dry-run # Preview without modifying files
155
+ ```
156
+
157
+ The fix pipeline: **scan → collect fixable diagnostics → plan → apply → verify → re-scan**.
158
+ If verification fails, changes are rolled back automatically.
159
+
160
+ ### `deep-slop ci [path]`
161
+
162
+ CI mode — structured output with quality gate.
163
+
164
+ ```bash
165
+ deep-slop ci . # Fail below default threshold (50)
166
+ deep-slop ci . --fail-below 70 # Custom threshold
167
+ deep-slop ci . --format sarif # SARIF for GitHub Code Scanning
168
+ deep-slop ci . --format json # JSON output
169
+ deep-slop ci . --changes # Only changed files
170
+ deep-slop ci . --staged # Only staged files
171
+ ```
172
+
173
+ Exit code 1 if score is below threshold. Perfect for CI pipelines.
174
+
175
+ ### `deep-slop rules`
176
+
177
+ List and search all available rules.
178
+
179
+ ```bash
180
+ deep-slop rules # List all rules
181
+ deep-slop rules --search unused # Fuzzy search by name/description
182
+ deep-slop rules ast-slop/empty-catch # Show rule details with impact tier
183
+ ```
184
+
185
+ ### `deep-slop init [path]`
186
+
187
+ Scaffold configuration and CI workflow.
188
+
189
+ ```bash
190
+ deep-slop init . # Create .deep-slop/config.yml
191
+ deep-slop init . --preset typescript-strict # From preset
192
+ deep-slop init . --strict # Maximum strictness (enterprise preset)
193
+ ```
194
+
195
+ ### `deep-slop doctor [path]`
196
+
197
+ Check which external tools are available (ruff, golangci-lint, clippy, knip, etc.).
198
+
199
+ ```bash
200
+ deep-slop doctor . # Show toolchain coverage
201
+ ```
202
+
203
+ ### `deep-slop trend [path]`
204
+
205
+ Show score history with sparklines.
206
+
207
+ ```bash
208
+ deep-slop trend . # Show score trend
209
+ deep-slop trend . --limit 20 # Last 20 scans
210
+ ```
211
+
212
+ ### `deep-slop watch [path]`
213
+
214
+ Watch mode — re-scan on file changes.
215
+
216
+ ```bash
217
+ deep-slop watch . # Watch and re-scan on changes
218
+ ```
219
+
220
+ ### `deep-slop hook`
221
+
222
+ Manage git hooks and AI tool hooks for automated scanning.
223
+
224
+ ```bash
225
+ deep-slop hook install # Install pre-commit hook
226
+ deep-slop hook uninstall # Remove pre-commit hook
227
+ deep-slop hook status # Show hook status
228
+ deep-slop hook baseline # Capture quality baseline
229
+ deep-slop hook audit # Audit dependencies for vulnerabilities
230
+ deep-slop hook sentinel # Run sentinel mode with auto-repair
231
+ ```
232
+
233
+ **Runtime hooks** (full scan + fix): Claude, Cursor, Gemini, Pi
234
+ **Rules-only hooks** (pass diagnostics as context): Codex, Windsurf, Cline, Kilo, Copilot, Antigravity
235
+
236
+ ### `deep-slop agent`
237
+
238
+ AI agent integration for automated repair.
239
+
240
+ ```bash
241
+ deep-slop agent repair . # Start repair loop (default: Claude)
242
+ deep-slop agent repair . --provider codex # Use Codex for repairs
243
+ deep-slop agent repair . --provider cursor # Use Cursor for repairs
244
+ deep-slop agent repair . --target-score 80 # Target specific score
245
+ deep-slop agent plan . # Preview repair plan without applying
246
+ deep-slop agent use claude . # Set default provider for project
247
+ deep-slop agent sessions . # List all repair sessions
248
+ ```
249
+
250
+ **16 providers:** `claude`, `codex`, `cursor`, `opencode`, `aider`, `goose`,
251
+ `windsurf`, `vscode`, `amp`, `gemini-cli`, `kimi`, `warp`, `pi`, `crush`,
252
+ `deep-agents`, `antigravity`
253
+
254
+ ### `deep-slop badge [path]`
255
+
256
+ Generate a shields.io quality score badge for your README.
257
+
258
+ ```bash
259
+ deep-slop badge . # Output badge URL
260
+ deep-slop badge . --json # JSON with URL + markdown
261
+ deep-slop badge . --owner Romanchello --repo deep-slop
262
+ ```
263
+
264
+ ### `deep-slop update`
265
+
266
+ Self-update to the latest version.
267
+
268
+ ```bash
269
+ deep-slop update # Check and install updates
270
+ deep-slop update --check # Only check, do not install
271
+ ```
272
+
273
+ ---
274
+
275
+ ## The 18 Engines
276
+
277
+ ### 1. ast-slop — AI Slop Pattern Detection (20+ rules)
278
+
279
+ Detects hallmarks of AI-authored code:
280
+
281
+ | Rule | Severity | Description |
282
+ |------|----------|-------------|
283
+ | `empty-catch` | strict | Empty catch blocks silently swallow errors |
284
+ | `narrative-comment` | strict | Comments that describe WHAT instead of WHY |
285
+ | `hallucinated-import` | standard | Imports from non-existent packages |
286
+ | `as-any-cast` | standard | `as any` casts disabling type safety |
287
+ | `generic-naming` | advisory | Variables like `data`, `result`, `item`, `info` |
288
+ | `decorative-comment` | style | Visual separator blocks (`// ===`, `// ───`) |
289
+ | `console-leftover` | style | Debug `console.log`/`console.debug` statements |
290
+ | `trivial-comment` | mechanical | Comments that restate the obvious |
291
+ | `todo-leftover` | mechanical | TODO comments with AI agent attribution |
292
+ | `unnecessary-abstraction` | maintainability | Overly ceremonial class/module patterns |
293
+ | `silent-recovery` | strict | Unnecessary try-catch wrapping that hides failures |
294
+ | `hardcoded-config` | standard | Configuration values baked into source |
295
+ | `copy-paste-signature` | mechanical | Copy-paste patterns differing only in identifiers |
296
+ | `boilerplate-structure` | mechanical | Overly ceremonial patterns (AI template signature) |
297
+ | `ai-emoji-comment` | style | Emoji in comments (common AI agent signature) |
298
+ | `overly-defensive` | advisory | Unnecessary null checks or defensive wrapping |
299
+ | `todo-stub` | mechanical | TODO/FIXME stubs left by AI agents |
300
+ | `swallowed-exception` | strict | Exceptions caught and silently discarded |
301
+ | ...and more | | |
302
+
303
+ ### 2. import-intelligence — Import Path Optimization (7 rules)
304
+
305
+ | Rule | Description |
306
+ |------|-------------|
307
+ | `alternative-path` | Suggest tree-shakeable imports (e.g., `lodash/map` instead of `lodash`) |
308
+ | `barrel-optimization` | Skip barrel files, import from source |
309
+ | `circular-dependency` | Detect import cycles in the dependency graph |
310
+ | `unused-import` | Imported but never referenced |
311
+ | `duplicate-import` | Multiple import statements from the same module |
312
+ | `broken-alias` | Path alias that doesn't map to an existing file |
313
+ | `barrel-bypass` | Direct import past barrel re-export |
314
+
315
+ ### 3. dead-flow — Unreachable & Unused Code (7 rules)
316
+
317
+ | Rule | Description |
318
+ |------|-------------|
319
+ | `unreachable-after-terminator` | Code after `return`/`throw`/`break` |
320
+ | `dead-conditional` | Conditionals that always evaluate the same way |
321
+ | `unused-export` | Exported symbols with no consumers |
322
+ | `unused-variable` | Declared but never read (`_`-prefixed vars skipped) |
323
+ | `empty-block` | Empty `if`/`for`/`while`/`try`/`catch` blocks |
324
+ | `dead-switch-case` | Unreachable switch cases after `default` |
325
+ | `dead-conditional` | Logic errors or AI artifacts |
326
+
327
+ ### 4. type-safety — TypeScript Type Enforcement (6 rules)
328
+
329
+ | Rule | Description |
330
+ |------|-------------|
331
+ | `as-any-cast` | `as any` casts with context-aware type suggestions |
332
+ | `double-assertion` | `as unknown as X` bypass patterns |
333
+ | `ts-suppress` | `@ts-ignore` and `@ts-expect-error` directives |
334
+ | `non-null-assertion` | `!` operator without null checks |
335
+ | `generic-any` | `any` used as generic parameter (`Array<any>`) |
336
+ | `missing-return-type` | Functions without explicit return types |
337
+
338
+ ### 5. syntax-deep — Syntax Anomaly Detection (12 rules)
339
+
340
+ BOM characters, CRLF line endings, mixed indentation, escape sequences, regex
341
+ issues, floating-point precision loss, Unicode anomalies (zero-width spaces,
342
+ RTL overrides, homoglyphs), trailing whitespace, NUL bytes, shebang mismatches,
343
+ and leftover git merge conflict markers.
344
+
345
+ ### 6. security-deep — Security Vulnerability Detection (10 rules)
346
+
347
+ | Rule | Description |
348
+ |------|-------------|
349
+ | `eval-usage` | `eval()`, `new Function()`, `vm.runInContext` |
350
+ | `innerhtml-usage` | Direct `innerHTML` assignment (XSS risk) |
351
+ | `sql-injection` | String concatenation in SQL queries |
352
+ | `shell-injection` | Unsanitized `exec()`/`spawn()` arguments |
353
+ | `ssrf-risk` | Server-side request forgery patterns |
354
+ | `prototype-pollution` | Deep merge without prototype guard |
355
+ | `hardcoded-secret` | API keys, tokens, passwords in source |
356
+ | `dependency-vulnerability` | Known vulnerable dependencies |
357
+ | `xss-risk` | Cross-site scripting attack vectors |
358
+ | `unsafe-html` | Unsafe HTML operations |
359
+
360
+ ### 7. arch-constraints — Architecture Analysis (6 rules)
361
+
362
+ | Rule | Description |
363
+ |------|-------------|
364
+ | `circular-dependency` | Module dependency cycles (via graphology) |
365
+ | `high-coupling` | High fan-in/fan-out modules |
366
+ | `layer-violation` | Imports that violate defined layer boundaries |
367
+ | `god-file` | Files concentrating too many responsibilities |
368
+ | `deep-nesting` | Excessive nesting depth (context-aware thresholds) |
369
+ | `unstable-dependency` | Fragile dependency patterns |
370
+
371
+ ### 8. dup-detect — Duplicate Code Detection (5 rules)
372
+
373
+ Identical AST subtrees, similar blocks (copy-paste with minor edits), duplicate
374
+ imports across files, repeated constants, and copy-paste divergence patterns.
375
+
376
+ ### 9. perf-hints — Performance Anti-Patterns (6 rules)
377
+
378
+ N+1 query patterns, missing React memoization (`React.memo`/`useMemo`/`useCallback`),
379
+ synchronous operations in async context, large allocations in loops, unnecessary
380
+ awaits, and string concatenation in loops.
381
+
382
+ ### 10. i18n-lint — Internationalization Issues (4 rules)
383
+
384
+ Hardcoded strings in JSX/props, missing translation keys, locale mismatches
385
+ across locale files, and untranslated strings.
386
+
387
+ ### 11. config-lint — Configuration Validation (6 rules)
388
+
389
+ tsconfig issues, ESLint misconfig, package script problems, Prettier config,
390
+ Vite config, and EditorConfig inconsistencies.
391
+
392
+ ### 12. meta-quality — Scoring & Quality Gate (4 rules)
393
+
394
+ Score report quality, trend analysis/regression detection, quality gate
395
+ enforcement, and config sanity checks.
396
+
397
+ ### 13. knip — Unused Dependency/Export Detection
398
+
399
+ Integrates [knip](https://github.com/webpro/knip) to find unused dependencies,
400
+ unused exports, and dead code that the AST engines may miss.
401
+
402
+ ### 14. arch-rules — Custom Architecture Rules
403
+
404
+ Load custom rules from `.deep-slop/rules.yml`:
405
+
406
+ ```yaml
407
+ rules:
408
+ - id: forbid-lodash-default-import
409
+ message: "Use specific lodash imports for tree-shaking"
410
+ severity: warning
411
+ pattern: "import _ from 'lodash'"
412
+ - id: no-direct-api-from-ui
413
+ message: "UI components must use service layer, not call API directly"
414
+ severity: error
415
+ forbid_import_from_path:
416
+ from: "src/ui/**"
417
+ import: "src/api/**"
418
+ ```
419
+
420
+ ### 15. lint-external — Multi-Language Linters
421
+
422
+ Wraps external linters for non-TypeScript code:
423
+
424
+ | Language | Tool |
425
+ |----------|------|
426
+ | Python | [ruff](https://docs.astral.sh/ruff/) |
427
+ | Go | [golangci-lint](https://golangci-lint.run/) |
428
+ | Rust | [clippy](https://doc.rust-lang.org/clippy/) |
429
+
430
+ ### 16. format-lint — Formatting Consistency (6 rules)
431
+
432
+ Detects formatting inconsistencies across all source files: mixed indentation,
433
+ inconsistent quote style, max line length violations, inconsistent semicolons,
434
+ blank line clusters, and trailing comma inconsistencies.
435
+
436
+ ### 17. framework-lint — Framework-Specific Rules (15+ rules)
437
+
438
+ Framework-specific AI slop detection:
439
+
440
+ **Next.js rules** (8 rules): Misplaced `use client`, missing `use client`,
441
+ Pages Router APIs in App Router, `next/router` vs `next/navigation`, missing
442
+ Image dimensions, metadata in client components, hardcoded env vars, links
443
+ without ARIA labels.
444
+
445
+ **Tailwind CSS rules** (7 rules): `@apply` anti-pattern, inline style conflicts,
446
+ `!important` modifier, duplicate utilities, magic values, incomplete flex,
447
+ overloaded className strings.
448
+
449
+ ### 18. markup-lint — Markup & Config Quality (20+ rules)
450
+
451
+ Quality checks for non-source files:
452
+
453
+ **JSON** (4 rules): Trailing commas, duplicate keys, inconsistent spacing, deep nesting.
454
+ **YAML** (4 rules): Tab indentation, duplicate keys, complex anchors, missing document separators.
455
+ **CSS** (4 rules): Unused selectors, `!important` overuse, duplicate properties, universal selectors.
456
+ **HTML** (4 rules): Missing `alt` on images, missing `lang`, deprecated tags, inline event handlers.
457
+ **Markdown** (4 rules): Broken links, inconsistent heading styles, TODOs in docs, missing fenced language.
458
+
459
+ ### 19+. Plugin Engines
460
+
461
+ deep-slop supports custom plugin engines loaded from `.deep-slop/plugins/`.
462
+ Plugins implement the same `Engine` interface as built-in engines and appear
463
+ alongside them in scan output, scoring, and MCP tools.
464
+
465
+ See the [Plugin API](#plugin-api) section for details.
466
+
467
+ ---
468
+
469
+ ## Languages
470
+
471
+ deep-slop analyzes **14 languages** with Tree-sitter AST support for 8:
472
+
473
+ | Language | AST Analysis | Engines Active |
474
+ |----------|:------------:|----------------|
475
+ | TypeScript | ✅ tree-sitter | All engines |
476
+ | JavaScript | ✅ tree-sitter | All engines |
477
+ | TSX | ✅ tree-sitter | All + framework-lint |
478
+ | JSX | ✅ tree-sitter | All + framework-lint |
479
+ | Python | ✅ tree-sitter | ast-slop, syntax-deep, security-deep, lint-external (ruff) |
480
+ | Go | ✅ tree-sitter | ast-slop, syntax-deep, security-deep, lint-external (golangci-lint) |
481
+ | Rust | ✅ tree-sitter | ast-slop, syntax-deep, lint-external (clippy) |
482
+ | PHP | ✅ tree-sitter | ast-slop, syntax-deep, security-deep |
483
+ | C# | ✅ tree-sitter | ast-slop, syntax-deep |
484
+ | Swift | ✅ tree-sitter | ast-slop, syntax-deep |
485
+ | JSON | Text-based | markup-lint |
486
+ | YAML | Text-based | markup-lint, config-lint |
487
+ | CSS | Text-based | markup-lint, framework-lint (Tailwind) |
488
+ | HTML | Text-based | markup-lint |
489
+ | Markdown | Text-based | markup-lint |
490
+
491
+ > Score is withheld for projects where >80% of files are in unsupported languages.
492
+
493
+ ---
494
+
495
+ ## Frameworks
496
+
497
+ ### Next.js
498
+
499
+ 8 rules detecting common AI-authored Next.js anti-patterns:
500
+ - Misplaced or missing `'use client'` directives
501
+ - Pages Router APIs in App Router projects
502
+ - `next/router` instead of `next/navigation`
503
+ - Missing `<Image>` dimensions causing layout shift
504
+ - Metadata exports in client components
505
+ - Hardcoded URLs instead of environment variables
506
+ - Links without accessible text
507
+
508
+ ### Tailwind CSS
509
+
510
+ 7 rules catching AI-generated Tailwind slop:
511
+ - `@apply` negating utility-first approach
512
+ - Inline style conflicts with Tailwind classes
513
+ - `!important` modifier indicating specificity issues
514
+ - Duplicate/conflicting utilities in same className
515
+ - Arbitrary magic values instead of theme scale
516
+ - Bare `flex` without alignment (likely incomplete)
517
+ - Overloaded className strings needing extraction
518
+
519
+ ---
520
+
521
+ ## Configuration
522
+
523
+ ### `.deep-slop/config.yml`
524
+
525
+ Create `.deep-slop/config.yml` in your project root:
526
+
527
+ ```yaml
528
+ # .deep-slop/config.yml
529
+
530
+ # ── Engine selection (all enabled by default) ──
531
+ engines:
532
+ ast-slop: true
533
+ import-intelligence: true
534
+ dead-flow: true
535
+ type-safety: true
536
+ syntax-deep: true
537
+ security-deep: true
538
+ arch-constraints: true
539
+ dup-detect: true
540
+ perf-hints: true
541
+ i18n-lint: false # Disable for non-i18n projects
542
+ config-lint: true
543
+ meta-quality: true
544
+ knip: true
545
+ arch-rules: true
546
+ lint-external: false # Requires external tools installed
547
+ format-lint: true
548
+ framework-lint: true
549
+ markup-lint: true
550
+
551
+ # ── Quality thresholds ──
552
+ quality:
553
+ maxFunctionLoc: 50 # Max lines per function
554
+ maxFileLoc: 300 # Max lines per file
555
+ maxNesting: 4 # Max nesting depth
556
+ maxParams: 5 # Max function parameters
557
+ maxCyclomatic: 10 # Max cyclomatic complexity
558
+ maxCoupling: 10 # Max fan-in/fan-out
559
+
560
+ # ── Context-aware complexity thresholds ──
561
+ # Rust: 2.5x, Go: 1.5x, TSX: 1.5x multiplier on maxCyclomatic
562
+
563
+ # ── Security settings ──
564
+ security:
565
+ audit: true # Run npm audit
566
+ auditTimeout: 60 # Audit timeout in seconds
567
+ owasp: true # OWASP top-10 checks
568
+
569
+ # ── Import intelligence ──
570
+ imports:
571
+ suggestAlternatives: true # Suggest tree-shakeable paths
572
+ optimizeBarrels: true # Flag barrel file imports
573
+ validateAliases: true # Check tsconfig path aliases
574
+ buildGraph: true # Build import dependency graph
575
+ maxCircularDepth: 5 # Max circular dep depth
576
+
577
+ # ── Type safety ──
578
+ types:
579
+ flagAsAny: true # Flag `as any` casts
580
+ suggestTypes: true # Suggest concrete types
581
+ flagDoubleAssertion: true # Flag `as unknown as X`
582
+
583
+ # ── Dead code ──
584
+ deadCode:
585
+ unreachableBranches: true
586
+ unusedExports: true
587
+ unusedVariables: true # _-prefixed vars skipped
588
+
589
+ # ── i18n ──
590
+ i18n:
591
+ hardcodedStrings: true
592
+ validateKeys: false # Enable if you have locale files
593
+
594
+ # ── Scoring ──
595
+ scoring:
596
+ mode: logarithmic # logarithmic or linear
597
+ failBelow: 50 # CI quality gate threshold
598
+
599
+ # ── Rule severity overrides ──
600
+ rules:
601
+ ast-slop/generic-naming: off # Turn off a rule
602
+ security-deep/eval-usage: error # Promote to error
603
+ type-safety/missing-return-type: warning # Demote to warning
604
+
605
+ # ── Exclude patterns ──
606
+ exclude:
607
+ - node_modules
608
+ - .git
609
+ - dist
610
+ - build
611
+ - coverage
612
+ - tmp-*
613
+
614
+ # ── CI quality gate ──
615
+ ci:
616
+ failBelow: 50 # Fail if score below this threshold
617
+ format: json # Output format for CI
618
+ failOnErrors: true # Also fail on any error-level diagnostic
619
+ ```
620
+
621
+ ### `.deep-slopignore`
622
+
623
+ Exclude files from scanning with a `.deep-slopignore` file (gitignore-style patterns):
624
+
625
+ ```
626
+ # .deep-slopignore
627
+ node_modules/
628
+ dist/
629
+ *.min.js
630
+ *.d.ts
631
+ coverage/
632
+ ```
633
+
634
+ ### Suppress Directives
635
+
636
+ Suppress specific rules inline in source files:
637
+
638
+ ```typescript
639
+ // deep-slop-ignore-next ast-slop/narrative-comment
640
+ // This comment explains WHY, not what — intentional
641
+ const result = compute(data);
642
+
643
+ // deep-slop-ignore-line ast-slop/generic-naming
644
+ const info = getData();
645
+
646
+ /* deep-slop-ignore-start ast-slop/console-leftover */
647
+ console.log('debug temp');
648
+ /* deep-slop-ignore-end ast-slop/console-leftover */
649
+ ```
650
+
651
+ **Directive forms:** `deep-slop-ignore-next`, `deep-slop-ignore-line`,
652
+ `deep-slop-ignore-start` / `deep-slop-ignore-end`
653
+
654
+ ### `--include` Option
655
+
656
+ Scan only specific file patterns:
657
+
658
+ ```bash
659
+ deep-slop scan . --include "src/**/*.ts"
660
+ deep-slop scan . --include "src/**/*.ts" --include "lib/**/*.js"
661
+ ```
662
+
663
+ ### Config Inheritance
664
+
665
+ Extend from presets or parent configs:
666
+
667
+ ```yaml
668
+ extends: typescript-strict # Built-in preset name
669
+
670
+ # Override specific settings
671
+ quality:
672
+ maxFileLoc: 400 # Relax from preset's 200
673
+ ```
674
+
675
+ ### Custom Architecture Rules
676
+
677
+ Create `.deep-slop/rules.yml`:
678
+
679
+ ```yaml
680
+ rules:
681
+ - id: no-business-logic-in-ui
682
+ message: "Business logic must not live in UI components"
683
+ severity: error
684
+ forbid_import_from_path:
685
+ from: "src/components/**"
686
+ import: "src/services/**"
687
+
688
+ - id: no-moment-js
689
+ message: "Use date-fns instead of moment.js for tree-shaking"
690
+ severity: warning
691
+ forbid_import: "moment"
692
+ ```
693
+
694
+ ### Presets
695
+
696
+ | Preset | Description |
697
+ |--------|-------------|
698
+ | `typescript-strict` | Strict scoring, all engines, error thresholds (failBelow: 80) |
699
+ | `monorepo-relaxed` | Relaxed for monorepos, excludes common monorepo paths (failBelow: 60) |
700
+ | `python-go` | Optimized for Python + Go — enables lint-external, disables config-lint |
701
+ | `minimal` | Only ast-slop + security-deep — lightweight scanning |
702
+
703
+ ```bash
704
+ deep-slop init . --preset typescript-strict
705
+ deep-slop init . --strict # Enterprise preset (maximum strictness)
706
+ ```
707
+
708
+ ---
709
+
710
+ ## MCP Server
711
+
712
+ deep-slop ships a [Model Context Protocol](https://modelcontextprotocol.io/) server
713
+ for integration with AI coding agents (Claude Code, Cursor, Windsurf, Aider, etc.).
714
+
715
+ ### Setup
716
+
717
+ Add to your MCP client config (`.cursor/mcp.json`, `.claude/settings.json`, etc.):
718
+
719
+ ```json
720
+ {
721
+ "mcpServers": {
722
+ "deep-slop": {
723
+ "command": "npx",
724
+ "args": ["-y", "deep-slop-mcp"]
725
+ }
726
+ }
727
+ }
728
+ ```
729
+
730
+ Or if installed globally:
731
+
732
+ ```json
733
+ {
734
+ "mcpServers": {
735
+ "deep-slop": {
736
+ "command": "deep-slop-mcp"
737
+ }
738
+ }
739
+ }
740
+ ```
741
+
742
+ ### MCP Tools (7+ tools)
743
+
744
+ | Tool | Description |
745
+ |------|-------------|
746
+ | `deep_slop_scan` | Full project scan with configurable engines, severity filtering, and assessment |
747
+ | `deep_slop_fix` | Auto-fix issues: scan → fix → verify → re-scan |
748
+ | `deep_slop_why` | Explain why a rule flagged specific code (impact tier, rationale, doc link) |
749
+ | `deep_slop_engines` | List all 18 engines and their rule counts |
750
+ | `deep_slop_rules` | List/search all 181+ rules with metadata (severity, tier, fixable) |
751
+ | `deep_slop_score` | Quick quality score check (fast, minimal output) |
752
+ | `deep_slop_baseline` | Check quality baseline before making changes |
753
+
754
+ ---
755
+
756
+ ## CI Integration
757
+
758
+ ### GitHub Actions Composite Action
759
+
760
+ Use deep-slop as a composite GitHub Action in your CI:
761
+
762
+ ```yaml
763
+ steps:
764
+ - uses: DemumuMind/deep-slopDM@main
765
+ with:
766
+ directory: "."
767
+ fail-below: "50"
768
+ format: "sarif"
769
+ node-version: "20"
770
+ version: "latest"
771
+ ```
772
+
773
+ **Inputs:**
774
+
775
+ | Input | Default | Description |
776
+ |-------|---------|-------------|
777
+ | `directory` | `.` | Directory to scan |
778
+ | `node-version` | `20` | Node.js version |
779
+ | `format` | `sarif` | Output format (human, json, sarif) |
780
+ | `fail-below` | `50` | Fail if score below threshold (0–100) |
781
+ | `version` | `latest` | deep-slop CLI version |
782
+
783
+ ### SARIF Upload to GitHub Code Scanning
784
+
785
+ ```yaml
786
+ - uses: DemumuMind/deep-slopDM@main
787
+ with:
788
+ format: sarif
789
+ fail-below: "70"
790
+
791
+ - uses: github/codeql-action/upload-sarif@v3
792
+ if: always()
793
+ with:
794
+ sarif_file: deep-slop-results.sarif
795
+ ```
796
+
797
+ SARIF 2.1.0 output integrates with [GitHub code scanning](https://docs.github.com/en/code-security/code-scanning).
798
+
799
+ ### `init --strict` Enterprise Preset
800
+
801
+ ```bash
802
+ deep-slop init . --strict
803
+ ```
804
+
805
+ Creates a strict configuration with `failBelow: 80`, all engines enabled,
806
+ and error-level severity for security and architecture rules. Ideal for
807
+ enterprise CI pipelines.
808
+
809
+ ---
810
+
811
+ ## Agent Integration
812
+
813
+ deep-slop integrates with **16 AI agent providers** for automated repair:
814
+
815
+ | Provider | Flag | Type |
816
+ |----------|------|------|
817
+ | Claude Code | `--provider claude` | Runtime (full scan + fix) |
818
+ | Codex | `--provider codex` | Runtime |
819
+ | Cursor | `--provider cursor` | Runtime |
820
+ | OpenCode | `--provider opencode` | Runtime |
821
+ | Aider | `--provider aider` | Runtime |
822
+ | Goose | `--provider goose` | Runtime |
823
+ | Windsurf | `--provider windsurf` | Runtime |
824
+ | VS Code | `--provider vscode` | Runtime |
825
+ | Amp | `--provider amp` | Runtime |
826
+ | Gemini CLI | `--provider gemini-cli` | Runtime |
827
+ | Kimi | `--provider kimi` | Runtime |
828
+ | Warp | `--provider warp` | Runtime |
829
+ | Pi | `--provider pi` | Runtime |
830
+ | Crush | `--provider crush` | Runtime |
831
+ | Deep Agents | `--provider deep-agents` | Runtime |
832
+ | Antigravity | `--provider antigravity` | Runtime |
833
+
834
+ ### Repair Loop
835
+
836
+ ```bash
837
+ deep-slop agent repair . --provider claude --target-score 80
838
+ ```
839
+
840
+ The repair loop: **scan → diagnose → prompt agent → apply fixes → re-scan → repeat**
841
+ until the target score is reached or max turns exhausted.
842
+
843
+ ### Agent Hooks
844
+
845
+ **Runtime hooks** (full scan + auto-fix): Claude, Cursor, Gemini, Pi
846
+ **Rules-only hooks** (pass diagnostics as context to the agent): Codex, Windsurf, Cline, Kilo, Copilot, Antigravity
847
+
848
+ ### Auto PR with `--pr`
849
+
850
+ Create a pull request automatically after agent repair completes:
851
+
852
+ ```bash
853
+ deep-slop agent repair . --provider claude --pr
854
+ ```
855
+
856
+ ---
857
+
858
+ ## Plugin API
859
+
860
+ deep-slop supports custom plugin engines loaded from `.deep-slop/plugins/`.
861
+ Plugins implement the same `Engine` interface as built-in engines and appear
862
+ alongside them in scan output, scoring, and MCP tools.
863
+
864
+ ### Plugin Structure
865
+
866
+ ```
867
+ .deep-slop/
868
+ plugins/
869
+ my-engine/
870
+ index.js # Plugin entry point
871
+ ```
872
+
873
+ ### Plugin Interface
874
+
875
+ ```typescript
876
+ interface Engine {
877
+ name: string; // Unique engine identifier
878
+ description: string; // Human-readable description
879
+ supportedLanguages: Language[]; // Languages this engine supports
880
+ run(context: EngineContext): Promise<EngineResult>;
881
+ fix?(diagnostics: Diagnostic[], context: EngineContext): Promise<FixResult>;
882
+ }
883
+ ```
884
+
885
+ ### Creating a Plugin
886
+
887
+ ```javascript
888
+ // .deep-slop/plugins/my-engine/index.js
889
+ export const myEngine = {
890
+ name: 'my-engine',
891
+ description: 'Custom engine for project-specific checks',
892
+ supportedLanguages: ['typescript', 'javascript'],
893
+ async run(context) {
894
+ const diagnostics = [];
895
+ // Your analysis logic here
896
+ return {
897
+ engine: 'my-engine',
898
+ diagnostics,
899
+ elapsed: 0,
900
+ skipped: false,
901
+ };
902
+ },
903
+ };
904
+ ```
905
+
906
+ Plugins are auto-discovered and loaded after built-in engines. They can be
907
+ enabled/disabled in `.deep-slop/config.yml` just like built-in engines:
908
+
909
+ ```yaml
910
+ engines:
911
+ my-engine: true # Enable custom plugin
912
+ ```
913
+
914
+ ---
915
+
916
+ ## VS Code Extension
917
+
918
+ Install the `deep-slop` extension from the VS Code marketplace for inline diagnostics.
919
+
920
+ **Features:**
921
+ - Diagnostics in the Problems panel
922
+ - Scan workspace or current file via commands
923
+ - Optional auto-scan on save
924
+
925
+ **Configuration:**
926
+
927
+ | Setting | Default | Description |
928
+ |---------|---------|-------------|
929
+ | `deep-slop.path` | `""` | Path to deep-slop CLI (auto-detected if empty) |
930
+ | `deep-slop.scanOnSave` | `false` | Auto-scan on save |
931
+ | `deep-slop.autoScan` | `false` | Auto-scan on activation |
932
+
933
+ **Commands:**
934
+ - `deep-slop: Scan Workspace`
935
+ - `deep-slop: Scan Current File`
936
+
937
+ See [`editors/vscode/`](editors/vscode/) for the extension source.
938
+
939
+ ---
940
+
941
+ ## Pre-commit Hook
942
+
943
+ Add deep-slop as a [pre-commit](https://pre-commit.com/) hook:
944
+
945
+ ```yaml
946
+ repos:
947
+ - repo: https://github.com/DemumuMind/deep-slopDM
948
+ rev: v1.4.0
949
+ hooks:
950
+ - id: deep-slop
951
+ ```
952
+
953
+ Or install via the CLI:
954
+
955
+ ```bash
956
+ deep-slop hook install
957
+ ```
958
+
959
+ ---
960
+
961
+ ## Scoring System
962
+
963
+ deep-slop uses a **density-aware logarithmic scoring** system (0–100 scale):
964
+
965
+ ```
966
+ score = 100 - (100 × log1p(scaledDeduction)) / log1p(100 + scaledDeduction)
967
+ ```
968
+
969
+ Where:
970
+ - **density** = min(1, actionable_issues / (file_count + smoothing))
971
+ - **scaledDeduction** = totalDeduction × density
972
+ - **totalDeduction** = sum(severityWeight × ruleMultiplier × engineWeight)
973
+ - Per-rule **caps** prevent noisy rules from dominating the score
974
+ - **Context-aware complexity thresholds**: Rust 2.5×, Go 1.5×, TSX 1.5× on maxCyclomatic
975
+ - **tsconfig path aliases** are respected for import resolution
976
+ - **`_`-prefixed unused variables** are skipped
977
+
978
+ ### Impact Tiers
979
+
980
+ Each rule is classified into one of 6 tiers:
981
+
982
+ | Tier | Multiplier | Cap | Example Rules |
983
+ |------|-----------|-----|---------------|
984
+ | **strict** | 1.0× | 40 | Empty catch, eval usage, hardcoded secrets, circular deps |
985
+ | **standard** | 1.0× | 30 | Hallucinated imports, as-any casts, broken aliases |
986
+ | **maintainability** | 0.75× | 24 | High coupling, layer violations, N+1 queries |
987
+ | **mechanical** | 0.5× | 16 | Unused imports, trailing whitespace, BOM characters |
988
+ | **style** | 0.5× | 8 | Decorative comments, console leftovers, precision loss |
989
+ | **advisory** | 0.25× | 8 | Generic naming, missing React memo, hardcoded strings |
990
+
991
+ ### Score Labels
992
+
993
+ | Score | Label |
994
+ |-------|-------|
995
+ | >= 75 | **Healthy** |
996
+ | >= 50 | **Needs Work** |
997
+ | < 50 | **Critical** |
998
+
999
+ ### Severity Weights
1000
+
1001
+ | Severity | Weight |
1002
+ |----------|--------|
1003
+ | error | 10 |
1004
+ | warning | 3 |
1005
+ | info | 1 |
1006
+ | suggestion | 0.25 |
1007
+
1008
+ ---
1009
+
1010
+ ## Programmatic API
1011
+
1012
+ ```typescript
1013
+ import { runScan, DEFAULT_CONFIG, type ScanResult } from "deep-slop";
1014
+
1015
+ const result: ScanResult = await runScan({
1016
+ rootDirectory: "/path/to/project",
1017
+ languages: ["typescript"],
1018
+ frameworks: ["react"],
1019
+ files: ["src/index.ts"],
1020
+ installedTools: {},
1021
+ config: DEFAULT_CONFIG,
1022
+ });
1023
+
1024
+ console.log(`Score: ${result.score}/100 (${result.label})`);
1025
+ console.log(`Errors: ${result.bySeverity.error}`);
1026
+ console.log(`Warnings: ${result.bySeverity.warning}`);
1027
+ ```
1028
+
1029
+ ---
1030
+
1031
+ ## deep-slop vs aislop
1032
+
1033
+ | Feature | aislop | deep-slop |
1034
+ |---------|--------|-----------|
1035
+ | Detection engines | 6 | **18** |
1036
+ | Analysis method | Regex-based | **AST (tree-sitter)** |
1037
+ | Total rules | 13 | **181+** |
1038
+ | AI slop rules | 13 | **20+** |
1039
+ | Alternative import paths | No | **Yes** — tree-shakeable suggestions |
1040
+ | Type safety analysis | No | **Yes** — `as any`, double assertions, `@ts-ignore` |
1041
+ | Dead code flow | Via knip | **AST-native** — unreachable, unused exports/variables |
1042
+ | Architecture analysis | Basic | **Yes** — circular deps, coupling, layer violations, god files |
1043
+ | Duplicate code detection | No | **Yes** — structural + copy-paste patterns |
1044
+ | Performance hints | No | **Yes** — N+1, memoization, sync-in-async |
1045
+ | i18n linting | No | **Yes** — hardcoded strings, missing keys, locale mismatches |
1046
+ | Config validation | No | **Yes** — tsconfig, ESLint, Vite, Prettier, EditorConfig |
1047
+ | Framework rules | No | **Yes** — Next.js (8), Tailwind CSS (7) |
1048
+ | Formatting consistency | No | **Yes** — indent, quotes, semicolons, trailing commas |
1049
+ | Markup quality | No | **Yes** — JSON, YAML, CSS, HTML, Markdown |
1050
+ | Custom architecture rules | Yes (rules.yml) | **Yes** (rules.yml with matchers) |
1051
+ | Plugin API | No | **Yes** — custom engines from `.deep-slop/plugins/` |
1052
+ | MCP Server | 4 tools | **7+ tools** (scan, fix, why, engines, rules, score, baseline) |
1053
+ | Scoring | Density-aware logarithmic | **Density-aware logarithmic** + per-rule caps |
1054
+ | Impact tiers | 6 tiers | **6 tiers** (strict → advisory) |
1055
+ | Auto-fix pipeline | Plan → apply → verify | **Plan → apply → verify → rollback** |
1056
+ | SARIF output | Yes | **Yes** — SARIF 2.1.0 for GitHub Code Scanning |
1057
+ | Score withheld (unsupported lang) | No | **Yes** — null score when >80% unsupported |
1058
+ | VS Code extension | Yes | **Yes** — Problems panel + auto-scan |
1059
+ | GitHub Action | Yes | **Yes** — composite action with SARIF upload |
1060
+ | Pre-commit hook | Yes | **Yes** |
1061
+ | Config presets | No | **4 presets** + `--strict` enterprise |
1062
+ | Config inheritance | Yes (extends) | **Yes** (extends) |
1063
+ | Rule severity overrides | Yes | **Yes** — per-rule error/warning/info/off |
1064
+ | Suppress directives | No | **Yes** — next/line/start/end |
1065
+ | Score badge | Yes | **Yes** |
1066
+ | Score history | Yes (trend) | **Yes** (trend + sparklines) |
1067
+ | Watch mode | No | **Yes** — re-scan on file changes |
1068
+ | Multi-language linting | oxlint, ruff, golangci-lint, clippy, rubocop | **ruff, golangci-lint, clippy** |
1069
+ | AI agent providers | 16 flags | **16 providers** + repair loop + sessions |
1070
+ | Agent --pr auto PR | No | **Yes** |
1071
+ | Context-aware thresholds | No | **Yes** — Rust 2.5×, Go 1.5×, TSX 1.5× |
1072
+ | tsconfig alias support | No | **Yes** — path aliases respected |
1073
+ | `_`-prefixed unused vars | Not skipped | **Skipped** |
1074
+ | Self-update | No | **Yes** — `deep-slop update` |
1075
+ | Top findings section | No | **Yes** — most impactful issues highlighted |
1076
+ | Pattern docs | No | **Yes** — bad/good examples per rule |
1077
+
1078
+ ---
1079
+
1080
+ ## Performance
1081
+
1082
+ | Metric | Value |
1083
+ |--------|-------|
1084
+ | Self-scan time | ~2s (18 engines, 100+ files) |
1085
+ | Package size | 282KB tarball |
1086
+ | Memory usage | ~45MB peak |
1087
+ | Cold start | ~300ms (with tree-sitter) |
1088
+ | Test suite | 197 tests, all passing |
1089
+ | Type-check | 0 TS errors |
1090
+
1091
+ ---
1092
+
1093
+ ## Self-Scan
1094
+
1095
+ deep-slop runs on itself. The self-scan score is captured by `pnpm scan` and
1096
+ written to the project's history. We practice what we preach — our own codebase
1097
+ is scanned and scored by deep-slop, and we use it to continuously improve code
1098
+ quality.
1099
+
1100
+ ---
1101
+
1102
+ ## Development
1103
+
1104
+ ```bash
1105
+ # Install dependencies
1106
+ pnpm install
1107
+
1108
+ # Build
1109
+ pnpm build
1110
+
1111
+ # Type-check
1112
+ pnpm typecheck
1113
+
1114
+ # Run tests
1115
+ pnpm test
1116
+
1117
+ # Scan the project itself
1118
+ pnpm scan
1119
+
1120
+ # JSON output
1121
+ pnpm scan:json
1122
+ ```
1123
+
1124
+ ---
1125
+
1126
+ ## Contributing
1127
+
1128
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines, or:
1129
+
1130
+ 1. Fork the repository
1131
+ 2. Create a feature branch (`git checkout -b feature/my-feature`)
1132
+ 3. Make your changes and add tests
1133
+ 4. Run the test suite (`pnpm test`)
1134
+ 5. Ensure the project type-checks (`pnpm typecheck`)
1135
+ 6. Scan for slop (`pnpm scan`) — we hold ourselves to the same standard
1136
+ 7. Commit with a descriptive message
1137
+ 8. Open a pull request
1138
+
1139
+ **Adding a new rule:**
1140
+ 1. Add the rule to the appropriate engine in `src/engines/<engine>/index.ts`
1141
+ 2. Add rule impact classification in `src/scoring/rule-impact.ts`
1142
+ 3. Add display label in `src/output/rule-labels.ts`
1143
+ 4. If fixable, add to `FIXABLE_RULES` in `src/engines/catalog.ts`
1144
+ 5. Add tests in `src/engines/<engine>/index.test.ts`
1145
+
1146
+ **Adding a new engine:**
1147
+ 1. Create `src/engines/<name>/index.ts` implementing the `Engine` interface
1148
+ 2. Register in `src/engines/orchestrator.ts`
1149
+ 3. Add to `src/types/index.ts` `EngineName` type
1150
+ 4. Add preset entries in `src/config/presets.ts`
1151
+ 5. Add engine info in the MCP `deep_slop_engines` tool
1152
+
1153
+ ---
1154
+
1155
+ ## License
1156
+
1157
+ [MIT](LICENSE) &copy; Romanchello 2026
1158
+
1159
+ ---
1160
+
1161
+ <div align="center">
1162
+
1163
+ **[Report Bug](https://github.com/DemumuMind/deep-slopDM/issues)** &middot;
1164
+ **[Request Feature](https://github.com/DemumuMind/deep-slopDM/issues)** &middot;
1165
+ **[npm](https://www.npmjs.com/package/deep-slop)** &middot;
1166
+ **[GitHub Action](action.yml)** &middot;
1167
+ **[VS Code Extension](editors/vscode/)** &middot;
1168
+ **[Contributing](CONTRIBUTING.md)**
1169
+
1170
+ </div>