feat(pipeline): implement 3-phase slop detection pipeline architecture (#107) - #116
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7106ea918a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR implements a 3-phase slop detection pipeline architecture to enhance AI-generated code detection. The implementation adds structured certainty tagging (HIGH/MEDIUM/LOW) and optional CLI tool integration with graceful degradation.
Changes:
- Introduces
pipeline.jsandcli-enhancers.jsmodules synced across 5 plugins + root lib - Adds 3-phase detection: regex patterns (Phase 1), multi-pass analyzers (Phase 2), CLI tools (Phase 3)
- Implements certainty-tagged findings with thoroughness levels (quick/normal/deep)
- Updates agent workflows, documentation, and exports
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/patterns/pipeline.js | Core pipeline orchestrator with 3-phase detection logic |
| lib/patterns/cli-enhancers.js | Optional CLI tool integration with caching and security |
| plugins/*/lib/patterns/pipeline.js | Synced pipeline across ship, reality-check, project-review, next-task, deslop-around |
| plugins/*/lib/patterns/cli-enhancers.js | Synced CLI enhancers across all 5 plugins |
| plugins/*/lib/index.js | Export updates for new pipeline and cliEnhancers modules |
| plugins/*/lib/config/index.js | Placeholder config modules |
| plugins/next-task/agents/deslop-work.md | Updated agent workflow to use pipeline |
| tests/pipeline.test.js | Comprehensive test suite (627 lines) |
| docs/USAGE.md | Documentation of pipeline architecture |
| README.md | Updated feature descriptions |
| CHANGELOG.md | Release notes for pipeline feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fixed the language filter issue in 0d977f1. The filter now correctly:
Thanks for catching this @chatgpt-codex-connector! |
|
Summary
Testing
|
Summary of ChangesHello @avifenesh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant architectural enhancement to the slop detection mechanism, moving from a monolithic approach to a modular, multi-phase pipeline. This change improves the accuracy and flexibility of identifying code quality issues by incorporating various analysis techniques, from simple regex to advanced CLI tools, and provides a structured output for AI agents to act upon. The new design also includes robust security measures and configurable analysis depth. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
#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
- 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
- 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.
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
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.
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
79a6568 to
105be67
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 30 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces a 3-phase slop detection pipeline architecture, enhancing the /deslop-around command with certainty-tagged findings and optional CLI tool integration. The changes include new pipeline.js and cli-enhancers.js modules, updated documentation in CHANGELOG.md, README.md, and docs/USAGE.md, and corresponding test files. The deslop-work.md agent has also been updated to leverage the new pipeline orchestrator. The new architecture provides a structured approach to identifying and addressing code quality issues, categorizing findings by certainty (HIGH, MEDIUM, LOW) to guide subsequent actions. Overall, the implementation is robust, with good test coverage for the new modules, including security validation for command injection prevention. The caching mechanism for CLI tool availability is a thoughtful addition for performance. The documentation updates clearly explain the new architecture and thoroughness levels.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
…116) - Added details about deslop-work agent rewrite (pseudo-JS to explicit tool usage) - Documented formatHandoffPrompt() for token-efficient LLM handoff - Added Changed section for agent refactor and deslop-around docs enhancements - Clarified certainty-based decision making architecture
Summary
Implements a 3-phase slop detection pipeline architecture as specified in #107:
Key Features
Files Created
lib/patterns/pipeline.js- 3-phase pipeline orchestratorlib/patterns/cli-enhancers.js- Language-aware CLI tool integration with caching__tests__/pipeline.test.js- Pipeline tests__tests__/cli-enhancers.test.js- CLI enhancer tests with security validationSecurity
Test Plan
Closes #107