Commit 6f0219f
authored
* feat(pipeline): implement 3-phase slop detection pipeline architecture (#107)
Implement a pipeline-based detection system with certainty-tagged findings:
Phase 1 (always runs):
- Built-in regex patterns from slop-patterns.js
- Multi-pass analyzers (doc/code ratio, verbosity, over-engineering, buzzwords)
- HIGH certainty findings - can be auto-fixed directly
Phase 2 (optional - if tools available):
- jscpd for duplicate code detection
- madge for circular dependency detection
- escomplex for cyclomatic complexity analysis
- LOW certainty findings - need verification
Phase 3 (LLM handoff):
- Certainty-tagged findings for agent review
- Token-efficient prompt format
- Action guidance by certainty level
New files:
- lib/patterns/pipeline.js - Pipeline orchestrator
- lib/patterns/cli-enhancers.js - Optional CLI tool integration
- lib/config/index.js - Config stub
- __tests__/pipeline.test.js - Pipeline tests
- __tests__/cli-enhancers.test.js - CLI enhancers tests
Updates:
- deslop-work.md - Now uses pipeline orchestrator
- lib/index.js - Exports new modules
Features:
- Thoroughness levels: quick (regex), normal (+analyzers), deep (+CLI)
- Mode inheritance: report vs apply from deslop-around
- Graceful degradation when CLI tools not installed
- Missing tools notification at end of analysis
* feat(cli-enhancers): add language-aware tool detection with caching
- Detect project languages (JS/TS, Python, Go, Rust) from config files
- Recommend CLI tools appropriate for detected languages
- Add per-repo caching with 5-minute TTL for tool availability
- Support jscpd (cross-lang), madge/escomplex (JS), pylint/radon (Python),
golangci-lint (Go), clippy (Rust)
- Update tests with 61 new test cases for language detection
- Fix pipeline tests to use functions meeting minimum thresholds
Relates to #107
* fix(cli-enhancers): prevent command injection in path handling
- Escape user-provided paths with escapeDoubleQuotes() before shell execution
- Affects runDuplicateDetection, runDependencyAnalysis, runComplexityAnalysis
- Add 3 security tests for shell metacharacter handling
- Synced fix to all 5 plugin lib directories
Security: Prevents command injection via malicious paths containing
$, backticks, $(cmd), or quotes.
* docs: update deslop-around documentation for pipeline architecture
Added comprehensive documentation for the new 3-phase slop detection
pipeline introduced in #107:
- **Architecture section**: Explains Phase 1 (regex), Phase 2 (multi-pass),
Phase 3 (CLI tools) with certainty levels (HIGH/MEDIUM/LOW)
- **Thoroughness levels**: Documents quick/normal/deep modes
- **Language-aware tools**: Lists recommended tools per language
- JavaScript/TypeScript: jscpd, madge, escomplex
- Python: pylint, radon
- Go: golangci-lint
- Rust: clippy
- **Enhanced detection list**: Added buzzword inflation and code smells
Updated files:
- README.md: Main command reference
- docs/USAGE.md: Detailed usage guide
Refs #107
* fix(pipeline): honor language filter for non-JS language runs
When a non-JS language filter is set (e.g., python), the previous logic
incorrectly allowed JS files through. Now the special case for 'js'
detection only applies when the language filter IS javascript or
typescript.
Addresses review feedback from Codex.
* refactor(tests): remove unused variables in test files
Address Copilot review feedback:
- Remove unused 'name' in CLI_TOOLS iteration
- Use more descriptive variable names in cache refresh test
- Remove unused multiPassFindings and mediumFindings variables
1 parent 965a77e commit 6f0219f
30 files changed
Lines changed: 8572 additions & 146 deletions
File tree
- __tests__
- docs
- lib
- config
- patterns
- plugins
- deslop-around/lib
- config
- patterns
- next-task
- agents
- lib
- config
- patterns
- project-review/lib
- config
- patterns
- reality-check/lib
- config
- patterns
- ship/lib
- config
- patterns
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
11 | 23 | | |
12 | 24 | | |
13 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
163 | 177 | | |
164 | 178 | | |
165 | 179 | | |
| |||
170 | 184 | | |
171 | 185 | | |
172 | 186 | | |
| 187 | + | |
173 | 188 | | |
174 | 189 | | |
175 | 190 | | |
| |||
0 commit comments